$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Getting Started with Vagrant
Search
Erika Heidi
March 02, 2014
Programming
5
1.2k
Getting Started with Vagrant
Talk presented at DevFest Women in Istanbul #womentechmakers
Erika Heidi
March 02, 2014
Tweet
Share
More Decks by Erika Heidi
See All by Erika Heidi
FreeCAD 101 Lightning Talk
erikaheidi
0
35
Learning Lab: WordPress
erikaheidi
0
110
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
180
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
220
Automatizando documentação em PHP com Autodocs
erikaheidi
0
170
Building the World: The Story Behind Wolfi
erikaheidi
0
790
Hello Wolfi
erikaheidi
1
770
Container Images for the Cloud Native Era
erikaheidi
1
430
Creating Secure Container Images with apko
erikaheidi
0
610
Other Decks in Programming
See All in Programming
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
190
開発に寄りそう自動テストの実現
goyoki
2
1.5k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
GISエンジニアから見たLINKSデータ
nokonoko1203
0
180
Developing static sites with Ruby
okuramasafumi
0
330
チームをチームにするEM
hitode909
0
400
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
470
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
26k
愛される翻訳の秘訣
kishikawakatsumi
3
350
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
120
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
870
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Technical Leadership for Architectural Decision Making
baasie
0
190
The Cult of Friendly URLs
andyhume
79
6.7k
How to build a perfect <img>
jonoalderson
0
4.7k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
Transcript
None
whoami • Brazilian, living in Amsterdam since 2012 • PHP
<independent> developer, eventually sysadmin • Author of Vagrant Cookbook on LeanPub
What to expect from this talk • Introduction to Vagrant
– Terminology, basic usage • Provisioning – Choosing a Provisioner – Practical Example with Ansible • ProTips • Useful Resources
None
“It works on my machine” - every developer, ever
1.1 Why Vagrant • Reproducible and portable development environment •
Enables easier code collaboration • Backend env tests / benchmark • Automation Tools learning and testing
1.2 What you need (basic) • Vagrant [1.4.x] • VirtualBox
[4.3.x]
None
1.3 Terminology • Boxes • Host and Guest • Provider
• Provisioner • Synced Folder • Vagrantfile
1.4 Getting Started Vagrant.configure("2") do |config| config.vm.box = "precise64" config.vm.box_url
= "http://files.vagrantup.com/precise64.box" config.vm.provision "shell", inline: "echo hello, this is a simple Shell Provisioner!" end
Output
None
None
2.1 Shell x Automation Tools • Automation Tools have powerful
built-in features – Clear language – Idempotent State – Templating – Modularization
2.2 Automation Tools PUPPET CHEF ANSIBLE Syntax Custom based on
Ruby Ruby YAML Terminology Manifests / Modules Recipes / CookBooks Playbooks / Roles Exec. Order Not sequential Sequential Sequential Documentation Confusing Chaotic Excellent Popularity 1st 2nd 3rd Extra Requirements - - ansible Overall Learning Curve Moderate High Low
Pratical Example Nginx + PHP5: Ansible
Vagrantfile config.vm.provision "ansible" do |ansible| ansible.playbook = "playbook.yml" end
Playbook --- - hosts: all sudo: true tasks: - name:
Update apt apt: update_cache=yes - name: Install Nginx apt: pkg=nginx state=latest - name: Install PHP5-fpm apt: pkg=php5-fpm state=latest
Output
None
3.1 Installing Packages • Package managers are usually outdated –
Make SURE you run apt-get update first
3.2 Debugging • Unknown Vagrant error – Use VirtualBox /
Vmware GUI • Unknown Provisioner error – Increase provisioner verbosity • Not working as expected – Login, fix, automate
None
Vagrant Cookbook Special discount coupon for DevFest Women: http://leanpub.com/vagrantcookbook/c/devfestw
puphpet.com
phansible.com
Comparing Provisioners • Sandbox-PHP – Ansible, Puppet and Chef provisionings
– https://github.com/vagrantee/sandbox-php
@erikaheidi