Slide 1

Slide 1 text

AN INTRODUCTION TO VAGRANT & VAPROBASH BY DRIES VINTS

Slide 2

Slide 2 text

ABOUT ME ▸ Developer at BeatSwitch ▸ Writer of Laravel Weekly ▸ Contributor for Laracon EU

Slide 3

Slide 3 text

THE GOALS ▸ Intro to Vagrant ▸ Start using Vaprobash

Slide 4

Slide 4 text

DEVOPS

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

WHAT WILL THIS TALK NOT COVER? ▸ Detailed provisioning ▸ Server configuration (Apache, Nginx) ▸ Vagrant deployment

Slide 7

Slide 7 text

WHAT WILL THIS TALK COVER? ▸ Quick intro of Vagrant & basics ▸ Quick overview of provisioners ▸ Getting started with Vaprobash

Slide 8

Slide 8 text

WHAT IS VAGRANT? ▸ Created by Mitchell Hashimoto in 2010 ▸ Development environments ▸ Lightweight, reproducible and sharable

Slide 9

Slide 9 text

WHY VAGRANT?

Slide 10

Slide 10 text

"It works on my machine"

Slide 11

Slide 11 text

WHY VAGRANT? ▸ Sharable development environments ▸ No more messing w/ your workstation ▸ Works on all major OS: Linux, OSX and Wincrap FREE

Slide 12

Slide 12 text

VAGRANT VS. TRADITIONAL METHODS ▸ MAMP ▸ Development Servers ▸ Personal Virtual Servers

Slide 13

Slide 13 text

DEVELOP ON VIRTUAL PRODUCTION ENVIRONMENTS

Slide 14

Slide 14 text

TERMINOLOGY ▸ Boxes (vagrantcloud.com) ▸ Host and Guest ▸ Provider (Virtualbox, VM Ware) ▸ Provisioner ▸ Synced Folder ▸ Vagrantfile

Slide 15

Slide 15 text

GETTING STARTED

Slide 16

Slide 16 text

WHAT YOU NEED ▸ Vagrant ▸ Virtualbox or VM Ware

Slide 17

Slide 17 text

VAGRANTFILE Vagrant.configure("2") do |config| config.vm.box = "hashicorp/precise32" config.vm.provision :shell, :path => "bootstrap.sh" config.vm.network :forwarded_port, host: 4567, guest: 80 end

Slide 18

Slide 18 text

COMMANDS $ vagrant up $ vagrant reload $ vagrant halt $ vagrant suspend $ vagrant resume $ vagrant provision $ vagrant ssh $ vagrant destroy $ vagrant share

Slide 19

Slide 19 text

VAGRANT CLOUD vagrantcloud.com ▸ Vagrant share ▸ Box distribution (private or public) ▸ Discover boxes

Slide 20

Slide 20 text

PROVISIONING

Slide 21

Slide 21 text

PROVISIONERS ▸ Puppet ▸ Chef ▸ Ansible ▸ Bash

Slide 22

Slide 22 text

PUPPET - CHEF - ANSIBLE ▸ Puppet: not sequential ▸ Chef: high learning curve & chaotic documentation ▸ Ansible: easy (read: easier)

Slide 23

Slide 23 text

VAPROBASH

Slide 24

Slide 24 text

VAPROBASH ▸ Created by Chris Fidao ▸ Vagrant Provisioning Bash Scripts ▸ Goal: easy to use provisioning

Slide 25

Slide 25 text

BASE SUPPORT ▸ Git ▸ PHP ▸ Vim ▸ ...

Slide 26

Slide 26 text

WEB SERVERS ▸ Apache ▸ HHVM ▸ Nginx

Slide 27

Slide 27 text

DATABASES ▸ MySQL ▸ PostgreSQL ▸ SQLite ▸ MongoDB ▸ ...

Slide 28

Slide 28 text

FRAMEWORKS/TOOLS ▸ Composer ▸ Laravel ▸ Symfony ▸ PHPUnit ▸ ...

Slide 29

Slide 29 text

AND MORE ▸ Memcached ▸ Redis ▸ ElasticSearch and ElasticHQ ▸ Beanstalkd ▸ ...

Slide 30

Slide 30 text

XIP.IO # xip.io domain 192.168.22.10.xip.io # or hosts file entry 192.168.22.10 example.loc

Slide 31

Slide 31 text

DEMO!

Slide 32

Slide 32 text

SHOULD I USE VAGRANT?

Slide 33

Slide 33 text

DON'T STOP HERE ALWAYS BE LEARNING

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

RESOURCES ▸ Vaprobash: fideloper.github.io/Vaprobash ▸ Ansible provisioning: getprotobox.com ▸ Web dev screencasts: laracasts.com ▸ For speakers: speaking.io

Slide 36

Slide 36 text

CONTACT ▸ twitter.com/driesvints ▸ [email protected] ▸ github.com/driesvints

Slide 37

Slide 37 text

CREDITS ▸ Erika Heidi for some ideas of her own talk ▸ Chris Fidao for Vaprobash ▸ Mitchell Hashimoto for Vagrant ▸ BeatSwitch for being awesome

Slide 38

Slide 38 text

QUESTIONS?

Slide 39

Slide 39 text

THANK YOU!