Merge "ci: Add redirection from /v2 to /identity/v2"
This commit is contained in:
commit
029242656d
@ -18,6 +18,7 @@
|
||||
# - magnum_register_image
|
||||
# - start_magnum
|
||||
# - configure_iptables_magnum
|
||||
# - configure_apache_magnum
|
||||
# - stop_magnum
|
||||
# - cleanup_magnum
|
||||
|
||||
@ -347,6 +348,46 @@ function configure_iptables_magnum {
|
||||
}
|
||||
|
||||
|
||||
function configure_apache_magnum {
|
||||
# Set redirection for kubernetes openstack cloud provider
|
||||
# FIXME: When [1] is in kubernetes, we won't need the redirection anymore.
|
||||
# [1] https://github.com/gophercloud/gophercloud/pull/423
|
||||
HTACCESS_PATH=/var/www/html
|
||||
if is_ubuntu; then
|
||||
OVERRIDE_CONF_FILE=/etc/apache2/apache2.conf
|
||||
elif is_fedora; then
|
||||
OVERRIDE_CONF_FILE=/etc/httpd/conf/httpd.conf
|
||||
fi
|
||||
# If horizon is enabled then we need
|
||||
if is_service_enabled horizon; then
|
||||
HTACCESS_PATH=$DEST/horizon/.blackhole
|
||||
sudo tee -a $APACHE_CONF_DIR/horizon.conf <<EOF
|
||||
<Directory $HTACCESS_PATH>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride all
|
||||
Require all granted
|
||||
</Directory>
|
||||
EOF
|
||||
else
|
||||
sudo tee -a $OVERRIDE_CONF_FILE <<EOF
|
||||
<Directory $HTACCESS_PATH>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride all
|
||||
Require all granted
|
||||
</Directory>
|
||||
EOF
|
||||
fi
|
||||
|
||||
sudo mkdir -p $HTACCESS_PATH
|
||||
sudo tee $HTACCESS_PATH/.htaccess <<EOF
|
||||
RewriteEngine on
|
||||
RewriteRule ^v2\.0(.*) /identity/v2.0\$1
|
||||
RewriteRule ^v3(.*) /identity/v3\$1
|
||||
EOF
|
||||
enable_apache_mod rewrite
|
||||
}
|
||||
|
||||
|
||||
# start_magnum() - Start running processes, including screen
|
||||
function start_magnum {
|
||||
|
||||
|
@ -41,6 +41,7 @@ if is_service_enabled magnum-api magnum-cond; then
|
||||
start_magnum
|
||||
|
||||
configure_iptables_magnum
|
||||
configure_apache_magnum
|
||||
fi
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user