The process to build and package an Apereo CAS server is typically one that is very much source-oriented and without basic familiarity with Java, web applications, build tools, and servlet containers, it could be quite challenging to get a CAS server up and running quickly. In this post, we will review the list of options that should allow one with a very modest technical background to build and package a CAS server relatively quickly.
This tutorial specifically focuses on:
7.0.x
21
Apereo CAS Initializr is a component in the Apereo CAS ecosystem that allows you as the deployer to generate CAS WAR Overlay projects on the fly with just what you need to start quickly. Conceptually identical to start.spring.io, you can browse the user interface and add/remove modules that you wish to include in your deployment from the menu. At its most basic form, you can in the end either download the project as a .zip
file manually or do so via the command line:
mkdir cas-server && cd cas-server
curl "https://getcas.apereo.org/starter.tgz" | tar -xzvf -
Then, it’s time to build the project:
./gradlew build
…and finally, run:
java -jar build/libs/cas.war --server.ssl.enabled=false --server.port=8080
CAS should be running on http://localhost:8080/cas
.
If you prefer to not deal with the CAS Initializr or in scenarios where it might not be immediately available or under maintenance, there is also a ready-made GitHub repository template for you to clone. This is virtually identical to the project that would be generated by the CAS Initializr for you:
git clone git@github.com:apereo/cas-overlay-template.git cas-server
cd cas-server
# Build
./gradlew build
# ...and run
java -jar build/libs/cas.war --server.ssl.enabled=false --server.port=8080
As before, CAS should be running on http://localhost:8080/cas
.
The Apereo CAS project does publish Docker images that one can use for showcases and demos. Once you have Docker installed, it should be fairly easy to run the following:
docker run --rm \
-e SERVER_SSL_ENABLED=false -e SERVER_PORT=8080 \
-p 8080:8080 --name casserver apereo/cas:7.0.0
As before, CAS should be running on http://localhost:8080/cas
.
If you have questions about the contents and the topic of this blog post, or if you need additional guidance and support, feel free to send us a note and ask about consulting and support services.
I hope this review was of some help to you and I am sure that both this post as well as the functionality it attempts to explain can be improved in any number of ways. Please feel free to engage and contribute as best as you can.
Happy Coding,
Monday-Friday
9am-6pm, Central European Time
7am-1pm, U.S. Eastern Time
Monday-Friday
9am-6pm, Central European Time