Wikifeeds/Deployment Process
The Wikifeeds service is deployed to the Kubernetes cluster. Here are the concrete steps for it based on the Pipeline admin guide. Refer to it also for emergencies, e.g. when you need to roll back a deploy.
Update deployment-charts repo
edit- Clone or update deployment-charts repo.
- Find the new Docker image version tag.
- See the latest Gerrit patch in the wikifeeds repo. The last comment from PiplineBot has a tag, like
TAGS: 2020-05-07-160910-production, 7ad7bcaf084ef2b6a0792fd75d0f1f4f84b5467b
- Copy the more readable tag, e.g.
2020-05-07-160910-production
and use that for the next step. - FYI, the Docker image should also show up in https://tools.wmflabs.org/dockerregistry/wikimedia/mediawiki-services-wikifeeds/tags/.
- See the latest Gerrit patch in the wikifeeds repo. The last comment from PiplineBot has a tag, like
- Update the
values.yaml
files in all three foldersdeployment-charts/helmfile.d/services/${CLUSTER}/wikifeeds
whereCLUSTER
is one of (staging,eqiad,codfw).main_app: version: 2020-04-16-201210-production
- Change the version to the latest version, e.g.
2020-05-07-160910-production
.
- Change the version to the latest version, e.g.
- Commit the change. The convention is to prefix the commit with the service name,
wikifeeds:
in this case. - Push to Gerrit.
- Make a CR and after a successful review merge it.
Deploy to Beta Cluster
editProbably can skip that step for now since it's not in k8s yet. Therefore the .hfenv
files don't exist on the Beta Cluster deployment machine yet.
Here are some notes:
- Log into horizon to find the host deployment-wikifeeds01, also edit the version string there.
- If you want to run this right away (and not want to wait until puppet runs):
sudo puppet agent -tv
Deploy to production
edit- Scan through recent chat in
#wikimedia-operations
channel on IRC to make sure there's nothing blocking the deploy. - After merge, log in in a deployment server, there is a cron (1 minute) that will update the /srv/deployment-charts directory with the contents from git.
ssh deployment cd /srv/deployment-charts/helmfile.d/services/ CLUSTER= #one of staging,eqiad,codfw cd $CLUSTER/wikifeeds source .hfenv; helmfile diff #show the changes that will be applied on the cluster source .hfenv; helmfile apply #materialize the previous diff in the cluster and also will log into SAL the change cd ../.. # rinse and repeat for other clusters
- All done!
In case there are multiple releases of your service in the same helmfile, you can use the --selector name=RELEASE_NAME
option, e.g. source .hfenv; helmfile --selector name=test status
.