Contenu connexe
Similaire à Openstack Vagrant plugin overview (20)
Openstack Vagrant plugin overview
- 2. 2
Openstack as a Vagrant Plugin
quick overview of vagrant based vm provisioning
Márton Kiss
Openstack Ambassador
marton.kiss@gmail.com
@marton_kiss
- 3. 3
A tool to avoid works for me errors!
/// WHAT IS VAGRANT ///
- 4. 4
1. deploy a vagrant
http://www.vagrantup.com/downloads.html
2. install Openstack plugin
$ vagrant plugin install vagrant-openstack-plugin
/// INSTALL VAGRANT TOOLSET ///
- 5. 5
!
$ vagrant box add dummy https://github.com/cloudbau/
vagrant-openstack-plugin/raw/master/dummy.box
/// PREPARE OPENSTACK DUMMY BOX ///
- 6. 6
require 'vagrant-openstack-plugin'
Vagrant.configure("2") do |config|
config.vm.box = “dummy"
# Make sure the private key from the key pair is provided
config.ssh.private_key_path = "~/.ssh/id_dsa"
!
config.vm.provider :openstack do |os|
os.username = ENV['OS_USERNAME']
os.api_key = ENV['OS_PASSWORD']
os.tenant = ENV['OS_TENANT_NAME']
os.region = "region-a.geo-1"
os.flavor = /standard.xsmall/
os.image = /20140408/
os.endpoint = "https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens"
os.keypair_name = "default-keypair"
os.ssh_username = "ubuntu"
os.floating_ip = "15.125.106.143"
end
!
# Provision
config.vm.provision :shell, :path => "scripts/bootstrap.sh"
end
/// Vagrantfile ///
- 11. 11
vagrant ssh - login to provisioned instance
vagrant provision - rerun provisioning
scripts (shell script, puppet, etc.)
vagrant destroy -f - destroy the instance
/// Use standard vagrant commands ///
- 12. 12
- minimal rsync support
- don’t place sensitive data next to
Vagrantfile, it is synced to /vagrant
directory inside vm
/// Limitations ///