the spock guide to think out of the vagrant box
DESCRIPTION
Presented at Australasian Open Source Developers Conference 2013, Auckland, New Zealand : A wrapper around VirtualBox and configuration management beauties such as Puppet and Chef, Vagrant is a great piece of open source software to create and configure your ideal development environments, virtually. This talk will try to discuss how a developer, administrator(operator) or both, can take advantage from Vagrant and how it helps in modern days multienvironments server provisioning and of course, to demolish the standard “works on my machine” pretextTRANSCRIPT
The Spock Guide To Think Out of The Vagrant Box
Errazudin Ishak
AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary
Who Am IErrazudin IshakAny-Stack-Dev-OpsSolutions ArchitectSakura Sky Media since [email protected]/errazudin
I Was Here 2009foss.my, MyGOSSCON
2010Ent. PHP Techtalk, BarcampKL, PHP Malaysia, MOSC.my, PHP Northwest UK, MyGOSSCON
2011Wordpress Conf. Asia, Joomla! Day KL, MOSC.my, OWASP Day KL
I Was Here2012OWASP AppSec Asia Pac. Sydney, MOSC.my
2013MOSC.my, OSDC NZ (yay!)
AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary
What on earth
VagrantVM without GUI
simple wrapper around vbox/vmware
Vagranttool for building and distributing development (working) environments
Vagrantlightweight, reproducible, and portable
VagrantMac, Windows, Linux
Vagrantworking environments made easy (locally or in the cloud)
Plugins (shell, chef, puppet, cfengine, salt, ansible)
AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary
"Developers are like vampires. They're frequently up all night, paler than death itself, and generally afraid of being exposed to daylight. Oh yes, and they tend think of themselves (or at least their code) as immortal." - www.codinghorror.com
“System Administrators are like werewolves. They may look outwardly ordinary, but are incredibly strong, mostly invulnerable to stuff that would kill regular people -- and prone to strange transformations during a moon "outage". - www.codinghorror.com
For what reasonsuper duper working container
easy to configure, reproducible
portable work environments
For what reasonmaximize team productivity and flexibility
Developers <3 Sysadmins
AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary
1: Get it all warmupInstall virtualboxhttps://www.virtualbox.org/wiki/Downloads
Install vagranthttp://docs.vagrantup.com/v2/installation/index.html
2: Initialization Download, Initialize$ vagrant init precise64 http://files.vagrantup.com/precise64.box
*3: Hack Your Vagrantfile Port forwarding, Networking, Fine tune resources, Provisioning ..
*optional, extra fun guaranteed
4: Dive in Up and away$ vagrant upBringing machine 'default' up with 'virtualbox' provider...[default] Clearing any previously set forwarded ports...[default] Creating shared folders metadata...[default] Clearing any previously set network interfaces...[default] Preparing network interfaces based on configuration...[default] Forwarding ports...[default] -- 22 => 2222 (adapter 1)[default] Booting VM...[default] Waiting for machine to boot. This may take a few minutes...[default] Machine booted and ready![default] Configuring and enabling network interfaces...[default] Mounting shared folders...[default] -- /vagrant
SSH$ vagrant ssh
AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary
Ok, Now WhatRemember this?
Ok, Now WhatFinally...
Developers <3 Everybody
Teamworkdevsisolate dependencies and their configuration within a single disposable, consistent environment, without sacrificing any of the tools
opsdisposable environment and consistent workflow for developing and testing infrastructure management scripts
dsgnrautomatically setup everything required for that web app
V for Victory!
AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary
Hey, can I ..Build my own box from 0?
How about my own SSH keys?
Hey, can I ..Build my own box from 0? YES
Custom box with veeweehttps://github.com/jedi4ever/veewee
Hey, can I ..My own SSH keys? YES
config.ssh.* default.private_key_path private_key_path default.username
username ...
Yay!
AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary
Summary
Summarylightweight, reproducible, and portable working environment
maximize team productivity and flexibility
minimize development $
Dig 'em outhttps://www.virtualbox.org/wiki/Downloadshttp://docs.vagrantup.com/v2/installation/index.htmlhttp://www.vagrantbox.es/https://github.com/jedi4ever/veeweehttps://speakerdeck.com/mheap/vagrant-plus-ansible
Dig 'em outpuphpet.com
Dig 'em outdocker.io
Dig 'em outgithub.com/ansible/ansible
Thank You@errazudin
* no aliens/animals were harmed in the making of this presentation. Full credit goes to the photos respective owners and/or photographers