implementing continuous integration best practices with drupal - 2014
DESCRIPTION
On May 22nd 2014 I was asked to speak at a Drupalcafé (http://www.meetup.com/drupalnetherlands/events/173046492/) on the subject of Continuous Integration on Acquia. I gave a refreshed presentation of one done on CI by Acquia in a 2012 Webinar and focused on the pillars that allow our customers to assemble a full CI implementation tailored to their own needs and workflows.TRANSCRIPT
Implementing Continuous Integration Best Practices with Drupal
Barry JaspanSenior Architect
May 22nd 2014
Jess IandiorioSr. Director, Cloud Product Marketing
Niels van MourikBackline support engineerAcquia Client Advisory Team
Creating killer websites is hard …
Deploying them shouldn’t be.
Yeah, right.
Continuous Integration decides between success or failure
• Work in small batches
• Always know where you stand
• Release often so there are no big surprises
• Test everything
Principles of Continuous Integration
• Use a source code repository
• Automate testing
• Test in a clone of the production environment
• Make all versions easily accessible
• Have an audit trail (“blame list”)
• Automate site deployment
• Measure results
• Iterate rapidly
http://en.wikipedia.org/wiki/Continuous_integration
Sounds great. How do I get there?
Option 1: Build it Yourself
• Git/SVN server
• Lots of Jenkins jobs• Deploy on commit
• Copy DB/files for dev
• Test on deploy
• Tag and release on success
• Many more…
• OS management• Server build
• Security updates
• Multiple web vhosts• Domains, SSL, php.ini, …
• Multiple databases• Manage credentials
• HA, memcached, Varnish, Tomcat, Jenkins, Solr, ... Scaling all of this
• Backups and restores
• 24/7 monitoring
You do not want to do this.
(If you want this job, I have a job for you)
Option 2: Use someone else's
Principles of Continuous Integration
• Use a source code repository
• Automate testing
• Test in a clone of the production environment
• Make all versions easily accessible
• Have an audit trail (“blame list”)
• Automate site deployment
• Measure results
• Iterate rapidly
Acquia Cloud free tier
Completely free for site development.
• Intuitive Dev workflow
• Power tools for power users
• Drupaloptimized infrastructure
• No production siteswww.acquia.com/acquia
cloudforfree
Acquia Cloud AC/DC'Dev Cloud'
Acquia Cloud Enterprise ACE'Managed Cloud'
Never let your best day become your worst.
• Whiteglove managed service for mission critical Drupal websites
• Drupaltuned hosting infrastructure
• HA, elastic resources with multiregion failover
One size doesn't fit all
Therefore Acquia's CI solutionallow you to assemble it toyour needs and workflow
SSH
Readonly SSH access toyour document root(s)
• Upload SSH pubkeys
• Access to file directory
• All Drush flavors available
• Access to all web servers
• VPN to your network is a possibility
Cloud Hooks
Act upon anything that ishappening on your site
• hooks / [ENV] / [name].sh
• Run any drush command
• Clean production DB's during copies/dumps (e.g. cache tbls)
• Run your tests and email/ssh results
• Some events:• postcodedeploy
• postdbcopy
• postfilescopy
http://bit.ly/1oj3YPM
https://github.com/acquia/cloudhooks
Acquia Cloud API
Automate everything youcould clickethyclick!
• Nice RESTful goodness
• 40 drush integration cmds• Therefore entirely scriptable• Deploy tags and branches
• Databases
• Domain names
• Purge varnish
• Copy fileshttps://cloudapi.acquia.com/
https://www.youtube.com/watch?v=_iA8h-Bh1Z0
Putting things togetherwith CI systems
Jenkins, Travis CI, CruiseControl
• Acquia focuses on Drupal
• VPS: elcheapo 5,00 €
• Make your Acquia Cloud a scripted marionet...
• Your build server, your workflow
https://cloudapi.acquia.com/
• For more information visit: http://www.acquia.com
• Sales: [email protected] / (+31) (0) 20 890 3987
• Twitter: @acquia
• Comments welcome:
this presentation is available as webinar on:http://acquia.com/resources/recorded_webinars
Questions?