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
This commit is contained in:
erus 2019-01-26 21:49:59 -03:00
parent 6bac9930eb
commit 12d5669103
1 changed files with 22 additions and 3 deletions

View File

@ -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
}