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
Introducing Chainguard Images for Safer PHP Runtimes
erikaheidi
0
80
Automatizando documentação em PHP com Autodocs
erikaheidi
0
35
Building the World: The Story Behind Wolfi
erikaheidi
0
320
Hello Wolfi
erikaheidi
1
600
Container Images for the Cloud Native Era
erikaheidi
1
270
Creating Secure Container Images with apko
erikaheidi
0
390
Criando GitHub Actions em PHP com Minicli
erikaheidi
0
160
Building GitHub Actions in PHP with Minicli
erikaheidi
0
440
10 Code Search Tricks for Open Source
erikaheidi
2
210
Other Decks in Programming
See All in Programming
TypeScriptでもLLMアプリケーション開発 / LLM Application In Typescript
rkaga
5
1.3k
TypeScriptの型とパフォーマンス (TSKaigi 2024)
ypresto
14
4.9k
How to implement a RubyVM with PHP?
memory1994
PRO
2
660
Dev ContainersとTestcontainers
bells17
3
100
PHPコードの実行モデルを理解する / Understanding-the-PHP-Execution-Model
shin1x1
0
1.1k
Powerfully Typed TypeScript
euxn23
4
1.7k
Three ways to use AI on Android: The Good, the Bad and the Ugly
marxallski
0
120
Escolhendo (ou não) o melhor ORM para o seu projeto
andreiacsilva
1
160
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
2.8k
The Cutting Edge Of Versioning (LambdaConf 2024)
chriskrycho
0
250
Productivity is Messing Around and Having Fun
hollycummins
1
180
How to improve maintainability and readability of your automated tests? ( #scrumniigata )
teyamagu
PRO
1
130
Featured
See All Featured
What the flash - Photography Introduction
edds
64
11k
How GitHub (no longer) Works
holman
305
140k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Building Effective Engineering Teams - LeadDev
addyosmani
33
1.9k
Debugging Ruby Performance
tmm1
70
11k
4 Signs Your Business is Dying
shpigford
176
21k
Teambox: Starting and Learning
jrom
128
8.4k
Done Done
chrislema
178
15k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
Facilitating Awesome Meetings
lara
43
5.6k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
22
6.5k
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