Imagine


...by single command you could generate a 

fully functional 
standalone
customizable
development ready

web environment

Meet


Virtual Box + Vagrant + Puppet + (Drush)

What Is it good for

Allows you to easily generate prod/dev env including:
  • Linux OS (centos based or any other)
  • Apache + necessary modules
  • PHP + necessary extensions
  • MySQL
  • PHPMyAdmin
  • Git / SVN
  • APC / other caching measures
  • XDebug / other debug tools
  • Profiling Tools
  • Other Dev Tools (Editors, etc)

How


  • Virtual Box - allows generating standalone "boxes"
  • Vagrant - allows command lines + configuration capability for the base OS setup
  • Puppet - Provisioning tool which allows installation and configuration of all the environment components
  • Drush - Drupal's swiss army knife for command line junkies

Vagrant


What is vagrant box
What is vagrantfile

Vagrant Commands:
vagrant add
vagrant init
vagrant up
vagrant halt
vagrant provision
vagrant destroy

Puppet


Automation tool to manage a platform from the ground up.

It allows the creation of cookbooks which includes the recipes for installing and configuring a given platform.

Can be leveraged regardless of vagrant

The RAL (resources abstraction layer) concept 

Glossary

  • Class - A collection of related resources, which, once defined, can be declared as a single unit.
  • Manifest - A file containing code written in the Puppet language, and named with the .pp file extension. Describes a system state for the described resources.
  • Module - A collection of classes, resource types, files, and templates, organized around a particular purpose.
  • Node / Agent - Puppet is usually deployed in a simple client-server arrangement, and the Puppet client daemon is known as the “agent” (or node).

PuPhpet

How do you pronounce PuPHPet?   The p is silent. :-)


Awesome Tool!

Provides :
  • Server packages config
  • LAMP config
  • Addition of the dotfiles to the env
  • Easily running shell scripts:
    • exec-always
    • exec-once

Puphpet Structure

Hiera - a key/value lookup tool for configuration data, built to make Puppet better
  • Config.yaml - key / value backbone file (used by hiera)
  • Manifest.pp - Main puppet file.  Single cookbook for all the generated puppet code by puphpet (on top of the contib modules).
  • Puppetfile - specs all the contrib modules to be used (although turned off/on at the config.yaml
  • Vagrantfile - using the config.yaml hiera definitions as well in Puphpet case.
  • Files dir - includes all the scripts and dot files added by the customizer

Drush


  • Drush Make - Drupal core + modules download cookbook file
  • Drush Install - Allows command line profile based installation
  • Drush en - Enabling drupal modules

drushmakeme - UI service for creating make files.

DRush Aliases


  • Drush Aliases Syntax
  • SSH Keys
  • Drush + Aliases + SSH Keys = Remote Operations
  • Examples:
    • drush @live cc all
      Clear all cache on production
    • drush @test fra
      # Revert all features at the test env
    • drush @live sql-dump > dump.sql
      # Have the live DB saved on the current local dir
    • drush @test sqlc < dump.sql 
      # import into test the local dump file

Drush Rebuild


  • drush rebuild @dev --source = @live
    # Based on prescription, clones live into dev
    •  DB sync
    • Files sync
    • DB sensitization (configurable)
    • Anything other drush / command line
  • Drush Shell Aliases:
    • drush test2dev
    • drush live2dev
    • TBD drush live2test?

Drush as a team

  • Central definitions for
    • Aliases
    • Drush Shell Aliases
    • Drush specific settings (e.g. rsync)
  • Possibly symlink .drush to samba to ftopia (see this)
  • Possibly implementing drush policy file

Now What


  • Pilot
  • Future: Master / Agent Dashboard...

Now What

Made with Slides.com