Successfully reported this slideshow.
Your SlideShare is downloading. ×

Jenkins or: How I learned to stop worrying and love automation

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
JENKINS
or: How I learned to stop worrying and love automation
#MidCamp 2018 – Jeff Geerling
Jeff Geerling
(geerlingguy)
• Drupalist and Acquian
• Writer
• Automator of things
AGENDA
1. Installing Jenkins
2. Configuation and Backup
3. Jenkins and Drupal

YouTube videos are no longer supported on SlideShare

View original on YouTube

Check these out next

1 of 39 Ad

Jenkins or: How I learned to stop worrying and love automation

Download to read offline

Jenkins is the most venerated and widely-used open source automation tools. It has many similarities to Drupal with it's open source roots, vast plugin ecosystem, and slow but steady modernization.

If you're not using Jenkins or any other automation tools to manage your Drupal sites, you're missing out!

Or, if you already use Jenkins, what if I told you it could be better? What if you could build automation around your automation?

This session will walk through different ways I've implemented secure Jenkins installations for Drupal and other PHP projects, including:

- Setting up Jenkins with Nginx and Let's Encrypt for https encryption.
- Managing configuration and Jenkins jobs in code (along with an introduction to Pipelines).
- Continuous Integration for your Jenkins environment (CI for your CI!).
- Backing up and restoring Jenkins servers.
- Integrating Jenkins with tools like Ansible and AWS CloudFormation to enhance your automation workflows.
- But the main takeaway will be the importance of automation.

Any tasks you regularly perform on your Drupal projects—especially those which affect production and could impact revenue—should be automated (with or without Jenkins!).

This session will be aimed at an intermediate audience, who may already be familiar with one or more of the following:

- Basic automation tools like Drush, Drupal Console, or shell scripts.
- Basic command line usage.
- Configuration management systems like Ansible or Puppet.

Jenkins is the most venerated and widely-used open source automation tools. It has many similarities to Drupal with it's open source roots, vast plugin ecosystem, and slow but steady modernization.

If you're not using Jenkins or any other automation tools to manage your Drupal sites, you're missing out!

Or, if you already use Jenkins, what if I told you it could be better? What if you could build automation around your automation?

This session will walk through different ways I've implemented secure Jenkins installations for Drupal and other PHP projects, including:

- Setting up Jenkins with Nginx and Let's Encrypt for https encryption.
- Managing configuration and Jenkins jobs in code (along with an introduction to Pipelines).
- Continuous Integration for your Jenkins environment (CI for your CI!).
- Backing up and restoring Jenkins servers.
- Integrating Jenkins with tools like Ansible and AWS CloudFormation to enhance your automation workflows.
- But the main takeaway will be the importance of automation.

Any tasks you regularly perform on your Drupal projects—especially those which affect production and could impact revenue—should be automated (with or without Jenkins!).

This session will be aimed at an intermediate audience, who may already be familiar with one or more of the following:

- Basic automation tools like Drush, Drupal Console, or shell scripts.
- Basic command line usage.
- Configuration management systems like Ansible or Puppet.

Advertisement
Advertisement

More Related Content

More from Jeff Geerling (15)

Recently uploaded (20)

Advertisement

Jenkins or: How I learned to stop worrying and love automation

  1. 1. JENKINS or: How I learned to stop worrying and love automation #MidCamp 2018 – Jeff Geerling
  2. 2. Jeff Geerling (geerlingguy) • Drupalist and Acquian • Writer • Automator of things
  3. 3. AGENDA 1. Installing Jenkins 2. Configuation and Backup 3. Jenkins and Drupal
  4. 4. JENKINS
  5. 5. JENKINS • Long, long time ago was 'Hudson'
  6. 6. JENKINS • Long, long time ago was 'Hudson'
  7. 7. JENKINS • Long, long time ago was 'Hudson'
  8. 8. JENKINS • Long, long time ago was 'Hudson' • After Oracle: "Time for a new name!"
  9. 9. JENKINS • Long, long time ago was 'Hudson' • After Oracle: "Time for a new name!" • Now under the stewardship of Cloudbees
  10. 10. JENKINS • Long, long time ago was 'Hudson' • After Oracle: "Time for a new name!" • Now under the stewardship of Cloudbees • Used to be only name in the open source CI game • Today: GitLab CI, Concourse, Travis CI, CircleCI, CodeShip...
  11. 11. RUNNING JENKINS • Server: • RAM (Jenkins is a hungry butler!) • CPU (if jobs need it) • Disk (don't fill the system disk!)
  12. 12. RUNNING JENKINS • Monitor RAM, CPU, Disk • Monitor jenkins service if RAM is limited • enforce-jenkins-running.sh
  13. 13. INSTALLING JENKINS • Install Java. • Install Jenkins. • Done! Image source: https://medium.com/@ricardoespsanto/jenkins-is-dead-long-live-concourse-ce13f94e4975
  14. 14. INSTALLING JENKINS • Install Java. • Install Jenkins. • Done! Image source: https://medium.com/@ricardoespsanto/jenkins-is-dead-long-live-concourse-ce13f94e4975
  15. 15. Image source: https://www.albany.edu/news/69224.php (Your Jenkins server, 3 years later)
  16. 16. INSTALLING JENKINS • Securely: • Java • Jenkins • Nginx • Let's Encrypt
  17. 17. INSTALLING JENKINS • Repeatably: • CI for Jenkins (CI-ception!) • Local or test Jenkins environment • You wouldn't develop a Drupal site in prod (riiiiight?), so why would you develop your automation in prod?!
  18. 18. INSTALLING JENKINS (If you want to skip ahead...) https://github.com/geerlingguy/drupal-jenkins-multisite
  19. 19. INSTALLING JENKINS (If you want the easier, but expensive-r, route) https://www.cloudbees.com/
  20. 20. INSTALLING JENKINS (If you want it RIGHT NOW!) docker run -d -p 8080:8080 jenkinsci/blueocean
  21. 21. WE'RE IN
  22. 22. CONFIGURING JENKINS • Plugins: • Very much like Drupal modules • (This has good and bad implications 😛)
  23. 23. CONFIGURING JENKINS • Blue Ocean: • No more 00's UI! • Follow this issue for
 setting it as default
  24. 24. CONFIGURING JENKINS • Secrets: • SSH keys • API keys • AWS credentials Image source: https://livinghiv.com/2014/09/07/least-secret-secret/
  25. 25. CONFIGURING JENKINS Image source: http://ru.memegenerator.net/instance/69770876/overly-excited-oprah-you-get-root-you-get-root-everyone-gets-root
  26. 26. CONFIGURING JENKINS • Access Control: • Use the Role Strategy Plugin • BUT, be careful, and TEST after upgrades! Image source: https://livinghiv.com/2014/09/07/least-secret-secret/
  27. 27. BACKING UP JENKINS Back up JENKINS_HOME to Amazon S3 tl;dr: jenkins-backup.yml
  28. 28. JENKINS & DRUPAL What can we do with them?
  29. 29. JENKINS & DRUPAL • Quite a lot, actually! • Run tests (PHPUnit, Behat, etc.) • Build dependencies (Composer, npm/yarn) • Run cron • Deploy new sites • Deploy updates to existing sites
  30. 30. JENKINS & DRUPAL • midwesternmac.com ('mm'): • Drupal 7 • Multisite, 6 sites total
  31. 31. JENKINS & DRUPAL (Demo)
  32. 32. Hey, I do this more than one time ever... I should automate it! Image source: Jack Moreh / freerangestock.com
  33. 33. XKCD: 1205
  34. 34. OTHER SOURCES • Tons of great tutorials on Drupal + Jenkins, e.g.: • Chromatic: D8 Deployments, Backups • Lullabot: One-click deployments • Phil Norton: Getting started
  35. 35. THANKS! • Support my open source work on Patreon:
 https://www.patreon.com/geerlingguy

×