Browse Source

Add a patch to Dockerfile for Mitaka

This is a workaround for murano-dashboard bug that will allow
building Horizon for Mitaka release (otherwise it will fail).
It can be useful in CI scenario when we build images for different OpenStack
releases.

Change-Id: Ieae9a52e49654e0469e58799f0b43ed343556f13
Marek Zawadzki 2 years ago
parent
commit
a284222df4
1 changed files with 34 additions and 0 deletions
  1. 34
    0
      docker/horizon/mitaka.patch

+ 34
- 0
docker/horizon/mitaka.patch View File

@@ -0,0 +1,34 @@
1
+--- Dockerfile.j2	2017-01-19 13:54:07.533262012 +0100
2
++++ Dockerfile.j2.mitaka	2017-01-19 14:08:08.960824525 +0100
3
+@@ -9,7 +9,6 @@
4
+
5
+ {{ copy_sources("openstack/horizon", "/horizon") }}
6
+ {{ copy_sources("openstack/sahara-dashboard", "/sahara-dashboard") }}
7
+-{{ copy_sources("openstack/murano-dashboard", "/murano-dashboard") }}
8
+ {{ copy_sources("openstack/searchlight-ui", "/searchlight-ui") }}
9
+
10
+ RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
11
+@@ -19,13 +18,9 @@
12
+         cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/; fi) \
13
+     && (if [ -f /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py ]; then \
14
+         cp -a /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py /horizon/openstack_dashboard/local/local_settings.d/; fi) \
15
+-    && /var/lib/microservices/venv/bin/pip install --upgrade /horizon /sahara-dashboard /murano-dashboard /searchlight-ui \
16
+     && useradd --user-group horizon \
17
+     && ln -s /etc/openstack-dashboard/local_settings /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \
18
+     && cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
19
+-    && cp -r /murano-dashboard/muranodashboard/conf/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/ \
20
+-    && cp -a /murano-dashboard/muranodashboard/local/enabled/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/enabled/ \
21
+-    && cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/ \
22
+     && cp /horizon/manage.py /var/lib/microservices/venv/bin/manage.py \
23
+     && /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py collectstatic --noinput --clear \
24
+     && chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon \
25
+@@ -36,9 +31,6 @@
26
+ # Workaround for https://bugs.launchpad.net/osprofiler/+bug/1361235
27
+ RUN sed -i "s#'../..'#os.path.realpath('../..')#" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi
28
+
29
+-# TODO (amogylchenko): remove ugly sed for session_engine
30
+-RUN sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/_50_murano.py
31
+-
32
+ COPY daemon.sh /usr/local/bin/daemon.sh
33
+ COPY horizon_sudoers /etc/sudoers.d/horizon_sudoers
34
+ RUN chmod 755 /usr/local/bin/daemon.sh \

Loading…
Cancel
Save