For Grouper 2.5+ see the new approach for Grouper 2.5+ packaging and versioning strategy  

You can run the grouper installer in non interactive mode to automatically install patches.  You might want to do this in dev or test servers.

Make a directory, e.g. /opt/grouper/2.2/patchAuto

Download the grouperInstaller.jar, and make a grouper.installer.properties

# this should be before the version number
#download.server.url = http://localhost:8090/grouper-ws/temp
download.server.url = http://software.internet2.edu/grouper
# default version to install
grouper.version = 2.2.1
# default to install or upgrade (default is install)
grouperInstaller.default.installOrUpgrade = patch
# default app to upgrade: api, ui, ws, or client
grouperInstaller.default.appToUpgrade = ui
# default of directory where app will be installed
grouperInstaller.default.installDirectory = /opt/tomcats/tomcat_d/webapps/grouper_v2_2
grouperInstaller.default.existingInstalledDirectory = /opt/tomcats/tomcat_d/webapps/grouper_v2_2

##############################
## Autorun properties
##
## If you uncomment one of these properties it will be used as empty, only uncomment to use
##
##############################
#### set this to true to try to use defaults for everything.  Only things without default values will need to be set
grouperInstaller.autorun.useDefaultsAsMuchAsAvailable = true

Make a shell script to kick it off: run.sh

#!/bin/bash
export JAVA_HOME=/opt/java6
export PATH=$JAVA_HOME/bin:$PATH
/sbin/service tomcat_d stop
cd /opt/grouper/2.2/patchAuto
java -cp .:grouperInstaller.jar edu.internet2.middleware.grouperInstaller.GrouperInstaller
rm -rf /opt/tomcats/tomcat_d/work/Catalina
/sbin/service tomcat_d start

Make a cron to schedule this daily

00 7 * * * echo `date` >  /tmp/grouper_2_2_autopatch.out ; /opt/grouper/2.2/patchAuto/run.sh  >> /tmp/grouper_2_2_autopatch.out 2>&1


sdf

  • No labels