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 Development Environments with Vagrant
Search
Erika Heidi
September 19, 2014
Programming
1
1k
Portable Development Environments with Vagrant
As presented at Hackference 2014
Erika Heidi
September 19, 2014
Tweet
Share
More Decks by Erika Heidi
See All by Erika Heidi
FreeCAD 101 Lightning Talk
erikaheidi
0
36
Learning Lab: WordPress
erikaheidi
0
110
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
180
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
230
Automatizando documentação em PHP com Autodocs
erikaheidi
0
170
Building the World: The Story Behind Wolfi
erikaheidi
0
790
Hello Wolfi
erikaheidi
1
780
Container Images for the Cloud Native Era
erikaheidi
1
430
Creating Secure Container Images with apko
erikaheidi
0
620
Other Decks in Programming
See All in Programming
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2.4k
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
170
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.3k
CSC307 Lecture 04
javiergs
PRO
0
640
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
270
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
250
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
140
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
3
1.3k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
490
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
510
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
720
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1k
Featured
See All Featured
Crafting Experiences
bethany
0
30
Automating Front-end Workflow
addyosmani
1371
200k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
200
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
280
Balancing Empowerment & Direction
lara
5
840
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Building an army of robots
kneath
306
46k
Getting science done with accelerated Python computing platforms
jacobtomlinson
1
96
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.5k
The Curse of the Amulet
leimatthew05
0
7.2k
The Pragmatic Product Professional
lauravandoore
37
7.1k
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