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
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
50
Learning Lab: WordPress
erikaheidi
0
130
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
200
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
250
Automatizando documentação em PHP com Autodocs
erikaheidi
0
190
Building the World: The Story Behind Wolfi
erikaheidi
0
820
Hello Wolfi
erikaheidi
1
800
Container Images for the Cloud Native Era
erikaheidi
1
450
Creating Secure Container Images with apko
erikaheidi
0
640
Other Decks in Programming
See All in Programming
Java 21/25 Virtual Threads 소개
debop
0
260
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
170
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
360
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
420
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
310
20260320登壇資料
pharct
0
120
モダンOBSプラグイン開発
umireon
0
180
20260315 AWSなんもわからん🥲
chiilog
2
170
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
140
へんな働き方
yusukebe
5
2.8k
ロボットのための工場に灯りは要らない
watany
12
3.2k
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Balancing Empowerment & Direction
lara
5
960
Optimizing for Happiness
mojombo
378
71k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
110
Paper Plane
katiecoart
PRO
0
48k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
390
Abbi's Birthday
coloredviolet
2
5.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Language of Interfaces
destraynor
162
26k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
180
Accessibility Awareness
sabderemane
0
84
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