mimir-openshift-experimental

by Grafana

Helm chartv2.1.0App 2.0.0

Grafana Mimir on OpenShift Experiment

About this chart

Grafana Mimir Helm Chart for OpenShift (Experimental)

Do not use in production.

Helm chart for deploying Grafana Mimir or optionally Grafana Enterprise Metrics to Kubernetes. Derived from Grafana Enterprise Metrics Helm Chart

mimir-openshift-experimental

Grafana Mimir on OpenShift Experiment

Requirements

Kubernetes: ^1.10.0-0

RepositoryNameVersion
https://charts.bitnami.com/bitnamimemcached(memcached)6.0.16
https://charts.bitnami.com/bitnamimemcached-queries(memcached)6.0.16
https://charts.bitnami.com/bitnamimemcached-metadata(memcached)6.0.16
https://helm.min.io/minio(minio)8.0.10

Dependencies

Storage

Grafana Mimir and Grafana Enterprise Metrics require an object storage backend to store metrics and indexes.

The default chart values will deploy Minio for initial set up. Production deployments should use a separately deployed object store. See Grafana Mimir documentation for details on storage types and documentation.

Grafana Enterprise Metrics license

In order to use the enterprise features of this chart, you need to provide the contents of a Grafana Enterprise Metrics license file as the value for the license.contents variable. To obtain a Grafana Enterprise Metrics license, refer to Get a license.

Helm3

The chart requires at least Helm version 3 to work.

Installation

This section describes various use cases for installation, upgrade and migration from different systems and versions.

Preparation

These are the common tasks to perform before any of the use cases.

# Add the repository
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

Installation of Grafana Mimir

helm install <cluster name> grafana/mimir-distributed

As part of this chart many different pods and services are installed which all have varying resource requirements. Please make sure that you have sufficient resources (CPU/memory) available in your cluster before installing Grafana Mimir Helm Chart.

Migration from Cortex to Grafana Mimir

Please consult the Migration from Cortex to Grafana guide on how to update the configuration. Prepare a custom values file with the contents:

nameOverride: cortex

mimir:
  config: |
    <text of configuration>

Perform the upgrade:

helm upgrade <cluster name> grafana/mimir-distributed -f <custom values file>

Installation of Grafana Enterprise Metrics

To install the chart with licensed features enabled, using a local Grafana Enterprise Metrics license file called license.jwt, provide the license as a value and set the enterprise.enabled value to true.

helm install <cluster name> grafana/mimir-distributed --set 'enterprise.enabled=true' --set-file 'license.contents=./license.jwt'

Upgrade from a previous version of Grafana Enterprise Metrics

Please consult the migration guide for details on how to prepare the configuration. Prepare a custom values file, with the contents:

enterprise:
  enabled: true
  legacyLabels: true

mimir:
  config: |
    <text of configuration>

The value (enterprise.legacyLabels) is needed because this chart installs objects with kubernetes de-facto standard labels by default which are different from older Grafana Enterprise Metrics labels.

helm upgrade <cluster name> grafana/mimir-distributed -f <custom values file> --set-file 'license.contents=./license.jwt'

Upgrade from Grafana Mimir to Grafana Enterprise Metrics

Use the name override to align labels and selectors and enable licensed features.

nameOverride: mimir-distributed

enterprise:
  enabled: true

Scale values

The default Helm chart values in the values.yaml file are configured to allow you to quickly test out Grafana Mimir. Alternative values files are included to provide a more realistic configuration that should facilitate a certain level of ingest load.

Small

The small.yaml values file configures the Grafana Mimir cluster to handle production ingestion of ~1M active series using the blocks storage engine. Query requirements can vary dramatically depending on query rate and query ranges. The values here satisfy a "usual" query load as seen from our production clusters at this scale. It is important to ensure that you run no more than one ingester replica per node so that a single node failure does not cause data loss. Zone aware replication can be configured to ensure data replication spans availability zones. Refer to Zone Aware Replication for more information. Minio is no longer enabled and you are encouraged to use your cloud providers object storage service for production deployments.

To deploy a cluster using small.yaml values file:

helm install <cluster name> grafana/mimir-distributed -f small.yaml

Large

The large.yaml values file configures the Grafana Mimir cluster to handle production ingestion of ~10M active series using the blocks storage engine. Query requirements can vary dramatically depending on query rate and query ranges. The values here satisfy a "usual" query load as seen from our production clusters at this scale. It is important to ensure that you run no more than one ingester replica per node so that a single node failure does not cause data loss. Zone aware replication can be configured to ensure data replication spans availability zones. Refer to Zone Aware Replication for more information. Minio is no longer enabled and you are encouraged to use your cloud providers object storage service for production deployments.

To deploy a cluster using the large.yaml values file:

helm install <cluster name> grafana/mimir-distributed -f large.yaml

Development

To configure a local default storage class for k3d:

kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

To install the chart with the values used in CI tests:

helm install test ./ --values ./ci/test-values.yaml

Contributing/Releasing

All changes require a bump to the chart version, as this enforced by CI. All changes to the chart itself should also have a corresponding CHANGELOG entry.

When making a change and organizing a release, first ensure your changes are encapuslated in a meaningful commit. In a separate commit, increase the chart version in the Chart.yaml file and add a CHANGELOG entry in the CHANGELOG.md file under the new version.

Finally, push your changes and open up a Pull Request with the prefix [mimir-distributed].

Deploy mimir-openshift-experimental with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mimir-openshift-experimental 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 chartmimir-openshift-experimental is pinned at v2.1.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