Browse Source

ci: Add redirection from /v2 to /identity/v2

Until [1] is in kubernetes we need to redirect from /v2 to
/identity/v2 for the cloud provider to work.

[1] https://github.com/gophercloud/gophercloud/pull/423

Change-Id: I5206e75e9528ceb8428c70df67e6ba26d01c4772
changes/29/496229/17
Spyros Trigazis 3 years ago
committed by yatin
parent
commit
674b90548d
2 changed files with 42 additions and 0 deletions
  1. +41
    -0
      devstack/lib/magnum
  2. +1
    -0
      devstack/plugin.sh

+ 41
- 0
devstack/lib/magnum View File

@ -18,6 +18,7 @@
# - magnum_register_image
# - start_magnum
# - configure_iptables_magnum
# - configure_apache_magnum
# - stop_magnum
# - cleanup_magnum
@ -344,6 +345,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 {


+ 1
- 0
devstack/plugin.sh View File

@ -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…
Cancel
Save