Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Getting Started with Vagrant
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
38
Learning Lab: WordPress
erikaheidi
0
120
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
190
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
230
Automatizando documentação em PHP com Autodocs
erikaheidi
0
170
Building the World: The Story Behind Wolfi
erikaheidi
0
800
Hello Wolfi
erikaheidi
1
780
Container Images for the Cloud Native Era
erikaheidi
1
430
Creating Secure Container Images with apko
erikaheidi
0
630
Other Decks in Programming
See All in Programming
Patterns of Patterns
denyspoltorak
0
1.4k
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Architectural Extensions
denyspoltorak
0
280
CSC307 Lecture 07
javiergs
PRO
0
550
Implementation Patterns
denyspoltorak
0
280
AI巻き込み型コードレビューのススメ
nealle
1
210
ぼくの開発環境2026
yuzneri
0
210
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
高速開発のためのコード整理術
sutetotanuki
1
400
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
2
250
A better future with KSS
kneath
240
18k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
How GitHub (no longer) Works
holman
316
140k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Skip the Path - Find Your Career Trail
mkilby
0
54
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
WENDY [Excerpt]
tessaabrams
9
36k
Testing 201, or: Great Expectations
jmmastey
46
8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
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