From 889b54780023c16ad12e52e4d90ffd6092979744 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Mon, 29 Oct 2012 18:42:11 -0700 Subject: [PATCH] Add support for openstack::all --- Vagrantfile | 3 +- manifests/scenarios/all_in_one.pp | 70 +++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 manifests/scenarios/all_in_one.pp diff --git a/Vagrantfile b/Vagrantfile index 33aee3f..0fa6762 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -63,12 +63,13 @@ Vagrant::Config.run do |config| 'memory' => 512, 'ip1' => '172.16.0.10' } + }, + { 'openstack_all' => { 'memory' => 2512, 'ip1' => '172.16.0.11'} } #{'compute_1' => # {'ip1' => '172.16.0.4'} #}, #{'compute_2' => # {'ip1' => '172.16.0.5'} - } ].each do |hash| diff --git a/manifests/scenarios/all_in_one.pp b/manifests/scenarios/all_in_one.pp new file mode 100644 index 0000000..6142f12 --- /dev/null +++ b/manifests/scenarios/all_in_one.pp @@ -0,0 +1,70 @@ +# +# deploys a single all in one installation +# uses variables set in site.pp +# +# +node /openstack-all/ { + + keystone_config { + 'DEFAULT/log_config': ensure => absent, + } + + class { 'openstack::test_file': + quantum => $use_quantum, + } + + # create a test volume on a loopback device for testing + class { 'cinder::setup_test_volume': } -> Service<||> + + include 'apache' + + class { 'openstack::all': + public_address => $ipaddress_eth1, + internal_address => $ipaddress_eth1, + public_interface => $public_interface, + private_interface => $private_interface, + mysql_root_password => $mysql_root_password, + secret_key => $secret_key, + admin_email => $admin_email, + admin_password => $admin_password, + keystone_db_password => $keystone_db_password, + keystone_admin_token => $admin_token, + nova_db_password => $nova_db_password, + nova_user_password => $nova_user_password, + glance_db_password => $glance_db_password, + glance_user_password => $glance_user_password, + quantum_user_password => $quantum_user_password, + quantum_db_password => $quantum_db_password, + cinder_user_password => $cinder_user_password, + cinder_db_password => $cinder_db_password, + rabbit_password => $rabbit_password, + rabbit_user => $rabbit_user, + libvirt_type => $libvirt_type, + floating_range => $floating_network_range, + fixed_range => $fixed_network_range, + verbose => $verbose, + auto_assign_floating_ip => $auto_assign_floating_ip, + quantum => $use_quantum, + #vncproxy_host => $ipaddress_eth1, + } + + class { 'openstack::auth_file': + admin_password => $admin_password, + keystone_admin_token => $keystone_admin_token, + controller_node => '127.0.0.1', + } + + # TODO not sure why this is required + # this has a bug, and is constantly added to the file + Package['libvirt'] -> + file_line { 'quemu_hack': + line => 'cgroup_device_acl = [ + "/dev/null", "/dev/full", "/dev/zero", + "/dev/random", "/dev/urandom", + "/dev/ptmx", "/dev/kvm", "/dev/kqemu", + "/dev/rtc", "/dev/hpet", "/dev/net/tun",]', + path => '/etc/libvirt/qemu.conf', + ensure => present, + } ~> Service['libvirt'] + +}