How to install Chantico
Installation of Chantico from OCI Registry
The easiest option to install Chantico into your k8s cluster is by using the helm package from the OCI Registry.
-
The command above installs the latest version of Chantico. See available chart versions. Also check out the releases or the changelog on the documentation website for the list of changes throughout the version history.
-
Inspect the values.yaml file to see what parameters can be provided. For example, excluding the Chantico controller from the installation can be done with
--set controller.include=false.
Upgrading using OCI Registry
To upgrade an existing chantico deployment to a new version, run helm upgrade with the new version provided.
Prometheus Operator dependency
Chantico configures Prometheus through Prometheus Operator. The Chantico chart depends on the kube-prometheus-stack chart, which installs the operator, its CRDs and Grafana. Only these components are enabled; Alertmanager, node exporter, kube-state-metrics and the default rules are disabled. Chantico then creates a Prometheus resource that the operator turns into a running Prometheus instance.
Grafana is configured under the kube-prometheus-stack.grafana key in the chart values, for example:
See Prometheus Operator integration for details.
Using an alternative storage class
The Chantico chart creates two persistent volumes:
pvc: claim with data shared by the controller, SNMP generator jobs, filebrowser and Prometheus.victoriaMetrics.pvc: settings of the claim template of the VictoriaMetrics StatefulSet.
By default, both claims use the default storage class of the cluster. Override storageClassName when installing or upgrading Chantico. Each block also accepts storage, accessModes and volumeName.
The shared claim name is configured with persistentVolumeClaimName. To use an existing claim, set its name and disable creation with pvc.include=false. Disabling creation does not disable the volume mount.
VictoriaMetrics storage
VictoriaMetrics runs as a StatefulSet that creates its own claim, chantico-volume-mount-chantico-victoriametrics-0, from a claim template. Set a different storage class or size with victoriaMetrics.pvc.
To bind the claim to a specific existing volume, set victoriaMetrics.pvc.volumeName. The claim is not removed when the StatefulSet or release is deleted, so VictoriaMetrics data is kept. VictoriaMetrics stores its data in the victoria-metrics/ directory of its claim.
You can list the storage classes available on your cluster with kubectl.
Multi-node clusters
With the default ReadWriteOnce access mode, the shared volume can only be attached to one node. The chart and the controller therefore schedule all pods that use it, including SNMP generator jobs and Prometheus, on the same node. Required pod affinity selects pods using the same claim in the same namespace and uses kubernetes.io/hostname as the topology key.
VictoriaMetrics has its own claim and no affinity to the shared volume, so it can run on a different node.
Use a CSI storage class for multi-node deployments. The chart’s optional hostPath PV remains intended for single-node development.
Watching resources in different namespaces
By default, the Chantico controller manages resources in the namespace it is deployed in.
If you want it to watch resources in a different namespace, you can override the controller.watchNamespace value when installing or upgrading Chantico. You can set this value to a single namespace or to an asterisk to give access to the managed resources in all namespaces.
Getting started with the deployed Chantico
After Chantico is successfully deployed on your cluster, you can start making use of it for measuring your datacenter hardware of interest. Currently this can only be done with manual configuration, until a more automated approach has been implemented. Chantico inherently configures SNMP walks for endpoints by means of MIB and .yaml files. The steps of configuring this typically follows the following how-to guides:
- How to register an SNMP device type - Upload the MIB files to use and make
.yamlfiles for measurement devices. Also see the example atconfig/samples/chantico_v1alpha1_measurementdevice_mock.yaml. - How to register a physical SNMP device - Define IP address(es) of interest in physical measurement
.yamlfile. Example atconfig/samples/chantico_v1alpha1_physicalmeasurement.yaml. - With the MIB files, measurement devices and physical measurements in place, the targets should be accessible and scrapeable in Prometheus. Perform port forwarding on the Prometheus deployment to validate the result of this setup. If done successful one should see a timeseries of the requested value(s).
- How to register data center resources When desired, encapsulate data center structure using data center resources.
Uninstall Chantico on K8s cluster
- Remove Chantico together with dependencies like CRDs:
- Optionally, delete the namespace: