Successfully reported this slideshow.

Continuous Integration & Drupal

4

Share

1 of 35
1 of 35

Continuous Integration & Drupal

4

Share

Download to read offline

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.

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.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Continuous Integration & Drupal

  1. 1. Drupal Café 21-11-2012 About 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 quality control — small pieces of effort, applied frequently.” Source: Wikipedia
  13. 13. What is it? "In software engineering, continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently.” “Continuous integration aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control 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-up DEV 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 • LAMP Target envs (T/A/P) • Shell scripts: • Redmine plugin: • LAMP • make-backup.sh • Github webhook • Drush • update-code.sh • SSH key Jenkins user • apply-updates.sh in site user authorized keys
  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

Editor's Notes

  • Welcome all, thanks for attending. And thank you Michel for having me here. We gave this talk at the latest Tech Talk @ Triquanta and due to the great feedback we decided to do it again.\n
  • LimoenGroen has a mission to create durable websites and a better web. We use Open Source (Drupal), and we make sure they are future-proof and accessible by anyone.\n
  • AGENDA\nNEXT: Show hands. \n
  • Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
  • Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
  • Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
  • Surprisingly to see that nearly no-one already applies CI and we saw the same at the Tech Talk. And there is a need, because... NEXT\n
  • Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
  • Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
  • Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
  • Companies that write down all clicks (content types, views, etc) and re-apply these manually on Acceptance and Production. Companies that export a view and import it on Prod.\n
  • \n
  • \n
  • Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n
  • Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n
  • Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n
  • Not everything can be integrated with Features module. Then we use hook_update_N() scripts. \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Eerst git pull, dan build steps.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • ×