Automating Drupal Deployment Dominique De Cooman
Developer for 5 years Web agencies in Belgium Contributions Blog Who am I
Faster Less errors Well documented Reproducable History Continous Integration Why deploying automaticaly
Vps with a Lamp stack Version control – Git Drush Drupal of course Dev – Staging – Production setup Continous integration server Deployment scripts Basic components
Vps You can get a vps from 12€/month on most hosting platforms. There are trials available everywhere Example: How to set it up?
Plenty of installation scripts online Example installing-drupal-ubuntu-drupal-training-purpose Install your lamp stack
Git We will use the succesfull branching model Git flow Production branch Development branch Release branch Hotfixes Install Git flow Bash complete Version control
DRUpal SHell Install Drush aliasses Simplyfies executing commands in builds Drush
Create a proper repository layout Bash Updates Installs scripts Docroot Documentation Etc Drupal (settings files, robot.txt, htaccess, …) Drush - aliases Ssh vhost Configure you server to connect to drupal. Drupal
Jenkins Install ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu Why? Automate our workflow Execute our tests Continous integration server
Exporting database changes Configuring jenkins jobs Writing deployment scripts Automating the workflow
Use features Use hook_update() D8 configuration management in core Exporting database changes
Jenkins Create jobs Environments Testbots Basic setup General settings Repository configuration Build triggers Post build actions Configuring the jobs
Copy files Update the code Settings file Copy build script Build section
Enable/Disable ui modules Set environment specific variables Error_level Cache Revert features Update the database Flush cache Deploy scripts
Modules Leave the opportunity to debug Error level Caching settings Staging and production must by identical Representative No testrun on production Differences per environment
Develop on feature branch Run testbot – fix error Export changes Commit Merge feature in development branch Deploy on development environment Monitor job execution Evaluate tests Manual testing Create release branch Deploy release branch on staging environment Evaluate tests Merge branch into master and development Deploy master on production environment Create hotfix branch - maintenance Test and deploy hotfix branch Merge hotfix into master and merge into development Deploy master Demo
References
Minimizing overhead with git flow Installing lamp stack drupal-ubuntu-drupal-training-purpose drupal-ubuntu-drupal-training-purpose Go live checklist 7-tip-how-automate-and-control-your-go-live-checklisthttp:// 7-tip-how-automate-and-control-your-go-live-checklist Install jenkins ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntuhttps://wiki.jenkins- ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu Get all the code, job scripts and presentation overview: deployment deployment Resources