From 0a31e07d9ef2c36eca0be4ffc845c0b1b50411d2 Mon Sep 17 00:00:00 2001 From: Aimon Bustardo Date: Tue, 6 Nov 2012 17:06:02 -0800 Subject: [PATCH] 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