Deploying CAS5.2.X to Tomcat servers

65 views
Skip to first unread message

Jay

unread,
Apr 28, 2018, 1:09:25 AM4/28/18
to CAS Community
Hello everyone,
We are facing some issues deploying the CAS war file to the server in Unix.

We have to keep separate properties file and config files for different environment and server deploy script will take of copying the files to the desired location and from where CAS application can read.

Is there a guide or something we can follow to achieve this?

Thanks in advance,
Jay

Man H

unread,
Apr 28, 2018, 4:56:16 AM4/28/18
to cas-...@apereo.org

Consider assigning environmental variables to cas.properties through maven filtering, where each variables value is environment specific.

--
- 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+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/7303f207-7b63-4b1d-bc35-9387527f8a2d%40apereo.org.

Christian Poirier

unread,
Apr 28, 2018, 5:46:59 PM4/28/18
to cas-...@apereo.org

Hi Jay

 

I think you should reed about Configuration Server. This configuration server will not allow you to deploy the cas.war file on each server but have a single endpoint access to your configuration. When using this, you must keep the minimum configuration in the bootstrap.properties included in the war file. 

 

 

I’m not a expert of CAS Apereo but I read a lot and I will implement for my preproduction and production environment.

 

<<bootstrap.properties>> sample supplying a connection to a config server. Of course, the server must be accessible only by your internal network.

 

##

# CAS Spring Cloud Config Client

#

# Name of the application for which environment settings and properties should be fetched.

# This should map to a cas.yml or cas.properties file.

spring.application.name=cas

spring.profiles.active=standalone,ldap,spnego

 

# Define where the configuration server is running

# and what credentials are used to access it.

# By default, basic authN is used.

spring.cloud.config.uri=http://casuser:Mellon@localhost:8888/casconfigserver

spring.cloud.config.profile=native

 

# Configuration server is off by default.

spring.cloud.config.enabled=true

       

spring.cloud.config.watch.enabled=true

spring.cloud.config.watch.initialDelay=30000

spring.cloud.config.watch.delay=1000

 

spring.cloud.config.fail-fast=true

health.config.enabled=true

 

 

Christian Poirier

Provenance : Courrier pour Windows 10

 

De : Jay
Envoyé le :28 avril 2018 01:09
À : CAS Community
Objet :[cas-user] Deploying CAS5.2.X to Tomcat servers

--

- 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.

Message has been deleted

Sri Jayanth

unread,
Apr 30, 2018, 12:59:17 PM4/30/18
to cas-...@apereo.org
Sure Ray, I will have this option too in my mind.

Currently, We are trying to put the properties file and config files under <CATALINA_HOME>/shared/conf folder (added to common.loader).
i.e. place the etc/cas/* inside the above mentioned structure.

So will it be able to read the properties file from there?

Thanks,
Jay

On Mon, Apr 30, 2018 at 9:37 PM, Ray Bon <rb...@uvic.ca> wrote:
Jay,

We use the CAS config server (spring cloud) and store all our config in git in separate branches for dev preprod and prod (and developer branches too). We use tomcat and place lines like these in setenv.sh:

CATALINA_OPTS="$CATALINA_OPTS -Dspring.cloud.config.uri=http://casserver:password@menhaden.comp.uvic.ca/casconfigserver"
CATALINA_OPTS="$CATALINA_OPTS -Dspring.cloud.config.enabled=true -Dspring.cloud.config.label=rbon"

Ray
-- 
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | rb...@uvic.ca

--
- 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+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1525104446.1799.4.camel%40uvic.ca.

Confidentiality Note:
This e-mail and any attachment to it contains confidential and trade secret
information intended only for the use of the individual(s) or entity named on the
e-mail.  Do not forward it without authorization from the sender.  If the reader
of this e-mail is not the intended recipient, or the employee or agent
responsible for delivering it to the intended recipient, you are notified that
reading, copying, forwarding or printing it is strictly prohibited.  If you have
received this e-mail in error, please immediately return it to the sender and
delete it from your system.

Reply all
Reply to author
Forward
0 new messages