Ansible for Drupal Infrastructure

& Deployments
BoF @ #DrupalConLA
Led by: Jeff Geerling
Technical Architect, Acquia
________________________________________
/ "Automation shouldn't be your day job" 
 #ansible #pycon2014 /
----------------------------------------
 ^__^
 (oo)_______
(__) )/
||----w |
|| ||
Agenda
1. Quick Intro to Ansible
2. Demo: Deploying Drupal 8 to the #Dramble
3. Drupal VM, Roundtable discussion, etc.
“Configuration management for humans.” (— Me, 2014)

Uses SSH

Secure, fast, simple

Don't need configuration management to manage your configuration
management.
Ansible 101
1. Inventory: Describe your infrastructure

2. Ad-Hoc commands: Run one-off tasks

3. Playbooks: "Infrastructure as code"
________________________________________
/ Drupal 8 on a cluster of Raspberry Pis 
 #dramble /
----------------------------------------
 ^__^
 (oo)_______
(__) )/
||----w |
|| ||
http://robmyers.org/cc-ironies/no_flash_photography_sign/
Please help me avoid the

Xenon Death Flash
Ad-Hoc commands
Have fun with RGB LEDs!
$ ansible webservers -a "rgb red" -s
Ad-Hoc commands
Have fun with RGB LEDs!
$ ansible webservers -a "rgb red" -s
Group
'Use sudo'
Command
Playbooks
---
- hosts: webservers
sudo: yes
tasks:
- name: Ensure PHP is installed.
apt: name=php5-common state=installed
Playbooks
---
- hosts: webservers
sudo: yes
tasks:
- name: Ensure PHP is installed.
apt: name=php5-common state=installed
Group
Module
Documentation
Arguments
Architecture
Architecture
Architecture
Architecture
Deploying Drupal 8
Demo
See: raspberry-pi-dramble on GitHub
Deploying Drupal 8
1. First deploy: install

$ ansible-playbook main.yml
2. Second deploy: update, import config, rebuild caches

$ ansible-playbook main.yml --extra-vars "drupal_version=1.2.1"
____________________________________
/ Drupal 8 is scalable and (almost) 
 fast! /
------------------------------------
 ^__^
 (oo)_______
(__) )/
||----w |
|| ||
At #MidCamp/#MADCamp (mid-March), it was a different story!
Ansible for DevOps
On LeanPub

Nearly complete!

50% off: http://bit.ly/a4d-drupalcon
Resources
• Ansible documentation

• Ansible Vagrant examples

• Ansible for DevOps

• Raspberry Pi Dramble

• Raspberry Pi Dramble Wiki
Open Discussion
• Drupal VM

• DevShop

• Vlad

• Valkyrie

• Other projects/companies

using Ansible?

Ansible for Drupal infrastructure and deployments