Revision 1ce79b2f
Added by Andreas Kohlbecker over 2 years ago
README.md | ||
---|---|---|
1 |
UTIS - README |
|
2 |
==================== |
|
1 |
# UTIS - README |
|
3 | 2 |
|
4 | 3 |
|
5 | 4 |
|
6 |
Installation |
|
7 |
-----------------------------
|
|
5 |
|
|
6 |
## Installation
|
|
8 | 7 |
|
9 | 8 |
At the example of jetty8 in Debian like systems: |
10 | 9 |
|
11 |
**Requirements** |
|
12 |
You need to run utis with an Oracle JVM 1.7 |
|
10 |
### Requirements |
|
11 |
|
|
12 |
Java runtime environment 1.8 |
|
13 |
|
|
14 |
## setting up with docker-compose |
|
15 |
|
|
16 |
here we are using the official `jetty:9.4-jre8-slim` docker image that is provided by the jetty project on [Docker hub](https://hub.docker.com/_/jetty) |
|
17 |
|
|
18 |
Requirement: Install **docker** and **docker-compose** |
|
19 |
|
|
20 |
|
|
21 |
~~~ |
|
22 |
mkdir /opt/jetty9-docker |
|
23 |
cd /opt/jetty9-docker |
|
24 |
~~~ |
|
25 |
|
|
26 |
create user and group that are expected in the jetty9.4 container with the respective UID |
|
27 |
|
|
28 |
~~~ |
|
29 |
addgroup --quiet --system jetty |
|
30 |
adduser --quiet --system --ingroup jetty --no-create-home --disabled-password --uid 999 jetty |
|
31 |
~~~ |
|
32 |
|
|
33 |
create a `docker-compose.yaml` file with the following content: |
|
13 | 34 |
|
14 |
1. place the eubon-utis.war in /var/lib/jetty8/webapps/ |
|
15 |
2. create the folder for local stores: |
|
16 |
sudo mkdir /var/lib/utis |
|
17 |
sudo chown -R jetty:adm /var/lib/utis |
|
18 |
3. Start jetty |
|
19 |
/etc/init.d/jetty8 start |
|
35 |
~~~ |
|
36 |
version: "2.0" |
|
37 |
services: |
|
38 |
app: |
|
39 |
image: jetty:9.4-jre8-slim |
|
40 |
ports: |
|
41 |
- "8080:8080" |
|
42 |
volumes: |
|
43 |
- ./webapps:/var/lib/jetty/webapps |
|
44 |
- ./log:/usr/local/jetty/log |
|
45 |
- ./utis:/var/lib/jetty/utis |
|
46 |
user: jetty |
|
47 |
~~~ |
|
20 | 48 |
|
49 |
create the folders to be bound to the container |
|
21 | 50 |
|
22 |
The URIs UTIS is listening at |
|
23 |
------------------------------ |
|
51 |
~~~ |
|
52 |
mkdir log utis webapps |
|
53 |
~~~ |
|
54 |
|
|
55 |
copy the utis war file to the webapps folder |
|
56 |
|
|
57 |
~~~ |
|
58 |
cp $WORKSPACE/target/eubon-utis.war webapps/eubon-utis.war |
|
59 |
~~~ |
|
60 |
|
|
61 |
Set the permissions so that the user jetty has read and write access to these folders: |
|
62 |
|
|
63 |
~~~ |
|
64 |
chown -R jetty:jetty log utis webapps |
|
65 |
chmod 774 jetty:jetty log utis webapps |
|
66 |
~~~ |
|
67 |
|
|
68 |
start the docker container |
|
69 |
|
|
70 |
~~~ |
|
71 |
docker-compose up -d |
|
72 |
~~~ |
|
73 |
|
|
74 |
## Service end-point URLs |
|
24 | 75 |
|
25 | 76 |
utis controllers: |
77 |
|
|
26 | 78 |
* http://127.0.0.1:8080/eubon-utis/ |
27 | 79 |
* http://127.0.0.1:8080/eubon-utis/search.html |
28 | 80 |
* http://127.0.0.1:8080/eubon-utis/capabilities.html |
29 | 81 |
|
30 | 82 |
swagger api-doc REST service at: |
83 |
|
|
31 | 84 |
* http://127.0.0.1:8080/eubon-utis/api-docs.json |
32 | 85 |
* http://127.0.0.1:8080/eubon-utis/api-docs/default/utis-controller.json |
33 | 86 |
|
34 | 87 |
swagger ui at: |
88 |
|
|
35 | 89 |
* http://127.0.0.1:8080/eubon-utis/doc/ |
36 | 90 |
|
37 |
Logfiles |
|
38 |
----------------------------- |
|
91 |
## Logfiles |
|
39 | 92 |
|
40 | 93 |
Since version 1.3 on linux systems the logfiles are located at `/var/log/utis`. Previous versions of utis put the logfiles in `/var/log/jetty8`. |
41 | 94 |
The `ContextDependentInitializer` may choose to place the logs into another directory if it is not possible to write the logs into `/var/log/utis`. |
42 | 95 |
Please refer to this class for further details. |
43 | 96 |
|
44 |
Development |
|
45 |
-------------------- |
|
97 |
## Development |
|
46 | 98 |
|
47 |
## Running in dev mode |
|
99 |
### Running in dev mode
|
|
48 | 100 |
|
49 | 101 |
UTIS can be configuired for easier development. This encompasses two java system properties which can be specifed by passing environment variables to the jvm: |
50 | 102 |
|
51 | 103 |
|
52 |
### `excludedClients` |
|
104 |
#### `excludedClients`
|
|
53 | 105 |
|
54 | 106 |
-DexcludedClients=[Client class simple names comma separated] |
55 | 107 |
|
... | ... | |
69 | 121 |
-DskipStoreUpdating |
70 | 122 |
|
71 | 123 |
|
72 |
## Using swagger |
|
124 |
### Using swagger
|
|
73 | 125 |
|
74 | 126 |
* https://github.com/martypitt/swagger-springmvc |
75 | 127 |
* https://github.com/adrianbk/swagger-springmvc-demo/tree/master/swagger-ui |
76 | 128 |
|
77 | 129 |
|
78 |
## On Spring MVC |
|
130 |
### On Spring MVC
|
|
79 | 131 |
Content Negotiation Using Spring MVC |
80 | 132 |
* http://java.dzone.com/articles/content-negotiation-using |
Also available in: Unified diff
updating documentation: set up for docker-compose