# -*- mode: ruby -*- # vi: set ft=ruby sw=2 ts=2 sts=2 et : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # root off of the openstack provider dummy box config.vm.box = "dummy" config.ssh.username = 'root' # make sure to set the following in your # ~/.vagrant.d/boxes/dummy/0/openstack/Vagrantfile # # os.openstack_auth_url # os.endpoint_type # os.flavor # os.tenant_name # os.username # os.password # os.networks # # If you are not using an SSH token / smartcard also set this # os.key_name # config.ssh.private_key_path -- set this outside the openstack block # in your base box config.vm.provider :openstack do |os, override| # Default the CentOS 6.5 - Vagrant ready image unless overriden by a RSIMAGE # environment variable if ENV['IMAGE'] os.image = ENV['IMAGE'] else os.image = 'CentOS 7 - baseline - 20151215' end case ENV['IMAGE'] when /.*centos.*/i override.ssh.username = 'centos' end end # Explicitlly set default shared folder and load lib folder config.vm.synced_folder ".", "/vagrant" config.vm.synced_folder "../lib/", "/vagrant/lib" # run our bootstrapping for the ovsdb-devstack system config.vm.provision 'shell', path: 'bootstrap.sh' ################# # FINAL CLEANUP # ################# # set RESEAL to... anything if you want to snap an image of this box # not setting the environment variable will cause the system to come # up fully and not be in a resealable state if ENV['RESEAL'] config.vm.provision 'shell', path: '../lib/system_reseal.sh' end end