Simple DevOps Using Jenkins

4,022 views

Published on

This presentation will cover a simple setup of a Jenkins (it can even run on your laptop), and a set of scripts will be demonstrated that enable the following automation and workflow:

- Run Drupal cron from Jenkins via drush
- Create backups
- Restore from backups
- Refresh a development environment with the database from live
- Update stage, triggered on a commit to version control
- Update production, manually triggered after testing stage
- As much as this will done live as possible; slides and screenshots will be a fallback. - Electronic copy of the scripts and other files will be provided, so that attendees can modify and use them.

The presentation is aimed at smaller teams and freelancers, who might consider an automated setup to have too much overhead to be worth it; the goal is to demonstrate that there is a good payoff from a small investment in DevOps.

Published in: Technology

Simple DevOps Using Jenkins

  1. 1. Simple DevOps WithJenkinsRobert RistrophEmail & AIM: robert@fourkitchens.comGoogle Chat: rgristroph@gmail.comTwitter: @robgrSlides:http://www.nyccamp.org/sessions/simple-devops-using-jenkins
  2. 2. What is DevOps ?Trendy buzzword for a lot of common senseAutomate everything“Development” and “Operations” cannot beseparate, and must support each otherAssociated with big software teams that canafford bureaucratic overhead (started as ananti-bureaucratic movement)However small shops can take the best ideasand use them
  3. 3. What is Jenkins ? http://jenkins-ci.org/ Java based; a server, but also useful running locally Wide variety of plugins Supportive community - #jenkinsci on irc.freenode.net Open Source, MIT License Not the only option, but best supported
  4. 4. Jenkins Architecture A master server runs the java server Users (mostly) interact through a web interface “Nodes” (or “workers”) are computers that the master can log into through ssh (key based) “Jobs” are run on workers, the results are “builds”
  5. 5. Walk Through: Installation Basic Security Key Setup Jobs and Logs
  6. 6. DevOps Workflow
  7. 7. Walk Through: Fresh Database Staging Deploy Live
  8. 8. Features / Update HooksCode flows forward, Database backward“Zero Touch” on live (if possible)Not always practical for a small group orquick jobs
  9. 9. Jenkins / Drush replacingcron Run “drush cron” from a Jenkins job Logs results Move custom heavy tasks (search indexing) to their own drush command and Jenkins job Can use php-cli.ini to allow more memory
  10. 10. BackupsConsider the “Backup and Migrate” moduleor tar / drush sql-dumpYou MUST test backupsYou MUST automate backups – otherwise itwont happen
  11. 11. SummaryNot a big overhead to start getting payoffProfessionalizes your operation, even if youare a lone freelancerCome to me after the talk for examples ofthe jobs shown, or other questions

×