routehub-client-hub
by Routehub
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.
| Parameter | Description | Default |
|---|---|---|
global.customRegistry | Custom Docker registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.redis.PORT | Redis port | "6379" |
global.redis.PASSWORD | Redis password | "" |
global.redis.DB | Redis database number | "0" |
routehubClientRest.replicaCount | Number of REST API replicas | 1 |
routehubClientRest.image.repository | REST API image repository | "your-repo/client-rest" |
routehubClientRest.image.tag | REST API image tag | "latest" |
routehubClientRest.service.type | REST API service type | "ClusterIP" |
routehubClientRest.service.port | REST API service port | 80 |
routehubClientMqtt.replicaCount | Number of MQTT server replicas | 1 |
routehubClientMqtt.image.repository | MQTT server image repository | "your-repo/client-mqtt" |
routehubClientMqtt.image.tag | MQTT server image tag | "latest" |
routehubClientMqtt.service.type | MQTT server service type | "ClusterIP" |
routehubClientMqtt.service.port | MQTT server service port | 1883 |
redis.replicaCount | Number of Redis replicas | 1 |
redis.image.repository | Redis image repository | "redis" |
redis.image.tag | Redis image tag | "6.0.9" |
redis.service.type | Redis service type | "ClusterIP" |
redis.service.port | Redis service port | 6379 |
timescale.replicaCount | Number of TimescaleDB replicas | 1 |
timescale.image.repository | TimescaleDB image repository | "timescale/timescaledb" |
timescale.image.tag | TimescaleDB image tag | "latest-pg12" |
timescale.service.type | TimescaleDB service type | "ClusterIP" |
timescale.service.port | TimescaleDB service port | 5432 |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartroutehub-client-hub is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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