Automating drupal deployment
This presentation is the property of its rightful owner.
Sponsored Links
1 / 19

Automating Drupal Deployment PowerPoint PPT Presentation


  • 73 Views
  • Uploaded on
  • Presentation posted in: General

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

Download Presentation

Automating Drupal Deployment

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Automating drupal deployment

Automating Drupal Deployment

Dominique De Cooman


Who am i

Who am I

Developer for 5 years

Web agencies in Belgium

http://drupal.org/user/199987

Contributions

Blog http://dominiquedecooman.com


Why deploying automaticaly

Why deploying automaticaly

Faster

Less errors

Well documented

Reproducable

History

Continous Integration


Basic components

Basic components

Vps with a Lamp stack

Version control – Git

Drush

Drupal of course

Dev – Staging – Production setup

Continous integration server

Deployment scripts


How to set it up

How to set it up?

  • 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


Install your lamp stack

Install your lamp stack

  • Plenty of installation scripts online

  • Example

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


Version control

Version control

  • Git

  • We willuse the succesfullbranching model

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

  • Git flow

    • Productionbranch

    • Development branch

    • Release branch

    • Hotfixes

    • Install

      • Git flow

      • Bash complete


Drush

Drush

  • DRUpal SHell

  • Install

    • http://drupal.org/project/drush

  • Drush aliasses

    • Simplyfies executing commands in builds


Drupal

Drupal

  • Create a proper repositorylayout

    • Bash

      • Updates

      • Installs

      • scripts

    • Docroot

    • Documentation

    • Etc

      • Drupal (settings files, robot.txt, htaccess, …)

      • Drush - aliases

      • Ssh

      • vhost

  • Configureyou server toconnecttodrupal.


Continous integration server

Continous integration server

  • Jenkins

    • Install

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

  • Why?

    • Automate our workflow

    • Execute our tests


Automating the workflow

Automating the workflow

Exporting database changes

Configuring jenkins jobs

Writing deployment scripts


Exporting database changes

Exporting database changes

Use features

Use hook_update()

D8 configuration management in core


Configuring the jobs

Configuring the jobs

  • Jenkins

    • Create jobs

      • Environments

      • Testbots

    • Basic setup

      • General settings

      • Repositoryconfiguration

      • Build triggers

      • Post build actions


Build section

Build section

  • Copy files

    • Update the code

    • Settings file

    • Copy build script


Deploy scripts

Deploy scripts

  • Enable/Disable ui modules

  • Set environment specific variables

    • Error_level

    • Cache

  • Revert features

  • Update the database

  • Flush cache


Differences per environment

Differences per environment

  • Modules

    • Leave the opportunity to debug

  • Error level

  • Caching settings

  • Staging and production must by identical

    • Representative

    • No testrun on production


Automating drupal deployment

Demo

Develop on feature branch

Run testbot – fix error

Export changes

Commit

Merge feature in developmentbranch

Deploy on development environment

Monitor job execution

Evaluate tests

Manual testing

Create release branch

Deploy release branch on staging environment

Evaluate tests

Mergebranchinto master anddevelopment

Deploy master on production environment

Createhotfixbranch - maintenance

Test anddeployhotfixbranch

Mergehotfixinto master andmergeintodevelopment

Deploy master


References

References

http://dominiquedecooman.com

http://durpal.org/user/199987

http://twitter.com/dominiquedc


Resources

Resources

Minimizingoverhead 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

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

https://www.gandi.net/hosting/trial/

Get all the code, job scripts andpresentationoverview: http://dominiquedecooman.com/blog/automating-drupal-deployment


  • Login