README.md 1.96 KB
Newer Older
Misagh Moayyed's avatar
Misagh Moayyed committed
1
CAS Overlay Template
2
=======================
Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
3

Misagh Moayyed's avatar
Misagh Moayyed committed
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.
Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
5 6

# Versions
Misagh Moayyed's avatar
Misagh Moayyed committed
7

Misagh Moayyed's avatar
Misagh Moayyed committed
8 9
- CAS `6.0.x`
- JDK `11`
Misagh Moayyed's avatar
Misagh Moayyed committed
10

Misagh Moayyed's avatar
Misagh Moayyed committed
11
# Overview
12

13
You may invoke build commands using the `build.sh` script to work with your chosen overlay using:
14

Misagh Moayyed's avatar
Misagh Moayyed committed
15
```bash
16
./build.sh [command]
Misagh Moayyed's avatar
Misagh Moayyed committed
17
```
Misagh Moayyed's avatar
Misagh Moayyed committed
18

Misagh Moayyed's avatar
Misagh Moayyed committed
19 20 21 22 23 24
To see what commands are available to the build script, run:

```bash
./build.sh help
```

Misagh Moayyed's avatar
Misagh Moayyed committed
25 26 27
# Configuration

- The `etc` directory contains the configuration files and directories that need to be copied to `/etc/cas/config`.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
- The specifics of the build are controlled using the `gradle.properties` file.

## Adding Modules

CAS modules may be specified under the `dependencies` block of the [Gradle build script](build.gradle):

```gradle
dependencies {
    compile "org.apereo.cas:cas-server-some-module:${project.casVersion}"
    ...
}
```

Study material:

- https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html
- https://docs.gradle.org/current/userguide/dependency_management.html

## Clear Gradle Cache

If you need to, on Linux/Unix systems, you can delete all the existing artifacts (artifacts and metadata) Gradle has downloaded using:

```bash
# Only do this when absolutely necessary!
rm -rf $HOME/.gradle/caches/
```

Same strategy applies to Windows too, provided you switch `$HOME` to its equivalent in the above command.
Misagh Moayyed's avatar
Misagh Moayyed committed
56

Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
57 58
# Deployment

59 60
- Create a keystore file `thekeystore` under `/etc/cas`. Use the password `changeit` for both the keystore and the key/certificate entries.
- Ensure the keystore is loaded up with keys and certificates of the server.
Misagh Moayyed's avatar
Misagh Moayyed committed
61

Misagh Moayyed's avatar
Misagh Moayyed committed
62 63 64 65 66 67 68
On a successful deployment via the following methods, CAS will be available at:

* `https://cas.server.name:8443/cas`

## Executable WAR

Run the CAS web application as an executable WAR.
Misagh Moayyed's avatar
Misagh Moayyed committed
69 70

```bash
Misagh Moayyed's avatar
Misagh Moayyed committed
71
./build.sh run
Misagh Moayyed's avatar
Misagh Moayyed committed
72 73 74
```

## External
Misagh Moayyed's avatar
Misagh Moayyed committed
75

Misagh Moayyed's avatar
Misagh Moayyed committed
76
Deploy the binary web application file `cas.war` after a successful build to a servlet container of choice.