aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Berendt <berendt@betacloud-solutions.de>2016-07-01 22:13:31 +0200
committerChristian Berendt <berendt@betacloud-solutions.de>2016-08-31 12:48:18 +0000
commite821f58c9b40dfb3f335b51f8a41627ac221726b (patch)
treeaf12493359a56117e42ca92eb1243451e967b408
parent970eff43f3fd083ff00702d5443e8bfb5c81fee8 (diff)
downloadkolla-e821f58c9b40dfb3f335b51f8a41627ac221726b.tar.gz
kolla-e821f58c9b40dfb3f335b51f8a41627ac221726b.zip
Install neutron-lbaas-dashboard from source in horizon container
Change-Id: I9bc0288dd436eaaa48c8fd27e0907bbb8dadfe2c Partial-bug: #1592446 Co-authored-by: Shaun Smekel <shaun.smekel@theorem.net.au>
-rw-r--r--docker/horizon/Dockerfile.j26
-rw-r--r--kolla/common/config.py4
-rw-r--r--kolla/image/build.py10
3 files changed, 18 insertions, 2 deletions
diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2
index 623a5a992..5076804e6 100644
--- a/docker/horizon/Dockerfile.j2
+++ b/docker/horizon/Dockerfile.j2
@@ -94,6 +94,7 @@ RUN echo > /etc/apache2/ports.conf \
{% endif %}
ADD horizon-archive /horizon-source
+ADD plugins-archive /
RUN ln -s horizon-source/* horizon \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /horizon \
&& useradd --user-group horizon \
@@ -102,6 +103,11 @@ RUN ln -s horizon-source/* horizon \
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
&& cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings \
&& cp /horizon/manage.py /var/lib/kolla/venv/bin/manage.py \
+ && if [ "$(ls /plugins)" ]; then \
+ pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \
+ ln -s `find /plugins -name 'neutron-lbaas-dashboard-*' -type d`/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py \
+ /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py; \
+ fi \
&& /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py collectstatic --noinput --clear \
&& (cd /var/lib/kolla/venv/lib/python2.7/site-packages/horizon && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \
&& (cd /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \
diff --git a/kolla/common/config.py b/kolla/common/config.py
index 9de8a8198..ba94f1f39 100644
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -209,6 +209,10 @@ SOURCES = {
'type': 'url',
'location': ('http://tarballs.openstack.org/horizon/'
'horizon-master.tar.gz')},
+ 'horizon-plugin-neutron-lbaas-dashboard': {
+ 'type': 'url',
+ 'location': ('http://tarballs.openstack.org/neutron-lbaas-dashboard/'
+ 'neutron-lbaas-dashboard-master.tar.gz')},
'ironic-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/ironic/'
diff --git a/kolla/image/build.py b/kolla/image/build.py
index 1eb3a4634..03534b797 100644
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -824,8 +824,14 @@ class KollaWorker(object):
(re.search('{}-plugin-.+'.format(image.name),
section) for section in
self.conf.list_all_sections()) if match]:
- self.conf.register_opts(common_config.get_source_opts(),
- plugin)
+ try:
+ self.conf.register_opts(
+ common_config.get_source_opts(),
+ plugin
+ )
+ except cfg.DuplicateOptError:
+ LOG.debug('Plugin %s already registered in config',
+ plugin)
image.plugins.append(
process_source_installation(image, plugin))