Browse Source

Fix horizon with murano plugin for mitaka

Change-Id: Ia7a02796de06978b9b41fb71ac94842149762344
Andrey Pavlov 2 years ago
parent
commit
1c2f63d873
3 changed files with 10 additions and 40 deletions
  1. 8
    6
      docker/horizon/Dockerfile.j2
  2. 0
    34
      docker/horizon/mitaka.patch
  3. 2
    0
      service/files/local_settings.j2

+ 8
- 6
docker/horizon/Dockerfile.j2 View File

@@ -15,6 +15,14 @@ RUN apt-get update \
15 15
 RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
16 16
     && cp -a /sahara-dashboard/sahara_dashboard/enabled/* /horizon/openstack_dashboard/local/enabled/ \
17 17
     && cp -a /searchlight-ui/searchlight_ui/enabled/_1001_project_search_panel.py /horizon/openstack_dashboard/local/enabled/ \
18
+    && (if [ -d /murano-dashboard/muranodashboard/conf ]; then \
19
+       cp -r /murano-dashboard/muranodashboard/conf/* /horizon/openstack_dashboard/conf/; fi) \
20
+    && (if [ -d /murano-dashboard/muranodashboard/local/enabled ]; then \
21
+        cp -a /murano-dashboard/muranodashboard/local/enabled/* /horizon/openstack_dashboard/local/enabled/; else \
22
+        cp /murano-dashboard/muranodashboard/local/_50_murano.py /horizon/openstack_dashboard/local/enabled/;  fi) \
23
+    && (if [-d /murano-dashboard/muranodashboard/local/local_settings.d ]; then \
24
+       cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /horizon/openstack_dashboard/local/local_settings.d/ \
25
+       && sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" /horizon/openstack_dashboard/local/local_settings.d/_50_murano.py; fi) \
18 26
     && (if [ -f /searchlight-ui/searchlight_ui/conf/searchlight_policy.json ]; then \
19 27
         cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/; fi) \
20 28
     && (if [ -f /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py ]; then \
@@ -23,9 +31,6 @@ RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
23 31
     && useradd --user-group horizon \
24 32
     && ln -s /etc/openstack-dashboard/local_settings /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \
25 33
     && cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
26
-    && cp -r /murano-dashboard/muranodashboard/conf/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/ \
27
-    && cp -a /murano-dashboard/muranodashboard/local/enabled/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/enabled/ \
28
-    && cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/ \
29 34
     && cp /horizon/manage.py /var/lib/microservices/venv/bin/manage.py \
30 35
     && /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py collectstatic --noinput --clear \
31 36
     && chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon \
@@ -36,9 +41,6 @@ ENV PATH /var/lib/venv/bin:$PATH
36 41
 # Workaround for https://bugs.launchpad.net/osprofiler/+bug/1361235
37 42
 RUN sed -i "s#'../..'#os.path.realpath('../..')#" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi
38 43
 
39
-# TODO (amogylchenko): remove ugly sed for session_engine
40
-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
41
-
42 44
 COPY daemon.sh /usr/local/bin/daemon.sh
43 45
 COPY horizon_sudoers /etc/sudoers.d/horizon_sudoers
44 46
 RUN chmod 755 /usr/local/bin/daemon.sh \

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

@@ -1,34 +0,0 @@
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 \

+ 2
- 0
service/files/local_settings.j2 View File

@@ -717,3 +717,5 @@ COMPRESS_OFFLINE = True
717 717
 # If using Glance V2, this value should be False unless the Glance
718 718
 # configuration and policies allow setting locations.
719 719
 IMAGES_ALLOW_LOCATION = True
720
+
721
+SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

Loading…
Cancel
Save