Browse Source

Fix horizon with murano plugin for mitaka

Change-Id: Ia7a02796de06978b9b41fb71ac94842149762344
changes/82/424582/1
Andrey Pavlov 3 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 \
RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
&& cp -a /sahara-dashboard/sahara_dashboard/enabled/* /horizon/openstack_dashboard/local/enabled/ \
&& cp -a /searchlight-ui/searchlight_ui/enabled/_1001_project_search_panel.py /horizon/openstack_dashboard/local/enabled/ \
&& (if [ -d /murano-dashboard/muranodashboard/conf ]; then \
cp -r /murano-dashboard/muranodashboard/conf/* /horizon/openstack_dashboard/conf/; fi) \
&& (if [ -d /murano-dashboard/muranodashboard/local/enabled ]; then \
cp -a /murano-dashboard/muranodashboard/local/enabled/* /horizon/openstack_dashboard/local/enabled/; else \
cp /murano-dashboard/muranodashboard/local/_50_murano.py /horizon/openstack_dashboard/local/enabled/; fi) \
&& (if [-d /murano-dashboard/muranodashboard/local/local_settings.d ]; then \
cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /horizon/openstack_dashboard/local/local_settings.d/ \
&& sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" /horizon/openstack_dashboard/local/local_settings.d/_50_murano.py; fi) \
&& (if [ -f /searchlight-ui/searchlight_ui/conf/searchlight_policy.json ]; then \
cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/; fi) \
&& (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 \
&& useradd --user-group horizon \
&& ln -s /etc/openstack-dashboard/local_settings /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
&& cp -r /murano-dashboard/muranodashboard/conf/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/ \
&& cp -a /murano-dashboard/muranodashboard/local/enabled/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/enabled/ \
&& cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/ \
&& cp /horizon/manage.py /var/lib/microservices/venv/bin/manage.py \
&& /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py collectstatic --noinput --clear \
&& 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
# Workaround for https://bugs.launchpad.net/osprofiler/+bug/1361235
RUN sed -i "s#'../..'#os.path.realpath('../..')#" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi

# TODO (amogylchenko): remove ugly sed for session_engine
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

COPY daemon.sh /usr/local/bin/daemon.sh
COPY horizon_sudoers /etc/sudoers.d/horizon_sudoers
RUN chmod 755 /usr/local/bin/daemon.sh \


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

@@ -1,34 +0,0 @@
--- Dockerfile.j2 2017-01-19 13:54:07.533262012 +0100
+++ Dockerfile.j2.mitaka 2017-01-19 14:08:08.960824525 +0100
@@ -9,7 +9,6 @@

{{ copy_sources("openstack/horizon", "/horizon") }}
{{ copy_sources("openstack/sahara-dashboard", "/sahara-dashboard") }}
-{{ copy_sources("openstack/murano-dashboard", "/murano-dashboard") }}
{{ copy_sources("openstack/searchlight-ui", "/searchlight-ui") }}

RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
@@ -19,13 +18,9 @@
cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/; fi) \
&& (if [ -f /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py ]; then \
cp -a /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py /horizon/openstack_dashboard/local/local_settings.d/; fi) \
- && /var/lib/microservices/venv/bin/pip install --upgrade /horizon /sahara-dashboard /murano-dashboard /searchlight-ui \
&& useradd --user-group horizon \
&& ln -s /etc/openstack-dashboard/local_settings /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
- && cp -r /murano-dashboard/muranodashboard/conf/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/ \
- && cp -a /murano-dashboard/muranodashboard/local/enabled/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/enabled/ \
- && cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/ \
&& cp /horizon/manage.py /var/lib/microservices/venv/bin/manage.py \
&& /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py collectstatic --noinput --clear \
&& chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon \
@@ -36,9 +31,6 @@
# Workaround for https://bugs.launchpad.net/osprofiler/+bug/1361235
RUN sed -i "s#'../..'#os.path.realpath('../..')#" /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi

-# TODO (amogylchenko): remove ugly sed for session_engine
-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
-
COPY daemon.sh /usr/local/bin/daemon.sh
COPY horizon_sudoers /etc/sudoers.d/horizon_sudoers
RUN chmod 755 /usr/local/bin/daemon.sh \

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

@@ -717,3 +717,5 @@ COMPRESS_OFFLINE = True
# If using Glance V2, this value should be False unless the Glance
# configuration and policies allow setting locations.
IMAGES_ALLOW_LOCATION = True

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

Loading…
Cancel
Save