Merge "Optimize devstack plugin"

This commit is contained in:
Zuul 2023-01-29 04:26:24 +00:00 committed by Gerrit Code Review
commit 5940aea746

View File

@ -188,14 +188,19 @@ function configure_mongodb {
pip_install pymongo
if is_ubuntu; then
# NOTE: To fix the mongodb's issue in ubuntu 22.04 LTS
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
sudo dpkg -i ./libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
install_package mongodb-org
restart_service mongod
ubuntu_version=`cat /etc/issue | cut -d " " -f2`
if [[ $ubuntu_version > '22' ]]; then
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
sudo dpkg -i ./libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
install_package mongodb-org
restart_service mongod
else
install_package mongodb-server
restart_service mongodb
fi
elif is_fedora; then
install_package mongodb
install_package mongodb-server