mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 13:17:24 +01:00
refactor: Modularize vagrant scripts
This commit is contained in:
13
vagrant_scripts/install_gcc.sh
Executable file
13
vagrant_scripts/install_gcc.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
echo Adding PPA repository for gcc...
|
||||||
|
add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||||
|
apt-get update -qq
|
||||||
|
|
||||||
|
echo Installing gcc 4.8...
|
||||||
|
apt-get install -qq gcc-4.8 g++-4.8
|
||||||
|
|
||||||
|
update-alternatives --remove-all gcc
|
||||||
|
update-alternatives --remove-all g++
|
||||||
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
|
||||||
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
|
||||||
|
update-alternatives --config gcc
|
||||||
|
update-alternatives --config g++
|
||||||
11
vagrant_scripts/install_mongo.sh
Executable file
11
vagrant_scripts/install_mongo.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
# Import MongoDB public GPG key
|
||||||
|
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
|
||||||
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
||||||
|
|
||||||
|
# Create a list file for MongoDB
|
||||||
|
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get install mongodb-10gen
|
||||||
|
apt-get install -y mongodb-org=2.6.4 mongodb-org-server=2.6.4 mongodb-org-shell=2.6.4 mongodb-org-mongos=2.6.4 mongodb-org-tools=2.6.4
|
||||||
|
|
||||||
@@ -20,5 +20,3 @@ npm install -g npm@2
|
|||||||
|
|
||||||
echo Installing global modules...
|
echo Installing global modules...
|
||||||
npm install -g gulp bower grunt-cli mocha
|
npm install -g gulp bower grunt-cli mocha
|
||||||
|
|
||||||
npm i
|
|
||||||
8
vagrant_scripts/install_sprite_dependencies.sh
Executable file
8
vagrant_scripts/install_sprite_dependencies.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
echo Installing GraphicsMagick - provides gm and convert...
|
||||||
|
apt-get install -qq graphicsmagick
|
||||||
|
|
||||||
|
echo Installing phantomjs and dependency...
|
||||||
|
apt-get install -qq libicu48
|
||||||
|
|
||||||
|
echo Installing requirements for grunt-spritesmith...
|
||||||
|
apt-get install -qq pkg-config libcairo2-dev libjpeg-dev
|
||||||
9
vagrant_scripts/install_test_dependencies.sh
Executable file
9
vagrant_scripts/install_test_dependencies.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
echo Installing Xvfb...
|
||||||
|
apt-get install -qq xvfb
|
||||||
|
echo Installing Java7...
|
||||||
|
apt-get install -qq openjdk-7-jre
|
||||||
|
echo Downloading Firefox...
|
||||||
|
wget http://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_40.0.3-0ubuntu1_amd64.deb/download -O firefox.deb >/dev/null 2>&1
|
||||||
|
echo Installing Firefox...
|
||||||
|
dpkg -i firefox.deb
|
||||||
|
rm firefox.deb
|
||||||
@@ -41,40 +41,14 @@ apt-get install -qq build-essential
|
|||||||
echo Installing python sofrware properties...
|
echo Installing python sofrware properties...
|
||||||
apt-get install -qq python-software-properties
|
apt-get install -qq python-software-properties
|
||||||
|
|
||||||
echo Installing GraphicsMagick - provides gm and convert...
|
echo Installing sprite dependencies...
|
||||||
apt-get install -qq graphicsmagick
|
/vagrant/vagrant_scripts/install_sprite_dependencies.sh
|
||||||
|
|
||||||
echo Installing phantomjs and dependency...
|
|
||||||
apt-get install -qq libicu48
|
|
||||||
|
|
||||||
echo Installing requirements for grunt-spritesmith...
|
|
||||||
apt-get install -qq pkg-config libcairo2-dev libjpeg-dev
|
|
||||||
|
|
||||||
# Import MongoDB public GPG key
|
|
||||||
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
|
|
||||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
|
||||||
|
|
||||||
# Create a list file for MongoDB
|
|
||||||
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
|
|
||||||
|
|
||||||
echo Installing Mongodb...
|
echo Installing Mongodb...
|
||||||
apt-get update
|
/vagrant/vagrant_scripts/install_mongo.sh
|
||||||
apt-get install mongodb-10gen
|
|
||||||
apt-get install -y mongodb-org=2.6.4 mongodb-org-server=2.6.4 mongodb-org-shell=2.6.4 mongodb-org-mongos=2.6.4 mongodb-org-tools=2.6.4
|
|
||||||
|
|
||||||
echo Adding PPA repository for gcc...
|
echo Installing gcc...
|
||||||
add-apt-repository ppa:ubuntu-toolchain-r/test
|
/vagrant/vagrant_scripts/install_gcc.sh
|
||||||
apt-get update -qq
|
|
||||||
|
|
||||||
echo Installing gcc 4.8...
|
|
||||||
apt-get install -qq gcc-4.8 g++-4.8
|
|
||||||
|
|
||||||
update-alternatives --remove-all gcc
|
|
||||||
update-alternatives --remove-all g++
|
|
||||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
|
|
||||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
|
|
||||||
update-alternatives --config gcc
|
|
||||||
update-alternatives --config g++
|
|
||||||
|
|
||||||
echo Installing Git...
|
echo Installing Git...
|
||||||
apt-get install -qq git
|
apt-get install -qq git
|
||||||
@@ -82,24 +56,16 @@ apt-get install -qq git
|
|||||||
echo Installing curl...
|
echo Installing curl...
|
||||||
apt-get install -qq curl
|
apt-get install -qq curl
|
||||||
|
|
||||||
echo Installing Xvfb...
|
echo Installing test dependencies...
|
||||||
apt-get install -qq xvfb
|
/vagrant/vagrant_scripts/install_gcc.sh
|
||||||
echo Installing Java7...
|
|
||||||
apt-get install -qq openjdk-7-jre
|
|
||||||
echo Downloading Firefox...
|
|
||||||
wget http://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_40.0.3-0ubuntu1_amd64.deb/download -O firefox.deb >/dev/null 2>&1
|
|
||||||
echo Installing Firefox...
|
|
||||||
dpkg -i firefox.deb
|
|
||||||
rm firefox.deb
|
|
||||||
|
|
||||||
echo Installing ntp...
|
echo Installing ntp...
|
||||||
apt-get install -qq ntp
|
apt-get install -qq ntp
|
||||||
|
|
||||||
/vagrant/vagrant_scripts/install.sh
|
echo Installing nvm, node and global node modules...
|
||||||
|
/vagrant/vagrant_scripts/install_node.sh
|
||||||
|
|
||||||
## # echo Seeding Mongodb...
|
echo All done! run npm install to install the required node modules and then npm start to start the server
|
||||||
## node ./src/seed.js
|
|
||||||
## no longer required - see comments in src/seed.js
|
|
||||||
|
|
||||||
# Uncomment both lines to autostart the habitica server when provisioning
|
# Uncomment both lines to autostart the habitica server when provisioning
|
||||||
# echo Starting Habitica server...
|
# echo Starting Habitica server...
|
||||||
|
|||||||
Reference in New Issue
Block a user