You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

User:BryanDavis/Helm

From Wikitech-static
Jump to navigation Jump to search

Some notes on using Helm things for managing a Foundation production deployed service.

Run tests for a particular chart locally

$ CHART=toolhub
$ rake run_locally[lint[$CHART]]
$ rake run_locally[validate_template[$CHART]]
$ rake run_locally[helm_diffs[$CHART]]

Chart test fixtures

All feature flags in your chart's values.yaml that are not enabled by default should have a corresponding charts/$CHART/.fixtures/${FEATURE_FLAG}_enabled.yaml fixture configuration file added to the repo. Each of the .fixtures YAML files present in your chart's directory will be used by the validate_template test to check the output of your chart with the fixture YAML added as additional configuration to the helm template ... command.

Your charts/$CHART/.fixtures files need to include settings that you would expect to be system provided in an actual deployment. This includes anything that would be read from the /etc/helmfile-defaults Puppet managed file tree on a deployment server like services_proxy settings.

Helmfile.d test fixtures

A helmfile.d/services/$SERVICE/.fixtures.yaml file can be used to provide settings for your service that you would expect to be system provided in an actual deployment. This includes anything that would be read from the /etc/helmfile-defaults Puppet managed file tree on a deployment server like services_proxy settings.

Deploying

$ ssh deploy1002.eqiad.wmnet
$ cd /srv/deployment-charts/helmfile.d/services/toolhub
$ helmfile -e staging diff
... diff output ...
$ helmfile -e staging -i apply
... diff output ...
Affected releases are:
  main (wmf-stable/toolhub) UPDATED

Do you really want to apply?
  Helmfile will apply all your changes, as shown above.

 [y/n]: y