@@ -46,12 +46,22 @@ ADD plugins-archive /
46
46
COPY extend_start.sh /usr/local/bin/kolla_extend_start
47
47
48
48
# NOTE(hrw): to install horizon from unpacked sources we cannot have it in upper-constraints.txt
49
+ # NOTE(kevko): This dance with local settings python paths below is needed
50
+ # because we are using different distros with different python version and we need to
51
+ # know to which path symlink should point to.
49
52
RUN ln -s horizon-source/* horizon \
50
53
&& {{ macros.upper_constraints_remove("horizon") }} \
51
54
&& {{ macros.install_pip(horizon_pip_packages | customizable("pip_packages")) }} \
52
55
&& mkdir -p /etc/openstack-dashboard \
53
56
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
54
- && cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings \
57
+ && cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings.py \
58
+ && local_settings=$(python -c 'import os;import openstack_dashboard;settings=os.path.dirname(openstack_dashboard.__file__) + "/local/local_settings.py";print(settings);') \
59
+ && rm -f $local_settings \
60
+ && ln -s /etc/openstack-dashboard/local_settings.py $local_settings \
61
+ && mkdir -p /etc/openstack-dashboard/local_settings.d \
62
+ && local_settings_d=$(python -c 'import os;import openstack_dashboard;settings_d=os.path.dirname(openstack_dashboard.__file__) + "/local/local_settings.d";print(settings_d);') \
63
+ && rm -rf $local_settings_d \
64
+ && ln -s /etc/openstack-dashboard/local_settings.d $local_settings_d \
55
65
&& cp /horizon/manage.py /var/lib/kolla/venv/bin/manage.py \
56
66
&& if [ "$(ls /plugins)" ]; then \
57
67
{{ macros.install_pip(horizon_plugins_pip_packages) }}; \
0 commit comments