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
61
Automatizando documentação em PHP com Autodocs
erikaheidi
0
29
Building the World: The Story Behind Wolfi
erikaheidi
0
300
Hello Wolfi
erikaheidi
1
590
Container Images for the Cloud Native Era
erikaheidi
1
260
Creating Secure Container Images with apko
erikaheidi
0
380
Criando GitHub Actions em PHP com Minicli
erikaheidi
0
150
Building GitHub Actions in PHP with Minicli
erikaheidi
0
430
10 Code Search Tricks for Open Source
erikaheidi
2
200
Other Decks in Programming
See All in Programming
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
300
Node.js v22 で変わること
yosuke_furukawa
PRO
4
1.6k
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
480
PostmanでAPIの動作確認が楽になった話
h455h1
0
160
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
640
ScalarDBを用いたマイクロサービスにおけるデータ管理 (Database Engineering Meetup #2)
scalar
0
110
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
670
Front-end application development, Symfony-style(s)
dunglas
2
2k
Anthropic Cookbook のおすすめレシピ
schroneko
7
870
Featured
See All Featured
Building an army of robots
kneath
300
41k
Building Applications with DynamoDB
mza
88
5.6k
Art, The Web, and Tiny UX
lynnandtonic
289
19k
The Power of CSS Pseudo Elements
geoffreycrofte
60
5k
Designing with Data
zakiwarfel
96
4.8k
A Philosophy of Restraint
colly
197
16k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
The Cost Of JavaScript in 2023
addyosmani
16
3.8k
Building Adaptive Systems
keathley
31
1.9k
Thoughts on Productivity
jonyablonski
58
3.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Designing for humans not robots
tammielis
248
25k
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