Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Getting Started with Vagrant
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
95
Learning Lab: WordPress
erikaheidi
0
180
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
240
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
290
Automatizando documentação em PHP com Autodocs
erikaheidi
0
230
Building the World: The Story Behind Wolfi
erikaheidi
0
890
Hello Wolfi
erikaheidi
1
840
Container Images for the Cloud Native Era
erikaheidi
1
500
Creating Secure Container Images with apko
erikaheidi
0
760
Other Decks in Programming
See All in Programming
SREの越境 / SRE Collaboration
y0hgi
2
260
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
260
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
160
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
アクセシビリティから考える情報設計
high_g_engineer
0
380
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
150
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
730
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
速習iPhone Duo対応
yuukiw00w
1
660
一人だけ、Kiroが静止する日
hideg
0
120
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
360
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
Featured
See All Featured
Between Models and Reality
mayunak
4
460
A better future with KSS
kneath
240
18k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
How GitHub (no longer) Works
holman
316
150k
How to build a perfect <img>
jonoalderson
1
6k
RailsConf 2023
tenderlove
30
1.6k
Are puppies a ranking factor?
jonoalderson
2
3.9k
Designing Experiences People Love
moore
143
24k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
510
Skip the Path - Find Your Career Trail
mkilby
1
230
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
Docker and Python
trallard
47
4.2k
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