aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Arbet <michal.arbet@ultimum.io>2020-06-04 15:09:46 +0200
committerMichal Arbet <michal.arbet@ultimum.io>2020-06-21 01:35:18 +0200
commit46f8eed88a865adbbf564aae6949a0e2a39f3c31 (patch)
tree2f79682f17d62a2f18b43f2d8c4899340eb0413a
parentdc2db8f6a02b18609f55a7c03357e8b6128990ef (diff)
downloadkolla-46f8eed88a865adbbf564aae6949a0e2a39f3c31.tar.gz
kolla-46f8eed88a865adbbf564aae6949a0e2a39f3c31.zip
Fix horizon debian binary docker image
Debian packages are different from ubuntu packages. Differencies in /etc/openstack-dashboard: - Symlinking {{ python_path }}/openstack_dashboard/local/enabled/ -> /etc/openstack-dashboard/enabled - Symlinking {{ python_path }}/openstack_dashboard/local_settings.d/ -> /etc/openstack-dashboard/local_settings.d - Symlinking {{ python_path }}/openstack_dashboard/conf/ -> /etc/openstack-dashboard/policy Every dashboard-plugin debian package is copying his policy files, local_settings, enabled to above locations. Every dashboard-plugin is triggering dpkg and collect-static, compress is done by openstack-dashboard package. Kolla has to remove all these debian package's configs and provide kolla configs. Move also /etc/openstack-dashboard/policy to standard location and delete symlink as kolla-ansible is overriding default policy files path to /etc/openstack-dashboard/. Change-Id: Ieca15bdb315d52e9547d798df11641ef36485b26 Depends-On: https://review.opendev.org/733612
-rw-r--r--docker/horizon/Dockerfile.j27
1 files changed, 4 insertions, 3 deletions
diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2
index ec3a5e233..db28421ca 100644
--- a/docker/horizon/Dockerfile.j2
+++ b/docker/horizon/Dockerfile.j2
@@ -92,9 +92,10 @@ RUN echo > /etc/apache2/ports.conf \
&& for locale in /usr/lib/python3/dist-packages/*/locale; do \
(cd ${locale%/*} && /usr/bin/django-admin compilemessages) \
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
+ && rm -rf /etc/openstack-dashboard/enabled/* \
+ /etc/openstack-dashboard/local_settings.d/* \
+ /usr/lib/python3/dist-packages/openstack_dashboard/conf \
+ && mv /etc/openstack-dashboard/policy /usr/lib/python3/dist-packages/openstack_dashboard/conf
{% endif %}
{% endblock %}