Drupal and Jenkins

Fd1ddc8e53e730804f2814248f69a565?s=47 btmash
November 14, 2012

Drupal and Jenkins

Simple DevOps using Jenkins (and more) for Drupal

Fd1ddc8e53e730804f2814248f69a565?s=128

btmash

November 14, 2012
Tweet

Transcript

  1. 2.

    Agenda • About Jenkins • Why not Jenkins? • Why

    Jenkins? ◦ Who is it for? • Resources • Demo • Q & A
  2. 3.

    About Jenkins • Written in Java. • Continuous Integration Software

    ◦ Way to test code / functionality changes as they are introduced to your software. ◦ Send out test results on pass/fail/other criteria. • Gradually evolved into software to also help manage deployment. • Tons of plugins ◦ CVS/SVN/Git/Mercurial/Bazaar/etc. ◦ Selenium, Phing ◦ Notifications
  3. 4.

    Why not Jenkins • Resource heavy ◦ Better to have

    a separate server for it. • Setup heavy ◦ Setup server, ssh keys, etc. • Code heavy ◦ Code your deployment steps. • Need to learn another language ◦ Shell scripting ◦ Python (Fabric) ▪ Drush (aegir, drush_deploy) ◦ Ruby (capistrano, whiskey_disk) • Use other deployment tool ◦ Chef/Puppet (Ruby? create deb/rpm packages?)
  4. 5.

    • Create test builds easily. ◦ No need to ssh

    into the server(s). ◦ No need to remember steps. • Run tests easily ◦ Get emails / web reports of results. ◦ Sent out to entire team. ▪ https://github.com/codedance/Retaliation • Create production builds easily. ◦ See points above. ◦ Also allow for other team members to deploy changes without actually requiring server credentials. • Easily create the builds. ◦ Push of a button. ◦ Cron task. ◦ Only on code changes (automated). Why Jenkins
  5. 6.

    Who is it for? • If you host your own

    websites. ◦ Own set of servers (on hand, vps, dedicated, etc) • Even if you're on Pantheon/Acquia, useful since you can test out your code locally before deployment. • Great tool regardless of actual application. ◦ Drupal, Wordpress, Django...doesn't matter. • Not scared of some code.
  6. 7.

    Resources • Fabric ◦ http://docs.fabfile.org ▪ http://docs.fabfile.org/en/1.5/tutorial.html • Capistrano ◦

    https://github.com/capistrano/capistrano • Mig5 (http://mig5.net) ◦ http://goo.gl/yiveJ (article) ◦ https://github.com/mig5/aegir_cid (aegir) • BTMash ◦ http://goo.gl/1nMH9 (capistrano) ◦ https://github.com/btmash/deploy_btm_aegir (aegir)
  7. 8.

    Resources (Cont'd) • Others ◦ http://reload.github.com/jenkins-drupal-template/ (testing) ◦ http://sachachua.com/blog/p/22290 (Testing)

    ◦ http://danepowell.com/content/updated-zero-touch- deployment-aegir-and-jenkins (aegir) ◦ http://drupalize.me/blog/201211/our-approach-data- migration-upgrade (test content migration) ◦ http://goo.gl/QwtHM (additional slides with more details)
  8. 9.

    Demo • About demo ◦ Using Barracuda in testing/production. (http://drupal.

    org/project/barracuda) ▪ Aegir ▪ Nginx ▪ Various other things that I don't have to worry about. ▪ ssh key to checkout git repo. ◦ Jenkins / Fabric on build server. ▪ Nginx for reverse-proxy and password auth. • Only allow 'anonymous' user access to notify on git poll. ▪ Small instance (256 megs) ▪ ssh key to automatically log into testing/production.