Browse Source

Fix searchlight-ui configuring for mitaka

Searchlight-ui has no policy and settings files in mitaka, so
need to add check for cp, if they are exist.

Change-Id: Ie0a7159144fda111cedfbd031c28de3059a8b2d2
Peter Razumovsky 2 years ago
parent
commit
e5e8c2b855
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      docker/horizon/Dockerfile.j2

+ 4
- 2
docker/horizon/Dockerfile.j2 View File

@@ -15,8 +15,10 @@ 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
-    && cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/ \
19
-    && cp -a /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py /horizon/openstack_dashboard/local/local_settings.d/ \
18
+    && (if [ -f /searchlight-ui/searchlight_ui/conf/searchlight_policy.json ]; then \
19
+        cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/; fi) \
20
+    && (if [ -f /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py ]; then \
21
+        cp -a /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py /horizon/openstack_dashboard/local/local_settings.d/; fi) \
20 22
     && /var/lib/microservices/venv/bin/pip install --upgrade /horizon /sahara-dashboard /murano-dashboard /searchlight-ui \
21 23
     && useradd --user-group horizon \
22 24
     && ln -s /etc/openstack-dashboard/local_settings /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \

Loading…
Cancel
Save