From 1b420b6e8a22e761ef016e38950e0def5b8310d6 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Tue, 18 Dec 2012 19:58:39 -0500 Subject: [PATCH 1/2] Display message with information on Horizon Also moved informative message for OSCLIENT --- packstack/installer/output_messages.py | 3 ++- packstack/installer/run_setup.py | 1 - packstack/plugins/dashboard_500.py | 3 ++- packstack/plugins/openstack_client_400.py | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packstack/installer/output_messages.py b/packstack/installer/output_messages.py index 184e64ff3..17b1b590c 100644 --- a/packstack/installer/output_messages.py +++ b/packstack/installer/output_messages.py @@ -81,4 +81,5 @@ ERR_NO_ANSWER_FILE="Error: Could not find file %s" ERR_ONLY_1_FLAG="Error: The %s flag is mutually exclusive to all other command line options" # -INFO_KEYSTONERC="To use the command line tools source the file /root/keystonerc_admin created on the OSCLIENT host (if configured)" +INFO_KEYSTONERC="To use the command line tools source the file /root/keystonerc_admin created on %s" +INFO_DASHBOARD="To use the console, browse to http://%s/dashboard" diff --git a/packstack/installer/run_setup.py b/packstack/installer/run_setup.py index bc9373651..44b7ae588 100644 --- a/packstack/installer/run_setup.py +++ b/packstack/installer/run_setup.py @@ -604,7 +604,6 @@ def _addFinalInfoMsg(): successfull install of rhemv """ controller.MESSAGES.append(output_messages.INFO_LOG_FILE_PATH%(logFile)) - controller.MESSAGES.append(output_messages.INFO_KEYSTONERC) def _lockRpmVersion(): """ diff --git a/packstack/plugins/dashboard_500.py b/packstack/plugins/dashboard_500.py index 17d46ac16..5dca46bc3 100644 --- a/packstack/plugins/dashboard_500.py +++ b/packstack/plugins/dashboard_500.py @@ -7,7 +7,7 @@ import uuid import packstack.installer.engine_validators as validate import packstack.installer.engine_processors as process -from packstack.installer import basedefs +from packstack.installer import basedefs, output_messages import packstack.installer.common_utils as utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile @@ -78,3 +78,4 @@ def createmanifest(): manifestfile = "%s_horizon.pp"%controller.CONF['CONFIG_HORIZON_HOST'] manifestdata = getManifestTemplate("horizon.pp") appendManifestFile(manifestfile, manifestdata) + controller.MESSAGES.append(output_messages.INFO_DASHBOARD%controller.CONF['CONFIG_HORIZON_HOST']) diff --git a/packstack/plugins/openstack_client_400.py b/packstack/plugins/openstack_client_400.py index e1c086344..738acd48b 100644 --- a/packstack/plugins/openstack_client_400.py +++ b/packstack/plugins/openstack_client_400.py @@ -6,7 +6,7 @@ import logging import packstack.installer.engine_validators as validate import packstack.installer.engine_processors as process -from packstack.installer import basedefs +from packstack.installer import basedefs, output_messages import packstack.installer.common_utils as utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile @@ -65,3 +65,4 @@ def createmanifest(): manifestfile = "%s_osclient.pp"%controller.CONF['CONFIG_OSCLIENT_HOST'] manifestdata = getManifestTemplate("openstack_client.pp") appendManifestFile(manifestfile, manifestdata) + controller.MESSAGES.append(output_messages.INFO_KEYSTONERC%controller.CONF['CONFIG_OSCLIENT_HOST']) From c2c95d67b86bec279f9fc836b3ecb12c1c7e8a3d Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Tue, 18 Dec 2012 20:46:55 -0500 Subject: [PATCH 2/2] Redirect / to /dashboard on Horizon Server --- packstack/puppet/templates/horizon.pp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packstack/puppet/templates/horizon.pp b/packstack/puppet/templates/horizon.pp index 324f4d95c..2ab43beda 100644 --- a/packstack/puppet/templates/horizon.pp +++ b/packstack/puppet/templates/horizon.pp @@ -4,6 +4,12 @@ package {"horizon-packages": notify => Class["horizon"], } +file {"/etc/httpd/conf.d/rootredirect.conf": + ensure => present, + content => 'RedirectMatch ^/$ /dashboard/', + notify => File["/etc/httpd/conf.d/openstack-dashboard.conf"], +} + class {'horizon': secret_key => '%(CONFIG_HORIZON_SECRET_KEY)s', keystone_host => '%(CONFIG_KEYSTONE_HOST)s',