SlideShare a Scribd company logo
© 2014 VMware Inc. All rights reserved.© 2014 VMware Inc. All rights reserved.
01/16/2015
OpenStack and Vagrant
How to explore the greatness of OpenStack with Vagrant
Yves Fauser
Solutions Architect @ VMware
What is Vagrant – The Goals of Vagrant
Quote from Vagrant Web-Site:
“Create and configure
lightweight,
reproducible,
and portable
development environments.”
What is Vagrant
Repeatable
Quickly Build and destroy single machine and multi-machine environments
Configurable
Describe all the steps to build an environment in a single file, and bundle all the additional
needed resources in a folder structure on your local machine
Easy to use, easy to share
Share environments through version control like Git or with tar files (box files in Vagrant)
and then simply type “vagrant up” to start
Extensible
Large community of people contribute extensions (plugins and providers) to Vagrant –
Like the OpenStack Plugin, VMware plugin, etc. …. It’s all Ruby
What is Vagrant – How this relates to config management
Configuration Management
Vagrant starts the VM, orchestrates the access to the VM
(using keypair based authentication).
It also does some customization of the VM based on its OS Knowledge
(e.g. setting the Hostname and shares files between the developers machine
and the VM)
After this Vagrant “hands off” the task of configuring the VM to some form of
configuration management tool like:
Shell scripts
Puppet
Chef
Ansible
What is Vagrant – The Vagrantfile
Vagrant.configure(2) do |config|!
config.vm.box = "hashicorp/precise64"!
config.vm.network "forwarded_port", guest: 80, host: 3080!
!
config.vm.synced_folder "www", "/var/www"!
!
config.vm.provision 'shell', inline: !
'apt-get update && apt-get install apache2 -y'!
!
end!
Again, …. It’s all Ruby
ON TO A DEMO
What is Vagrant – Vagrant Providers
Vagrant Providers
Vagrant is hypervisor agnostic through so called “provider”
Vagrant provides a virtualbox provider by default
Hashicorp offers a commercial VMware Provider (Fusion / Workstation)
with a support model
Everybody can write a provider and offer it as a rubygem
(rubygems.org => Just search for Vagrant)
Example community driven providers are:
OpenStack, AWS, vSphere (ESX and vCenter), vCloud Director / vCloudAir, KVM, Parallels,
open VMware fusion / workstation, etc.
What is Vagrant – Vagrant Providers
Vagrant Providers
Vagrant offers a CLI to easily install Vagrant providers / plugins
from rubygems.org
yfauser$ vagrant plugin list!
vagrant-openstack-plugin (0.11.1)!
vagrant-share (1.1.4, system)!
vagrant-vcenter (0.3.2)!
vagrant-vmware-fusion (3.1.2)!
!
yfauser$ vagrant plugin help!
Usage: vagrant plugin <command> [<args>]!
!
Available subcommands:!
install!
license!
list!
uninstall!
update!
Vagrant OpenStack Providers
There is a big number of vagrant OpenStack providers available
The first one was the Rackspace provider:
https://rubygems.org/gems/rackspace
First non cloud provider specific fork from Edmund Haselwanter:
https://rubygems.org/gems/vagrant-openstack-plugin
New provider with added feature from Guillaume Giamarchi (also, it doesn’t
use fog):
https://rubygems.org/gems/vagrant-openstack-provider
And many more ….
Vagrant OpenStack Provider - Vagrantfile
require 'vagrant-openstack-plugin'!
!
Vagrant.configure("2") do |config|!
config.vm.box = "dummy"!
config.vm.hostname = "RubyWebDev”!
# Make sure the private key from the key pair is provided!
config.ssh.private_key_path = "~/.ssh/MyOpenStackSecretKey.pem”!
!
config.vm.provider :openstack do |os|!
os.username = "#{ENV['OS_USERNAME']}" # e.g. "#{ENV['OS_USERNAME']}"!
os.api_key = "#{ENV['OS_PASSWORD']}" # e.g. "#{ENV['OS_PASSWORD']}"!
os.flavor = /m1.small/ ! # Regex or String!
os.image = /Ubuntu 14.04 Cloud-Init with Puppet/ # Regex or String!
os.endpoint = "#{ENV['OS_AUTH_URL']}/tokens" # e.g. "#{ENV['OS_AUTH_URL']}/tokens"!
os.keypair_name = ”MyOpenStackKeypair" # as stored in Nova!
os.ssh_username = "ubuntu" # login for the VM!
os.network = "LabNet" # optional!
os.security_groups = ['Allow-All'] # optional!
os.tenant = "#{ENV['OS_TENANT_NAME']}" # optional!
os.floating_ip = :auto # optional (The floating IP to assign for this instance … !
os.floating_ip_pool = ”Router-Uplink-Network" # optional (The floating IP pool to allocate addresses from!
end!
!
config.vm.synced_folder "rails", "/home/ubuntu/rails” !
!
config.vm.provision "puppet" do |puppet|!
puppet.manifest_file = "Web-Server.pp"!
puppet.options = "--verbose --debug"!
end!
!
end!
Vagrant OpenStack Provider - Caveats
File sharing uses rsync over ssh only, so there is no instant update of the files
you share
However Vagrant can automatically watch and update your files with the
“rsync-auto” command
You need to install the “dummy box” with:
vagrant box add dummy
https://github.com/cloudbau/vagrant-openstack-plugin/raw/master/dummy.box
Be careful not to place sensitive data like the OS_PASSWORD into the
Vagrantfile, it will by default be copied into the VM in the /vagrant path
Questions?

More Related Content

PDF
Debugging ansible modules
PPTX
Ansible module development 101
PDF
Testing Ansible with Jenkins and Docker
PPTX
Introduction to Ansible - Jan 28 - Austin MeetUp
PPTX
Monitor-Driven Development Using Ansible
PPTX
Extending ansible
PDF
Jenkins and ansible reference
PDF
Ansible
Debugging ansible modules
Ansible module development 101
Testing Ansible with Jenkins and Docker
Introduction to Ansible - Jan 28 - Austin MeetUp
Monitor-Driven Development Using Ansible
Extending ansible
Jenkins and ansible reference
Ansible

What's hot (20)

PDF
How Ansible Makes Automation Easy
PDF
Deploying PHP Applications with Ansible
PPTX
Advance discussion on Ansible - Rahul Inti
PDF
Introducing Ansible
PDF
infra-as-code
PDF
Ansible - Hands on Training
PDF
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
PDF
Ansible Intro - June 2015 / Ansible Barcelona User Group
PPTX
DevOps, A brief introduction to Vagrant & Ansible
PPT
Ansible presentation
PDF
F5 Automation and service discovery
PDF
Investigation of testing with ansible
PPTX
Ansible Best Practices - July 30
PPTX
Basics of Ansible - Sahil Davawala
PDF
Introduction to Ansible (Pycon7 2016)
PDF
A quick intro to Ansible
PDF
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
PDF
Ansible Automation to Rule Them All
PDF
CI/CD Using Ansible and Jenkins for Infrastructure
PDF
Network Automation with Ansible
How Ansible Makes Automation Easy
Deploying PHP Applications with Ansible
Advance discussion on Ansible - Rahul Inti
Introducing Ansible
infra-as-code
Ansible - Hands on Training
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible Intro - June 2015 / Ansible Barcelona User Group
DevOps, A brief introduction to Vagrant & Ansible
Ansible presentation
F5 Automation and service discovery
Investigation of testing with ansible
Ansible Best Practices - July 30
Basics of Ansible - Sahil Davawala
Introduction to Ansible (Pycon7 2016)
A quick intro to Ansible
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
Ansible Automation to Rule Them All
CI/CD Using Ansible and Jenkins for Infrastructure
Network Automation with Ansible
Ad

Similar to Open stack and_vagrant-os-meetup-2015 (20)

PDF
Intro to vagrant
PDF
Vagrant For DevOps
PPTX
Vagrant
PDF
Vagrant - Version control your dev environment
PDF
Vagrant - Team Development made easy
PPTX
How To Set a Vagrant Development System
PPTX
Vagrant-Overview
PPTX
Development with Vagrant
PPTX
Vagrant introduction for Developers
KEY
Using Vagrant
PDF
Vagrant workshop 2015
PDF
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
PPTX
Vagrant for ci
PPTX
DevOps Hackathon - Session 1: Vagrant
PDF
Vagrant are you still develop in a non-virtual environment-
PDF
Vagrant and Configuration Management
PPTX
Couch to OpenStack: Glance - July, 23, 2013
PPTX
Docker and Vagrant usage in OPENi
PPTX
Baylisa - Dive Into OpenStack
PDF
Simplify and run your development environments with Vagrant on OpenStack
Intro to vagrant
Vagrant For DevOps
Vagrant
Vagrant - Version control your dev environment
Vagrant - Team Development made easy
How To Set a Vagrant Development System
Vagrant-Overview
Development with Vagrant
Vagrant introduction for Developers
Using Vagrant
Vagrant workshop 2015
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
Vagrant for ci
DevOps Hackathon - Session 1: Vagrant
Vagrant are you still develop in a non-virtual environment-
Vagrant and Configuration Management
Couch to OpenStack: Glance - July, 23, 2013
Docker and Vagrant usage in OPENi
Baylisa - Dive Into OpenStack
Simplify and run your development environments with Vagrant on OpenStack
Ad

More from yfauser (7)

PDF
Open stack networking_101_update_2014-os-meetups
PDF
Open stack networking_101_update_2014
PDF
Linux Tag 2014 OpenStack Networking
PDF
Osdc2014 openstack networking yves_fauser
PDF
Nvp deep dive_session_cee-day
PDF
Open stack networking_101_part-2_tech_deep_dive
PDF
Open stack networking_101_part-1
Open stack networking_101_update_2014-os-meetups
Open stack networking_101_update_2014
Linux Tag 2014 OpenStack Networking
Osdc2014 openstack networking yves_fauser
Nvp deep dive_session_cee-day
Open stack networking_101_part-2_tech_deep_dive
Open stack networking_101_part-1

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Approach and Philosophy of On baking technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
Encapsulation theory and applications.pdf
Programs and apps: productivity, graphics, security and other tools
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
20250228 LYD VKU AI Blended-Learning.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Approach and Philosophy of On baking technology
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology

Open stack and_vagrant-os-meetup-2015

  • 1. © 2014 VMware Inc. All rights reserved.© 2014 VMware Inc. All rights reserved. 01/16/2015 OpenStack and Vagrant How to explore the greatness of OpenStack with Vagrant Yves Fauser Solutions Architect @ VMware
  • 2. What is Vagrant – The Goals of Vagrant Quote from Vagrant Web-Site: “Create and configure lightweight, reproducible, and portable development environments.”
  • 3. What is Vagrant Repeatable Quickly Build and destroy single machine and multi-machine environments Configurable Describe all the steps to build an environment in a single file, and bundle all the additional needed resources in a folder structure on your local machine Easy to use, easy to share Share environments through version control like Git or with tar files (box files in Vagrant) and then simply type “vagrant up” to start Extensible Large community of people contribute extensions (plugins and providers) to Vagrant – Like the OpenStack Plugin, VMware plugin, etc. …. It’s all Ruby
  • 4. What is Vagrant – How this relates to config management Configuration Management Vagrant starts the VM, orchestrates the access to the VM (using keypair based authentication). It also does some customization of the VM based on its OS Knowledge (e.g. setting the Hostname and shares files between the developers machine and the VM) After this Vagrant “hands off” the task of configuring the VM to some form of configuration management tool like: Shell scripts Puppet Chef Ansible
  • 5. What is Vagrant – The Vagrantfile Vagrant.configure(2) do |config|! config.vm.box = "hashicorp/precise64"! config.vm.network "forwarded_port", guest: 80, host: 3080! ! config.vm.synced_folder "www", "/var/www"! ! config.vm.provision 'shell', inline: ! 'apt-get update && apt-get install apache2 -y'! ! end! Again, …. It’s all Ruby ON TO A DEMO
  • 6. What is Vagrant – Vagrant Providers Vagrant Providers Vagrant is hypervisor agnostic through so called “provider” Vagrant provides a virtualbox provider by default Hashicorp offers a commercial VMware Provider (Fusion / Workstation) with a support model Everybody can write a provider and offer it as a rubygem (rubygems.org => Just search for Vagrant) Example community driven providers are: OpenStack, AWS, vSphere (ESX and vCenter), vCloud Director / vCloudAir, KVM, Parallels, open VMware fusion / workstation, etc.
  • 7. What is Vagrant – Vagrant Providers Vagrant Providers Vagrant offers a CLI to easily install Vagrant providers / plugins from rubygems.org yfauser$ vagrant plugin list! vagrant-openstack-plugin (0.11.1)! vagrant-share (1.1.4, system)! vagrant-vcenter (0.3.2)! vagrant-vmware-fusion (3.1.2)! ! yfauser$ vagrant plugin help! Usage: vagrant plugin <command> [<args>]! ! Available subcommands:! install! license! list! uninstall! update!
  • 8. Vagrant OpenStack Providers There is a big number of vagrant OpenStack providers available The first one was the Rackspace provider: https://rubygems.org/gems/rackspace First non cloud provider specific fork from Edmund Haselwanter: https://rubygems.org/gems/vagrant-openstack-plugin New provider with added feature from Guillaume Giamarchi (also, it doesn’t use fog): https://rubygems.org/gems/vagrant-openstack-provider And many more ….
  • 9. Vagrant OpenStack Provider - Vagrantfile require 'vagrant-openstack-plugin'! ! Vagrant.configure("2") do |config|! config.vm.box = "dummy"! config.vm.hostname = "RubyWebDev”! # Make sure the private key from the key pair is provided! config.ssh.private_key_path = "~/.ssh/MyOpenStackSecretKey.pem”! ! config.vm.provider :openstack do |os|! os.username = "#{ENV['OS_USERNAME']}" # e.g. "#{ENV['OS_USERNAME']}"! os.api_key = "#{ENV['OS_PASSWORD']}" # e.g. "#{ENV['OS_PASSWORD']}"! os.flavor = /m1.small/ ! # Regex or String! os.image = /Ubuntu 14.04 Cloud-Init with Puppet/ # Regex or String! os.endpoint = "#{ENV['OS_AUTH_URL']}/tokens" # e.g. "#{ENV['OS_AUTH_URL']}/tokens"! os.keypair_name = ”MyOpenStackKeypair" # as stored in Nova! os.ssh_username = "ubuntu" # login for the VM! os.network = "LabNet" # optional! os.security_groups = ['Allow-All'] # optional! os.tenant = "#{ENV['OS_TENANT_NAME']}" # optional! os.floating_ip = :auto # optional (The floating IP to assign for this instance … ! os.floating_ip_pool = ”Router-Uplink-Network" # optional (The floating IP pool to allocate addresses from! end! ! config.vm.synced_folder "rails", "/home/ubuntu/rails” ! ! config.vm.provision "puppet" do |puppet|! puppet.manifest_file = "Web-Server.pp"! puppet.options = "--verbose --debug"! end! ! end!
  • 10. Vagrant OpenStack Provider - Caveats File sharing uses rsync over ssh only, so there is no instant update of the files you share However Vagrant can automatically watch and update your files with the “rsync-auto” command You need to install the “dummy box” with: vagrant box add dummy https://github.com/cloudbau/vagrant-openstack-plugin/raw/master/dummy.box Be careful not to place sensitive data like the OS_PASSWORD into the Vagrantfile, it will by default be copied into the VM in the /vagrant path