Install packages from plugin.sh

The plugin installs redis packages when needed but it doesn't do the
same for mongodb. This patch makes sure the required mongodb packages
are installed.

Change-Id: Ifef3d043cc05323a964ac3f3eac2f3505b267b82
Depends-On: 9643dcbf073d187d1ec32253c039ede6ba8b4d59
This commit is contained in:
Flavio Percoco 2015-04-30 09:25:07 +02:00
parent 5b7181e66e
commit a432f030ed

View File

@ -159,12 +159,15 @@ function configure_mongodb {
# Set nssize to 2GB. This increases the number of namespaces supported
# # per database.
if is_ubuntu; then
install_package mongodb-server
sudo sed -i -e "
s|[^ \t]*#[ \t]*\(nssize[ \t]*=.*\$\)|\1|
s|^\(nssize[ \t]*=[ \t]*\).*\$|\1 2047|
" /etc/mongodb.conf
restart_service mongodb
elif is_fedora; then
install_package mongodb
install_package mongodb-server
sudo sed -i '/--nssize/!s/OPTIONS=\"/OPTIONS=\"--nssize 2047 /' /etc/sysconfig/mongod
restart_service mongod
fi