Men$oned in this presenta$on Pre-exisCng environments: - - PowerPoint PPT Presentation

men oned in this presenta on
SMART_READER_LITE
LIVE PREVIEW

Men$oned in this presenta$on Pre-exisCng environments: - - PowerPoint PPT Presentation

Men$oned in this presenta$on Pre-exisCng environments: h#p://virtualbox.org virtual machine Vagrant h#p://vagrantup.com vdd (h#ps://www.drupal.org/project/vdd) Undine ( Ansible h#p://docs.ansible.com


slide-1
SLIDE 1

Men$oned in this presenta$on

  • h#p://virtualbox.org — virtual machine
  • Vagrant — h#p://vagrantup.com
  • Ansible h#p://docs.ansible.com
  • h#p://phansible.com — generator for

Vagran>ile and Ansible playbook

Vagrant quick ref

  • vagrant init — create template Vagran>ile

in current directory

  • vagrant up — boot machine
  • And sets it up if this is our first Cme
  • vagrant suspend — sleep
  • vagrant halt — shut down
  • vagrant reload — reboot
  • vagrant ssh — log in to VM using SSH
  • vagrant destroy — deletes our machine

and its disks

Pre-exisCng environments:

  • vdd (h#ps://www.drupal.org/project/vdd)
  • Undine (

h#ps://www.drupal.org/project/undine)

  • Based on Acquia Cloud (unofficial)
  • h#ps://www.drupal.org/project/vagrant
  • h#p://vampd.io
  • h#p://www.drupalvm.com
slide-2
SLIDE 2

Easy, repeatable development environments using virtualiza$on and provisioning

CHASE CATHCART WRIGHT STATE UNIVERSITY DRUPALCAMP OHIO OCTOBER 23, 2015

slide-3
SLIDE 3

How do you do things currently?

1. Edit live via WebFTP 2. drush run-server 3. Local full stack: LAMP, MAMP, WAMP, WIMP, ... 4. LAMP in a virtual machine How does it go when you deploy a code change?

  • “It worked on my machine.”
  • Are you matching your local

configuraCon to producCon (including so_ware versions)?

Keep Calm-o-MaCc

slide-4
SLIDE 4

Objec$ves

1. Isolate development environments for different servers from one another and from your local machine where possible 2. Make reproducCon repeatable, quick, and easy 3. Reproduce our producCon environments, as closely as possible, locally

slide-5
SLIDE 5

Vagrant Ansible

VirtualBox

Virtualiza$on

VirtualBox virtualbox.org

slide-6
SLIDE 6

Vagrant Ansible

VirtualBox

Virtualiza$on

VirtualBox virtualbox.org

slide-7
SLIDE 7

Vagrant Ansible

VirtualBox

Provisioning

aka “IT AutomaCon” Ansible

  • Others: chef, puppet, shell

scripts

Runs a series of tasks

  • Playbook

docs.ansible.com

slide-8
SLIDE 8

Vagrant Ansible

VirtualBox

User interface

Vagrant Vagran>ile: system configuraCon recipe

  • Create VM, set parameters
  • Install a base "box”—lightweight OS

image

  • Pass off to the provisioner once online

Provides commands for managing the VM

  • vagrant up — boot machine, checking

against the Vagran>ile

  • And sets it up if this is our first Cme
  • vagrant suspend— sleep
  • vagrant halt — shut down
  • vagrant reload — reboot
  • vagrant ssh — log in to VM using SSH

vagrantup.com

slide-9
SLIDE 9

Vagrant Ansible

VirtualBox

Off-the-shelf dev environments

Drupal VM

  • @geerlingguy

Others:

  • Vagrant Drupal Development

(VDD)

  • Undine
  • Based on Acquia Cloud (unofficial)
  • drupal.org/project/vagrant
  • vampd.io
slide-10
SLIDE 10

Objec$ves

1. Isolate development environments for different servers from one another and from your local machine where possible 2. Make reproducCon repeatable, quick, and easy 3. Reproduce our producCon environments, as closely as possible, locally

slide-11
SLIDE 11

Reproducing your produc$on environment

Visitor Firewall appliance Load balancer HTTPS service Varnish HTTPD PHP+APC Drupal memcached Legacy webserver NFS MySQL N applicaCon servers - RHEL 1 DB server - RHEL

slide-12
SLIDE 12

Building your own environment

Vagran>ile Provisioner file

  • Playbook
  • Something besides Ansible

Helpers

  • Phansible (phansible.com) — Vagran>ile + playbook generator
  • PuPHPet
  • Vagrantbox.es and vagrantcloud.com — Boxes
  • Ansible Galaxy — Contributed roles (collecCons of tasks and more)
slide-13
SLIDE 13

Considera$ons

Which things ma#er?

  • Versions, definitely (A.B.c)
  • Equivalences can be ok (e.g., Red

Hat => CentOS)

  • You're not going to match every

single thing up

Build out in stages Windows Technical things: Networking

  • Port forwarding or a private LAN?
  • Access other devices (e.g., mobiles)
  • VPN :-/

SELinux Storage

  • VirtualBox shared filesystem
  • NFS
  • Rsync
slide-14
SLIDE 14

Steps to bliss, summarized

1. Install VirtualBox, Vagrant, Ansible 2. Make or download your development environment

  • It may have addiConal dependencies to install

3. 'vagrant up' 4. ... 5. Profit! 6. Screw something up? 'vagrant destroy’

slide-15
SLIDE 15

Easy, repeatable development environments using virtualiza$on and provisioning

CHASE CATHCART WRIGHT STATE UNIVERSITY DRUPALCAMP OHIO OCTOBER 23, 2015