Suggestions for registry cleaner when CAS is deployed to AWS

17 views
Skip to first unread message

Pablo Vidaurri

unread,
Jun 7, 2024, 1:05:47 PMJun 7
to CAS Community
Have CAS deployed to AWS with ability to auto scale new instances based on load/demand. At the moment the cas configuration directory where the cas.properties file is raising some doubts. 

There are a couple of settings like host name and registry cleaner enable flag. Host should usually be unique among instances and cleaner flag should only be set on one instance.

How best to have a common properties file and define these new flags per instance? I know I can pass in -D flag at startup but somewhere I still need to determine how to make host unique and reserve a single host to enable the cleaner.

Is there a way to invoke the cleaner with an API call that I can trigger with a scheduled lambda?

Ray Bon

unread,
Jun 8, 2024, 12:58:23 AMJun 8
to cas-...@apereo.org
Pablo,

I have an application.yml file in src/main/resources with all properties.
Some of them have variables for values:
cas:
  authn:
    saml-idp:
      metadata:
        file-system:
          location: ${saml-idp.metadata.file-system.location}

At the bottom of the file I have default values (makes local running simple - but you could use prod values instead):
saml-idp:
  metadata:
    file-system:
      location: file:/home/casrunner/idp/metadata

Then our jenkins job adds application.properties (also includes secrets):
saml-idp.metadata.file-system.location={{ saml-idp_metadata_location }}
service-registry.ldap.bind-credential={{ service_ldap_bind_credential }}

Filling in the specifics for the target deploy.

This way your problem is one of deployment, not cas.

You can set the directory of application.properties when starting tomcat:
-Dcas.standalone.configurationDirectory=/etc/cas/config

Not sure what you are referring to with host name.

Ray

On Fri, 2024-06-07 at 10:03 -0700, Pablo Vidaurri wrote:
You don't often get email from psvid...@gmail.com. Learn why this is important
Reply all
Reply to author
Forward
0 new messages