-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis-setup.sh
executable file
·28 lines (19 loc) · 954 Bytes
/
travis-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
# Stop old travis Mongo
sudo service mongodb stop
sudo killall mongod 2>/dev/null
sudo killall mongodb 2>/dev/null
# Remove old mongo packages
sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen
sudo apt-get autoremove
# Import mongodb public GPG key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update -qq -y
sudo apt-get install -y mongodb-org
sudo service mongod stop
sudo rm -f /etc/mongod.conf
sudo cp ./config/mongodb_dev.conf /etc/mongod.conf
sudo /usr/bin/mongod --fork --quiet --config /etc/mongod.conf
mongoimport -d nomad -c locations --type tsv --file location_data/allCountries.txt --fields countrycode,postalcode,name,name1,code1,name2,code2,name3,code3,latitude,longitude,accuracy