README.md 2.6 KB
Newer Older
Misagh Moayyed's avatar
Misagh Moayyed committed
1
CAS Overlay Template
Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
2
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. The CAS services management overlay is available [here](https://github.com/apereo/cas-services-management-overlay).
Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
5
6

# Versions
Misagh Moayyed's avatar
updated    
Misagh Moayyed committed
7

Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
8
```xml
Misagh Moayyed's avatar
Misagh Moayyed committed
9
<cas.version>6.0.x</cas.version>
Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
10
11
```

Misagh Moayyed's avatar
Misagh Moayyed committed
12
# Requirements
Misagh Moayyed's avatar
Misagh Moayyed committed
13

Misagh Moayyed's avatar
Misagh Moayyed committed
14
* JDK 11
Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
15

16
17
# Configuration

Misagh Moayyed's avatar
Misagh Moayyed committed
18
The `etc` directory contains the configuration files and directories that need to be copied to `/etc/cas/config`.
19

Misagh Moayyed's avatar
Misagh Moayyed committed
20
21
# Build

Misagh Moayyed's avatar
updated    
Misagh Moayyed committed
22
23
24
25
26
27
28
29
To see what commands are available to the build script, run:

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

To package the final web application, run:

Misagh Moayyed's avatar
Misagh Moayyed committed
30
```bash
Misagh Moayyed's avatar
Misagh Moayyed committed
31
./build.sh package
Misagh Moayyed's avatar
Misagh Moayyed committed
32
33
```

Misagh Moayyed's avatar
updated    
Misagh Moayyed committed
34
35
36
37
38
39
To update `SNAPSHOT` versions run:

```bash
./build.sh package -U
```

Dmitriy Kopylenko's avatar
Dmitriy Kopylenko committed
40
41
# Deployment

Misagh Moayyed's avatar
Misagh Moayyed committed
42
43
- 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
44

Misagh Moayyed's avatar
Updated    
Misagh Moayyed committed
45
46
47
48
49
50
51
52
On a successful deployment via the following methods, CAS will be available at:

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

## Executable WAR

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

```bash
Misagh Moayyed's avatar
Misagh Moayyed committed
55
./build.sh run
Misagh Moayyed's avatar
Misagh Moayyed committed
56
57
```

Misagh Moayyed's avatar
Updated    
Misagh Moayyed committed
58
## Spring Boot
Misagh Moayyed's avatar
Misagh Moayyed committed
59

Misagh Moayyed's avatar
Updated    
Misagh Moayyed committed
60
61
62
63
64
Run the CAS web application as an executable WAR via Spring Boot. This is most useful during development and testing.

```bash
./build.sh bootrun
```
Misagh Moayyed's avatar
Misagh Moayyed committed
65

Misagh Moayyed's avatar
Misagh Moayyed committed
66
67
### Warning!

Misagh Moayyed's avatar
Misagh Moayyed committed
68
Be careful with this method of deployment. `bootRun` is not designed to work with already executable WAR artifacts such that CAS server web application. YMMV. Today, uses of this mode ONLY work when there is **NO OTHER** dependency added to the build script and the `cas-server-webapp` is the only present module. See [this issue](https://github.com/spring-projects/spring-boot/issues/8320) for more info.
Misagh Moayyed's avatar
Misagh Moayyed committed
69

Hal Deadman's avatar
Hal Deadman committed
70
71

## Spring Boot App Server Selection
Misagh Moayyed's avatar
Misagh Moayyed committed
72

Misagh Moayyed's avatar
Misagh Moayyed committed
73
There is an app.server property in the `pom.xml` that can be used to select a spring boot application server.
Misagh Moayyed's avatar
Misagh Moayyed committed
74
75
It defaults to `-tomcat` but `-jetty` and `-undertow` are supported.

Misagh Moayyed's avatar
Misagh Moayyed committed
76
It can also be set to an empty value (nothing) if you want to deploy CAS to an external application server of your choice.
Hal Deadman's avatar
Hal Deadman committed
77
78
79
80
81
82

```xml
<app.server>-tomcat<app.server>
```

## Windows Build
Misagh Moayyed's avatar
Misagh Moayyed committed
83

Misagh Moayyed's avatar
Misagh Moayyed committed
84
If you are building on windows, try `build.cmd` instead of `build.sh`. Arguments are similar but for usage, run:
Hal Deadman's avatar
Hal Deadman committed
85
86
87
88
89

```
build.cmd help
```

Misagh Moayyed's avatar
Misagh Moayyed committed
90
## External
Misagh Moayyed's avatar
updated    
Misagh Moayyed committed
91

Misagh Moayyed's avatar
Misagh Moayyed committed
92
Deploy resultant `target/cas.war`  to a servlet container of choice.
93
94
95
96


## Command Line Shell

Misagh Moayyed's avatar
Misagh Moayyed committed
97
Invokes the CAS Command Line Shell. For a list of commands either use no arguments or use `-h`. To enter the interactive shell use `-sh`.
98
99

```bash
Misagh Moayyed's avatar
updated    
Misagh Moayyed committed
100
./build.sh cli
Misagh Moayyed's avatar
Misagh Moayyed committed
101
```