tsorage

by Helm

Helm chartv0.4.11App 1.0.0Apache-2.0

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)

ParameterDescriptionDefault
gateway.enabledEnable the modulefalse
gateway.replicaCountNumber of gateway instance(s) needed1
Image
gateway.image.collectorGateway collector image repositoryceticasbl/tsorage-collector:0.2.0
gateway.image.transmitterGateway transmitter image repositoryceticasbl/tsorage-transmitter:0.2.0
gateway sources
gateway.sourcesList of the sources of the gateway[{type:"flow/http/json","host":"0.0.0.0","port":8081}]
Service
gateway.service.typeKubernetes service type for the gateway moduleNodePort
gateway.service.portKubernetes service port for the gateway module8081
gateway.service.annotationsCustom annotations for service{}
Ingress
gateway.ingress.enabledEnables Ingressfalse
gateway.ingress.annotationsIngress annotations{}
gateway.ingress.labelsCustom labels{}
gateway.ingress.hostsIngress accepted hostnames[]
gateway.ingress.tlsIngress TLS configuration[]
Resources
gateway.resourcesCPU/Memory resource requests/limits{}
Tolerations
gateway.tolerationsAdd tolerations[]
NodeSelector
gateway.nodeSelectorNode labels for pod assignment{}
Affinity
gateway.affinityNode/pod affinities{}

Ingestion module

ParameterDescriptionDefault
ingestion.enabledEnable the moduletrue
ingestion.replicaCountNumber of Ingestion instance(s) needed1
Image
ingestion.image.repositoryIngestion module image repositoryceticasbl/tsorage-ingestion
ingestion.image.tagIngestion module image tag0.1.7
ingestion.image.pullPolicyIngestion module pull policyIfNotPresent
Ingestion sources
HTTP source
ingestion.sources.http.enabledEnable the HTTP sourcefalse
ingestion.sources.http.portsEnable the module[8081]
MQTT source
ingestion.sources.mqtt.enabledEnable the MQTT sourcefalse
ingestion.sources.mqtt.hostAddress of the MQTT broker0.0.0.0
ingestion.sources.mqtt.portPort of the MQTT broker1883
ingestion.sources.mqtt.security.typeSecurity policy the access to the MQTT brokeranonymous
Random source
ingestion.sources.random.enabledEnable a Random sourcefalse
Service
ingestion.service.typeKubernetes service type for the Ingestion moduleNodePort
ingestion.service.annotationsCustom annotations for service{}
Ingress
ingestion.ingress.enabledEnables Ingressfalse
ingestion.ingress.annotationsIngress annotations{}
ingestion.ingress.labelsCustom labels{}
ingestion.ingress.hostsIngress accepted hostnames[]
ingestion.ingress.tlsIngress TLS configuration[]
Resources
ingestion.resourcesCPU/Memory resource requests/limits{}
Tolerations
ingestion.tolerationsAdd tolerations[]
NodeSelector
ingestion.nodeSelectorNode labels for pod assignment{}
Affinity
ingestion.affinityNode/pod affinities{}
Mosquitto
Image
ingestion.mosquitto.image.repositoryMosquitto image repositoryeclipse-mosquitto
ingestion.mosquitto.image.tagMosquitto image tag1.6.10
ingestion.mosquitto.image.pullPolicyMosquitto pull policyIfNotPresent
Service
ingestion.mosquitto.service.typeKubernetes service type for MosquittoNodePort
ingestion.mosquitto.service.annotationsCustom annotations for service{}
Resources
ingestion.mosquitto.resourcesCPU/Memory resource requests/limits{}
Configuration
ingestion.mosquitto.configConfiguration file for MosquittoSee values.yaml

Processor module

ParameterDescriptionDefault
processor.enabledEnable the moduletrue
processor.replicaCountNumber of Processor instance(s) needed1
Image
processor.image.repositoryProcessor module image repositoryceticasbl/tsorage-processor
processor.image.tagProcessor module image tag0.2.0
processor.image.pullPolicyProcessor module pull policyIfNotPresent
processor configuration
processor.config.aggregators Enable the HTTP source["1m","1h","1d"]
processor.config.parallelismEnable the module8
processor.config.sharderEnable the module"month"
processor.config.grouper.sizeEnable the module1000
processor.config.grouper.durationEnable the module10
processor.config.grouper.duration_unitEnable the module"minutes"
Resources
processor.resourcesCPU/Memory resource requests/limits{}
Tolerations
processor.tolerationsAdd tolerations[]
NodeSelector
processor.nodeSelectorNode labels for pod assignment{}
Affinity
processor.affinityNode/pod affinities{}

Hub module

ParameterDescriptionDefault
hub.enabledEnable the moduletrue
hub.replicaCountNumber of Hub instance(s) needed1
Image
hub.image.repositoryHub module image repositoryceticasbl/tsorage-hub
hub.image.tagHub module image tag0.2.0
hub.image.pullPolicyHub module pull policyIfNotPresent
Service
hub.service.typeKubernetes service type for the Hub moduleNodePort
hub.service.portKubernetes service port for the Hub module8081
hub.service.annotationsCustom annotations for service{}
Ingress
hub.ingress.enabledEnables Ingressfalse
hub.ingress.annotationsIngress annotations{}
hub.ingress.labelsCustom labels{}
hub.ingress.hostsIngress accepted hostnames[]
hub.ingress.tlsIngress TLS configuration[]
Resources
hub.resourcesCPU/Memory resource requests/limits{}
Tolerations
hub.tolerationsAdd tolerations[]
NodeSelector
hub.nodeSelectorNode labels for pod assignment{}
Affinity
hub.affinityNode/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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charttsorage is pinned at v0.4.11 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