9
Vagrantfile
vendored
9
Vagrantfile
vendored
@@ -5,20 +5,19 @@ Vagrant::Config.run do |config|
|
||||
remote_url_base = ENV['REMOTE_VAGRANT_STORE']
|
||||
|
||||
config.vm.box = "#{box}"
|
||||
config.vm.box_url = "http://faro.puppetlabs.lan/vagrant/#{box}.box"
|
||||
|
||||
config.ssh.forwarded_port_key = "ssh"
|
||||
ssh_forward = 2231
|
||||
ssh_forward = 2222
|
||||
|
||||
|
||||
config.vm.box = "#{box}"
|
||||
config.vm.box_url = "http://faro.puppetlabs.lan/vagrant/#{box}.vbox"
|
||||
config.vm.box_url = "#{remote_url_base}/#{box}.vbox"
|
||||
config.vm.customize do |vm|
|
||||
vm.memory_size = 768
|
||||
vm.cpu_count = 1
|
||||
end
|
||||
|
||||
net_base = "172.20.0"
|
||||
net_base = "172.21.0"
|
||||
|
||||
# the master runs apply to configure itself
|
||||
config.vm.define :puppetmaster do |pm|
|
||||
@@ -52,7 +51,7 @@ Vagrant::Config.run do |config|
|
||||
ssh_forward = ssh_forward + 1
|
||||
rabbit.vm.forward_port('ssh', 22, ssh_forward, :auto => true)
|
||||
rabbit.vm.network("#{net_base}.13")
|
||||
rabbit.vm.provision :shell, :path => 'scripts/run-rabbit.sh'
|
||||
rabbit.vm.provision :shell, :path => 'scripts/run-rabbitmq.sh'
|
||||
end
|
||||
config.vm.define :controller do |controller|
|
||||
ssh_forward = ssh_forward + 1
|
||||
|
@@ -9,22 +9,32 @@ $rabbit_vhost = '/'
|
||||
$rabbit_host = 'rabbitmq'
|
||||
$rabbit_port = '5672'
|
||||
|
||||
$glance_api_servers = 'glance:9292'
|
||||
$glance_host = 'glance'
|
||||
$glance_port = '9292'
|
||||
|
||||
$api_server = 'controller'
|
||||
|
||||
resources { 'nova_config':
|
||||
purge => true,
|
||||
}
|
||||
|
||||
node db {
|
||||
class { 'mysql::server':
|
||||
config_hash => {'bind_address' => '0.0.0.0'}
|
||||
config_hash => {
|
||||
'bind_address' => '0.0.0.0'
|
||||
#'root_password' => 'foo',
|
||||
#'etc_root_password' => true
|
||||
}
|
||||
}
|
||||
class { 'mysql::ruby': }
|
||||
class { 'nova::db':
|
||||
password => $db_password,
|
||||
dbname => $db_user,
|
||||
user => $db_name,
|
||||
dbname => $db_name,
|
||||
user => $db_username,
|
||||
host => $clientcert,
|
||||
# does glance need access?
|
||||
allowed_hosts => ['controller', 'glance'],
|
||||
allowed_hosts => ['controller', 'glance', 'compute'],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,16 +53,40 @@ node controller {
|
||||
|
||||
image_service => 'nova.image.glance.GlanceImageService',
|
||||
|
||||
glance_api_servers => 'glance:9292',
|
||||
glance_host => 'glance',
|
||||
glance_port => '9292',
|
||||
glance_api_servers => $glance_api_servers,
|
||||
glance_host => $glance_host,
|
||||
glance_port => $glance_port,
|
||||
|
||||
libvirt_type => 'qemu',
|
||||
}
|
||||
}
|
||||
|
||||
node compute {
|
||||
|
||||
class { 'nova::compute':
|
||||
api_server => $api_server,
|
||||
enabled => true,
|
||||
api_port => 8773,
|
||||
aws_address => '169.254.169.254',
|
||||
}
|
||||
class { 'nova::compute::libvirt':
|
||||
libvirt_type => 'qemu',
|
||||
flat_network_bridge => 'br100',
|
||||
flat_network_bridge_ip => '11.0.0.1',
|
||||
flat_network_bridge_netmask => '255.255.255.0',
|
||||
}
|
||||
class { "nova":
|
||||
verbose => $verbose,
|
||||
sql_connection => "mysql://${db_username}:${db_password}@${db_host}/${db_name}",
|
||||
image_service => $image_service,
|
||||
glance_api_servers => $glance_api_servers,
|
||||
glance_host => $glance_host,
|
||||
glance_port => $glance_port,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_userid => $rabbit_user,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
}
|
||||
}
|
||||
|
||||
node glance {
|
||||
|
Submodule modules/create_resources updated: ef2b103ffb...28584b0ed1
Submodule modules/mysql updated: b93e0f65cb...29bdca5a76
Submodule modules/nova updated: 5d38e9b1c8...71c65b66c0
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
puppet apply /vagrant/manifests/hosts.pp
|
||||
puppet apply --certname $1 /vagrant/manifests/site.pp --modulepath /vagrant/modules
|
||||
puppet apply /vagrant/manifests/site.pp --modulepath /vagrant/modules --graph --certname $* --graphdir /vagrant/graphs
|
||||
|
Reference in New Issue
Block a user