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
Getting Started with Vagrant
Search
Erika Heidi
March 02, 2014
Programming
5
1.2k
Getting Started with Vagrant
Talk presented at DevFest Women in Istanbul #womentechmakers
Erika Heidi
March 02, 2014
Tweet
Share
More Decks by Erika Heidi
See All by Erika Heidi
Learning Lab: WordPress
erikaheidi
0
28
Criando Container Runtimes mais Seguras com Wolfi
erikaheidi
0
95
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
130
Automatizando documentação em PHP com Autodocs
erikaheidi
0
97
Building the World: The Story Behind Wolfi
erikaheidi
0
580
Hello Wolfi
erikaheidi
1
670
Container Images for the Cloud Native Era
erikaheidi
1
350
Creating Secure Container Images with apko
erikaheidi
0
490
Criando GitHub Actions em PHP com Minicli
erikaheidi
0
220
Other Decks in Programming
See All in Programming
快速入門可觀測性
blueswen
0
330
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Full stack testing :: basic to basic
up1
1
930
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
240
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
720
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
良いユニットテストを書こう
mototakatsu
5
1.9k
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
CSC305 Lecture 25
javiergs
PRO
0
130
From Translations to Multi Dimension Entities
alexanderschranz
2
130
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Docker and Python
trallard
42
3.1k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A designer walks into a library…
pauljervisheath
204
24k
Building an army of robots
kneath
302
44k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Rails Girls Zürich Keynote
gr2m
94
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
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