cloud driven development: a better workflow, less worries, and more power
DESCRIPTION
Platform-as-a-service (PaaS) solutions have recently sprung up for Drupal, with Pantheon and Acquia Dev Cloud leading the race. The advantages are plentiful: zero set-up costs, instant upscaling, the use of powerful services such as Apache Solr, Varnish, Redis/Memcached, automated Drupal core updates, site profiling tools, etc. In this session, I’ll make Drupal developers familiar with PaaS, and show the concepts of “Cloud-driven development” to speed up development and deployment processes. I will show how to use your local, development, test and production environments to organize your Drupal development, and push changes back and forth using Git, Features and Drush, eliminating the need to share the database and pushing changes exclusively via code. Finally, Drush will make your deployment a breeze. With the free developer subscription of Pantheon and a series of Drush commands and scripts, you will be able to start developing and deploying your own Drupal projects in the cloud, and never again worry about your server. After all, you are a Drupal Developer, not a System Administrator!TRANSCRIPT
Cloud Driven Development
Peter Vanhee20th October 2012 - DrupalCamp Spain
a better workflow, less worries, and more power
‣ Consumer and contributor to Drupal for over 6 years @pvhee
‣ Co-founder Marzee Labs @marzeelabs, a web shop from Barcelona
‣ http://marzeelabs.org
Who am I?
The Cloud
“The cloud has given has us the ability to provide nearly limitless, on-demand resources to speed up our web development and deployment processes”
For me?
Photo from Flickr by Abode of Chaos
The Cloud
Is that enough?
Enter PaaS
‣ “Platform-as-a-service”
‣ Yet another service built on top of the cloud
‣ Provides a computing platform and a solution stack
Source: Wikipedia
Know any?
Paas for Drupal
In general, Drupal PaaS offer
‣ Different environments. Typically a development, staging and production environment
‣ Code repository, e.g. git
‣ On-demand resources
‣ Specialty services for search, caching, performance optimization, etc.
‣ A lot of automation of the tools you typically use (or want to) when building Drupal sites
More good stuff
‣ one-click installs of Drupal distributions
‣ they teach you awesome developer processes
Disadvantages?
‣ Difficult to break away from the standard setup
‣ Not always shell access - and shell in generally very limited
‣ Cannot install just anything
Cuts most of the deals
Enter Cloud Driven Development
“Cloud Driven Development puts the fun back into your Drupal development and deployment”
Cloud Driven Development Model
adev btest clive
u local
Cloud Driven Development Modelfor your Team
adev
u local u local
Cloud Driven Development Modelwith the Client
btest clive
Revise new features Work on content
Cloud Driven Development Modelfor Everyone Else
clive
Cloud Driven Development Model
adev btest clive
u local
gngn
gn
g files and n database move from right to left t code moves from left to right
t t
t
The Ingredients
Drush+
“exportables”
for Cloud DD
Demo using Pantheon
Free developer tier at http://getpantheon.com
Spinning up a new site
Go
> git clone git@* drupalcamp_spain
u local
At Marzee Labs we maintain our own Drupal distribution
‣ contains modules and sandboxes we always use
‣ has some features we always need
‣ has smart settings preconfigured
mz/mz.makemz/mz.profilemz/mz.installmz/mz.info
Make our site
> drush make --no-core profiles/mz/mz.make .
From to
> git add -A .> git commit -m "Built site from MZ"> git push origin master
u local adev
Install your site on adev
Install your site (2)
A typical development flow
‣ pull the database from the dev/test/live environment *
‣ drush dl awesome_module
‣ configure and export
‣ enable the module, in our site feature
* if you follow a real database-free development flow, you should do this only once at the beginning
First: get your drush aliases
adev
btest
clive
ulocal
> drush @pantheon.dcspain.dev
> drush @pantheon.dcspain.test
> drush @pantheon.dcspain.live
from to
Deploy on
> git push origin master
> drush @pantheon.dcspain.dev updatedb
> drush @pantheon.dcspain.dev fra
> drush @pantheon.dcspain.dev cc all
adev
Deploy on btest
Hello Pandarus
‣ A drupal sandbox* by wodenx
‣ For command-line freaks
‣ Deploy via command-line
‣ Syncronize databases and files
* http://drupal.org/sandbox/wodenx/1512788 soon to be a full d.o. project
Deploy faster with Pandarus
> drush pan-deploy test
Syncing database and files never was easier
> drush pan-sql-sync @pantheon.dcspain.dev @self
> drush rsync @pantheon.dcspain.dev:%files @self:%files
Pre-launch dev cycle
adev btest
u local
gn
t
t gn
Going Live
btest clive
t
gn
Searching like a pro
Caching like a boss
‣ varnish / nginx - for anonymous users
‣ redis - for authenticated users
Site Profiling
Ou Yeah.. there is more
‣ Drupal core updates
‣ On-server development - hot fixes directly on the server
Things to look out for
‣ Drupal 8 and the CMI: will make exportables much better (think: bye-bye Features)
‣ More command-line magic
‣ More automation
‣ Cloud Driven Development: the future for Drupal?