Slide 1

Slide 1 text

Simple DevOps using Jenkins (and more) Ashok Modi (BTMash) LA Drupal Meetup - Nov 2012

Slide 2

Slide 2 text

Agenda ● About Jenkins ● Why not Jenkins? ● Why Jenkins? ○ Who is it for? ● Resources ● Demo ● Q & A

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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?)

Slide 5

Slide 5 text

● 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

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

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)

Slide 8

Slide 8 text

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)

Slide 9

Slide 9 text

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.

Slide 10

Slide 10 text

Q & A Thank you! Happy Diwali, New Year, and Thanksgiving :)