Install all dashboard/panel files from murano-dashboard

Previously murano only had _50_murano.py dashboard file. This is about
to change, to allow more granular configuration of murano and
app-catalog panels/dashboards. This commit prepares devstack to
accommodate upcoming change.
This commit also rewrites install section of murano-dashboard, to group
all copy commands under the same code block while also grouping pre/post
Newton installation instructions and removing some of the redundant code
(some of the local settings are already present in _50_murano.py in
Newton)

Targets bp: catalog-dashboard-reorg

Change-Id: I6d1d8c99aecf10567608d0c96de69a5309e706e3
This commit is contained in:
Kirill Zaitsev 2016-08-22 20:34:24 +03:00 committed by Kirill Zaitsev
parent 079f8c50d5
commit 0d1c6bdaa9
2 changed files with 38 additions and 47 deletions

View File

@ -501,10 +501,10 @@ function configure_local_settings_py() {
fi fi
# Install Murano as plugin for Horizon # Install Murano as plugin for Horizon
ln -sf $MURANO_DASHBOARD_DIR/muranodashboard/local/enabled/_50_murano.py $HORIZON_DIR/openstack_dashboard/local/enabled/ ln -sf $MURANO_DASHBOARD_DIR/muranodashboard/local/enabled/*.py $HORIZON_DIR/openstack_dashboard/local/enabled/
# Install setting to Horizon # Install setting to Horizon
ln -sf $MURANO_DASHBOARD_DIR/muranodashboard/local/local_settings.d/_50_murano.py $HORIZON_DIR/openstack_dashboard/local/local_settings.d/ ln -sf $MURANO_DASHBOARD_DIR/muranodashboard/local/local_settings.d/*.py $HORIZON_DIR/openstack_dashboard/local/local_settings.d/
# Install murano RBAC policy to Horizon # Install murano RBAC policy to Horizon
ln -sf $MURANO_DASHBOARD_DIR/muranodashboard/conf/murano_policy.json $HORIZON_DIR/openstack_dashboard/conf/ ln -sf $MURANO_DASHBOARD_DIR/muranodashboard/conf/murano_policy.json $HORIZON_DIR/openstack_dashboard/conf/

View File

@ -248,24 +248,6 @@ This section describes how to install and run the murano dashboard.
cd horizon cd horizon
tox -e venv -- pip install -e ../murano-dashboard tox -e venv -- pip install -e ../murano-dashboard
#. Enable the murano panel in the OpenStack Dashboard by copying
the ``muranodashboard`` plug-in file to
the ``openstack_dashboard/local/enabled/`` directory:
* For the OpenStack installations prior to the Newton release, run:
.. code-block:: console
cp ../murano-dashboard/muranodashboard/local/_50_murano.py \
openstack_dashboard/local/enabled/
* For the Newton (and later) OpenStack installations, run:
.. code-block:: console
cp ../murano-dashboard/muranodashboard/local/enabled/_50_murano.py \
openstack_dashboard/local/enabled/
#. Prepare local settings. #. Prepare local settings.
.. code-block:: console .. code-block:: console
@ -276,37 +258,44 @@ This section describes how to install and run the murano dashboard.
For more information, check out the official For more information, check out the official
`horizon documentation <http://docs.openstack.org/developer/horizon/topics/settings.html#openstack-settings-partial>`_. `horizon documentation <http://docs.openstack.org/developer/horizon/topics/settings.html#openstack-settings-partial>`_.
#. Customize local settings according to your OpenStack installation: #. Enable and configure Murano dashboard in the OpenStack Dashboard:
.. code-block:: ini * For the Newton (and later) OpenStack installations, copy plug-in file
local settings files, and policy files:
.. code-block:: console
cp ../murano-dashboard/muranodashboard/local/enabled/*.py \
openstack_dashboard/local/enabled/
cp ../murano-dashboard/muranodashboard/local/local_settings.d/*.py \
openstack_dashboard/local/local_settings.d/
cp ../murano-dashboard/muranodashboard/conf/* openstack_dashboard/conf/
* For the OpenStack installations prior to the Newton release, run:
.. code-block:: console
cp ../murano-dashboard/muranodashboard/local/_50_murano.py \
openstack_dashboard/local/enabled/
Customize local settings of your horizon installation, by editing the
``openstack_dashboard/local/local_settings.py`` file:
.. code-block:: python
... ...
ALLOWED_HOSTS = '*' ALLOWED_HOSTS = '*'
# Provide OpenStack Lab credentials # Provide your OpenStack Lab credentials
OPENSTACK_HOST = '%OPENSTACK_HOST_IP%' OPENSTACK_HOST = '%OPENSTACK_HOST_IP%'
... ...
# Set secret key to prevent it's generation
SECRET_KEY = 'random_string'
...
DEBUG_PROPAGATE_EXCEPTIONS = DEBUG DEBUG_PROPAGATE_EXCEPTIONS = DEBUG
#. For the OpenStack installations of the Newton (and later) version, Change the default session back end from browser cookies to database
copy murano dashboard specific settings and policy files
to horizon dashboard:
.. code-block:: console
cp ../murano-dashboard/muranodashboard/local/local_settings.d/_50_murano.py \
openstack_dashboard/local/local_settings.d/
cp ../murano-dashboard/conf/* openstack_dashboard/conf/
#. Change the default session back end from browser cookies to database
to avoid issues with forms during the applications creation: to avoid issues with forms during the applications creation:
.. code-block:: python .. code-block:: python
@ -320,6 +309,7 @@ This section describes how to install and run the murano dashboard.
SESSION_ENGINE = 'django.contrib.sessions.backends.db' SESSION_ENGINE = 'django.contrib.sessions.backends.db'
#. (Optional) If you do not plan to get the murano service from the keystone #. (Optional) If you do not plan to get the murano service from the keystone
application catalog, specify where the ``murano-api`` service is running: application catalog, specify where the ``murano-api`` service is running:
@ -327,8 +317,9 @@ This section describes how to install and run the murano dashboard.
MURANO_API_URL = 'http://localhost:8082' MURANO_API_URL = 'http://localhost:8082'
#. (Optional) If you have set up the database as a session back end, #. (Optional) If you have set up the database as a session back end (this is
perform the database synchronization: done by default with murano local_settings file starting with Newton),
perform database migration:
.. code-block:: console .. code-block:: console
@ -348,7 +339,7 @@ This section describes how to install and run the murano dashboard.
The development server restarts automatically on every code change. The development server restarts automatically on every code change.
**Result:** The murano dashboard is available at ``http://localhost:8000``. **Result:** The murano dashboard is available at ``http://IP:PORT``.
Import murano applications Import murano applications
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~