Include Page | ||||
---|---|---|---|---|
|
The Grouper distribution has a build script for one environment. If you need to manage dev/test/prod for the loader/ui/ws that is 9 environments. When you need to upgrade, it can be time consuming and easy to make mistakes.
...
- Create that folder structure above e.g. in C:\dev\eclipse\projects\pennGrouper
- Download the later Grouper API binary, UI, WS, and client (binary)
- E.g. in C:\software\grouper\1.5.2\grouper.apiBinary-1.5.2
- E.g. in C:\software\grouper\1.5.2\grouper.clientBinary-1.5.2
- E.g. in C:\software\grouper\1.5.2\grouper.ui-1.5.2
- E.g. in C:\software\grouper\1.5.2\grouper.ws-1.5.2
- Copy all the build.example.properties to build.properties in each of the 4. Look at the build.properties, copy the file to the buildFiles dir. Sync with CVS and diff to see if there are changes (if not new). If there are changes, then copy the file back to its original location
- Example of changes, in the WS and UI build.properties, put the path to Grouper in there.
- Run "ant dist" in the UI and WS
- Edit this build.properties, and put in the locations to everything
Code Block |
---|
grouper.dir=C:\\software\\grouper\\1.5.2\\grouper.apiBinary-1.5.2
grouper.jar.dir=${grouper.dir}/dist/lib
grouper.client.dir=C:\\software\\grouper\\1.5.2\\grouper.clientBinary-1.5.2
grouper.ui.dir=C:\\software\\grouper\\1.5.2\\grouper.ui-1.5.2\\dist\\grouper
grouper.ws.dir=C:\\software\\grouper\\1.5.2\\grouper.ws-1.5.2\\grouper-ws\\build\\dist\\grouper-ws
|
- Run the ant task: copyGrouperApiFilesToBuildProject. This will copy the grouper config files to the conf directory. If this is an upgrade, compare the files with the latest in CVS and merge your changes. Otherwise look at the files and make changes as necessary. However, if you have something which differs per env, put a variable in there. In this case, here are my variables in grouper.properties:
Code Block |
---|
grouper.env.name = <at:var at:name="envName" />
|
There are corresponding entries in the build.properties:
Code Block |
---|
devEnv=DEV
testEnv=TEST
prodEnv=PROD
|
Here are the variables in the log4j.properties:
Code Block |
---|
log4j.appender.grouper_error.File = <at:var at:name="logDir" />/grouper_error.log
|
This is the one place where the data is different per env and grouper module (well, mine are similar since I run on different servers, but they can be different). Here are the build.properties entries
Code Block |
---|
evUiLogDirdevUiLogDir=/opt/appserv/tomcat_2v/logs/grouper testUiLogDir=/opt/appserv/tomcat_2v/logs/grouper prodUiLogDir=/opt/appserv/tomcat_2v/logs/grouper devWsLogDir=/opt/appserv/tomcat_3b/logs/grouper/grouper_error.log testWsLogDir=/opt/appserv/tomcat_3b/logs/grouper/grouper_error.log prodWsLogDir=/opt/appserv/tomcat_3b/logs/grouper/grouper_error.log localdevProjectLogDir=c:/temp devProjectLogDir=/opt/appserv/tomcat_3c/logs/grouper testProjectLogDir=/opt/appserv/tomcat_3c/logs/grouper prodProjectLogDir=/opt/appserv/tomcat_3c/logs/grouper |
Here are the grouper.hibernate.properties variables
Code Block |
---|
hibernate.connection.url = <at:var at:name="dbUrl" />
hibernate.connection.username = <at:var at:name="dbUser" />
hibernate.connection.password = <at:var at:name="dbPass" />
|
There are entries per env. Note the passwords are encrypted with the morphString Internet2 library, so the encrypted values are in a file system file (better for storage of config files in CVS nad hiding plaintext passwords)
Code Block |
---|
devDbUrl=jdbc:oracle:thin:@devserver:1521:devsid
testDbUrl=jdbc:oracle:thin:@testserver:1521:testsid
prodDbUrl=jdbc:oracle:thin:@prodserver:1521:prodsid
devDbUser=myuser
testDbUser=myuser
prodDbUser=myuser
localdevDbPass=r:/home/appadmin/pass/grouper/grouperMorphDev.pass
devDbPass=/home/appadmin/pass/grouper/grouperMorphDev.pass
testDbPass=/home/appadmin/pass/grouper/grouperMorphTest.pass
prodDbPass=/home/appadmin/pass/grouper/grouperMorphProd.pass
|
grouper-loader.properties (in appSpecific/conf instead of conf since only needed in the loader) also has a variable for the report directory and loader servers and passes:
Code Block |
---|
db.warehouse.pass = <at:var at:name="warehousePass" />
db.warehouse.url = <at:var at:name="warehouseUrl" />
daily.report.saveInDirectory = <at:var at:name="dailyReportDirectory" />
|
These are in the build.properties
Code Block |
---|
localdevWarehousePass=r:/home/appadmin/pass/grouper/grouperMorphWarehouse.pass
devWarehousePass=/home/appadmin/pass/grouper/grouperMorphWarehouse.pass
testWarehousePass=/home/appadmin/pass/grouper/grouperMorphWarehouse.pass
prodWarehousePass=/home/appadmin/pass/grouper/grouperMorphWarehouse.pass
localdevWarehouseUrl=jdbc:oracle:thin:@testwarehouse:1521:testwhsid
devWarehouseUrl=jdbc:oracle:thin:@testwarehouse:1521:testwhsid
testWarehouseUrl=jdbc:oracle:thin:@testwarehouse:1521:testwhsid
prodWarehouseUrl=jdbc:oracle:thin:@prodwarehouse:1521:prodwhside
localdevDailyReportDirectory=c:/temp/groupDailyReports
devDailyReportDirectory=/opt/appserv/tomcat_3c/logs/fastGrouper/dailyReports
testDailyReportDirectory=/opt/appserv/tomcat_3c/logs/fastGrouper/dailyReports
prodDailyReportDirectory=/opt/appserv/tomcat_3c/logs/fastGrouper/dailyReports
|
...
See the setting in the build.properties to control the name of the client zip
Code Block |
---|
clientPackageName=pennGroupsClient-1.5.2.tar.gz
|
...
At Penn we run the loader in a webapp. So we need the grouper API and config files in the webapp. That webapp has dev/test/prod envs so we need to make sure the config files are currect. Configure the location of the project in the build.properties, the config dirs for each env, and also the log directories for the 4 envs
Code Block |
---|
externalProjectLibDir=C:\\dev\\eclipse\\projects\\fastGrouper\\sourcecontrol\\web\\WEB-INF\\lib
localdevConfDir=C:\\dev\\eclipse\\projects\\fastGrouper\\resources
devConfDir=C:\\dev\\eclipse\\projects\\fastGrouper\\sourcecontrol\\servers\\integratedDev\\resources
testConfDir=C:\\dev\\eclipse\\projects\\fastGrouper\\sourcecontrol\\servers\\testDaemon\\resources
prodConfDir=C:\\dev\\eclipse\\projects\\fastGrouper\\sourcecontrol\\servers\\prodDaemon\\resources
localdevProjectLogDir=c:/temp
devProjectLogDir=/opt/appserv/tomcat_3c/logs/grouper
testProjectLogDir=/opt/appserv/tomcat_3c/logs/grouper
prodProjectLogDir=/opt/appserv/tomcat_3c/logs/grouper
|
...