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
Portable Environments with Vagrant
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Erika Heidi
August 29, 2014
Programming
1.8k
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Portable Environments with Vagrant
Portable Development Environments with Vagrant (and Ansible) - LaraconEU 2014
Erika Heidi
August 29, 2014
More Decks by Erika Heidi
See All by Erika Heidi
FreeCAD 101 Lightning Talk
erikaheidi
0
76
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
490
Creating Secure Container Images with apko
erikaheidi
0
710
Other Decks in Programming
See All in Programming
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.4k
Claude Team Plan導入・ガイド
tk3fftk
0
250
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
210
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
130
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
470
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
510
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
520
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.3k
Build-to-own AI: Agentic Development for Humans
inesmontani
PRO
0
170
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.6k
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
190
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Designing Experiences People Love
moore
143
24k
Docker and Python
trallard
47
4k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
630
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
430
Typedesign – Prime Four
hannesfritz
42
3.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Transcript
None
whoami • PHP developer with sysadmin background • Author of
Vagrant Cookbook on LeanPub 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
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 ]
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 Laracon EU 2014 http://bit.ly/vc-laracon
Questions?
More Vagrant Resources http://erikaheidi.com/vagrant Please Rate this Talk! https://joind.in/11689