aboutsummaryrefslogtreecommitdiff
path: root/docker/horizon/Dockerfile.j2
diff options
context:
space:
mode:
authorViktor Michalek <viktor.michalek@ultimum.io>2019-09-20 18:36:27 +0200
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2019-10-01 03:15:23 +0000
commit6f44a3282aeeef90caaba48daae068493e2b8606 (patch)
treeb4919a3dc96d954d58bd3ad83c6d100ae21ae4e5 /docker/horizon/Dockerfile.j2
parentf9b229841db5d27fe11b95d055d74af289893ef2 (diff)
downloadkolla-6f44a3282aeeef90caaba48daae068493e2b8606.tar.gz
kolla-6f44a3282aeeef90caaba48daae068493e2b8606.zip
Horizon: fix for Debian
Stein/Buster packages are enabling plugins by default at its installation time, but we actually know what plugins should be enabled just only at the deploy time. Therefore we need to install all available plugins and disble them right at the image build time. Plugins will be enabled according to deployment (kolla-ansible) configuration at deploy time. Change-Id: I9604ebb4f2a5081fd1209b9841aa997a70a90a11
Diffstat (limited to 'docker/horizon/Dockerfile.j2')
-rw-r--r--docker/horizon/Dockerfile.j220
1 files changed, 16 insertions, 4 deletions
diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2
index 0686e2644..48bdcd1d6 100644
--- a/docker/horizon/Dockerfile.j2
+++ b/docker/horizon/Dockerfile.j2
@@ -69,9 +69,15 @@ RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
'python3-octavia-dashboard',
'python3-sahara-dashboard',
'python3-trove-dashboard',
- 'tzdata'
+ 'tzdata',
] %}
- #NOTE(hrw): check for python-murano-dashboard
+ {% if base_distro == 'debian' %}
+ {% set horizon_packages = horizon_packages + [
+ 'python3-neutron-fwaas-dashboard',
+ 'python3-neutron-vpnaas-dashboard',
+ ] %}
+ {% endif %}
+ #NOTE(hrw): check for python-murano-dashboard
{{ macros.install_packages(horizon_packages | customizable("packages")) }}
@@ -80,14 +86,20 @@ RUN echo > /etc/apache2/ports.conf \
&& sed -i 's|\(ServerTokens \)OS|\1Prod|' /etc/apache2/conf-available/security.conf \
&& ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load \
&& ln -s ../mods-available/expires.load /etc/apache2/mods-enabled/expires.load \
+ {% if base_distro == 'ubuntu' %}
&& cp /usr/share/openstack-dashboard/openstack_dashboard/conf/*.json /etc/openstack-dashboard \
- && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \
&& rm /etc/apache2/conf-enabled/openstack-dashboard.conf \
+ {% endif %}
+ && cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \
&& rm /etc/openstack-dashboard/local_settings.py \
&& ln -s /etc/openstack-dashboard/local_settings /etc/openstack-dashboard/local_settings.py \
&& for locale in /usr/lib/python3/dist-packages/*/locale; do \
(cd ${locale%/*} && /usr/bin/django-admin compilemessages) \
- done
+ done {% if install_type == 'binary' and base_distro == 'debian' %} \
+ && find /etc/openstack-dashboard/enabled/ -type f | grep -Ev \
+ `dpkg -L openstack-dashboard python3-django-horizon | \
+ grep '/etc/openstack-dashboard/enabled/' | sed 's/\.py/.*.py/g' |xargs -l1 basename | xargs | tr ' ' '|'` | xargs rm
+ {% endif %}
{% endblock %}
{% endif %}