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
1.2k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Getting Started with Vagrant
Talk presented at DevFest Women in Istanbul #womentechmakers
Erika Heidi
March 02, 2014
More Decks by Erika Heidi
See All by Erika Heidi
FreeCAD 101 Lightning Talk
erikaheidi
0
73
Learning Lab: WordPress
erikaheidi
0
160
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
230
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
280
Automatizando documentação em PHP com Autodocs
erikaheidi
0
210
Building the World: The Story Behind Wolfi
erikaheidi
0
870
Hello Wolfi
erikaheidi
1
830
Container Images for the Cloud Native Era
erikaheidi
1
480
Creating Secure Container Images with apko
erikaheidi
0
700
Other Decks in Programming
See All in Programming
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
110
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
190
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.8k
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
150
FDEが実現するAI駆動経営の現在地
gonta
2
230
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
140
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
150
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1k
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
270
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
430
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
510
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
470
Unsuck your backbone
ammeep
672
58k
The Pragmatic Product Professional
lauravandoore
37
7.4k
The Curse of the Amulet
leimatthew05
2
13k
Google's AI Overviews - The New Search
badams
0
1.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
A designer walks into a library…
pauljervisheath
211
24k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
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