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
Learning Lab: WordPress
erikaheidi
0
43
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
110
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
150
Automatizando documentação em PHP com Autodocs
erikaheidi
0
110
Building the World: The Story Behind Wolfi
erikaheidi
0
620
Hello Wolfi
erikaheidi
1
690
Container Images for the Cloud Native Era
erikaheidi
1
370
Creating Secure Container Images with apko
erikaheidi
0
510
Criando GitHub Actions em PHP com Minicli
erikaheidi
0
230
Other Decks in Programming
See All in Programming
Ça bouge du côté des animations CSS !
goetter
2
140
Ruby on cygwin 2025-02
fd0
0
180
Rubyと自由とAIと
yotii23
3
430
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
220
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
120
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
840
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
1
110
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
140
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
53
18k
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
830
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
290
color-scheme: light dark; を完全に理解する
uhyo
7
490
Featured
See All Featured
A designer walks into a library…
pauljervisheath
205
24k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Scaling GitHub
holman
459
140k
Faster Mobile Websites
deanohume
306
31k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
250
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Embracing the Ebb and Flow
colly
84
4.6k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
BBQ
matthewcrist
87
9.5k
Git: the NoSQL Database
bkeepers
PRO
427
65k
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