cloud driven development: a better workflow, less worries, and more power

46
Cloud Driven Development Peter Vanhee 20th October 2012 - DrupalCamp Spain a better workflow, less worries, and more power

Upload: marzee-labs

Post on 15-Jan-2015

1.355 views

Category:

Technology


0 download

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

Page 1: Cloud Driven Development: a better workflow, less worries, and more power

Cloud Driven Development

Peter Vanhee20th October 2012 - DrupalCamp Spain

a better workflow, less worries, and more power

Page 2: Cloud Driven Development: 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?

Page 3: Cloud Driven Development: a better workflow, less worries, and more power

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”

Page 5: Cloud Driven Development: a better workflow, less worries, and more power

The Cloud

Page 6: Cloud Driven Development: a better workflow, less worries, and more power

Is that enough?

Page 7: Cloud Driven Development: a better workflow, less worries, and more power

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

Page 8: Cloud Driven Development: a better workflow, less worries, and more power

Know any?

Page 9: Cloud Driven Development: a better workflow, less worries, and more power

Paas for Drupal

Page 10: Cloud Driven Development: a better workflow, less worries, and more power

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

Page 11: Cloud Driven Development: a better workflow, less worries, and more power

More good stuff

‣ one-click installs of Drupal distributions

‣ they teach you awesome developer processes

Page 12: Cloud Driven Development: a better workflow, less worries, and more power

Disadvantages?

‣ Difficult to break away from the standard setup

‣ Not always shell access - and shell in generally very limited

‣ Cannot install just anything

Page 13: Cloud Driven Development: a better workflow, less worries, and more power

Cuts most of the deals

Page 14: Cloud Driven Development: a better workflow, less worries, and more power

Enter Cloud Driven Development

“Cloud Driven Development puts the fun back into your Drupal development and deployment”

Page 15: Cloud Driven Development: a better workflow, less worries, and more power

Cloud Driven Development Model

adev btest clive

u local

Page 16: Cloud Driven Development: a better workflow, less worries, and more power

Cloud Driven Development Modelfor your Team

adev

u local u local

Page 17: Cloud Driven Development: a better workflow, less worries, and more power

Cloud Driven Development Modelwith the Client

btest clive

Revise new features Work on content

Page 18: Cloud Driven Development: a better workflow, less worries, and more power

Cloud Driven Development Modelfor Everyone Else

clive

Page 19: Cloud Driven Development: a better workflow, less worries, and more power

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

Page 20: Cloud Driven Development: a better workflow, less worries, and more power

The Ingredients

Drush+

“exportables”

for Cloud DD

Page 21: Cloud Driven Development: a better workflow, less worries, and more power

Demo using Pantheon

Free developer tier at http://getpantheon.com

Page 22: Cloud Driven Development: a better workflow, less worries, and more power

Spinning up a new site

Page 23: Cloud Driven Development: a better workflow, less worries, and more power
Page 24: Cloud Driven Development: a better workflow, less worries, and more power

Go

> git clone git@* drupalcamp_spain

u local

Page 25: Cloud Driven Development: a better workflow, less worries, and more power

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

Page 26: Cloud Driven Development: a better workflow, less worries, and more power

Make our site

> drush make --no-core profiles/mz/mz.make .

Page 27: Cloud Driven Development: a better workflow, less worries, and more power

From to

> git add -A .> git commit -m "Built site from MZ"> git push origin master

u local adev

Page 28: Cloud Driven Development: a better workflow, less worries, and more power

Install your site on adev

Page 29: Cloud Driven Development: a better workflow, less worries, and more power

Install your site (2)

Page 30: Cloud Driven Development: a better workflow, less worries, and more power

Pantheon Dashboard

From http://getpantheon.com

Page 31: Cloud Driven Development: a better workflow, less worries, and more power

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

Page 32: Cloud Driven Development: a better workflow, less worries, and more power

First: get your drush aliases

adev

btest

clive

ulocal

> drush @pantheon.dcspain.dev

> drush @pantheon.dcspain.test

> drush @pantheon.dcspain.live

from to

Page 33: Cloud Driven Development: a better workflow, less worries, and more power

Deploy on

> git push origin master

> drush @pantheon.dcspain.dev updatedb

> drush @pantheon.dcspain.dev fra

> drush @pantheon.dcspain.dev cc all

adev

Page 34: Cloud Driven Development: a better workflow, less worries, and more power

Deploy on btest

Page 35: Cloud Driven Development: a better workflow, less worries, and more power

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

Page 36: Cloud Driven Development: a better workflow, less worries, and more power

Deploy faster with Pandarus

> drush pan-deploy test

Page 37: Cloud Driven Development: a better workflow, less worries, and more power

Syncing database and files never was easier

> drush pan-sql-sync @pantheon.dcspain.dev @self

> drush rsync @pantheon.dcspain.dev:%files @self:%files

Page 38: Cloud Driven Development: a better workflow, less worries, and more power

Pre-launch dev cycle

adev btest

u local

gn

t

t gn

Page 39: Cloud Driven Development: a better workflow, less worries, and more power

Going Live

btest clive

t

gn

Page 40: Cloud Driven Development: a better workflow, less worries, and more power

Searching like a pro

Page 41: Cloud Driven Development: a better workflow, less worries, and more power

Caching like a boss

‣ varnish / nginx - for anonymous users

‣ redis - for authenticated users

Page 42: Cloud Driven Development: a better workflow, less worries, and more power

Scale!

From http://getpantheon.com

Page 43: Cloud Driven Development: a better workflow, less worries, and more power

Site Profiling

Page 44: Cloud Driven Development: a better workflow, less worries, and more power

Ou Yeah.. there is more

‣ Drupal core updates

‣ On-server development - hot fixes directly on the server

Page 45: Cloud Driven Development: a better workflow, less worries, and more power

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?

Page 46: Cloud Driven Development: a better workflow, less worries, and more power

Thanks!http://marzeelabs.org @marzeelabs