tsorage
by Helm
A platform for collecting, storing, and processing time series at scale.
About this chart
Helm Chart for TSorage
Introduction
This Helm chart installs TSorage in a Kubernetes cluster.
Prerequisites
- Kubernetes cluster 1.16+
- Helm 3.0.0+
- PV provisioner support in the underlying infrastructure
Chart details
This chart will do the following:
- Deploy the modules of TSorage:
- Gateway (optional)
- Ingestion
- Processor
- Hub
- Deploy a Cassandra database using incubator/cassandra chart
- Deploy a Kafka server using incubator/kafka chart
- Deploy a Mosquitto broker within Ingestion pods (if MQTT source is enabled)
- Expose some TSorage modules:
- Gateway via a NodePort service (optional)
- Hub via a NodePort services (optional)
- Ingestion via a NodePort service (optional)
The chart also manages the order of the deployment so that the dependencies between the modules are respected.
Installing the chart
Before installing the TSorage chart, add Helm repository of CETIC:
$ helm repo add cetic https://cetic.github.io/helm-charts
$ helm repo update
To install the chart with a release name my-release in the default namespace:
$ helm install my-release cetic/tsorage
Uninstalling the chart
To uninstall/delete the my-release deployment in the default namespace:
$ helm uninstall my-release
The command removes all the Kubernetes components associated with the chart and deletes the release completely.
Upgrading the chart
To upgrade a TSorage release my-release:
$ helm repo update
$ helm upgrade my-release cetic/tsorage
Configuration
The following tables lists the configurable parameters of the TSorage chart and their default values.
gateway module (optional)
| Parameter | Description | Default |
|---|---|---|
gateway.enabled | Enable the module | false |
gateway.replicaCount | Number of gateway instance(s) needed | 1 |
| Image | ||
gateway.image.collector | Gateway collector image repository | ceticasbl/tsorage-collector:0.2.0 |
gateway.image.transmitter | Gateway transmitter image repository | ceticasbl/tsorage-transmitter:0.2.0 |
| gateway sources | ||
gateway.sources | List of the sources of the gateway | [{type:"flow/http/json","host":"0.0.0.0","port":8081}] |
| Service | ||
gateway.service.type | Kubernetes service type for the gateway module | NodePort |
gateway.service.port | Kubernetes service port for the gateway module | 8081 |
gateway.service.annotations | Custom annotations for service | {} |
| Ingress | ||
gateway.ingress.enabled | Enables Ingress | false |
gateway.ingress.annotations | Ingress annotations | {} |
gateway.ingress.labels | Custom labels | {} |
gateway.ingress.hosts | Ingress accepted hostnames | [] |
gateway.ingress.tls | Ingress TLS configuration | [] |
| Resources | ||
gateway.resources | CPU/Memory resource requests/limits | {} |
| Tolerations | ||
gateway.tolerations | Add tolerations | [] |
| NodeSelector | ||
gateway.nodeSelector | Node labels for pod assignment | {} |
| Affinity | ||
gateway.affinity | Node/pod affinities | {} |
Ingestion module
| Parameter | Description | Default |
|---|---|---|
ingestion.enabled | Enable the module | true |
ingestion.replicaCount | Number of Ingestion instance(s) needed | 1 |
| Image | ||
ingestion.image.repository | Ingestion module image repository | ceticasbl/tsorage-ingestion |
ingestion.image.tag | Ingestion module image tag | 0.1.7 |
ingestion.image.pullPolicy | Ingestion module pull policy | IfNotPresent |
| Ingestion sources | ||
| HTTP source | ||
ingestion.sources.http.enabled | Enable the HTTP source | false |
ingestion.sources.http.ports | Enable the module | [8081] |
| MQTT source | ||
ingestion.sources.mqtt.enabled | Enable the MQTT source | false |
ingestion.sources.mqtt.host | Address of the MQTT broker | 0.0.0.0 |
ingestion.sources.mqtt.port | Port of the MQTT broker | 1883 |
ingestion.sources.mqtt.security.type | Security policy the access to the MQTT broker | anonymous |
| Random source | ||
ingestion.sources.random.enabled | Enable a Random source | false |
| Service | ||
ingestion.service.type | Kubernetes service type for the Ingestion module | NodePort |
ingestion.service.annotations | Custom annotations for service | {} |
| Ingress | ||
ingestion.ingress.enabled | Enables Ingress | false |
ingestion.ingress.annotations | Ingress annotations | {} |
ingestion.ingress.labels | Custom labels | {} |
ingestion.ingress.hosts | Ingress accepted hostnames | [] |
ingestion.ingress.tls | Ingress TLS configuration | [] |
| Resources | ||
ingestion.resources | CPU/Memory resource requests/limits | {} |
| Tolerations | ||
ingestion.tolerations | Add tolerations | [] |
| NodeSelector | ||
ingestion.nodeSelector | Node labels for pod assignment | {} |
| Affinity | ||
ingestion.affinity | Node/pod affinities | {} |
| Mosquitto | ||
| Image | ||
ingestion.mosquitto.image.repository | Mosquitto image repository | eclipse-mosquitto |
ingestion.mosquitto.image.tag | Mosquitto image tag | 1.6.10 |
ingestion.mosquitto.image.pullPolicy | Mosquitto pull policy | IfNotPresent |
| Service | ||
ingestion.mosquitto.service.type | Kubernetes service type for Mosquitto | NodePort |
ingestion.mosquitto.service.annotations | Custom annotations for service | {} |
| Resources | ||
ingestion.mosquitto.resources | CPU/Memory resource requests/limits | {} |
| Configuration | ||
ingestion.mosquitto.config | Configuration file for Mosquitto | See values.yaml |
Processor module
| Parameter | Description | Default |
|---|---|---|
processor.enabled | Enable the module | true |
processor.replicaCount | Number of Processor instance(s) needed | 1 |
| Image | ||
processor.image.repository | Processor module image repository | ceticasbl/tsorage-processor |
processor.image.tag | Processor module image tag | 0.2.0 |
processor.image.pullPolicy | Processor module pull policy | IfNotPresent |
| processor configuration | ||
processor.config.aggregators | Enable the HTTP source | ["1m","1h","1d"] |
processor.config.parallelism | Enable the module | 8 |
processor.config.sharder | Enable the module | "month" |
processor.config.grouper.size | Enable the module | 1000 |
processor.config.grouper.duration | Enable the module | 10 |
processor.config.grouper.duration_unit | Enable the module | "minutes" |
| Resources | ||
processor.resources | CPU/Memory resource requests/limits | {} |
| Tolerations | ||
processor.tolerations | Add tolerations | [] |
| NodeSelector | ||
processor.nodeSelector | Node labels for pod assignment | {} |
| Affinity | ||
processor.affinity | Node/pod affinities | {} |
Hub module
| Parameter | Description | Default |
|---|---|---|
hub.enabled | Enable the module | true |
hub.replicaCount | Number of Hub instance(s) needed | 1 |
| Image | ||
hub.image.repository | Hub module image repository | ceticasbl/tsorage-hub |
hub.image.tag | Hub module image tag | 0.2.0 |
hub.image.pullPolicy | Hub module pull policy | IfNotPresent |
| Service | ||
hub.service.type | Kubernetes service type for the Hub module | NodePort |
hub.service.port | Kubernetes service port for the Hub module | 8081 |
hub.service.annotations | Custom annotations for service | {} |
| Ingress | ||
hub.ingress.enabled | Enables Ingress | false |
hub.ingress.annotations | Ingress annotations | {} |
hub.ingress.labels | Custom labels | {} |
hub.ingress.hosts | Ingress accepted hostnames | [] |
hub.ingress.tls | Ingress TLS configuration | [] |
| Resources | ||
hub.resources | CPU/Memory resource requests/limits | {} |
| Tolerations | ||
hub.tolerations | Add tolerations | [] |
| NodeSelector | ||
hub.nodeSelector | Node labels for pod assignment | {} |
| Affinity | ||
hub.affinity | Node/pod affinities | {} |
Specify parameters using --set key=value[,key=value] argument to helm install. For example:
$ helm install my-release cetic/tsorage \
--set processor.replicaCount=3 \
--set grafana.enabled=false
The above command sets the number of Processor module nodes to 3 and disables Grafana.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:
$ helm install my-release cetic/tsorage -f values.yaml
Scale TSorage
To scale a TSorage release my-release, increase the number of nodes of TSorage's components:
$ helm upgrade my-release cetic/tsorage \
--set hub.replicaCount=<num_nodes> \
--set ingestion.replicaCount=<num_nodes> \
--set processor.replicaCount=<num_nodes> \
--set cassandra.config.cluster_size=<num_nodes> \
--set kafka.replicas=<num_nodes> \
--set kafka.zookeeper.replicaCount=<num_nodes>
Deploy tsorage with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has tsorage 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 charttsorage is pinned at v0.4.11 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