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 Environments with Vagrant
Search
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
100
Learning Lab: WordPress
erikaheidi
0
190
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
250
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
850
Container Images for the Cloud Native Era
erikaheidi
1
510
Creating Secure Container Images with apko
erikaheidi
0
790
Other Decks in Programming
See All in Programming
残高管理から台帳サービスへの進化
artoy
1
210
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
190
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
1
170
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.2k
AI-Powered Domain-Driven Design
ziobrando
0
210
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.7k
Verilogで学ぶCPU自作入門
uyuki234
8
4.2k
ActionController meets Protocol Buffers
sorah
0
660
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
160
ジョジョの世界をXRで再現する
mofurune
0
180
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
230
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
720
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
950
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
The Invisible Side of Design
smashingmag
301
52k
Facilitating Awesome Meetings
lara
57
7.2k
Building AI with AI
inesmontani
PRO
1
1.3k
How to Talk to Developers About Accessibility
jct
2
590
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
310
Believing is Seeing
oripsolob
1
250
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