routehub-client-hub

by Routehub

Helm chartv1.0.0App 0.0.1

A Helm chart for RouteHub Client deployment

About this chart

RouteHub Client Helm Chart

This Helm chart deploys the RouteHub Client application on a Kubernetes cluster.

Components

The RouteHub Client application consists of the following components:

  • REST API Server
  • MQTT Server
  • Redis
  • TimescaleDB

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.0+

Installing the Chart

To install the chart with the release name my-release:

helm install my-release ./charts/routehub-client

Configuration

The following table lists the configurable parameters of the RouteHub Client chart and their default values.

ParameterDescriptionDefault
global.customRegistryCustom Docker registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.redis.PORTRedis port"6379"
global.redis.PASSWORDRedis password""
global.redis.DBRedis database number"0"
routehubClientRest.replicaCountNumber of REST API replicas1
routehubClientRest.image.repositoryREST API image repository"your-repo/client-rest"
routehubClientRest.image.tagREST API image tag"latest"
routehubClientRest.service.typeREST API service type"ClusterIP"
routehubClientRest.service.portREST API service port80
routehubClientMqtt.replicaCountNumber of MQTT server replicas1
routehubClientMqtt.image.repositoryMQTT server image repository"your-repo/client-mqtt"
routehubClientMqtt.image.tagMQTT server image tag"latest"
routehubClientMqtt.service.typeMQTT server service type"ClusterIP"
routehubClientMqtt.service.portMQTT server service port1883
redis.replicaCountNumber of Redis replicas1
redis.image.repositoryRedis image repository"redis"
redis.image.tagRedis image tag"6.0.9"
redis.service.typeRedis service type"ClusterIP"
redis.service.portRedis service port6379
timescale.replicaCountNumber of TimescaleDB replicas1
timescale.image.repositoryTimescaleDB image repository"timescale/timescaledb"
timescale.image.tagTimescaleDB image tag"latest-pg12"
timescale.service.typeTimescaleDB service type"ClusterIP"
timescale.service.portTimescaleDB service port5432

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example:

helm install my-release ./charts/routehub-client --set routehubClientRest.replicaCount=2

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:

helm install my-release ./charts/routehub-client -f values.yaml

Updating the Chart

To update the release of the RouteHub Client chart:

helm upgrade my-release ./charts/routehub-client

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

This command removes all the Kubernetes components associated with the chart and deletes the release.

How to deploy the hub?

Create a namespace

kubectl create namespace routehub-clients
helm repo add routehub-helm https://routehub-link.github.io/RouteHub.HELM/

Create a secret for the registry

kubectl create secret docker-registry your-secret-name \
  --namespace routehub-clients \
  --docker-server=your.registry \
  --docker-username=your-username \
  --docker-password=your-password

Deploy the hub

helm install my-hub routehub-helm/routehub-client-hub \
  --namespace routehub-clients \
  --create-namespace \
  --set global.customRegistry=your.registry/ \
  --set global.imagePullSecrets[0].name=your-secret-name \
  --set routehubClientRest.environment.Name="Test Hub" \
  --set routehubClientRest.environment.ORGANIZATION_ID=test-org \
  --set routehubClientRest.environment.OWNER_ID=test-owner \
  --set routehubClientRest.environment.PLATFORM_ID=12058bdf-8940-43b3-bd90-13487e4c8fc4 \
  --set routehubClientRest.environment.SEED=TRUE 

For Debug you could add the following flags

--dry-run --debug

Deploy routehub-client-hub with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has routehub-client-hub on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartroutehub-client-hub is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply