install-osrf.sh: update for OpenSRF 2.4/Evergreen 2.8
[sitka/sitka-tools.git] / deployment / install-osrf.sh
index 3160e3e..61e4cf2 100755 (executable)
@@ -3,8 +3,8 @@ DEFAULT_USER="sitkastaff"
 HOMEDIR="/home/${DEFAULT_USER}"
 BUILDDIR="${HOMEDIR}/opensrf"
 INSTALLDIR="/srv/openils"
-BRANCH="rel_2_3"
-HOSTNAME="nonprod"
+BRANCH="rel_2_4"
+HOSTNAME="nonprod-28"
 SITKACONF="${HOMEDIR}/sysadmin"
 
 # test for ejabberd passwords
@@ -32,7 +32,7 @@ su -l -c "cd ${BUILDDIR} && git fetch origin && git checkout ${BRANCH} && git pu
  
 # as root
 echo "Installing OpenSRF prerequisites for Ubuntu..."
-cd ${BUILDDIR} && make -f src/extras/Makefile.install ubuntu-precise
+cd ${BUILDDIR} && make -f src/extras/Makefile.install ubuntu-trusty
  
 # as DEFAULT_USER
 echo "Configuring and building OpenSRF..."
@@ -71,3 +71,18 @@ chmod 640 /etc/ejabberd/ejabberd.cfg
   ejabberdctl register opensrf public.localhost ${PUBLIC_OPENSRF_PASSWD}
 
 echo "OpenSRF is installed!"
+
+# websockets install (REQUIRED for web client)
+# XXX a valid SSL cert is required!
+rm -r /tmp/apache-websocket
+cd /tmp && git clone https://github.com/disconnect/apache-websocket
+cd apache-websocket && apxs2 -i -a -c mod_websocket.c
+sh /usr/share/doc/apache2/examples/setup-instance websockets
+a2dismod websocket
+cp ${SITKACONF}/files/etc/apache2-websockets/apache2.conf/${HOSTNAME} /etc/apache2-websockets/apache2.conf
+cp ${SITKACONF}/files/etc/apache2-websockets/envvars/${HOSTNAME} /etc/apache2-websockets/envvars
+
+#/etc/init.d/apache2-websockets start
+
+echo "websockets is installed!"
+