From f6a8bcc2845a161791f28185ccfa360b37d9e417 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Tue, 2 Sep 2014 17:28:22 +0100 Subject: [PATCH] Set the default ENDPOINT TYPE to internalURL for Horizon Default is publicURL which will fail if internal server doesn't have access via the firewall. All this value to be overridden via the "horizon" service vars. Fixes #57 --- .../playbooks/openstack/horizon.yml | 2 ++ .../templates/local_settings.py | 2 +- .../vars/openstack_service_vars/horizon.yml | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 rpc_deployment/vars/openstack_service_vars/horizon.yml diff --git a/rpc_deployment/playbooks/openstack/horizon.yml b/rpc_deployment/playbooks/openstack/horizon.yml index a33cea0dcf..704e8e6132 100644 --- a/rpc_deployment/playbooks/openstack/horizon.yml +++ b/rpc_deployment/playbooks/openstack/horizon.yml @@ -26,6 +26,8 @@ - openstack_common - openstack_openrc - horizon_common + vars_files: + - vars/openstack_service_vars/horizon.yml - hosts: horizon_all[0] user: root diff --git a/rpc_deployment/roles/horizon_common/templates/local_settings.py b/rpc_deployment/roles/horizon_common/templates/local_settings.py index 79fe645bd6..1fa42dac1d 100644 --- a/rpc_deployment/roles/horizon_common/templates/local_settings.py +++ b/rpc_deployment/roles/horizon_common/templates/local_settings.py @@ -223,7 +223,7 @@ IMAGE_CUSTOM_PROPERTY_TITLES = { # OPENSTACK_ENDPOINT_TYPE specifies the endpoint type to use for the endpoints # in the Keystone service catalog. Use this setting when Horizon is running # external to the OpenStack environment. The default is 'publicURL'. -#OPENSTACK_ENDPOINT_TYPE = "publicURL" +OPENSTACK_ENDPOINT_TYPE = " {{ horizon_endpoint_type }} " # SECONDARY_ENDPOINT_TYPE specifies the fallback endpoint type to use in the # case that OPENSTACK_ENDPOINT_TYPE is not present in the endpoints diff --git a/rpc_deployment/vars/openstack_service_vars/horizon.yml b/rpc_deployment/vars/openstack_service_vars/horizon.yml new file mode 100644 index 0000000000..8c371a832c --- /dev/null +++ b/rpc_deployment/vars/openstack_service_vars/horizon.yml @@ -0,0 +1,19 @@ +--- +# Copyright 2014, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The variables file used by the playbooks in the nova-api-ec2 group. +# These don't have to be explicitly imported by vars_files: they are autopopulated. + +horizon_endpoint_type: internalURL