Jenkins User Conference   New York, May 17 2012   #jenkinsconf        Advanced Continuous Deployment        with Jenkins  ...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf        Advanced Continuous Deployment        with Jenkins  ...
Jenkins User Conference    New York, May 17 2012   #jenkinsconf    Continuous Integration•    Emerged at the end of the ‘9...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf      CI Shortcomings•     Deployment to the target platform...
Jenkins User Conference        New York, May 17 2012   #jenkinsconf      Enter Continuous Deployment•     Strictest defini...
Jenkins User Conference      New York, May 17 2012   #jenkinsconf      With Continuous Deployment...•     Smoke tests     ...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Continuous Deployment Flow
Jenkins User Conference     New York, May 17 2012   #jenkinsconf      Continuous Deployment Flow•     Dev Team      •     ...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  The “Dev Commandments”For each version of the application,...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  The “Ops Commandments”We shall provide fully configured in...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf      DIY with Jenkins•     Maven / Ant•     Cargo / SSH plu...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf      Challenges•     Middleware-specific manual effort•    ...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Continuous Deployment with  Deployit
Jenkins User Conference      New York, May 17 2012   #jenkinsconf      Continuous Deployment Flow•     Dev Team      •    ...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf      Continuous Deployment Flow•     Dev → Test → QA → Prod...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Deployit Jenkins Plugin
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Deployit Jenkins Plugin: Package
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Deployit Jenkins Plugin: Deploy
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  The Unified Deployment Model
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Deployit Architecture
Jenkins User Conference   New York, May 17 2012   #jenkinsconf             Live Demo
Jenkins User Conference          New York, May 17 2012   #jenkinsconf      Security & Audit•     Lock down access to targe...
Jenkins User Conference    New York, May 17 2012   #jenkinsconf         One Best Practice         for Application Deployme...
Jenkins User Conference        New York, May 17 2012   #jenkinsconf    Forging your Deployment    Patterns•    Server side...
Jenkins User Conference              New York, May 17 2012   #jenkinsconf    Forging your Deployment    Patterns•    Exten...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Advanced Continuous  Deployment Best Practices1. Build com...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf      An aside: Visuwall•     ‘Live’ Build Wall      •      ...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf  Thank you!   and...
Jenkins User Conference   New York, May 17 2012   #jenkinsconf
Jenkins User Conference     New York, May 17 2012   #jenkinsconf        Get in touch!                  Andrew Phillips    ...
Upcoming SlideShare
Loading in …5
×

JUC NY - Advanced Continuous Deployment with Jenkins

3,738 views

Published on

Slides from the JUC New York session on "Advanced Continuous Deployment with Jenkins" on May 17th 2012. More details at http://www.cloudbees.com/content/2012-jenkins-user-conference-newyork-abstracts.cb#AndrewPhillips

Published in: Technology, Business

JUC NY - Advanced Continuous Deployment with Jenkins

  1. 1. Jenkins User Conference New York, May 17 2012 #jenkinsconf Advanced Continuous Deployment with Jenkins Andrew Phillips http://www.xebialabs.com
  2. 2. Jenkins User Conference New York, May 17 2012 #jenkinsconf Advanced Continuous Deployment with Jenkins with special thanks to Benoit Moussaud @bmoussaud
  3. 3. Jenkins User Conference New York, May 17 2012 #jenkinsconf Continuous Integration• Emerged at the end of the ‘90s as one of the XP practices• By continuously building and testing software quality should improve• Tests often limited to unit tests (e.g. JUnit)• Sometimes also functional tests (e.g. Selenium)
  4. 4. Jenkins User Conference New York, May 17 2012 #jenkinsconf CI Shortcomings• Deployment to the target platform often not part of the CI cycle➔ Deployment procedures not tested!➔ Application not tested on ultimate target platform!
  5. 5. Jenkins User Conference New York, May 17 2012 #jenkinsconf Enter Continuous Deployment• Strictest definition: Every (tagged) version goes to production ● Used by LinkedIn amongst others.• Less strict: Include deployment in the CI cycle to test the deployed artifacts on the target platform
  6. 6. Jenkins User Conference New York, May 17 2012 #jenkinsconf With Continuous Deployment...• Smoke tests • Landing page • Line of Life• Functional tests on target platform (e.g. Selenium) • Content of the landing page • Typical run• Performance tests (e.g. JMeter) • Response time of the landing page • Response time of the simple / complex path
  7. 7. Jenkins User Conference New York, May 17 2012 #jenkinsconf Continuous Deployment Flow
  8. 8. Jenkins User Conference New York, May 17 2012 #jenkinsconf Continuous Deployment Flow• Dev Team • Full nightly build • Tag package as “released”/”ready”• Acceptance/QA • Deploy “released” package to Test environment • Perform tests • If OK, tag package as “accepted”• Production/Ops • Deploy “accepted” packages to Production
  9. 9. Jenkins User Conference New York, May 17 2012 #jenkinsconf The “Dev Commandments”For each version of the application, we shallprovide one single package containing all theartifacts and resource definitionsThe package shall be independent of the targetenvironment
  10. 10. Jenkins User Conference New York, May 17 2012 #jenkinsconf The “Ops Commandments”We shall provide fully configured infrastructureitems (hosts, application servers, web servers,databases etc.) grouped by environmentWe shall associate configured environmentvariable values to all environments
  11. 11. Jenkins User Conference New York, May 17 2012 #jenkinsconf DIY with Jenkins• Maven / Ant• Cargo / SSH plugins• Middleware scripting• Maven profiles• or...?
  12. 12. Jenkins User Conference New York, May 17 2012 #jenkinsconf Challenges• Middleware-specific manual effort• Exposed security credentials• How to secure pipeline to later-stage environments ?• How to separate deployment and build audits?• Time Machine (what was the state of my environment at a certain time)?
  13. 13. Jenkins User Conference New York, May 17 2012 #jenkinsconf Continuous Deployment with Deployit
  14. 14. Jenkins User Conference New York, May 17 2012 #jenkinsconf Continuous Deployment Flow• Dev Team • Jenkins CI drives Deployit • Creates package, publishes to Deployit and triggers deployment to the development environment• Acceptance/QA • Uses UI to deploy selected tested version to QA • Tags the version as “accepted” if all tests pass• Production/Ops • Automates deployment of accepted versions to production environments via CLI
  15. 15. Jenkins User Conference New York, May 17 2012 #jenkinsconf Continuous Deployment Flow• Dev → Test → QA → Prod pipeline conditions are checked by Deployit
  16. 16. Jenkins User Conference New York, May 17 2012 #jenkinsconf Deployit Jenkins Plugin
  17. 17. Jenkins User Conference New York, May 17 2012 #jenkinsconf Deployit Jenkins Plugin: Package
  18. 18. Jenkins User Conference New York, May 17 2012 #jenkinsconf Deployit Jenkins Plugin: Deploy
  19. 19. Jenkins User Conference New York, May 17 2012 #jenkinsconf The Unified Deployment Model
  20. 20. Jenkins User Conference New York, May 17 2012 #jenkinsconf Deployit Architecture
  21. 21. Jenkins User Conference New York, May 17 2012 #jenkinsconf Live Demo
  22. 22. Jenkins User Conference New York, May 17 2012 #jenkinsconf Security & Audit• Lock down access to target systems: only Deployit needs to know the credentials• Control deployment capabilities • permissions to deploy this on that• Track deployment activities • who deployed what where and when?• Audit past events • what happened during that deployment x months ago?
  23. 23. Jenkins User Conference New York, May 17 2012 #jenkinsconf One Best Practice for Application Deployments• Targets • Java Middleware (incl. Tomcat, WebSphere, JBoss, WebLogic) • .NET & IIS • System: Files & Folders • Database: SQL (incl. rollback) • Web Servers: PHP, images, video, JavaScript • Load Balancers• Supports heterogeneous packages & environments
  24. 24. Jenkins User Conference New York, May 17 2012 #jenkinsconf Forging your Deployment Patterns• Server side• Configure • Application level: Manifest • Environment level: Dictionaries • Global level: deployit-default.properties
  25. 25. Jenkins User Conference New York, May 17 2012 #jenkinsconf Forging your Deployment Patterns• Extend • Plugins • Extend existing types, e.g. google.TomcatDataSource • Modify existing types • Generic plugin • Create your own model • Support additional middleware platforms • Command plugin • Levarage existing scripts
  26. 26. Jenkins User Conference New York, May 17 2012 #jenkinsconf Advanced Continuous Deployment Best Practices1. Build complete packages2. “Dev commandments”3. “Ops commandments”4. Lock down credentials5. Forge & share your deployment patterns
  27. 27. Jenkins User Conference New York, May 17 2012 #jenkinsconf An aside: Visuwall• ‘Live’ Build Wall • Build time • Test coverage • LOC • …• Connectors for • Jenkins • Deployit • …• http://awired.github.com/visuwall/
  28. 28. Jenkins User Conference New York, May 17 2012 #jenkinsconf Thank you! and...
  29. 29. Jenkins User Conference New York, May 17 2012 #jenkinsconf
  30. 30. Jenkins User Conference New York, May 17 2012 #jenkinsconf Get in touch! Andrew Phillips aphillips (at) xebialabs (dot) com http://www.xebialabs.com

×