Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MongoDB 3.2 #549

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mysql_root_password = "root" # We'll assume user "root"
mysql_version = "5.5" # Options: 5.5 | 5.6
mysql_enable_remote = "false" # remote access enabled when true
pgsql_root_password = "root" # We'll assume user "root"
mongo_version = "2.6" # Options: 2.6 | 3.0
mongo_version = "2.6" # Options: 2.6 | 3.0 | 3.2
mongo_enable_remote = "false" # remote access enabled when true

# Languages and Packages
Expand Down
11 changes: 8 additions & 3 deletions scripts/mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
echo ">>> Installing MongoDB"

# Get key and add to sources
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
if [ $2 == "3.2" ]; then
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
else
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
fi

# Make MongoDB connectable from outside world without SSH tunnel
if [ $2 == "3.0" ]; then
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
if [[ $2 == "3."* ]]; then
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/$2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-$2.list
else
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
fi
Expand All @@ -25,6 +29,7 @@ if [ $1 == "true" ]; then
# enable remote access
# setting the mongodb bind_ip to allow connections from everywhere
sed -i "s/bind_ip = .*/bind_ip = 0.0.0.0/" /etc/mongod.conf
sed -i "s/bindIp: .*/bindIp: 0.0.0.0/" /etc/mongod.conf
fi

# Test if PHP is installed
Expand Down