Changing the config directory

492 views
Skip to first unread message

Baron Fujimoto

unread,
Apr 1, 2021, 5:08:52 PM4/1/21
to CAS Community
In our CAS 5 deployment, I had changed the CAS config directory with an overlay for the file
/webapp/cas-server-webapp-resources/src/main/resources/bootstrap.properties
that set it to a cas role account user, like so
spring.cloud.config.server.native.searchLocations=file:///home/cas/cas/config

I'm working on upgrading to 6.3 now, and would like to do something equivalent rather than using the default /etc/cas/config

The CAS docs at <https://apereo.github.io/cas/6.3.x/configuration/Configuration-Server-Management.html#property-overrides> seem to suggest that the file src/main/resources/bootstrap.properties is still relevant, and provides the default(?) example:
spring.cloud.config.server.native.searchLocations=file:///etc/cas/config

However, when I look at webapp/cas-server-webapp-resources/src/main/resources/bootstrap.properties from the repo, I see:
 
# Do NOT modify this line below.
# If you wish to change the configuration directory, it's best to not
# overlay this file, but specify the directory location via command-line
# parameters or system properties via -D.
# cas.standalone.configuration-directory=/etc/cas/config

I *think* we want to use the default standalone profile to be compatible with our current CAS 5 deployments? But if so, I'm not sure what the recommended best practice is to achieve this given what I've seen. Do we set searchLocation in a bootstrap.properties overlay, or do we heed the advice to not mess with that there? Or am I misunderstanding the relationship between spring.cloud.config.server.native.searchLocations and cas.standalone.configuration-directory for what we're trying to achieve? The comments suggest that we  "specify the directory location via command-line parameters or system properties via -D". Are there explicit examples of how we would do this?
--
Baron Fujimoto <ba...@hawaii.edu> :: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum

Baron Fujimoto

unread,
Apr 7, 2021, 12:58:44 PM4/7/21
to CAS Community
Just bumping this again to see if anyone has any guidance or pointers to clarifying documentation.

Ray Bon

unread,
Apr 7, 2021, 3:04:57 PM4/7/21
to cas-...@apereo.org
Baron,

We use tomcat/bin/setenv.sh. Command line parameters go there:

# CAS Config direct file access
CATALINA_OPTS="$CATALINA_OPTS -Dcas.standalone.configurationDirectory=/home/uvtomcat/config"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.config.additional-location=/home/uvtomcat/config/bootstrap.yml"
export CATALINA_OPTS

Ray

On Wed, 2021-04-07 at 06:57 -1000, Baron Fujimoto wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.
-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations.

Baron Fujimoto

unread,
Apr 7, 2021, 3:31:24 PM4/7/21
to CAS Community
Mahalo, Ray!

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/768ae95814d01ee03d4e508cb91cd6c2a25be628.camel%40uvic.ca.
Reply all
Reply to author
Forward
0 new messages