From fe760774251020aa6aca4f74e40ee266d6099050 Mon Sep 17 00:00:00 2001 From: Keiichi Hikita Date: Mon, 4 Dec 2017 09:56:23 +0900 Subject: [PATCH] Split out heat own items from Horizon settings. Heat relevant contents will be split out from Horizon in Queens release. After this splitting out, Heat-Dashboard must have its own settings in Heat-Dashboard repository. So this review request includes following. - Create own settings under local_settings.d - Add procedure for installing above settings. - Fix installation procedure according to above changes. Change-Id: I0b9a9907cb0c02aed70e7c1af3d9d07b0ddeffb6 --- README.rst | 13 +++----- devstack/plugin.sh | 1 + doc/source/install/installation_contents.rst | 13 +++----- .../_1699_orchestration_settings.py | 33 +++++++++++++++++++ heat_dashboard/local_settings.d/__init__.py | 0 5 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 heat_dashboard/local_settings.d/_1699_orchestration_settings.py create mode 100644 heat_dashboard/local_settings.d/__init__.py diff --git a/README.rst b/README.rst index 7f3ae1b3..03d81d48 100644 --- a/README.rst +++ b/README.rst @@ -67,16 +67,11 @@ Enable heat-dashboard plugin in your Horizon environment:: cp heat-dashboard/heat_dashboard/enabled/* \ horizon/openstack_dashboard/local/enabled -Add 'orchestration' entry to POLICY_FILES value in local_settings.py:: + cp heat-dashboard/etc/* \ + horizon/openstack_dashboard/conf/ - POLICY_FILES = { - 'identity': 'keystone_policy.json', - 'compute': 'nova_policy.json', - 'volume': 'cinder_policy.json', - 'image': 'glance_policy.json', - 'orchestration': '/etc/heat_policy.json', <-- add this key/value pair - 'network': 'neutron_policy.json', - } + cp heat-dashboard/heat_dashboard/local_settings.d/* \ + horizon/openstack_dashboard/local/local_settings.d/ Finally you can launch Horizon with Heat Dashboard plugin:: diff --git a/devstack/plugin.sh b/devstack/plugin.sh index cae1df98..6ec786e6 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -16,6 +16,7 @@ function install_heat_dashboard { function configure_heat_dashboard { cp -a ${HEAT_DASHBOARD_DIR}/heat_dashboard/enabled/* ${DEST}/horizon/openstack_dashboard/local/enabled/ + cp -a ${HEAT_DASHBOARD_DIR}/heat_dashboard/local_settings.d ${DEST}/horizon/openstack_dashboard/local/local_settings.d/ cp -a ${HEAT_DASHBOARD_DIR}/etc/heat_policy.json ${DEST}/horizon/openstack_dashboard/conf/ # NOTE: If locale directory does not exist, compilemessages will fail, # so check for an existence of locale directory is required. diff --git a/doc/source/install/installation_contents.rst b/doc/source/install/installation_contents.rst index 550c28bc..2e33d586 100644 --- a/doc/source/install/installation_contents.rst +++ b/doc/source/install/installation_contents.rst @@ -47,16 +47,11 @@ Enable heat-dashboard plugin in your Horizon environment:: cp heat-dashboard/heat_dashboard/enabled/* \ horizon/openstack_dashboard/local/enabled -Add 'orchestration' entry to POLICY_FILES value in local_settings.py:: + cp heat-dashboard/etc/* \ + horizon/openstack_dashboard/conf/ - POLICY_FILES = { - 'identity': 'keystone_policy.json', - 'compute': 'nova_policy.json', - 'volume': 'cinder_policy.json', - 'image': 'glance_policy.json', - 'orchestration': '/etc/heat_policy.json', <-- add this key/value pair - 'network': 'neutron_policy.json', - } + cp heat-dashboard/heat_dashboard/local_settings.d/* \ + horizon/openstack_dashboard/local/local_settings.d/ Finally you can launch Horizon with Heat Dashboard plugin:: diff --git a/heat_dashboard/local_settings.d/_1699_orchestration_settings.py b/heat_dashboard/local_settings.d/_1699_orchestration_settings.py new file mode 100644 index 00000000..56a0ff74 --- /dev/null +++ b/heat_dashboard/local_settings.d/_1699_orchestration_settings.py @@ -0,0 +1,33 @@ +# 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. + +# This file is to be included for configuring application which relates +# to orchestration(Heat) functions. + +from django.conf import settings + + +OPENSTACK_HEAT_STACK = { + 'enable_user_pass': True, +} + +settings.LOGGING['loggers'].update({ + 'heatclient': { + 'handlers': ['console'], + 'level': 'DEBUG', + 'propagate': False, + } +}) + +settings.POLICY_FILES.update({ + 'orchestration': 'heat_policy.json', +}) diff --git a/heat_dashboard/local_settings.d/__init__.py b/heat_dashboard/local_settings.d/__init__.py new file mode 100644 index 00000000..e69de29b