EG 2.12 install scripts
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 7 Mar 2017 04:31:21 +0000 (20:31 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 7 Mar 2017 04:31:21 +0000 (20:31 -0800)
deployment/install-eg.sh
deployment/install-osrf.sh

index c1072cd..c37fd10 100755 (executable)
@@ -3,16 +3,18 @@
 
 HOSTNAME="nonprod"
 DEFAULT_USER="sitkastaff"
-HOMEDIR="/home/${DEFAULT_USER}"
-#EGRELEASE="Evergreen-ILS-2.10.beta"
-#BUILDDIR="${HOMEDIR}/${EGRELEASE}"
-BUILDDIR="${HOMEDIR}/evergreen"
+DEFAULT_USER_HOMEDIR="/home/${DEFAULT_USER}"
+INSTALL_USER="opensrf"
+INSTALL_USER_HOMEDIR="/home/${INSTALL_USER}"
+#EGRELEASE="Evergreen-ILS-2.12.beta"
+#BUILDDIR="${INSTALL_USER_HOMEDIR}/${EGRELEASE}"
+BUILDDIR="${INSTALL_USER_HOMEDIR}/evergreen"
 INSTALLDIR="/srv/openils"
-BRANCH="production/sitka_2_10_tpac"
-STAMP_ID="rel_2_10_2"
-ALT_STAMP_IDS="rel_2_10_2_sitka_0 2_10_2_sitka_0 2_10_2 rel_2_10_1 2_10_1 rel_2_10_0 2_10_0 rel_2_10_beta 2_10_beta"
-VERSION="2.10.2.sitka.0"
-SITKACONF="${HOMEDIR}/sysadmin"
+BRANCH="user/jeffdavis/upgrade_2_12_beta_tpac"
+STAMP_ID="rel_2_12_beta"
+ALT_STAMP_IDS="2_12_beta"
+VERSION="2.12.beta.sitka.0"
+SITKACONF="${DEFAULT_USER_HOMEDIR}/sysadmin"
 SITKACONF_BRANCH="master"
 SITKATOOLS="/root/sitka-tools"
 
@@ -44,20 +46,20 @@ fi
 if [ ! -d "${SITKACONF}" ]
 then
   # this will fail unless DEFAULT_USER has read access to the repo
-  suwrap "cd ${HOMEDIR} && git clone git+ssh://git@git.sitka.bclibraries.ca/sitka-infra/sysadmin" ${DEFAULT_USER}
+  suwrap "cd ${DEFAULT_USER_HOMEDIR} && git clone git+ssh://git@git.sitka.bclibraries.ca/sitka-infra/sysadmin" ${DEFAULT_USER}
 fi
 suwrap "cd ${SITKACONF} && git fetch origin && git checkout ${SITKACONF_BRANCH} && git pull" ${DEFAULT_USER}
 
 # checkout EG source
 if [ ! -d "${BUILDDIR}" ]
 then
-  suwrap "cd ${HOMEDIR} && git clone git://git.sitka.bclibraries.ca/sitka/evergreen evergreen" ${DEFAULT_USER}
+  suwrap "cd ${INSTALL_USER_HOMEDIR} && git clone git://git.sitka.bclibraries.ca/sitka/evergreen evergreen" ${INSTALL_USER}
 fi
-suwrap "cd ${BUILDDIR} && git fetch origin && git checkout ${BRANCH} && git pull" ${DEFAULT_USER}
+suwrap "cd ${BUILDDIR} && git fetch origin && git checkout ${BRANCH} && git pull" ${INSTALL_USER}
 
 # download and unpack EG release
 #rm -rf ${BUILDDIR}
-#suwrap "cd ${HOMEDIR} && wget http://open-ils.org/downloads/${EGRELEASE}.tar.gz && tar xzf ${EGRELEASE}.tar.gz" ${DEFAULT_USER}
+#suwrap "cd ${INSTALL_USER_HOMEDIR} && wget http://open-ils.org/downloads/${EGRELEASE}.tar.gz && tar xzf ${EGRELEASE}.tar.gz" ${INSTALL_USER}
  
 # as root
 cd ${BUILDDIR} && make -f Open-ILS/src/extras/Makefile.install ubuntu-trusty
@@ -66,11 +68,11 @@ if [[ -n "$WEBCLIENT" ]] ; then
 fi
 # by default, CPAN needs some manual input at this point; you can just accept all defaults
  
-# as DEFAULT_USER
-suwrap "cd ${BUILDDIR} && autoreconf -i" ${DEFAULT_USER} # not required for release versions
-suwrap "PATH=${INSTALLDIR}/bin:\$PATH cd ${BUILDDIR} && PATH=${INSTALLDIR}/bin:\$PATH ./configure -C --prefix=${INSTALLDIR} --sysconfdir=${INSTALLDIR}/conf --with-opensrf-headers=${INSTALLDIR}/include/ --with-opensrf-libs=${INSTALLDIR}/lib/" ${DEFAULT_USER}
-suwrap "cd ${BUILDDIR} && make" ${DEFAULT_USER}
-suwrap "cd ${BUILDDIR}/build/i18n && make LOCALE=fr-CA install && make LOCALE=en-CA install" ${DEFAULT_USER}
+# as INSTALL_USER
+suwrap "cd ${BUILDDIR} && autoreconf -i" ${INSTALL_USER} # not required for release versions
+suwrap "PATH=${INSTALLDIR}/bin:\$PATH cd ${BUILDDIR} && PATH=${INSTALLDIR}/bin:\$PATH ./configure -C --prefix=${INSTALLDIR} --sysconfdir=${INSTALLDIR}/conf --with-opensrf-headers=${INSTALLDIR}/include/ --with-opensrf-libs=${INSTALLDIR}/lib/" ${INSTALL_USER}
+suwrap "cd ${BUILDDIR} && make" ${INSTALL_USER}
+suwrap "cd ${BUILDDIR}/build/i18n && make LOCALE=fr-CA install && make LOCALE=en-CA install" ${INSTALL_USER}
  
 # as root
 cd ${BUILDDIR} && make STAFF_CLIENT_VERSION=${VERSION} STAFF_CLIENT_STAMP_ID=${STAMP_ID} install
@@ -284,9 +286,9 @@ SKINDIRS="${INSTALLDIR}/var/skins ${INSTALLDIR}/var/web/css/skin"
 for SKINDIR in ${SKINDIRS} ; do
   if [[ ! -d "${SKINDIR}" ]] ; then mkdir ${SKINDIR} ; fi
   chmod 777 ${SKINDIR}
-  chown -R sitkastaff:sitkastaff ${SKINDIR}
+  chown -R ${DEFAULT_USER}:${DEFAULT_USER} ${SKINDIR}
 done
-chown -R sitkastaff:sitkastaff ${INSTALLDIR}/conf/kpac ${INSTALLDIR}/var/web/images/kpac
+chown -R ${DEFAULT_USER}:${DEFAULT_USER} ${INSTALLDIR}/conf/kpac ${INSTALLDIR}/var/web/images/kpac
 
 # 10. staff client stuff
 apt-get install -y nsis unzip
@@ -300,9 +302,9 @@ apt-get install -y python-reportlab python-reportlab-accel unifont
 # web client
 if [[ -n "$WEBCLIENT" ]] ; then
   cd ${BUILDDIR}/Open-ILS/web/js/ui/default/staff/
-  npm install
-  bower install
-  grunt all
+  suwrap "npm install" ${INSTALL_USER}
+  suwrap "bower install" ${INSTALL_USER}
+  suwrap "grunt all" ${INSTALL_USER}
   echo 'Remember to start the websockets service: /etc/init.d/apache2-websockets start'
 fi
 
index a712f50..9e2fc17 100755 (executable)
@@ -3,7 +3,7 @@ DEFAULT_USER="sitkastaff"
 HOMEDIR="/home/${DEFAULT_USER}"
 BUILDDIR="${HOMEDIR}/opensrf"
 INSTALLDIR="/srv/openils"
-BRANCH="rel_2_4"
+BRANCH="rel_2_5"
 HOSTNAME="nonprod"
 SITKACONF="${HOMEDIR}/sysadmin"
 SITKACONF_BRANCH="master"
@@ -76,7 +76,7 @@ for PATHFILE in ${PATHFILES} ; do
   fi
 done
 chown ${DEFAULT_USER}:${DEFAULT_USER} /home/${DEFAULT_USER}/.bashrc
-#chown -R opensrf:opensrf ${INSTALLDIR}
+chown -R opensrf:opensrf ${INSTALLDIR}
  
 # as root, add the following two lines to /etc/hosts:
 #127.0.1.2     public.localhost        public