Created
January 20, 2011 08:24
-
-
Save vishvananda/787576 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant::Config.run do |global_config| | |
aptdir = "#{ENV['HOME']}/aptcache/" | |
checkout = "#{ENV['HOME']}/openstack-cookbooks" | |
global_config.vm.define :chef do |config| | |
ip = "192.168.76.100" | |
# path where code is checked out | |
config.vm.box = "base" | |
config.vm.box_url = "http://images.anso.com/vagrant/maverick64.box" | |
config.vm.network ip | |
config.vm.share_folder("v-apt", "/var/cache/apt", aptdir) | |
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[apt::cacher]", | |
"recipe[anso::ohai]", | |
"recipe[chef::bootstrap_server]", | |
"recipe[anso::cookbooks]", | |
"recipe[nginx]", | |
"recipe[anso::tty]", | |
#"recipe[anso::settings]", # vim / screen / git settings for testing | |
] | |
chef.json.merge!({ | |
:chef => { | |
:server_url => "http://localhost:4000", | |
:webui_enabled => true, | |
}, | |
:cookbooks => { | |
:branch => "devpackages" | |
}, | |
}) | |
end | |
end | |
global_config.vm.define :head do |config| | |
ip = "192.168.76.111" | |
config.vm.box = "base" | |
config.vm.box_url = "http://images.ansolabs.com/vagrant/maverick64.box" | |
config.vm.network ip | |
config.vm.share_folder("v-apt", "/var/cache/apt", aptdir) | |
config.vm.provision :chef_server do |chef| | |
chef.chef_server_url = "http://192.168.76.100:4000" | |
chef.validation_key_path = "vagrant.pem" | |
chef.validation_client_name = "vagrant" | |
chef.node_name = "nova-head-vagrant" | |
chef.provisioning_path = "/etc/chef" | |
chef.log_level = :debug | |
chef.run_list = [ | |
"recipe[nova::hostname]", | |
#"recipe[anso::apt_proxy]", | |
"recipe[nova::mysql]", | |
"recipe[nova::rabbit]", | |
] | |
chef.json.merge!({ | |
:nova => { | |
:my_ip => ip, | |
}, | |
:apt => { | |
:distro => "maverick", | |
:proxy_url => "http://192.168.76.100:3142", | |
} | |
}) | |
end | |
end | |
global_config.vm.define :node do |config| | |
ip = "192.168.76.112" | |
config.vm.box = "base" | |
config.vm.box_url = "http://images.ansolabs.com/vagrant/maverick64.box" | |
config.vm.network ip | |
config.vm.share_folder("v-apt", "/var/cache/apt", aptdir) | |
config.vm.provision :chef_server do |chef| | |
chef.chef_server_url = "http://192.168.76.100:4000" | |
# This needs to be set to the validator | |
chef.validation_key_path = "vagrant.pem" | |
chef.validation_client_name = "vagrant" | |
chef.node_name = "nova-node-vagrant" | |
chef.provisioning_path = "/etc/chef" | |
chef.log_level = :debug | |
chef.run_list = [ | |
"recipe[nova::hostname]", | |
#"recipe[anso::apt_proxy]", | |
"recipe[anso::devpackages]", | |
"recipe[nova::filevg]", | |
"recipe[nova::api]", | |
"recipe[nova::scheduler]", | |
"recipe[nova::network]", | |
"recipe[nova::objectstore]", | |
"recipe[nova::volume]", | |
"recipe[nova::compute]", | |
"recipe[nova::setup]", | |
"recipe[nova::creds]", # put creds for admin user | |
#"recipe[anso::settings]", # vim / screen / git settings for testing | |
] | |
chef.json.merge!({ | |
:nova => { | |
:my_ip => ip, | |
:libvirt_type => "qemu", | |
:images => [ | |
"http://192.168.76.100/tty.tgz" | |
], | |
:creds => { | |
:user => "vagrant", | |
:group => "vagrant", | |
:dir => "/vagrant", | |
} | |
}, | |
:apt => { | |
:distro => "maverick", | |
:proxy_url => "http://192.168.76.100:3142", | |
} | |
}) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment