Tweaks to allow Horizon dev mode
* Paramaterise FORCE_GENERATE so it can be set by Ansible when horizon dev mode is enabled. * Move the soft linking of local_settings to run time * Check perms on the secret_key_store at run time Change-Id: I9bb9a3061412e2f71c60a90ecf9d2e9d78ba2d78 Depends-On: If99b0310dac75776ca462034926dd57794572ce9
This commit is contained in:
parent
7da9d5c020
commit
aa412be7a8
@ -130,7 +130,6 @@ ADD plugins-archive /
|
||||
RUN ln -s horizon-source/* horizon \
|
||||
&& {{ macros.install_pip(horizon_pip_packages | customizable("pip_packages")) }} \
|
||||
&& mkdir -p /etc/openstack-dashboard \
|
||||
&& ln -s /etc/openstack-dashboard/local_settings /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \
|
||||
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
|
||||
&& cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings \
|
||||
&& cp /horizon/manage.py /var/lib/kolla/venv/bin/manage.py \
|
||||
|
@ -2,6 +2,19 @@
|
||||
|
||||
set -o errexit
|
||||
|
||||
FORCE_GENERATE="${FORCE_GENERATE}"
|
||||
|
||||
if [[ ${KOLLA_INSTALL_TYPE} == "binary" ]]; then
|
||||
SITE_PACKAGES="/usr/lib/python2.7/site-packages"
|
||||
elif [[ ${KOLLA_INSTALL_TYPE} == "source" ]]; then
|
||||
SITE_PACKAGES="/var/lib/kolla/venv/lib/python2.7/site-packages"
|
||||
fi
|
||||
|
||||
if [[ ! -f ${SITE_PACKAGES}/openstack_dashboard/local/local_settings.py ]]; then
|
||||
ln -s /etc/openstack-dashboard/local_settings \
|
||||
${SITE_PACKAGES}/openstack_dashboard/local/local_settings.py
|
||||
fi
|
||||
|
||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
@ -13,14 +26,6 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FORCE_GENERATE="no"
|
||||
|
||||
if [[ ${KOLLA_INSTALL_TYPE} == "binary" ]]; then
|
||||
SITE_PACKAGES="/usr/lib/python2.7/site-packages"
|
||||
elif [[ ${KOLLA_INSTALL_TYPE} == "source" ]]; then
|
||||
SITE_PACKAGES="/var/lib/kolla/venv/lib/python2.7/site-packages"
|
||||
fi
|
||||
|
||||
function config_dashboard {
|
||||
ENABLE=$1
|
||||
SRC=$2
|
||||
@ -256,6 +261,11 @@ fi
|
||||
if [[ ! -d "/var/log/kolla/horizon" ]]; then
|
||||
mkdir -p /var/log/kolla/horizon
|
||||
fi
|
||||
|
||||
if [[ $(stat -c %a /var/log/kolla/horizon) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/horizon
|
||||
fi
|
||||
|
||||
if [[ $(stat -c %U ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store) != "horizon" ]]; then
|
||||
chown horizon ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user