Ansible for Drupal infrastructure and deployments

21
Ansible for Drupal Infrastructure & Deployments BoF @ #DrupalConLA Led by: JeGeerling Technical Architect, Acquia ________________________________________ / "Automation shouldn't be your day job" \ \ #ansible #pycon2014 / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||

Transcript of Ansible for Drupal infrastructure and deployments

Ansible for Drupal Infrastructure& Deployments

BoF @ #DrupalConLA Led by: Jeff GeerlingTechnical Architect, Acquia

________________________________________ / "Automation shouldn't be your day job" \\ #ansible #pycon2014 / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||

Agenda1. 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 SSHSecure, fast, simple

Don't need configuration management to manage your configuration management.

Ansible 1011. 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 commandsHave fun with RGB LEDs!

$ ansible webservers -a "rgb red" -s

Ad-Hoc commandsHave 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 81. 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 DevOpsOn LeanPubNearly 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/companiesusing Ansible?