Added u-boot.sh for deployment on Debian boxes code-rev0
authorbobcall <bob@bobcall.e>
Mon, 5 Dec 2011 22:07:46 +0000 (17:07 -0500)
committerbobcall <bob@bobcall.e>
Mon, 5 Dec 2011 22:07:46 +0000 (17:07 -0500)
util/u-boot.sh [new file with mode: 0755]

diff --git a/util/u-boot.sh b/util/u-boot.sh
new file mode 100755 (executable)
index 0000000..4c905ee
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# Finals Club collaborative real-time editor
+# deployment script. (c) 2011 Finals Club Foundation
+# This script is licensed under the terms of the GPL
+# v3. To view this license, please see the COPYING
+# file in the src root.
+
+
+haproxy=/usr/sbin/haproxy
+
+#get / install dependencies
+
+apt-get update
+apt-get install git-core
+apt-get install make
+apt-get install g++
+apt-get install sqlite
+apt-get install curl
+
+# get src
+
+git clone git://github.com/finalsclubdev/FinalsClub.git
+
+cd etherpad-lite
+
+git clone git://github.com/chapel/etherpad-lite.git
+
+cd ..
+
+# install node
+nodever="v0.4.10"
+if test ! -e node-$nodever ; then
+               curl http://nodejs.org/dist/node-v0.4.10.tar.gz > node-v0.4.10.tar.gz
+               tar xzvf node-$nodever.tar.gz
+               cd node-$nodever
+               ./configure
+               make
+               make install
+fi
+
+# install npm
+if test ! -e npm ; then
+               git clone http://github.com/isaacs/npm.git
+               cd npm
+               sudo make install
+               cd ..
+fi
+
+npm install nodemon -g
+npm install forever -g
+
+## make it easier for root to run node
+cd /usr/bin
+ln -sf /usr/local/bin/node .
+ln -sf /usr/local/bin/forever .
+
+
+rm /data/db/mongod.lock
+/usr/local/bin/mongod -v --rest --replSet finalsclubset &> /var/log/mongod.log &
+