the spock guide to think out of the vagrant box

42
The Spock Guide To Think Out of The Vagrant Box Errazudin Ishak

Upload: errazudin-ishak

Post on 13-May-2015

656 views

Category:

Technology


1 download

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 multi­environments server provisioning and of course, to demolish the standard “works on my machine” pretext

TRANSCRIPT

Page 1: The Spock Guide to Think Out of The Vagrant Box

The Spock Guide To Think Out of The Vagrant Box

Errazudin Ishak

Page 2: The Spock Guide to Think Out of The Vagrant Box

AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary

Page 3: The Spock Guide to Think Out of The Vagrant Box

Who Am IErrazudin IshakAny-Stack-Dev-OpsSolutions ArchitectSakura Sky Media since [email protected]/errazudin

Page 4: The Spock Guide to Think Out of The Vagrant Box

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

Page 5: The Spock Guide to Think Out of The Vagrant Box

I Was Here2012OWASP AppSec Asia Pac. Sydney, MOSC.my

2013MOSC.my, OSDC NZ (yay!)

Page 6: The Spock Guide to Think Out of The Vagrant Box

AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary

Page 7: The Spock Guide to Think Out of The Vagrant Box

What on earth

Page 8: The Spock Guide to Think Out of The Vagrant Box

VagrantVM without GUI

simple wrapper around vbox/vmware

Page 9: The Spock Guide to Think Out of The Vagrant Box

Vagranttool for building and distributing development (working) environments

Page 10: The Spock Guide to Think Out of The Vagrant Box

Vagrantlightweight, reproducible, and portable

Page 11: The Spock Guide to Think Out of The Vagrant Box

VagrantMac, Windows, Linux

Page 12: The Spock Guide to Think Out of The Vagrant Box

Vagrantworking environments made easy (locally or in the cloud)

Plugins (shell, chef, puppet, cfengine, salt, ansible)

Page 13: The Spock Guide to Think Out of The Vagrant Box

AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary

Page 14: The Spock Guide to Think Out of The Vagrant Box

"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

Page 15: The Spock Guide to Think Out of The Vagrant Box

“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

Page 16: The Spock Guide to Think Out of The Vagrant Box

For what reasonsuper duper working container

easy to configure, reproducible

portable work environments

Page 17: The Spock Guide to Think Out of The Vagrant Box

For what reasonmaximize team productivity and flexibility

Page 18: The Spock Guide to Think Out of The Vagrant Box

Developers <3 Sysadmins

Page 19: The Spock Guide to Think Out of The Vagrant Box

AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary

Page 20: The Spock Guide to Think Out of The Vagrant Box

1: Get it all warmupInstall virtualboxhttps://www.virtualbox.org/wiki/Downloads

Install vagranthttp://docs.vagrantup.com/v2/installation/index.html

Page 21: The Spock Guide to Think Out of The Vagrant Box

2: Initialization Download, Initialize$ vagrant init precise64 http://files.vagrantup.com/precise64.box

Page 22: The Spock Guide to Think Out of The Vagrant Box

*3: Hack Your Vagrantfile Port forwarding, Networking, Fine tune resources, Provisioning ..

*optional, extra fun guaranteed

Page 23: The Spock Guide to Think Out of The Vagrant Box

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

Page 24: The Spock Guide to Think Out of The Vagrant Box

AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary

Page 25: The Spock Guide to Think Out of The Vagrant Box

Ok, Now WhatRemember this?

Page 26: The Spock Guide to Think Out of The Vagrant Box

Ok, Now WhatFinally...

Page 27: The Spock Guide to Think Out of The Vagrant Box

Developers <3 Everybody

Page 28: The Spock Guide to Think Out of The Vagrant Box

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

Page 29: The Spock Guide to Think Out of The Vagrant Box

V for Victory!

Page 30: The Spock Guide to Think Out of The Vagrant Box

AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary

Page 31: The Spock Guide to Think Out of The Vagrant Box

Hey, can I ..Build my own box from 0?

How about my own SSH keys?

Page 32: The Spock Guide to Think Out of The Vagrant Box

Hey, can I ..Build my own box from 0? YES

Custom box with veeweehttps://github.com/jedi4ever/veewee

Page 33: The Spock Guide to Think Out of The Vagrant Box

Hey, can I ..My own SSH keys? YES

config.ssh.* default.private_key_path private_key_path default.username

username ...

Page 34: The Spock Guide to Think Out of The Vagrant Box

Yay!

Page 35: The Spock Guide to Think Out of The Vagrant Box

AgendaWhat on earth..For what reason..So how to do that..Ok, now what..Hey, can I ..Summary

Page 36: The Spock Guide to Think Out of The Vagrant Box

Summary

Page 37: The Spock Guide to Think Out of The Vagrant Box

Summarylightweight, reproducible, and portable working environment

maximize team productivity and flexibility

minimize development $

Page 38: The Spock Guide to Think Out of The Vagrant Box

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

Page 39: The Spock Guide to Think Out of The Vagrant Box

Dig 'em outpuphpet.com

Page 40: The Spock Guide to Think Out of The Vagrant Box

Dig 'em outdocker.io

Page 41: The Spock Guide to Think Out of The Vagrant Box

Dig 'em outgithub.com/ansible/ansible

Page 42: The Spock Guide to Think Out of The Vagrant Box

Thank You@errazudin

[email protected]

* no aliens/animals were harmed in the making of this presentation. Full credit goes to the photos respective owners and/or photographers