Test Kitchen/Test Kitchen UI/Administration
Test Kitchen UI is an instrument and experiment management system. The application enables product teams to set up, manage, and configure various instruments for data collection and experimentation. This includes scheduling, designating metadata, setting sample rates, and targeting deployment environments.
Service details
Deployment
When to deploy
Deployments to staging environment ( https://test-kitchen-next.wikimedia.org ) can be done at will to test new features:
- Tasks in review will remain there after being merged and they will be moved to "Sign Off" to be deployed to staging, to be tested there
- Once those tasks have been tested on staging, they will be moved to "To Deploy"
- Once a task that is in "To Deploy" is deployed to production, it can be move to "Done"
Deployments to production environment ( https://test-kitchen.wikimedia.org ) will be done in a controlled way:
- There is a Test Kitchen UI deployment window , set every Tuesday at 14:00h UTC (7:00 PDT)
How to deploy
Note that:
-
test-kitchen-nextis the staging environment -
test-kitchenis the production environment
# Do the following once you have prepared the change and the change has been reviewed and merged
ssh deployment.eqiad.wmnet
cd /srv/deployment-charts
git log -n 1
# Check that the change has been pulled
cd helmfile.d/dse-k8s-services/<environment>
# Check changes and deploy
helmfile -e dse-k8s-eqiad diff
helmfile -e dse-k8s-eqiad -i apply
Troubleshooting
See Test Kitchen/Troubleshooting for some important tips or Kubernetes/Troubleshooting for a comprehensive guide about troubleshooting Kubernetes
Additionally, note that:
-
test-kitchen-nextis the staging environment -
test-kitchenis the production environment -
test-kitchen-stagingis the container name for staging environment (test-kitchen-next) -
test-kitchen-productionis the container name for production environment (test-kitchen)
Check pods
$ ssh deployment.eqiad.wmnet
$ kube_env <environment> dse-k8s-eqiad
$ kubectl get pods -w
NAME READY STATUS RESTARTS AGE
test-kitchen-staging-57d4bbb6bf-z2p5k 1/2 Error 0 10s
test-kitchen-staging-57d4bbb6bf-z2p5k 1/2 Error 1 (1s ago) 10s
test-kitchen-staging-57d4bbb6bf-z2p5k 1/2 CrashLoopBackOff 1 (1s ago) 11s
See logs
$ ssh deployment.eqiad.wmnet
$ kube_env <environment> dse-k8s-eqiad
$ kubectl get pods -w
$ kubectl logs -f <pod_name> -c <container_name> --tail=10
{"level":50,"time":1714483575453,"pid":1,"hostname":"test-kitchen-staging-66554859c4-p9m28","msg":"Error while setting an env variable. There is no value for SAL_PASSWORD"}
{"level":30,"time":1714483575592,"pid":1,"hostname":"test-kitchen-staging-66554859c4-p9m28","msg":"Connected to the database at an-mariadb1001.eqiad.wmnet:test_kitchen_staging"}
{"level":30,"time":1714483575600,"pid":1,"hostname":"test-kitchen-staging-66554859c4-p9m28","msg":"test-kitchen has started listening on port 8080"}
Troubleshoot the deployment
Let's assume we want to troubleshoot the deployment of a new release in staging environment:
$ ssh deployment.eqiad.wmnet
$ kube-env test-kitchen-next-deploy dse-k8s-eqiad
$ kubectl get events