Streamline your drupal development workflow in a 3-tier-environment - A story about drush make and drush aliases



Similar documents
DRUPAL CONTINUOUS INTEGRATION. Part I - Introduction

Drupal Drush Guide. Drupal.org

Putting It All Together. Vagrant Drush Version Control

Simple and powerful site deployment with capistrano

DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

MANAGE AND DEPLOY YOUR SITES WITH DRUSH

A (Web) Face for Radio. NPR and Drupal7 David Moore

How To Manage Change In Jeepers

The CivicActions Drupal Directory Structure. Gregory Heller on twitter) CivicActions.com Seattle Drupal User Group (#seadug) May 2009

Achieving Continuous Integration with Drupal

AVOIDING THE GIT OF DESPAIR

Zero-Touch Drupal Deployment

PKI, Git and SVN. Adam Young. Presented by. Senior Software Engineer, Red Hat. License Licensed under

Web Developer Toolkit for IBM Digital Experience

Automate Your Deployment with Bamboo, Drush and Features DrupalCamp Scotland, 9 th 10 th May 2014

Annoyances with our current source control Can it get more comfortable? Git Appendix. Git vs Subversion. Andrey Kotlarski 13.XII.

Git - Working with Remote Repositories

Drupalcamp Vienna 2009

How To Manage A Multi Site In Drupal

Hosting Drupal on Amazon Web Services (AWS) Heather Wozniak, Ph.D. Web Developer, UW College of Arts & Sciences hwozniak@uw.edu

CPSC 491. Today: Source code control. Source Code (Version) Control. Exercise: g., no git, subversion, cvs, etc.)

Version Control with Git. Linux Users Group UT Arlington. Rohit Rawat

Continuous Integration and Delivery at NSIDC

Drupal to WordPress migration worksheet

HIPAA Compliance Use Case

What we're doing with Drupal at UChicago and how it can help you.

Migrating into Drupal 8

The truth about Drupal

Emergency Preparedness

Setting up a local working copy with SVN, MAMP and rsync. Agentic

Who s me? Zequi Vázquez DevOps & Backend PhD student Hacking & Security Rock n Roll (electric guitarist) Videogames Books

JavaScript Applications for the Enterprise: From Empty Folders to Managed Deployments. George Bochenek Randy Jones

Module 11 Setting up Customization Environment

Version Control! Scenarios, Working with Git!

DRUPAL WEBSITE PLATFORM BUYER S GUIDE

KEEP CALM AND BREATHE DURING DISASTER RECOVERY

Implementing and Managing Windows Server 2008 Hyper-V

Using GitHub for Rally Apps (Mac Version)

Extending Remote Desktop for Large Installations. Distributed Package Installs

Auditing Drupal sites for performance, content and optimal configuration

OS X Modular Imaging and Deployment using Free and Open Source Tools

Version Control with. Ben Morgan

Bubble Code Review for Magento

AUDITING A DRUPAL 7 WEB SITE - OUR METHODOLOGY.

A Git Development Environment

Drupal CMS for marketing sites

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

DEPLOYING DRUPAL USING CAPISTRANO

6422: Implementing and Managing Windows Server 2008 Hyper-V (3 Days)

Rsync: The Best Backup System Ever

TEST AUTOMATION FRAMEWORK

Version Uncontrolled! : How to Manage Your Version Control

Show me the tests! Writing Automated Tests for Drupal

Updating Drupal. Tri-Valley Drupal Users Group August, 2012

Features-Based Deployment

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode On A Macbook Or Macbook (Powerpoint) On

Version Control with Svn, Git and git-svn. Kate Hedstrom ARSC, UAF

IceWarp Server Upgrade

Drupal for Designers

Microsoft PPM for Application Administrators using Microsoft Project Online

The Hitchhiker s Guide to Github: SAS Programming Goes Social Jiangtang Hu d-wise Technologies, Inc., Morrisville, NC

SMSNotify Extension. User Documentation. Automated SMS sender and customer relationship tool. SMSNotify User Documentation 1

Fundamentals of Continuous Integration

Version Control with Git. Kate Hedstrom ARSC, UAF

Introduction to the Git Version Control System

Advanced Server Virtualization: Vmware and Microsoft Platforms in the Virtual Data Center

Our Puppet Story. Martin Schütte. May

This module explains the Microsoft Dynamics NAV architecture and its core components.

Jazz Source Control Best Practices

Managing Projects Using Drupal 8 s Configuration Management System

Writing & Running Pipelines on the Open Grid Engine using QMake. Wibowo Arindrarto DTLS Focus Meeting

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

using version control in system administration

Drupal in the Cloud. Scaling with Drupal and Amazon Web Services. Northern Virginia Drupal Meetup

Building, testing and deploying mobile apps with Jenkins & friends

Continuous Integration. CSC 440: Software Engineering Slide #1

Developing tests for the KVM autotest framework

Version Control Your Jenkins Jobs with Jenkins Job Builder

Using Git for Project Management with µvision

Goldseek + Silverseek Website Redesign & Migration

5 Mistakes to Avoid on Your Drupal Website

How To Fix A Bug In Drupal 8.Dev

Using Toaster in a Production Environment

Continuous Integration and Delivery. manage development build deploy / release

A Backup Strategy for Informatics Craig Strachan Version /01/2011

IT Service Continuity Management PinkVERIFY

Introducing Xcode Source Control

What s really under the hood? How I learned to stop worrying and love Magento

Successful PaaS and CI in the Cloud

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

ALERT installation setup

IceWarp to IceWarp Server Migration

Oracle EPM Disaster Recovery High Level Overview

Drupal Site Tuneup. Vroom! Vroom! Kristen Pol / kristen@hook42.com

Data Center Automation with YADT

Developing ASP.NET MVC 4 Web Applications MOC 20486

Outline SSS Microsoft Windows Server 2008 Hyper-V Virtualization

Getting Content into Drupal Using Migrate

install the extension:

Avatier Identity Management Suite

Transcription:

Streamline your drupal development workflow in a 3-tier-environment - thomas.bussmeyer@init.de Berlin, 18.09.2011

1. Who we are 2. Scenario 3. Solution 4. Notes

Who we are Have a look at http://www.init.de

Scenario A typical set-up Code Developer Developer Developer SVN, git files & databases Code (backdoor) Dev Test files Live Live Live Code? Trunk. Database: an old one. I don't know. Plenty of files missing Trunk? Maybe. Database: from july Files: some files missing Code version? Don't know Current database Current files

Scenario Summary The set-up is quite well. (Version control is a good idea. Not to hack live, too. Teamwork with developers is fun.) But it's so slow and too much manual work. (You won't do it every time) And a controlled workflow and automated documentation is missing ( I know what version is on all my boxes. They all have the current database and files on it. )

Scenario Two questions (especially after launch) How do I get my new developments quickly and repeatedly to the development and test servers, finally to the live system? (Automated, every time in the same way, and fast. The project managers and customers are curious. Me too.) How do I ensure that I develop and test under realistic conditions on the development and test system? (I would like to test my new code with the live system.)

Scenario and two presumptions rules Configuration: Everything lives in code and code goes up (Local->SVN, SVN->Dev->Test->Live)! (So get used to features, strongarm and the drupal api) Database and files go down (Live->Test, Live->Dev, Live- >Local). (Don't touch the live files and database after launch! You won't migrate content.)

Solutions Solution? Again two things Introducing: drush make and drush aliases (and some little helper shell scripts) Examples: $ drush make project.make build_20110918-01 $ drush sql-sync @live [@local, @dev, @test]

Solutions drush make the answer to no. 1 drush make is an extension to drush that can create a ready-to-use drupal sites (You might set up a special build server for the build tasks.) It pulls sources from various locations. You can describe it as a build tool for drupal. (Only custom code in you repo. For all the other bricks and pieces you use the official repos.)

Solutions drush make what does it look like ; Drush Make file core = 7.x api = 2 ; MODULES projects[admin_menu][version] = "3.x-dev" projects[admin_menu][subdir] = adm projects[advanced_help][version] = "1.x-dev" projects[advanced_help][subdir] = dev projects[devel][version] = "1.x-dev" projects[devel][subdir] = dev [...]

Solutions drush make it goes even further ; custom svn, git or libraries or patches ; Features projects[atrium_features][type] = "module" projects[atrium_features][download][type] = "git" projects[atrium_features][download][url] = "http://github.com/phase2/a projects[atrium_features][download][tag] = "6.x-1.0" ; Libraries libraries[jquery_ui][download][type] = "get" libraries[jquery_ui][download][url] = "http://jquery-ui.googlecode.com libraries[jquery_ui][directory_name] = "jquery.ui" libraries[jquery_ui][destination] = "modules/contrib/jquery_ui" ; and patches, great! ; To apply a patch to a project, use the `patch` attribute and pass in ; of the patch. projects[admin_menu][patch][] = "http://drupal.org/files/issues/admin_ [...]

Solutions Our repo is a drupal profile projectdir/ config libraries (only custom) modules (only custom module and features) themes (only custom) project.make project.profile

Solutions Code upstream the big picture our svn drupal repo other sources get sources build.sh deploy.sh Dev Test Live Source repos Build server with drush make Drupal builds e.g. build_20110918-01

Solutions And some little helper scripts build.sh, on build server Run drush make Copy setting files Delete unnecessary files Make a build, e.g. build_20110918-01.tar.gz deploy.sh, on dev, test, live server Backup database and current code Get e.g. build_20110918-01 from build server and untar it Symlink files in new build Switch symlink to new build

Scenario Reminder: The two questions How do I get my new developments quickly and repeatedly to the development and test servers? (Automated every time in the same way and fast. The project managers and customers are curious. Me too.) How do I ensure that I develop and test under realistic conditions on the development and test system? (I would like to test my new code with the live system.)

Scenario Reminder: The two questions How do I get my new developments quickly and repeatedly to the development and test servers? (Automated every time in the same way and fast. The project managers and customers are curious. Me too.) How do I ensure that I develop and test under realistic conditions on the development and test system? (I would like to test my new code with the live system.)

Solutions drush aliases the answer to no. 2 Define all your hosts in your enviroment (even the remote ones) Move files and databases around with a single drush command.

Solutions drush aliases what does it look like $aliases['dev'] = array( 'uri' => 'dev.local', 'root' => '/Sites/dev.local', 'path-aliases' => array( '%files' => 'sites/example.com/files', '%dump' => '/tmp/drush/sql-sync-dev-local.sql', ), 'command-specific' => array ( 'sql-sync' => array ( 'simulate' => '0', 'structure-tables' => array( 'custom' => array( 'cache', 'cache_filter', 'cache_menu', 'cache_page', 'histor ), ), ), 'rsync' => array ( 'simulate' => '0', ), ), );

Solutions drush aliases what does it look like $aliases['prod'] = array( 'uri' => 'prod.local', 'root' => '/Sites/prod.local', 'path-aliases' => array( '%files' => 'sites/example.com/files', '%dump' => '/tmp/drush/sql-sync-prod-local.sql', ), 'command-specific' => array ( 'sql-sync' => array ( 'simulate' => '1', ), 'rsync' => array ( 'simulate' => '1', ), ), );

Solutions Data & files downstream the big picture live get database & files local dev test $ drush rsync @live [@local, @dev, @test] $ drush sql-sync @live [@local, @dev, @test]

Notes Final notes Get used to features, strongarm, installation profiles Use drush and drush make to build your application Use drush aliases capabilities to sync your boxes Drush http://drupal.org/project/drush Drush make http://drupal.org/project/drush_make http://developmentseed.org/blog/2010/jul/27/drush-make-files-production-drupal-sites/ http://drupal.org/node/1006620

Thank You for your attention! thomas.bussmeyer@init.de Berlin, 18.09.2011