Installing Drupal with Ansible

Installing Drupal with Ansible

Josh Finnie

Who am I

The Project

  • To convert NASA Science's CMS
  • Currently is Django (with Fein CMS)
  • Moving to Drupal 7

Gotcha

'Cloud'

THE CLOUD!

The Cloud

  • Amazon Web Services
    • EC2
    • (Hopefully) S3
    • Cloudfront
    • ect...
  • Need a way to keep persist instances.
  • Can do very little "hands-on" work.

Enter Ansible

Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. [http://docs.ansible.com/]

But What is Ansible

  • Not really like Puppet or Chef
  • Much, much simpler...

Reasons for Ansible

  • Easy automation
  • Repeatable workflow.
  • Hands-off Installation

This allows "cloud-scale"

Installing Ansible

$ which python pip
python is /usr/bin/python
pip is /usr/bin/pip
$ pip install ansible

That's it!

Using Ansible

  • Ansible uses configurations called Playbooks
  • They are written in YAML

Playbooks are Ansible’s configuration, deployment, and orchestration language.

  • Playbooks use Roles
    • The basic building blocks of Ansible.

Using Ansible (Con't)

Create Playbooks & Roles for each different machine type:

  • Webservers
  • MongoDB
  • Hadoop
  • Gluster (Brick & Clients)
  • etc...

More Examples here.

Automating Drupal

  • For Drupal, we have some Roles needed:
    • A LAMP stack
    • Drupal itself
    • Modules using drush

Science@NASA Specifics

We're using Ansible to install the following on Ubuntu 12.04:

  • PHP5
  • Apache
  • Drupal
  • Gluster
  • More to come?

Walk Through

Connect with me

Tonight's Slides

Questions

?

Resources & Credits