[QA] deployment system success story

Antoine Musso hashar+wmf at free.fr
Tue Oct 29 15:36:22 UTC 2013


Hello,

I had to deploy a new version of PHPUnit on the continuous integration
Jenkins slaves.  I went with a snapshot of it placed in the repository
integration/phpunit.git and used our deployment system to push it.

It worked! And it is surprisingly easy thanks to Ryan Lane recent
refactoring.

Basically:

In operations/puppet.git edit the manifests/role/deployment.pp , in the
$repo_config configuration add in:
 - some directory hierarchy that would fit under /srv/deployment
 - a grain (that is the name of a group of server
 - the repository URL

 $repo_config = {
  'integration/phpunit' => {
     'grain' => 'contint-production-slaves',
     'upstream' => 'https://gerrit.wikimedia.org/r/integration/phpunit',
   },
  ...

On each server, you will want to call the deployment::target define with
the name of the grain configured above. Ie:

 deployment::target { 'contint-production-slaves': }

Get that merged by the Wikimedia operations team.

Once puppet has run on the destination hosts, they have a
/srv/deployment/integration/phpunit empty directory. To fill it up, one
has to go to tin.eqiad.wmnet (Wikimedia private deployment host), then:

 cd /srv/deployment/integration/phpunit
 git deploy start
 git deploy --force sync

After sometime, the repository has been cloned and checked out on all
destination hosts.


References:
 https://wikitech.wikimedia.org/wiki/Sartoris
 https://gerrit.wikimedia.org/r/#/c/92510/1
 https://bugzilla.wikimedia.org/show_bug.cgi?id=54762

-- 
Antoine "hashar" Musso




More information about the QA mailing list