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
Portable Development Environments with Vagrant
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Erika Heidi
September 19, 2014
Programming
1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Portable Development Environments with Vagrant
As presented at Hackference 2014
Erika Heidi
September 19, 2014
More Decks by Erika Heidi
See All by Erika Heidi
FreeCAD 101 Lightning Talk
erikaheidi
0
96
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
300
Automatizando documentação em PHP com Autodocs
erikaheidi
0
230
Building the World: The Story Behind Wolfi
erikaheidi
0
900
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
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
160
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
18
16k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
390
スマート反転とウェブアクセシビリティ
camiha
0
210
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
510
AHC070解法紹介
eijirou
0
130
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
220
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.8k
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
470
Security issues being discussed on Web Platforms
petamoriken
0
1.2k
iOSDC2026登壇資料.pdf
riofujimon
0
190
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
190
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
How STYLIGHT went responsive
nonsquared
100
6.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Building AI with AI
inesmontani
PRO
1
1.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
Transcript
None
whoami • PHP developer with sysadmin background • Author of
Vagrant Cookbook and phansible.com
What to expect from this talk 1)Vagrant overview 2)Provisioning with
Ansible 3)Useful Resources
Why Vagrant?
None
1.1 Why Vagrant? • Reproducible and portable development environment •
Enables easier code collaboration • Backend env tests / benchmark • Automation Tools learning and testing
None
1.2 Provisioning • Multiple provisioners can be used • Most
common ones: – Puppet – Chef – Ansible – Shell Script
Automation Tools > Shell Script • Right tool for the
job • Clear language • Powerful built-in features • Provisioning can be reused for deployment
1.3 Some Terms • Host / Guest • Provider /
Provisioner • Boxes • Vagrantfile • Synced Folder
1.4 The simplest thing that does something Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64" config.vm.provision "shell", inline: "echo Hello World!" end
None
1.5 Commands • up • reload • provision • suspend
• resume • destroy [ --provision ] [ --provision ]
1.6 Other Vagrant Features • Managing Multiple VMs • Provisioning
to AWS, Digital Ocean, etc • Vagrant Cloud • Vagrant Share / Connect
DEMO 1 Vagrant up
None
2.1 Ansible Overview • Simple and Powerful • Tasks defined
with YAML • Sequential Execution • Modules Directory: Ansible Galaxy • Requires installation of Ansible in the Host
2.2 Vagrantfile Vagrant.configure("2") do |config| config.vm.box = "hashicorp/precise64" config.vm.provision "ansible"
do |ansible| ansible.playbook = "playbook.yml" end end
2.3 The Playbook # playbook.yml --- - hosts: all sudo:
true tasks: - name: Update apt-cache apt: update_cache=yes - name: Install Nginx apt: pkg=nginx state=latest
2.4 Playbook x Manifest (Puppet) #playbook.yml --- - hosts: all
sudo: true tasks: - name: Update apt-cache apt: update_cache=yes - name: Install Nginx apt: pkg=nginx state=latest #default.pp exec { 'apt-get update': command => '/usr/bin/apt-get update' } package { 'nginx': ensure => "installed", require => Exec['apt-get update'], }
2.5 Variables --- - hosts: all sudo: yes vars: web_server:
nginx tasks: - name: Install {{ web_server }} apt: pkg={{ web_server }} state=latest
2.5 Variables - arrays tasks: - name: Install Packages apt:
pkg={{ item }} state=latest with_items: - nginx - php5-fpm - git
2.5 Variables - arrays --- - hosts: all sudo: yes
vars: sys_packages: [ 'nginx', 'php5-fpm', 'git' ] tasks: - name: Install Packages apt: pkg={{ item }} state=latest with_items: sys_packages
DEMO 2 Basic Playbook
None
None
Vagrant Cookbook Special discount coupon for Hackference 2014 http://bit.ly/vc-hack
Questions?
More Vagrant Resources http://erikaheidi.com/vagrant