diff --git a/devstack/lib/magnum b/devstack/lib/magnum index 3d62b66020..ae8499d696 100644 --- a/devstack/lib/magnum +++ b/devstack/lib/magnum @@ -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 < +Options Indexes FollowSymLinks +AllowOverride all +Require all granted + +EOF + else + sudo tee -a $OVERRIDE_CONF_FILE < + Options Indexes FollowSymLinks + AllowOverride all + Require all granted + +EOF + fi + + sudo mkdir -p $HTACCESS_PATH + sudo tee $HTACCESS_PATH/.htaccess <