Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Vagrant script for devstack do |config|
sshdir = "#{ENV['HOME']}/.ssh/"
cachedir = (ENV['CACHEDIR'] or "#{ENV['HOME']}/cache/")
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "192.168.27.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027027")
suffix = "100"
ip = "#{ip_prefix}#{suffix}" = "oneiric"
config.vm.box_url = ""
config.vm.customize do |vm|
vm.memory_size = 1024
end, ip, :mac => "#{mac_prefix}#{suffix}")
config.vm.share_folder("v-cache", "/home/vagrant/cache", cachedir, :nfs => true)
config.vm.share_folder("v-ssh", "/home/vagrant/.host-ssh", sshdir)
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "#{checkout}/cookbooks"
chef.roles_path = "#{checkout}/roles"
chef.log_level = :debug
chef.run_list = [
#"recipe[anso::settings]", # vim / screen / git settings for testing
:nova => {
:source => {
:mysql_password => "secrete",
:rabbit_password => "secrete",
:admin_password => "secrete",
:service_token => "secrete",
:flat_interface => "eth1",
:public_interface => "eth1",
:floating_range => (ENV['FLOATING'] or "#{ip_prefix}128/28"),
:host_ip => ip,
# install virtualbox
curl -O
open VirtualBox-4.1.4-74291-OSX.dmg
# install new vagrant
sudo gem install vagrant
# get chef scripts
git clone git:// ~/openstack-cookbooks
mkdir ~/cache
mkdir ~/cache/stack # git repos are cloned here and shared via nfs
mkdir ~/devstack
cd ~/devstack
curl -o Vagrantfile
vagrant up
# you will need to enter your password for creating nfs shares
# when it is finished you should be able to access dashboard at
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.