|mediawiki/tools/release||master||+11 -1||Make deploy-promote work in train-dev enviroment|
|mediawiki/tools/train-dev||master||+10 -0||Add stub mwscript to deploy VM|
|Open||LarsWirzenius||T255695 Create a development & testing environment for scap + train deployments|
|Resolved||dancy||T260376 Try "deploy-promote testwikis" in train-dev, document what seems to be missing|
- Mentioned In
- T260671: Configure git user.email and user.name for the debian user on the deploy server in train-dev
- Mentioned Here
- T260674: Add app servers to train-dev
T260671: Configure git user.email and user.name for the debian user on the deploy server in train-dev
T260672: Add Gerrit to train-dev
deploy-promote modifies /srv/mediawiki-staging/wikiversions.json and performs a git commit on behalf of the user so it may be helpful to configure user.email and user.name to avoid a noisy warning. It then tries to push the commit to origin (which currently fails because the git VM is only configured for read-only access). Further, it pushes using a Gerrit-style reference (git push origin HEAD:refs/for/master%topic=1.35.0-wmf.32,l=Code-Review+2). Assuming the push somehow managed to succeed, deploy-promote discards the commit it created and performs a git pull to retrieve it from origin. It verifies that it has pulled down the commit that it pushed.
What happens next depends on if the target group is testwikis or not . If it is testwikis then deploy-promote runs scap sync <autogenerated message>. Otherwise it runs scap sync-wikiversions <autogenerated message>.
Finally deploy-promote performs a curl request to https://$CHECKDOMAIN/wiki/Special:Version, where CHECKDOMAIN depends on the target group. For testwikis, CHECKDOMAIN will be test.wikipedia.org.
scap sync expects mwscript to be installed on the deploy server. On the production deploy server it is installed as /usr/local/bin/mwscript. That script expects /etc/profile.d/mediawiki.sh to exist. /etc/profile.d/mediawiki.sh sets variables MEDIAWIKI_DEPLOYMENT_DIR, MEDIAWIKI_STAGING_DIR, and MEDIAWIKI_WEB_USER and potentially sets the umask to 0002 (not important for train-dev). For this scenario mwscript ultimately runs /srv/mediawiki-staging/multiversion/MWScript.php, passing over any arguments that were supplied (possibly using sudo to change to the MEDIAWIKI_WEB_USER first).
I concur that adding Gerrit to train-dev would be a good thing to do soon. Or at least something that behaves sufficiently like Gerrit, but I suspect it's easiest to just use Gerrit itself.
Created T260671: Configure git user.email and user.name for the debian user on the deploy server in train-dev and T260672: Add Gerrit to train-dev and T260674: Add app servers to train-dev. There's probably more changes (appservers?), but one step at a time, but I think this is what we can extract from this round of research.
Do we want to close this task as resolved, or keep it open for possible future research?