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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
620
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.6k
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
180
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
250
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
270
PHPで TLSのプロトコルを実装してみる
higaki_program
0
530
Codex の「自走力」を高める
yorifuji
0
1.3k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
280
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
260
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
120
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How GitHub (no longer) Works
holman
316
150k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
How to make the Groovebox
asonas
2
2k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
280
Designing for humans not robots
tammielis
254
26k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
86
Rails Girls Zürich Keynote
gr2m
96
14k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
130
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
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