From fecfeefbf72443bfa73fc5798dd50214cbf3b0ea Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 25 Mar 2014 11:37:13 -0400 Subject: [PATCH 1/2] Support servername in cloud::dashboard --- manifests/dashboard.pp | 6 ++++++ spec/classes/cloud_dashboard_spec.rb | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/dashboard.pp b/manifests/dashboard.pp index c100c389..726298bc 100644 --- a/manifests/dashboard.pp +++ b/manifests/dashboard.pp @@ -36,6 +36,10 @@ # (optional) Which interface we bind the Horizon server. # Default value in params # +# [*servername*] +# (optional) DNS name used to connect to Openstack Dashboard. +# Default value in params. +# # [*listen_ssl*] # (optional) Enable SSL on OpenStack Dashboard vhost # It requires SSL files (keys and certificates) @@ -75,6 +79,7 @@ class cloud::dashboard( $secret_key = $os_params::secret_key, $horizon_port = $os_params::horizon_port, $api_eth = $os_params::api_eth, + $servername = $os_params::servername, $listen_ssl = false, $keystone_host = $os_params::ks_keystone_internal_host, $keystone_proto = $os_params::ks_keystone_internal_proto, @@ -96,6 +101,7 @@ class cloud::dashboard( # e.g: 127.0.0.1 instead of a public IP address. # We force $api_eth to avoid this situation fqdn => $api_eth, + servername => $servername, bind_address => $api_eth, swift => true, keystone_url => $keystone_url, diff --git a/spec/classes/cloud_dashboard_spec.rb b/spec/classes/cloud_dashboard_spec.rb index a2f7a094..08c3f6cb 100644 --- a/spec/classes/cloud_dashboard_spec.rb +++ b/spec/classes/cloud_dashboard_spec.rb @@ -31,7 +31,8 @@ describe 'cloud::dashboard' do :keystone_proto => 'http', :keystone_port => '5000', :debug => true, - :api_eth => '10.0.0.1' } + :api_eth => '10.0.0.1', + :servername => 'horizon.openstack.org' } end it 'configure horizon' do @@ -41,6 +42,7 @@ describe 'cloud::dashboard' do :can_set_mount_point => 'False', :fqdn => '10.0.0.1', :bind_address => '10.0.0.1', + :servername => 'horizon.openstack.org', :swift => true, :cache_server_ip => false, :keystone_url => 'http://keystone.openstack.org:5000/v2.0', From 9d7c63b03b55bb80c116b880c452843e36bcbc2d Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 25 Mar 2014 18:04:01 -0400 Subject: [PATCH 2/2] Set servername default value to fqdn --- manifests/dashboard.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/dashboard.pp b/manifests/dashboard.pp index 726298bc..7d71b508 100644 --- a/manifests/dashboard.pp +++ b/manifests/dashboard.pp @@ -38,7 +38,7 @@ # # [*servername*] # (optional) DNS name used to connect to Openstack Dashboard. -# Default value in params. +# Default value fqdn. # # [*listen_ssl*] # (optional) Enable SSL on OpenStack Dashboard vhost @@ -79,7 +79,7 @@ class cloud::dashboard( $secret_key = $os_params::secret_key, $horizon_port = $os_params::horizon_port, $api_eth = $os_params::api_eth, - $servername = $os_params::servername, + $servername = $::fqdn, $listen_ssl = false, $keystone_host = $os_params::ks_keystone_internal_host, $keystone_proto = $os_params::ks_keystone_internal_proto,