For deployment fun and profit
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | None | T88701 [Quarterly Success Metric] Green nightly builds on the staging cluster (tracking) | |||
Declined | None | T88702 Create staging cluster | |||
Resolved | • demon | T91552 Create staging-elastic* (ElasticSearch machines) | |||
Declined | • mmodell | T88442 Setup staging-tin as deployment host | |||
Declined | None | T91463 Package trebuchet-trigger for trusty |
Event Timeline
Let's look at the roles on tin:
include standard include role::deployment::deployment_servers::production include mediawiki include role::scap::master include mysql include role::labsdb::manager include ssh::hostkeys-collect include role::releases::upload include admin
Of this, quite a few aren't needed on staging. Obvious ones being admin, standard, labsdb::manager, releases::upload.
That leaves:
- role::deployment::deployment_servers::production
- ssh::hostkeys-collect
- mediawiki
- role::scap::master
- mysql
We'll investigate and see what all needs to happen :)
Alright, so 'mysql' is just a mysql client role, and that's fine.
mediawiki role requires scap, which is role::scap::master. However, scap itself requires the deployment_server, which we need to first unify labs / prod for before going there.
So next order of business is to unify role::deployment:deployment_servers. It is a silly name, we should maybe call it 'role::deployment::server' maybe?
So I now have a WIP https://gerrit.wikimedia.org/r/#/c/195340/ where I am basically hacking away at things until this kind of works. I'll split that up into separate patches later on.
Change 195340 had a related patch set uploaded (by Greg Grossmeier):
deployment: Combine labs/prod deployment server roles
So I got it to try to install scap via trebuchet, and that kept failing. According to https://wikitech.wikimedia.org/wiki/Trebuchet it looks like first deploy has to be manual (EUGH?), so I did that and scap is now installed....
Now to get scap to *work*, so that the mediawiki role can be installed :)
Manual steps I've had to do so far:
- git deploy start / sync on scap
- Clone /srv/mediawiki-staging to be mediawiki-config
- Clone /srv/mediawiki-staging/php-master to be mediawiki itself
- Create /home/l10nupdate
- Create /srv/mediawiki-staging/private/PrivateSettings.php
@greg me neither. the plan is for me to get this patch in, then destroy staging-tin, and rebuild it. Repeat until 0 manual steps remain.
Alright, looks like I'll have to merge https://gerrit.wikimedia.org/r/#/q/status:open+project:operations/puppet+branch:production+topic:ssh-userkey,n,z to get this done without introducing hacks. I'll do that tomorrow.
Change 196773 had a related patch set uploaded (by Yuvipanda):
mediawiki: Ensure that /etc/php5/apache dir exists
Change 197355 had a related patch set uploaded (by Yuvipanda):
scap: Clone mediawiki-config on all scap masters
P409 is the 'bootstrap' script for git-deploy, should be run manually once on the deployment server (tin)
Note that ^ is a total hack :D should be fixed in git-deploy itself... at some point... by someone...
Change 204080 had a related patch set uploaded (by Thcipriani):
Add submodules to master checkoutMediaWiki
This all has to be puppetized/whatevered, but here are the steps, roughly, to a working mediawiki (sans database, guessing that will come from addWiki.php, still to be investigated). This does depend on a handful of patches that need to be merged.
- /srv/mediawiki-staging/multiversion/checkoutMediaWiki master php-master
- /srv/mediawiki-staging/multiversion/refreshWikiversionsCDB
- cp /srv/mediawiki-staging/private/PrivateSettings.php.example /srv/mediawiki-staging/private/PrivateSettings.php
- mwscript rebuildLocalisationCache.php --wiki=aawiki --outdir=/tmp/scap_l10n_$(date +%s)
- sudo -u l10nupdate cp -R /tmp/scap_l10n_1429139458/l10n_cache-*.cdb /srv/mediawiki-staging/php-master/cache/l10n/
- cd /srv/mediawiki-staging/wmf-config
- mwscript mergeMessageFileList.php --wiki=aawiki --list-file=wmf-config/extension-list --output=/tmp/ExtensionMessages-master.php
- sudo cp -R /tmp/ExtensionMessages-master.php /srv/mediawiki-staging/wmf-config
- sync-common
Change 196773 abandoned by Yuvipanda:
mediawiki: Ensure that /etc/php5/apache dir exists