Openstack Vagrant plugin overview

1,944 views

Published on

A quick overview of Openstack vagrant plugin with hpcloud backend.

Published in: Software, Technology

Openstack Vagrant plugin overview

  1. 1. 1
  2. 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. 3 A tool to avoid works for me errors! /// WHAT IS VAGRANT ///
  4. 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. 5 ! $ vagrant box add dummy https://github.com/cloudbau/ vagrant-openstack-plugin/raw/master/dummy.box /// PREPARE OPENSTACK DUMMY BOX ///
  6. 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 ///
  7. 7. 7 #!/bin/bash ! echo "Custom bootstrap" touch /tmp/H3llo /// scripts/bootstrap.sh ///
  8. 8. 8 export OS_USERNAME=user-name export OS_PASSWORD=password export OS_TENANT_NAME=tenant-name /// openrc file ///
  9. 9. 9 /// get tenant name ///
  10. 10. 10 /// vagrant up ///
  11. 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. 12 - minimal rsync support - don’t place sensitive data next to Vagrantfile, it is synced to /vagrant directory inside vm /// Limitations ///
  13. 13. 13 ? /// Questions ///

×