For deployment fun and profit
|operations/puppet : production||mediawiki: Ensure that /etc/php5/apache dir exists|
|operations/mediawiki-config : master||Add submodules to master checkoutMediaWiki|
|operations/puppet : production||scap: Clone mediawiki-config on all scap masters|
|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|
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.
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 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
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.
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
- 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