Content translation/Deployments/How-to

Jump to navigation Jump to search

This document describes deployment procedure for ContentTranslation, cxserver and Apertium.


Content Translation is updated via regular MediaWiki train. In case of manual update needed, follow the steps below.

  1. Update desired branches to desired commit/update using delete and create branches at Gerrit interface,,branches In case of emergency, note down old hash.
  2. Read and follow: Make sure you've clean copy of MediaWiki/core for this.
  3. You're ready for actual deployment.



Note image tag version from Gerrit patchset to be deploy. For eg: has 2019-04-11-112002-production tag.

Run it:

docker run -p 4000:8080 --it --entrypoint /bin/bash -c

Where, is local cxserver config file.

Endpoints can be tested at: http://localhost:4000

Config files[edit]

cxserver on Production config stays in:

helmfile.d/services/cxserver/values.yaml and,

WMF specific config stays in:


When config.yaml is updated. Update cxserver version in deployment-charts/charts/cxserver/Chart.yaml

and then run,

helm package cxserver

From charts/ directory, the repository index should then be rebuilt using:

helm repo index .

Submit generated tar file and index as Gerrit review.

Also see[edit]


  1. Clone deployment-charts repository (for first time).
  2. Do needful changes in config (update image or other configuration changes as needed).
  3. Make a CR (Example: and after a successful review, merge it.
  4. After merge, log in in a deployment server (eg: deploy1001), there is a cron (1 minute) that will update the /srv/deployment-charts directory with the contents from git.
  5. Go to /srv/deployment-charts/helmfile.d/services/cxserver.
  6. Execute: helmfile -e ${CLUSTER} diff This will show the changes that it will be applied on the cluster.
  7. Execute: helmfile -e ${CLUSTER} -i apply This will materialize the previous diff in the cluster and also will log into SAL the change.


If secrets like API key or token need update, it need to be done via SRE at Private Puppet repository.


This is done using helmfile:

  1. Change directory to /srv/deployment-charts/helmfile.d/services/${CLUSTER}/cxserver on a deployment server
  2. Unless you are mid un-applied changes the current values files should reflect the deployed values
  3. You can check for un-applied changes with: helmfile -e ${CLUSTER} diff
  4. You can see the status with helmfile -e ${CLUSTER} status


  • cxserver logs are available in logstash as 'cxserver-last-24-hours' dashboard.
  • Logs can be access from deploy1001 if needed:

cd /srv/deployment-charts/helmfile.d/services/${CLUSTER}/cxserver

source .hfenv

kubectl logs cxserver-production-6c4f65bc-z6hcb cxserver-production

cxserver-production-6c4f65bc-z6hcb is pod name.

To see all logs: kubectl logs -l app=cxserver -c cxserver-production

Rolling back changes[edit]

If you need to roll back a change because something went wrong:

  1. Revert the git commit to the deployment-charts repo
  2. Merge the revert (with review if needed)
  3. Wait one minute for the cron job to pull the change to the deployment server
  4. Change directory to /srv/deployment-charts/helmfile.d/services/cxserver
  5. Execute helmfile -e ${CLUSTER} diff to see what you'll be changing.
  6. Execute helmfile -e ${CLUSTER} -i apply where CLUSTER is one of (staging, eqiad, codfw).

See also[edit]