summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
authorerus <erudyn@protonmail.com>2019-01-26 21:49:59 -0300
committererus <erudyn@protonmail.com>2019-01-27 18:50:27 -0300
commit12d56691034b8edc730fa042fdfac0fe65f7a647 (patch)
treebb7aad0175f54e5e05f068b0c4c168a4b30c0464 /devstack
parent6bac9930ebd0f5882247879c3d9b04b732ba6fb4 (diff)
downloadkeystone-12d56691034b8edc730fa042fdfac0fe65f7a647.tar.gz
Add CentOS support in devstack federation plugin
Modify the install_federation function for adding Shibboleth repo and installation for CentOS in federation.sh, and also modify uninstall_federation function for removing Shibboleth packages when running `./unstack.sh`. Partial-bug: #1757000 Change-Id: I8c0f63d0a4fe19eab58e7cba3c49905f35266f9d
Diffstat (limited to 'devstack')
-rw-r--r--devstack/lib/federation.sh25
1 files changed, 22 insertions, 3 deletions
diff --git a/devstack/lib/federation.sh b/devstack/lib/federation.sh
index 774b7c271..d4acc7ec6 100644
--- a/devstack/lib/federation.sh
+++ b/devstack/lib/federation.sh
@@ -66,10 +66,24 @@ function install_federation {
# Enable the Shibboleth module for Apache
sudo a2enmod shib2
- else
+ elif is_fedora; then
# NOTE(knikolla): For CentOS/RHEL, installing shibboleth is tricky
# It requires adding a separate repo not officially supported
- echo "Skipping installation of shibboleth for non ubuntu host"
+
+ # Add Shibboleth repository with curl
+ curl https://download.opensuse.org/repositories/security://shibboleth/CentOS_7/security:shibboleth.repo \
+ | sudo tee /etc/yum.repos.d/shibboleth.repo >/dev/null
+
+ # Install Shibboleth
+ install_package shibboleth
+
+ # Create a new keypair for Shibboleth
+ sudo /etc/shibboleth/keygen.sh -f -o /etc/shibboleth
+
+ # Start Shibboleth module
+ start_service shibd
+ else
+ echo "Skipping installation of shibboleth for non ubuntu nor fedora host"
fi
}
@@ -153,7 +167,12 @@ function configure_tests_settings {
function uninstall_federation {
if is_ubuntu; then
uninstall_package libapache2-mod-shib2
+ elif is_fedora; then
+ uninstall_package shibboleth
+
+ # Remove Shibboleth repository
+ sudo rm /etc/yum.repos.d/shibboleth.repo
else
- echo "Skipping uninstallation of shibboleth for non ubuntu host"
+ echo "Skipping uninstallation of shibboleth for non ubuntu nor fedora host"
fi
}