Skip to content

Commit 4cab4f6

Browse files
authored
Update README.md
1 parent 5de0483 commit 4cab4f6

1 file changed

Lines changed: 0 additions & 145 deletions

File tree

cas/cas-server/README.md

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,146 +1 @@
1-
CAS Overlay Template [![Build Status](https://travis-ci.org/apereo/cas-overlay-template.svg?branch=master)](https://travis-ci.org/apereo/cas-overlay-template)
2-
=======================
31

4-
Generic CAS WAR overlay to exercise the latest versions of CAS. This overlay could be freely used as a starting template for local CAS war overlays.
5-
6-
# Versions
7-
8-
- CAS `6.1.x`
9-
- JDK `11`
10-
11-
# Overview
12-
13-
To build the project, use:
14-
15-
```bash
16-
# Use --refresh-dependencies to force-update SNAPSHOT versions
17-
./gradlew[.bat] clean build
18-
```
19-
20-
To see what commands are available to the build script, run:
21-
22-
```bash
23-
./gradlew[.bat] tasks
24-
```
25-
26-
To launch into the CAS command-line shell:
27-
28-
```bash
29-
./gradlew[.bat] downloadShell runShell
30-
```
31-
32-
To fetch and overlay a CAS resource or view, use:
33-
34-
```bash
35-
./gradlew[.bat] getResource -PresourceName=[resource-name]
36-
```
37-
38-
To list all available CAS views and templates:
39-
40-
```bash
41-
./gradlew[.bat] listTemplateViews
42-
```
43-
44-
To unzip and explode the CAS web application file and the internal resources jar:
45-
46-
```bash
47-
./gradlew[.bat] explodeWar
48-
```
49-
50-
# Configuration
51-
52-
- The `etc` directory contains the configuration files and directories that need to be copied to `/etc/cas/config`.
53-
54-
```bash
55-
./gradlew[.bat] copyCasConfiguration
56-
```
57-
58-
- The specifics of the build are controlled using the `gradle.properties` file.
59-
60-
## Adding Modules
61-
62-
CAS modules may be specified under the `dependencies` block of the [Gradle build script](build.gradle):
63-
64-
```gradle
65-
dependencies {
66-
compile "org.apereo.cas:cas-server-some-module:${project.casVersion}"
67-
...
68-
}
69-
```
70-
71-
To collect the list of all project modules and dependencies:
72-
73-
```bash
74-
./gradlew[.bat] allDependencies
75-
```
76-
77-
### Clear Gradle Cache
78-
79-
If you need to, on Linux/Unix systems, you can delete all the existing artifacts (artifacts and metadata) Gradle has downloaded using:
80-
81-
```bash
82-
# Only do this when absolutely necessary
83-
rm -rf $HOME/.gradle/caches/
84-
```
85-
86-
Same strategy applies to Windows too, provided you switch `$HOME` to its equivalent in the above command.
87-
88-
# Deployment
89-
90-
- Create a keystore file `thekeystore` under `/etc/cas`. Use the password `changeit` for both the keystore and the key/certificate entries. This can either be done using the JDK's `keytool` utility or via the following command:
91-
92-
```bash
93-
./gradlew[.bat] createKeystore
94-
```
95-
96-
- Ensure the keystore is loaded up with keys and certificates of the server.
97-
98-
On a successful deployment via the following methods, CAS will be available at:
99-
100-
* `https://cas.server.name:8443/cas`
101-
102-
## Executable WAR
103-
104-
Run the CAS web application as an executable WAR:
105-
106-
```bash
107-
./gradlew[.bat] run
108-
```
109-
110-
Debug the CAS web application as an executable WAR:
111-
112-
```bash
113-
./gradlew[.bat] debug
114-
```
115-
116-
Run the CAS web application as a *standalone* executable WAR:
117-
118-
```bash
119-
./gradlew[.bat] clean executable
120-
```
121-
122-
## External
123-
124-
Deploy the binary web application file `cas.war` after a successful build to a servlet container of choice.
125-
126-
## Docker
127-
128-
The following strategies outline how to build and deploy CAS Docker images.
129-
130-
### Jib
131-
132-
The overlay embraces the [Jib Gradle Plugin](https://github.com/GoogleContainerTools/jib) to provide easy-to-use out-of-the-box tooling for building CAS docker images. Jib is an open-source Java containerizer from Google that lets Java developers build containers using the tools they know. It is a container image builder that handles all the steps of packaging your application into a container image. It does not require you to write a Dockerfile or have Docker installed, and it is directly integrated into the overlay.
133-
134-
```bash
135-
./gradlew build jibDockerBuild
136-
```
137-
138-
### Dockerfile
139-
140-
You can also use the native Docker tooling and the provided `Dockerfile` to build and run CAS.
141-
142-
```bash
143-
chmod +x *.sh
144-
./docker-build.sh
145-
./docker-run.sh
146-
```

0 commit comments

Comments
 (0)