automating drupal deployment

19
Automating Drupal Deployment Dominique De Cooman

Upload: elan

Post on 12-Jan-2016

46 views

Category:

Documents


0 download

DESCRIPTION

Automating Drupal Deployment. Dominique De Cooman. Who am I. Developer for 5 years Web agencies in Belgium http://drupal.org/user/199987 Contributions Blog http://dominiquedecooman.com. Why deploying automaticaly. Faster Less errors Well documented Reproducable History - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Automating Drupal Deployment

Automating Drupal Deployment

Dominique De Cooman

Page 2: Automating Drupal Deployment

Developer for 5 years Web agencies in Belgium http://drupal.org/user/199987 Contributions Blog http://dominiquedecooman.com

Who am I

Page 3: Automating Drupal Deployment

Faster Less errors Well documented Reproducable History Continous Integration

Why deploying automaticaly

Page 4: Automating Drupal Deployment

Vps with a Lamp stack Version control – Git Drush Drupal of course Dev – Staging – Production setup Continous integration server Deployment scripts

Basic components

Page 5: Automating Drupal Deployment

Vps You can get a vps from 12€/month on most

hosting platforms. There are trials available everywhere

Example: https://www.gandi.net/hosting/trial/ https://control.vps.net/trial-signup

How to set it up?

Page 6: Automating Drupal Deployment

Plenty of installation scripts online Example

http://www.dominiquedecooman.com/blog/automate-installing-drupal-ubuntu-drupal-training-purpose

Install your lamp stack

Page 7: Automating Drupal Deployment

Git We will use the succesfull branching model

http://nvie.com/posts/a-successful-git-branching-model/

Git flow Production branch Development branch Release branch Hotfixes Install

Git flow Bash complete

Version control

Page 8: Automating Drupal Deployment

DRUpal SHell Install

http://drupal.org/project/drush Drush aliasses

Simplyfies executing commands in builds

Drush

Page 9: Automating Drupal Deployment

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

Page 10: Automating Drupal Deployment

Jenkins Install https://wiki.jenkins-ci.org/display/JENKINS/Insta

lling+Jenkins+on+Ubuntu Why?

Automate our workflow Execute our tests

Continous integration server

Page 11: Automating Drupal Deployment

Exporting database changes Configuring jenkins jobs Writing deployment scripts

Automating the workflow

Page 12: Automating Drupal Deployment

Use features Use hook_update() D8 configuration management in core

Exporting database changes

Page 13: Automating Drupal Deployment

Jenkins Create jobs

Environments Testbots

Basic setup General settings Repository configuration Build triggers Post build actions

Configuring the jobs

Page 14: Automating Drupal Deployment

Copy files Update the code Settings file Copy build script

Build section

Page 15: Automating Drupal Deployment

Enable/Disable ui modules Set environment specific variables

Error_level Cache

Revert features Update the database Flush cache

Deploy scripts

Page 16: Automating Drupal Deployment

Modules Leave the opportunity to debug

Error level Caching settings Staging and production must by identical

Representative No testrun on production

Differences per environment

Page 17: Automating Drupal Deployment

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

Page 18: Automating Drupal Deployment

http://dominiquedecooman.com http://durpal.org/user/199987 http://twitter.com/dominiquedc

References

Page 19: Automating Drupal Deployment

Minimizing overhead with git flow http://dominiquedecooman.com/blog/git-flow-minimizing-overhead

Installing lamp stack http://www.dominiquedecooman.com/blog/automate-installing-drupal-ubuntu-drupal-training-purpose

Go live checklist http://www.dominiquedecooman.com/blog/drupal-7-tip-how-automate-and-control-your-go-live-checklist

Install jenkins https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu

https://www.gandi.net/hosting/trial/ Get all the code, job scripts and presentation overview:

http://dominiquedecooman.com/blog/automating-drupal-deployment

Resources