Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
2.2.0
-
None
Description
Chris,
I tried the same trick with the `grouper-loader.properties` file:
grouper-loader.config.hierarchy = classpath:grouper-loader.base.properties, file:/etc/grouper/grouper-loader.local.properties
However, if I attempt to run a loader job, I get an error:
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: Cant find the ldap connection named: 'personLdap' in the grouper-loader.properties. Should have entry: ldap.personLdap.url or ldap.personLdap.configFileFromClasspath,
Problem with ldap conection: personLdap,
Error querying ldap server id: personLdap, searchDn: ou=mailgroups,o=lafayette, filter: 'cn=union_pt', returning attribute: member
Is it possible to externalize the `grouper-loader.properties`? It makes deploying the software and the configurations separately a lot easier if I can do this.
Is there some general way to externalize Java property files, or is it something that needs to be approached on a case-by-case basis.
Thanks,
Carl
----- Original Message -----
From: "Chris Hyzer"
To: "Carl Waldbieser"
Sent: Monday, November 17, 2014 1:25:16 PM
Subject: RE: Can `grouper.hibernate.properties` be externalized from WAR file?
Sure
In your grouper.hibernate.properties, don’t put environment specific information there (though you could put institution specific if you like). Just have an entry like this in there:
- comma separated config files that override each other (files on the right override the left)
- each should start with file: or classpath:
- e.g. classpath:grouper.hibernate.base.properties, file:c:/temp/myFile.properties
grouper.hibernate.config.hierarchy = classpath:grouper.hibernate.base.properties, classpath:grouper.hibernate.properties, file: /etc/grouper/grouper.hibernate.local.properties
or you could take out the grouper.hibernate.properties one, or you could name the local one grouper.hibernate.properties, whatever you want. You might want to put custom setting that apply to all envs in the classpath:grouper.hibernate.properties. Note, you might have to do this in other config files too..
Thanks,
Chris
----Original Message----
From: grouper-dev-request@internet2.edu grouper-dev-request@internet2.edu On Behalf Of Waldbieser, Carl
Sent: Monday, November 17, 2014 12:07 PM
To: grouper-dev
Subject: [grouper-dev] Can `grouper.hibernate.properties` be externalized from WAR file?
I am building a native package (RPM) for our Grouper pilot deployment on RHEL6. During a test deployment to a QA host, I noticed that the Grouper UI WAR file had made a copy of the $GROUPER_HOME/conf/grouper.hibernate.properties file from the build host.
Is there some way that the settings can be externalized (to say something like `/etc/grouper/grouper.hibernate.properties`) so that there is a single place from which both the API and the UI get their hibernate settings?
I would really like to be able to build a single software artifact and deploy it to QA and production environments, and not have to build a separate WAR for each environment.
Thanks,
Carl Waldbieser
ITS System Programmer
Lafayette College