SlideShare une entreprise Scribd logo
1  sur  15
Vagrant Up in 5 Easy
Steps
Trevor Roberts Jr
@VMTrooper
Cody Bunch
@cody_bunch
Introduction
 What is Vagrant?
 Created by Mitchell Hashimoto
 Provisioning Tool for Dev & Test Environments
 Why use Vagrant?
 Quick
 Easily replicate production on a Dev box
 How do I get started?
Step 1: Select your Provider
 What is a provider?
 Oracle VirtualBox (Free)
 VMware Fusion or Workstation ($)
 Build your own (AWS, Rackspace, etc.)
Step 2: Install Vagrant
 http://downloads.vagrantup.com
Step 3: Download a box
 VirtualBox: http://files.vagrantup.com/precise64.box
 VMware Fusion:
http://files.vagrantup.com/precise64_vmware.box
 Build your own or use others:
http://www.vagrantbox.es/
Step 4: Vagrant Init & Up
Open a Terminal Window in the directory for your test lab:
 vagrant init
 Edit the resulting Vagrantfile
 vagrant up
Step 5: Vagrant SSH
Login to the VM using vagrant CLI:
 vagrant ssh
Success!
But wait, there’s more…
 Version Control
 Customize Your VM
 Multi-VM Configuration (Static & Dynamic)
 VM Provisioners
 Squid Proxy
Version Control
 Source Code Control for your Vagrantfile
 Git, SVN, etc.
 Online collaboration
 GitHub, BitBucket, etc.
 This presentation and example code can be found at:
https://github.com/VMTrooper/VagrantBrownBag
Customize Your VM
 Hostname
 config.vm.hostname = "controller"
 IP Address
 config.vm.network :private_network, ip: 178.16.172.200
NOTE: for NAT addresses (i.e. :public_network), you will
need to do some extra work involving DHCP
Customize Your VM
 Memory
# If using Fusion
config.vm.provider :vmware_fusion do |v|
v.vmx["memsize"] = 1024
end
# If using VirtualBox
config.vm.provider :virtualbox do |vbox|
vbox.customize ["modifyvm", :id, "--memory", 1024]
end
Multi-VM Configuration
 Share files between VMs.
 The Vagrantfile’s folder is mounted to /vagrant on each
VM
 See sample code
Provisioners
 Configuration Management
 Shell Scripts
 Puppet (Standalone & Agent)
 Chef (Solo & Client)
 Ansible
Additional Info
 Vagrant Site: http://docs.vagrantup.com/v2/
 Google Groups: https://groups.google.com/forum/#!forum/vagrant-up
 IRC: #vagrant on Freenode
 GitHub (Check out bunchc, bodepd, ody, etc)
 For Fusion-related tips, I post them as I find them:
 http://vmtrooper.com/category/automation/vagrant/
 Mitchell’s Book

Contenu connexe

Tendances

Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and Puppet
Hendrik Ebbers
 

Tendances (20)

Using vagrant
Using vagrantUsing vagrant
Using vagrant
 
Vagrant for Development
Vagrant for DevelopmentVagrant for Development
Vagrant for Development
 
Docker and fig for dev
Docker and fig for devDocker and fig for dev
Docker and fig for dev
 
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrantDevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
 
Vagrantfordevops
VagrantfordevopsVagrantfordevops
Vagrantfordevops
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
Simplestack
SimplestackSimplestack
Simplestack
 
Local development environment through virtualisation
Local development environment through virtualisationLocal development environment through virtualisation
Local development environment through virtualisation
 
Intro to vagrant
Intro to vagrantIntro to vagrant
Intro to vagrant
 
Minicurso de Vagrant
Minicurso de VagrantMinicurso de Vagrant
Minicurso de Vagrant
 
Create your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and PackerCreate your very own Development Environment with Vagrant and Packer
Create your very own Development Environment with Vagrant and Packer
 
Building (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with PackerBuilding (localized) Vagrant boxes with Packer
Building (localized) Vagrant boxes with Packer
 
Simple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottleSimple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottle
 
Lightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and PuppetLightweight and reproducible environments with vagrant and Puppet
Lightweight and reproducible environments with vagrant and Puppet
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottle
 
Run Docker On Windows Using Vagrant
Run Docker On Windows Using VagrantRun Docker On Windows Using Vagrant
Run Docker On Windows Using Vagrant
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
OSDC 2019 | Virtualisation in Docker, using KVM as Hypervisor by Kososochukwu...
OSDC 2019 | Virtualisation in Docker, using KVM as Hypervisor by Kososochukwu...OSDC 2019 | Virtualisation in Docker, using KVM as Hypervisor by Kososochukwu...
OSDC 2019 | Virtualisation in Docker, using KVM as Hypervisor by Kososochukwu...
 
Virtual boxen
Virtual boxenVirtual boxen
Virtual boxen
 
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian HeiglOpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
OpenNebulaConf 2016 - LAB ONE - Vagrant running on OpenNebula? by Florian Heigl
 

En vedette

NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
Ontico
 

En vedette (10)

Vagrant vs docker? Melhor vagrant + docker
Vagrant vs docker? Melhor vagrant + dockerVagrant vs docker? Melhor vagrant + docker
Vagrant vs docker? Melhor vagrant + docker
 
Provisioning & DevOps at Amis25
Provisioning & DevOps at Amis25Provisioning & DevOps at Amis25
Provisioning & DevOps at Amis25
 
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and AnsibleService Delivery Assembly Line with Vagrant, Packer, and Ansible
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
 
Mitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorpMitchell Hashimoto, HashiCorp
Mitchell Hashimoto, HashiCorp
 
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
 
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
NVMf: 5 млн IOPS по сети своими руками / Андрей Николаенко (IBS)
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similaire à Vagrant Up in 5 Easy Steps

Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Christopher Bumgardner
 
Vm ware server-tips-tricks
Vm ware server-tips-tricksVm ware server-tips-tricks
Vm ware server-tips-tricks
unixadminrasheed
 

Similaire à Vagrant Up in 5 Easy Steps (20)

Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
DevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: VagrantDevOps Hackathon - Session 1: Vagrant
DevOps Hackathon - Session 1: Vagrant
 
Virtualization for Developers
Virtualization for DevelopersVirtualization for Developers
Virtualization for Developers
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
AtoM and Vagrant: Installing and Configuring the AtoM Vagrant Box for Local T...
 
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
Oracle Developers APAC Meetup #1 -  Working with Wercker WorksheetsOracle Developers APAC Meetup #1 -  Working with Wercker Worksheets
Oracle Developers APAC Meetup #1 - Working with Wercker Worksheets
 
Vagrant For DevOps
Vagrant For DevOpsVagrant For DevOps
Vagrant For DevOps
 
Node.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ BenetechNode.js, Vagrant, Chef, and Mathoid @ Benetech
Node.js, Vagrant, Chef, and Mathoid @ Benetech
 
Vagrant
VagrantVagrant
Vagrant
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
 
Vagrant
VagrantVagrant
Vagrant
 
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezDevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10Setup a Dev environment that feels like $HOME on Windows 10
Setup a Dev environment that feels like $HOME on Windows 10
 
Vm ware server-tips-tricks
Vm ware server-tips-tricksVm ware server-tips-tricks
Vm ware server-tips-tricks
 
Vmwareserver tips-tricks-110218231744-phpapp01
Vmwareserver tips-tricks-110218231744-phpapp01Vmwareserver tips-tricks-110218231744-phpapp01
Vmwareserver tips-tricks-110218231744-phpapp01
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and Docker
 
Building your own Desktop Cloud Environment
Building your own Desktop Cloud EnvironmentBuilding your own Desktop Cloud Environment
Building your own Desktop Cloud Environment
 
Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016
 

Plus de Trevor Roberts Jr.

Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013
Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013
Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013
Trevor Roberts Jr.
 

Plus de Trevor Roberts Jr. (7)

OpenStack for VMware Administrators
OpenStack for VMware AdministratorsOpenStack for VMware Administrators
OpenStack for VMware Administrators
 
Orchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStackOrchestrating Docker Containers with Google Kubernetes on OpenStack
Orchestrating Docker Containers with Google Kubernetes on OpenStack
 
Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013
Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013
Couch to OpenStack: Intro to DevOps & Puppet - October 1, 2013
 
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean WinnCouch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
 
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013
 
Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013
 
Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013
 

Dernier

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Dernier (20)

Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 

Vagrant Up in 5 Easy Steps

  • 1. Vagrant Up in 5 Easy Steps Trevor Roberts Jr @VMTrooper Cody Bunch @cody_bunch
  • 2. Introduction  What is Vagrant?  Created by Mitchell Hashimoto  Provisioning Tool for Dev & Test Environments  Why use Vagrant?  Quick  Easily replicate production on a Dev box  How do I get started?
  • 3. Step 1: Select your Provider  What is a provider?  Oracle VirtualBox (Free)  VMware Fusion or Workstation ($)  Build your own (AWS, Rackspace, etc.)
  • 4. Step 2: Install Vagrant  http://downloads.vagrantup.com
  • 5. Step 3: Download a box  VirtualBox: http://files.vagrantup.com/precise64.box  VMware Fusion: http://files.vagrantup.com/precise64_vmware.box  Build your own or use others: http://www.vagrantbox.es/
  • 6. Step 4: Vagrant Init & Up Open a Terminal Window in the directory for your test lab:  vagrant init  Edit the resulting Vagrantfile  vagrant up
  • 7. Step 5: Vagrant SSH Login to the VM using vagrant CLI:  vagrant ssh
  • 9. But wait, there’s more…  Version Control  Customize Your VM  Multi-VM Configuration (Static & Dynamic)  VM Provisioners  Squid Proxy
  • 10. Version Control  Source Code Control for your Vagrantfile  Git, SVN, etc.  Online collaboration  GitHub, BitBucket, etc.  This presentation and example code can be found at: https://github.com/VMTrooper/VagrantBrownBag
  • 11. Customize Your VM  Hostname  config.vm.hostname = "controller"  IP Address  config.vm.network :private_network, ip: 178.16.172.200 NOTE: for NAT addresses (i.e. :public_network), you will need to do some extra work involving DHCP
  • 12. Customize Your VM  Memory # If using Fusion config.vm.provider :vmware_fusion do |v| v.vmx["memsize"] = 1024 end # If using VirtualBox config.vm.provider :virtualbox do |vbox| vbox.customize ["modifyvm", :id, "--memory", 1024] end
  • 13. Multi-VM Configuration  Share files between VMs.  The Vagrantfile’s folder is mounted to /vagrant on each VM  See sample code
  • 14. Provisioners  Configuration Management  Shell Scripts  Puppet (Standalone & Agent)  Chef (Solo & Client)  Ansible
  • 15. Additional Info  Vagrant Site: http://docs.vagrantup.com/v2/  Google Groups: https://groups.google.com/forum/#!forum/vagrant-up  IRC: #vagrant on Freenode  GitHub (Check out bunchc, bodepd, ody, etc)  For Fusion-related tips, I post them as I find them:  http://vmtrooper.com/category/automation/vagrant/  Mitchell’s Book

Notes de l'éditeur

  1. Alternatively first line could be…For Fusion: vagrant init precise64 http://files.vagrantup.com/precise64_vmware.boxFor VirtualBox:vagrant init precise64 http://files.vagrantup.com/precise64.boxIt will automatically configure the name of the Vagrant box that you are using and
  2. For NAT, see http://vmtrooper.com/vagrant-static-external-ip-addresses-with-the-vmware-fusion-provider/