Drupal Developers Day
     Microsoft Philippines
6750 Ayala Avenue, Makati City




                                 10-27-2012
Automating Drupal
       Deployment
Version Control + Drush + Features


           Gerald Z. Villorente
     Kite Systems Ltd. | CNN Travel
Who am I
* Opensource advocate for 4 years
* Drupal user since 2010 (developer/themer)
* System administrator
* Developer at Kite Systems Ltd.
Deployment
Typical Environment
Deployment Mistakes
Manual Configuration
Production       Dev Server




Staging Server   Local Dev
Version Control

“is any practice that tracks and provides control
   over changes to source code”
– From Wikipedia
Internal Server Error
  404 Not Found
                             409 Conflict
Out of Resources                    Gateway
                                    Timeout
Bad Request
                                    PDO Error

                                403 Forbidden
   Syntax Error
           Invalid Operand
                Types         Access Denied
Version Control (Git, SVN, CVS)
How version control works?
Ok version control rocks,
    but how about the
configuration changes that
     I need to deploy?
Features module – the
answer to your question!



 “The features module enables the capture and
 management of features in Drupal.”
Alright that's (Features)
really awesome! But what if
 there is any other features
   of Drupal that Features
      doesnt support?
Easy boy! We still have an
        option.

    hook_update_N( )
Tools you need



     + SSH
Avoid repetitive task


 Use shell script!
Note: You can use CI
server and put all your
shell script to run every
          build
CI (Jenkins)
Remember!
* Development plan
Remember!
* Development plan
* Test plan
Remember!
* Development plan
* Test plan
* Documentation
Remember!
Local
Remember!
Local

        Dev
Remember!
Local

        Dev

              Staging
Remember!
Local

        Dev

              Staging

                        Prod
Always


Test, test, test!
Questions?

Automating Drupal Deployment