Merge "Configure Horizon to use SSL-enabled Keystone"
This commit is contained in:
commit
584e65cfc1
12
lib/horizon
12
lib/horizon
@ -45,7 +45,10 @@ function _horizon_config_set {
|
||||
local option=$3
|
||||
local value=$4
|
||||
|
||||
if grep -q "^$section" $file; then
|
||||
if [ -z "$section" ]; then
|
||||
sed -e "/^$option/d" -i $local_settings
|
||||
echo -e "\n$option=$value" >> $file
|
||||
elif grep -q "^$section" $file; then
|
||||
line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
|
||||
if [ -n "$line" ]; then
|
||||
sed -i -e "/^$section/,/^}/ s/^\( *'$option'\) *:.*$/\1: $value,/" $file
|
||||
@ -103,6 +106,13 @@ function init_horizon {
|
||||
_horizon_config_set $local_settings OPENSTACK_NEUTRON_NETWORK enable_vpn True
|
||||
fi
|
||||
|
||||
_horizon_config_set $local_settings "" OPENSTACK_HOST \"${KEYSTONE_SERVICE_HOST}\"
|
||||
_horizon_config_set $local_settings "" OPENSTACK_KEYSTONE_URL "\"${KEYSTONE_SERVICE_PROTOCOL}://%s:${KEYSTONE_SERVICE_PORT}/v2.0\" % OPENSTACK_HOST"
|
||||
|
||||
if [ -f $SSL_BUNDLE_FILE ]; then
|
||||
_horizon_config_set $local_settings "" OPENSTACK_SSL_CACERT \"${SSL_BUNDLE_FILE}\"
|
||||
fi
|
||||
|
||||
# Create an empty directory that apache uses as docroot
|
||||
sudo mkdir -p $HORIZON_DIR/.blackhole
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user