Jump to content

User:BKing (WMF)/Notes/Test Kubernetes Deploy

From Wikitech

Bking's notes on how to test deployment-charts changes before merging

1) Push your changes to Gerrit (no need to merge)

2) Login to the active deploy server, and clone the deployment-charts repo into your home directory using the "Anonymous HTTP" links in the Gerrit Web UI.

3)Open the CR you want to test in the Gerrit WebUI (example ), then click the ⋮ on the right-hand side and select "Download Patch." Select "Anonymous HTTP" again, then copy the "Reset to" section into your clipboard.

4)On the deployment server, navigate to the repo and paste the command you copied in the previous step.

5)Navigate to your application's helmfile directory (such as ~/deployment-charts/helmfile.d/services/${YOUR_SERVICE_NAME}) and modify your application's helmfile.yaml to point to your homedir's charts folder and values.yaml . The path is relative to your helmfile, so the helmfile should be modified to look something like this:

templates:
 default: &default
   chart: ../../../charts/blunderbuss
   missingFileHandler: Warn
   values:
     - "/etc/helmfile-defaults/general-Template:.Environment.Name.yaml" # general default values, controlled by SRE
     - "../../../charts/blunderbuss/values.yaml" # non-env-specific values, in this repository
     - "/etc/helmfile-defaults/private/dse-k8s_services/blunderbuss/Template:.Environment.Name.yaml" # prod-specific secrets, controlled by SRE
     - "values-Template:.Environment.Name.yaml" # env-specific overrides
     - "values-{{`Template:.Release.Name`}}.yaml" # release-specific overrides
     - environmentName: "Template:.Environment.Name"