From 0a31e07d9ef2c36eca0be4ffc845c0b1b50411d2 Mon Sep 17 00:00:00 2001 From: Aimon Bustardo Date: Tue, 6 Nov 2012 17:06:02 -0800 Subject: [PATCH 1/4] Add rabbit_virtual_host support to openstack controller module .. feature exists in puppetlabs-nova already. Also Made installation of Horizon optional. --- manifests/compute.pp | 1 + manifests/controller.pp | 21 ++++++++++++++------- manifests/nova/controller.pp | 8 +++++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/manifests/compute.pp b/manifests/compute.pp index a791adf..e63f69a 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -42,6 +42,7 @@ class openstack::compute ( # Rabbit $rabbit_host = '127.0.0.1', $rabbit_user = 'nova', + $rabbit_virtual_host = '/', # Glance $glance_api_servers = false, # Virtualization diff --git a/manifests/controller.pp b/manifests/controller.pp index 0cae84d..a4f0590 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -18,6 +18,7 @@ # [nova_user_password] Nova service password. # [rabbit_password] Rabbit password. # [rabbit_user] Rabbit User. +# [rabbit_virtual_host] Rabbit virtual host path for Nova. Defaults to '/'. # [network_manager] Nova network manager to use. # [fixed_range] Range of ipv4 network for vms. # [floating_range] Floating ip range to create. @@ -37,6 +38,7 @@ # [cache_server_port] local memcached instance port # [swift] (bool) is swift installed # [quantum] (bool) is quantum installed +# [horizon] (bool) is horizon installed # The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps. # There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose. # Each app is defined in two parts, the display name, and the URI @@ -116,7 +118,9 @@ class openstack::controller ( $network_config = {}, # Rabbit $rabbit_user = 'nova', + $rabbit_virtual_host = '/', # Horizon + $horizon = true, $cache_server_ip = '127.0.0.1', $cache_server_port = '11211', $horizon_app_links = undef, @@ -267,6 +271,7 @@ class openstack::controller ( # Rabbit rabbit_user => $rabbit_user, rabbit_password => $rabbit_password, + rabbit_virtual_host => $rabbit_virtual_host, # Glance glance_api_servers => $glance_api_servers, # VNC @@ -295,13 +300,15 @@ class openstack::controller ( ######## Horizon ######## - class { 'openstack::horizon': - secret_key => $secret_key, - cache_server_ip => $cache_server_ip, - cache_server_port => $cache_server_port, - swift => $swift, - quantum => $quantum, - horizon_app_links => $horizon_app_links, + if ($horizon) { + class { 'openstack::horizon': + secret_key => $secret_key, + cache_server_ip => $cache_server_ip, + cache_server_port => $cache_server_port, + swift => $swift, + quantum => $quantum, + horizon_app_links => $horizon_app_links, + } } } diff --git a/manifests/nova/controller.pp b/manifests/nova/controller.pp index 565e67e..67cb89f 100644 --- a/manifests/nova/controller.pp +++ b/manifests/nova/controller.pp @@ -53,6 +53,7 @@ class openstack::nova::controller ( $nova_db_dbname = 'nova', # Rabbit $rabbit_user = 'nova', + $rabbit_virtual_host = '/', # Database $db_type = 'mysql', # Glance @@ -84,9 +85,10 @@ class openstack::nova::controller ( # Install / configure rabbitmq class { 'nova::rabbitmq': - userid => $rabbit_user, - password => $rabbit_password, - enabled => $enabled, + userid => $rabbit_user, + password => $rabbit_password, + enabled => $enabled, + virtual_host => $rabbit_virtual_host, } # Configure Nova From 843a2e0aef58dd2789852715fa9a73a76e6db130 Mon Sep 17 00:00:00 2001 From: Aimon Bustardo Date: Tue, 6 Nov 2012 17:08:41 -0800 Subject: [PATCH 2/4] Add rabbit_virtual_host support to openstack controller module .. feature exists in puppetlabs-nova already. Also Made installation of Horizon optional. --- manifests/compute.pp | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/compute.pp b/manifests/compute.pp index e63f69a..8c9caa0 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -90,6 +90,7 @@ class openstack::compute ( glance_api_servers => $glance_api_servers, verbose => $verbose, rabbit_host => $rabbit_host, + virtual_host => $rabbit_virtual_host, } # Install / configure nova-compute From 9b052cd5fe53745e32ba5f21e6645f68fc8bce91 Mon Sep 17 00:00:00 2001 From: Aimon Bustardo Date: Tue, 6 Nov 2012 21:00:54 -0800 Subject: [PATCH 3/4] revert optional horizon for separate pull requests --- manifests/controller.pp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/manifests/controller.pp b/manifests/controller.pp index a4f0590..02e337b 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -38,7 +38,6 @@ # [cache_server_port] local memcached instance port # [swift] (bool) is swift installed # [quantum] (bool) is quantum installed -# [horizon] (bool) is horizon installed # The next is an array of arrays, that can be used to add call-out links to the dashboard for other apps. # There is no specific requirement for these apps to be for monitoring, that's just the defacto purpose. # Each app is defined in two parts, the display name, and the URI @@ -120,7 +119,6 @@ class openstack::controller ( $rabbit_user = 'nova', $rabbit_virtual_host = '/', # Horizon - $horizon = true, $cache_server_ip = '127.0.0.1', $cache_server_port = '11211', $horizon_app_links = undef, @@ -300,15 +298,13 @@ class openstack::controller ( ######## Horizon ######## - if ($horizon) { - class { 'openstack::horizon': - secret_key => $secret_key, - cache_server_ip => $cache_server_ip, - cache_server_port => $cache_server_port, - swift => $swift, - quantum => $quantum, - horizon_app_links => $horizon_app_links, - } + class { 'openstack::horizon': + secret_key => $secret_key, + cache_server_ip => $cache_server_ip, + cache_server_port => $cache_server_port, + swift => $swift, + quantum => $quantum, + horizon_app_links => $horizon_app_links, } } From 426236831fe3ba03c14e83be53905af94b15949a Mon Sep 17 00:00:00 2001 From: Aimon Bustardo Date: Tue, 6 Nov 2012 22:15:50 -0800 Subject: [PATCH 4/4] Fixed bad variable name --- manifests/compute.pp | 16 ++++++++-------- spec/fixtures/manifests/site.pp | 0 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 spec/fixtures/manifests/site.pp diff --git a/manifests/compute.pp b/manifests/compute.pp index 8c9caa0..1227cb6 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -83,14 +83,14 @@ class openstack::compute ( } class { 'nova': - sql_connection => $sql_connection, - rabbit_userid => $rabbit_user, - rabbit_password => $rabbit_password, - image_service => 'nova.image.glance.GlanceImageService', - glance_api_servers => $glance_api_servers, - verbose => $verbose, - rabbit_host => $rabbit_host, - virtual_host => $rabbit_virtual_host, + sql_connection => $sql_connection, + rabbit_userid => $rabbit_user, + rabbit_password => $rabbit_password, + image_service => 'nova.image.glance.GlanceImageService', + glance_api_servers => $glance_api_servers, + verbose => $verbose, + rabbit_host => $rabbit_host, + rabbit_virtual_host => $rabbit_virtual_host, } # Install / configure nova-compute diff --git a/spec/fixtures/manifests/site.pp b/spec/fixtures/manifests/site.pp deleted file mode 100644 index e69de29..0000000