[openstack-dev] [murano] [horizon] Reverse order of settings modules inclusion

Timur Sufiev tsufiev at mirantis.com
Thu Feb 20 14:14:54 UTC 2014


Hello!

In Murano's dashboard we have around 20 parameters that should be changed
or added to DJANGO_SETTINGS_MODULE. Currently all these parameters are
embedded into openstack_dashboard.settings during install with sed and
tools alike (and removed during uninstall).

Recently more clean and elegant way was devised [1]: not to insert code
into openstack_dashboard.settings, but define all Murano-specific settings
in its own config file which in turn imports the contents of
openstack_dashboard.settings. That also requires to change
DJANGO_SETTINGS_MODULE environment variable from
'openstack_dashboard.settings' to 'muranodashboard.settings' in django.wsgi
file which is referenced in apache config as the entry point for
Django-served site (we do not touch original openstack_dashboard wsgi-file,
but edit apache config to point to our own muranodashboard/wsgi/django.wsgi
file with appropriate environment variable).

While this approach has obvious advantages:
* Murano-specific parameters are clearly separated from common
openstack_dashboard parameters;
* moreover, customizable Murano parameters inside
/etc/murano/murano-dashboard/settings-{prologue,epilogue}.py files are
separated from constant muranodashboard settings somewhere in /usr/,
it also reverses in some sense relation between openstack_dashboard and
muranodashboard: now muranodashboard.settings file is the main entry point
for the whole openstack_dashboard Django application.

As to me, it doesn't pose a serious drawback, because openstack_dashboard
is still a main Django application which uses Murano as one of its
dashboards, only the order of settings inclusion is reversed. But after
investigating and implementing this scheme I might be a bit biased :)... So
I'd like to hear your opinion, whether this way of augmenting
openstack_dashboard settings is viable or not?

[1] https://review.openstack.org/#/c/68125/

-- 
Timur Sufiev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140220/9e26bbeb/attachment.html>


More information about the OpenStack-dev mailing list