Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Drupal Café21-11-2012About Continuous Integration(and why you should use it)
Introduction • Baris Wanschers • Co-owner of LimoenGroen • Chairman of Stichting Drupal Nederland
Agenda• The need for Continuous Integration• How we use it• Technical overview• Demo
Show hands• Who uses version control?
Show hands• Who uses version control?• Who uses a DTAP (or DTP)?
Show hands• Who uses version control?• Who uses a DTAP (or DTP)?• Who uses Features / Context?
Show hands• Who uses version control?• Who uses a DTAP (or DTP)?• Who uses Features / Context?• Who applies Continuous Int...
We’ve all been there • Implementing a new feature? Involves   putting the site in maintenance for hours
We’ve all been there • Implementing a new feature? Involves   putting the site in maintenance for hours • Re-clicking all ...
We’ve all been there • Implementing a new feature? Involves   putting the site in maintenance for hours • Re-clicking all ...
We’ve all been there • Implementing a new feature? Involves   putting the site in maintenance for hours • Re-clicking all ...
What is it?"In software engineering, continuous integration (CI)implements continuous processes of applying qualitycontrol...
What is it?"In software engineering, continuous integration (CI)implements continuous processes of applying qualitycontrol...
What’s the advantage? • Direct feedback if it cannot be deployed   Got e-mail? Back to the drawing board.
What’s the advantage? • Direct feedback if it cannot be deployed   Got e-mail? Back to the drawing board. • In control whe...
What’s the advantage? • Direct feedback if it cannot be deployed   Got e-mail? Back to the drawing board. • In control whe...
What’s the advantage? • Direct feedback if it cannot be deployed   Got e-mail? Back to the drawing board. • In control whe...
How we use it    D     T     A   P
How we use it                Repository                • develop                • master    D     T             A    P
How we use it                Repository                • develop                • master    D     T             A    P    ...
How we use it                    Repository                    • develop                    • master        Code       Cod...
How we use it                            Repository                            • develop                            • mast...
How we use it                            Repository                            • develop    Service hooks                 ...
How we use it                                  Repository                                  • develop    Service hooks     ...
How we use it                                  Repository                                  • develop    Service hooks     ...
How we use it                                  Repository                                  • develop      Service hooks   ...
How we use it                                  Repository                                  • develop      Service hooks   ...
How we use it                                  Repository                                  • develop      Service hooks   ...
Technical set-upDEV environment           Jenkins                               Git• LAMP                    • Tomcat     ...
Demo• Issue in Redmine  ”Replace latest blogs in footer with single teaser”
Demo• Issue in Redmine  ”Replace latest blogs in footer with single teaser”• Fix on dev & Update Feature
Demo• Issue in Redmine  ”Replace latest blogs in footer with single teaser”• Fix on dev & Update Feature• Commit with Issu...
Demo• Issue in Redmine  ”Replace latest blogs in footer with single teaser”• Fix on dev & Update Feature• Commit with Issu...
Future improvements• Features does not work on all modules• Automated tests with Jenkins  SimpleTest / Behat / Selennium• ...
Questions?• baris@limoengroen.nl• www.limoengroen.nl  www.bariswanschers.com• @BarisW on Drupal.org / IRC / Twitter
Upcoming SlideShare
Loading in …5
×

Continuous Integration & Drupal

3,230 views

Published on

Lots of customers demand a preview of the the new features before they go live, so we need a solid way to show them our work before applying it on the production environment. You may already use features (good!), but you still struggle with managing your changes? I will show you how my company LimoenGroen uses tools like Jenkins to automatically deploy changes to their Test environment and how to apply these changes to the Acceptance and Production environments.

Published in: Technology
  • Be the first to comment

Continuous Integration & Drupal

  1. 1. Drupal Café21-11-2012About Continuous Integration(and why you should use it)
  2. 2. Introduction • Baris Wanschers • Co-owner of LimoenGroen • Chairman of Stichting Drupal Nederland
  3. 3. Agenda• The need for Continuous Integration• How we use it• Technical overview• Demo
  4. 4. Show hands• Who uses version control?
  5. 5. Show hands• Who uses version control?• Who uses a DTAP (or DTP)?
  6. 6. Show hands• Who uses version control?• Who uses a DTAP (or DTP)?• Who uses Features / Context?
  7. 7. Show hands• Who uses version control?• Who uses a DTAP (or DTP)?• Who uses Features / Context?• Who applies Continuous Integration?
  8. 8. We’ve all been there • Implementing a new feature? Involves putting the site in maintenance for hours
  9. 9. We’ve all been there • Implementing a new feature? Involves putting the site in maintenance for hours • Re-clicking all you’ve done local, on Prod
  10. 10. We’ve all been there • Implementing a new feature? Involves putting the site in maintenance for hours • Re-clicking all you’ve done local, on Prod • The client accepts changes on ACC, but they still end up different on PROD
  11. 11. We’ve all been there • Implementing a new feature? Involves putting the site in maintenance for hours • Re-clicking all you’ve done local, on Prod • The client accepts changes on ACC, but they still end up different on PROD • In the end: Frustrated Clients
  12. 12. What is it?"In software engineering, continuous integration (CI)implements continuous processes of applying qualitycontrol — small pieces of effort, applied frequently.” Source: Wikipedia
  13. 13. What is it?"In software engineering, continuous integration (CI)implements continuous processes of applying qualitycontrol — small pieces of effort, applied frequently.”“Continuous integration aims to improve the quality ofsoftware, and to reduce the time taken to deliver it, byreplacing the traditional practice of applying qualitycontrol after completing all development." Source: Wikipedia
  14. 14. What’s the advantage? • Direct feedback if it cannot be deployed Got e-mail? Back to the drawing board.
  15. 15. What’s the advantage? • Direct feedback if it cannot be deployed Got e-mail? Back to the drawing board. • In control when going live Deployed to Test? Then it will work on Production as well.
  16. 16. What’s the advantage? • Direct feedback if it cannot be deployed Got e-mail? Back to the drawing board. • In control when going live Deployed to Test? Then it will work on Production as well. • Continue developing while CI tool runs No need to wait.
  17. 17. What’s the advantage? • Direct feedback if it cannot be deployed Got e-mail? Back to the drawing board. • In control when going live Deployed to Test? Then it will work on Production as well. • Continue developing while CI tool runs No need to wait. • Integration with Issue Management Update issues by committing your change.
  18. 18. How we use it D T A P
  19. 19. How we use it Repository • develop • master D T A P
  20. 20. How we use it Repository • develop • master D T A P DB + Files (drush sql-sync / drush rsync)
  21. 21. How we use it Repository • develop • master Code Code Code D T A P DB + Files (drush sql-sync / drush rsync)
  22. 22. How we use it Repository • develop • master commit -m “Applied X. Fixes #123.” develop or master/[TAG] D T A P
  23. 23. How we use it Repository • develop Service hooks • master commit -m “Applied X. Fixes #123.” develop or master/[TAG] D T A P
  24. 24. How we use it Repository • develop Service hooks • master commit -m “Applied X. Fixes #123.” develop or master/[TAG] develop D T A P
  25. 25. How we use it Repository • develop Service hooks • master commit -m “Applied X. Fixes #123.” manual start develop or master/[TAG] develop D T A P
  26. 26. How we use it Repository • develop Service hooks • master commit -m “Applied X. Fixes #123.” manual start develop or master/[TAG] develop develop D T A P
  27. 27. How we use it Repository • develop Service hooks • master commit -m “Applied X. Fixes #123.” manual start develop or master/[TAG] develop develop master/[TAG] D T A P
  28. 28. How we use it Repository • develop Service hooks • master commit -m “Applied X. Fixes #123.” manual start develop or master/[TAG] develop develop master/[TAG] D T A P
  29. 29. Technical set-upDEV environment Jenkins Git• LAMP • Tomcat • GitHub/BitBucket• Git • Apache (as proxy for Tomcat) • Service Hooks• Git flow • Jenkins plugins: • Service user (read• Drush • Git only) + ssh key• Drush alias files • Github • Git parameter • Jenkins jobs per project / target Redmine environment • LAMPTarget envs (T/A/P) • Shell scripts: • Redmine plugin:• LAMP • make-backup.sh • Github webhook• Drush • update-code.sh• SSH key Jenkins user • apply-updates.shin site user authorizedkeys
  30. 30. Demo• Issue in Redmine ”Replace latest blogs in footer with single teaser”
  31. 31. Demo• Issue in Redmine ”Replace latest blogs in footer with single teaser”• Fix on dev & Update Feature
  32. 32. Demo• Issue in Redmine ”Replace latest blogs in footer with single teaser”• Fix on dev & Update Feature• Commit with Issue number
  33. 33. Demo• Issue in Redmine ”Replace latest blogs in footer with single teaser”• Fix on dev & Update Feature• Commit with Issue number• Champagne!
  34. 34. Future improvements• Features does not work on all modules• Automated tests with Jenkins SimpleTest / Behat / Selennium• Automated roll-back on errors• Set monitoring to ‘scheduled downtime’ on deployments
  35. 35. Questions?• baris@limoengroen.nl• www.limoengroen.nl www.bariswanschers.com• @BarisW on Drupal.org / IRC / Twitter

×