Fix devstack plugin to support centos/rhel 9
Since there is no official repo of MongoDB for Centos-Stream-9 or Rhel-9, we will build the repo by script. Change-Id: I1f20eb22d6e922d12e0d88aae5bf47c032db3cb3
This commit is contained in:
parent
169d917c3e
commit
3c1627dbca
@ -8,7 +8,7 @@ dev-db/mongodb [platform:gentoo]
|
||||
redis [platform:rpm]
|
||||
redis-server [platform:dpkg]
|
||||
dev-db/redis [platform:gentoo]
|
||||
libmysqlclient-dev [platform:dpkg]
|
||||
default-libmysqlclient-dev [platform:dpkg]
|
||||
libmysqlclient-devel [platform:suse]
|
||||
mysql-client [platform:dpkg]
|
||||
mysql-server [platform:dpkg]
|
||||
|
@ -190,8 +190,8 @@ function configure_mongodb {
|
||||
# NOTE: To fix the mongodb's issue in ubuntu 22.04 LTS
|
||||
ubuntu_version=$(source /etc/os-release ; echo $VERSION_ID)
|
||||
if [[ $ubuntu_version == '22.04' ]]; 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 jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
|
||||
wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add -
|
||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
|
||||
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" | sudo tee /etc/apt/sources.list.d/bionic-security.list
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
|
||||
sudo apt update
|
||||
@ -204,10 +204,24 @@ function configure_mongodb {
|
||||
restart_service mongodb
|
||||
fi
|
||||
elif is_fedora; then
|
||||
fedora_version=$(source /etc/os-release ; echo $VERSION_ID)
|
||||
if [[ $fedora_version == '9' ]]; then
|
||||
cat > /etc/yum.repos.d/mongodb-org-6.0.repo << __EOF__
|
||||
[mongodb-org-6.0]
|
||||
name=MongoDB Repository
|
||||
baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/6.0/x86_64/
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc
|
||||
__EOF__
|
||||
install_package mongodb-org
|
||||
restart_service mongod
|
||||
else
|
||||
install_package mongodb
|
||||
install_package mongodb-server
|
||||
restart_service mongod
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# init_zaqar() - Initialize etc.
|
||||
|
@ -35,8 +35,8 @@ mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e "
|
||||
# TO fix the mongodb issue in ubuntu 22.04
|
||||
ubuntu_version=$(source /etc/os-release ; echo $VERSION_ID)
|
||||
if [[ $ubuntu_version == '22.04' ]]; 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 jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
|
||||
wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add -
|
||||
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
|
||||
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" | sudo tee /etc/apt/sources.list.d/bionic-security.list
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
|
||||
sudo apt update
|
||||
|
Loading…
Reference in New Issue
Block a user