Content translation/Deployments/How-to
Jump to navigation
Jump to search
This document describes deployment procedure for ContentTranslation, cxserver and Apertium.
Contents
ContentTranslation[edit]
Content Translation is updated via regular MediaWiki train. In case of manual update needed, follow the steps below.
- Update desired branches to desired commit/update using delete and create branches at Gerrit interface, https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/ContentTranslation,branches In case of emergency, note down old hash.
- Read and follow: https://wikitech.wikimedia.org/wiki/How_to_deploy_code#Updating_the_submodule Make sure you've clean copy of MediaWiki/core for this.
- You're ready for actual deployment.
cxserver[edit]
config[edit]
- Submit patch for cxserver configuration in cxserver/deploy repository. We need to change
cxserver/deploy/scap/templates/config.yaml.j2
- Puppet changes are done in
operations/puppet
repository - Beta is using config.dev.yaml in cxserver/deploy repository.
- Production is using config.prod.yaml from cxserver repository (and config from cxserver/deploy).
- To only change languages/MT config in Production, use
cxserver/config/*.wikimedia.yaml
Troubleshooting[edit]
- Test your config change in Labs and Beta Cluster first before deployment in Production.
- Check if cxserver is restarted?
- Ask in #wikimedia-operations, #wikimedia-releng
code[edit]
cxserver code update is handled via updating cxserver/deploy repository.
- Merge patch in cxserver repository.
- Once patch is merged, update cxserver/deploy repository as following.
- To submit patch for cxserver/deploy, run
./server.js build --deploy-repo --force --review
This will also update node_module and submit review in Gerrit. If only src (and if only package.json updated node_modules needed), run./server.js build --deploy-repo --review
- Merge patch.
- Once patch is merged, follow the deployment method below.
Deployment[edit]
Beta[edit]
ssh deployment-deploy01.deployment-prep.eqiad.wmflabs
cd /srv/deployment/cxserver/deploy
git pull
git submodule update --init
scap deploy 'Update cxserver to ...'
Production[edit]
ssh deploy1001.eqiad.wmnet
cd /srv/deployment/cxserver/deploy
git pull
git submodule update --init
scap deploy 'Update cxserver to ...'
Troubleshooting[edit]
- Stop if you get new errors not described here!
- To revert deployment, see: https://wikitech.wikimedia.org/wiki/Services/Deployment#Reverting_a_Deployment
- Check logs at: https://logstash.wikimedia.org
- While submitting patch for cxserver/deploy, make sure that deploy repo is clean (no diff), else patch submission may stuck forever.
- Deployment should also restart cxserver on scb clusters.
Debugging[edit]
To check health of end-points:
ssh scb2001
check-cxserver
If there is some error during deployment, logs of canary server can be seen at:
ssh scb2001
tail -f /srv/log/cxserver/main.log
Apertium[edit]
Apertium deployment is done via updating apertium packages through Gerrit change and puppet.
Troubleshooting[edit]
- Check if package list are up-to-date in Puppet.
- Make sure to ask to restart 'apertium-apy' on scb1001 and scb1002 to any Ops member after adding new languages support for Apertium MT.
- Check logs at:
/srv/logs/apertium/
See also[edit]
- service deployment: https://wikitech.wikimedia.org/wiki/Services/Deployment
- Deployer Quickstart Guide: https://doc.wikimedia.org/mw-tools-scap/scap3/quickstart/deployer.html
- cxserver/deploy README: https://phabricator.wikimedia.org/diffusion/GCXD/browse/master/README.md
- Issues with updating submodule with git deploy: https://phabricator.wikimedia.org/T89328, https://phabricator.wikimedia.org/T63882
- Apertium packaging and service information: https://www.mediawiki.org/wiki/Content_translation/Machine_Translation/Apertium