aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-08-29 14:16:28 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-08-29 14:16:28 +0200
commit98c16b58f4ee4bbca0e8b1a3c365459ecd7b3cd5 (patch)
tree51f2e0906edff01e2de76807f2b3b2ec90ad0a2f
parent118ecea1c7eb85d3159bca6c6f9da9bb90cb07d7 (diff)
downloadmoa-zs-98c16b58f4ee4bbca0e8b1a3c365459ecd7b3cd5.tar.gz
moa-zs-98c16b58f4ee4bbca0e8b1a3c365459ecd7b3cd5.tar.bz2
moa-zs-98c16b58f4ee4bbca0e8b1a3c365459ecd7b3cd5.zip
Update Readme
- Add Tomcat Deployment Guide
-rw-r--r--readme.md26
1 files changed, 22 insertions, 4 deletions
diff --git a/readme.md b/readme.md
index c5fe6ad..6eca69d 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
-# MOA ZS
+# MOA ZS - README
-## Compile, Test and Package
+## Build Instructions
Compilation and Runtime Requirements:
- openJDK 12 (OpenJDK 11 has an unfixed bug [1] that prevents the completion of TLS handshakes.)
@@ -76,6 +76,10 @@ Find the war file in the `target/` folder.
After packaging the application to a `war` file, the application can be deployed into a servlet container or as a standalone application.
+### Configuration
+
+The folder `src/test/resources/config` serves as a template for configuring the application. This folder can be used as-is for deploying the application in a test or development environment. You may apply changes to this folder to fit the needs of a productive environment. See [specification.md](docs/spec.md) and [application.yaml](src/test/resources/config/application.yaml) for more details.
+
### Deploy as Standalone Application
1. Create a new directory that serves as the application's working directory.
@@ -96,7 +100,7 @@ After packaging the application to a `war` file, the application can be deployed
cp src/test/resources/config standalone/ -r
```
- The `config` folder works out of the box for test environments. You may apply changes to files in the `config` folder to fit the needs of a productive environment.
+ If you rename this folder, the application might not find the configuration file `application.yaml`. Consult [Spring Doc: External Configuration](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files) for further details and alternative ways to configure the application.
1. Start application.
@@ -106,7 +110,21 @@ After packaging the application to a `war` file, the application can be deployed
### Deploy to Tomcat Container
-TODO: Describe
+1. Copy the application package `moa-zs.war` to Tomcat's `webapps` directory.
+
+ ```
+ cp target/moa-zs.war $CATALINA_BASE/webapps/
+ ```
+
+1. Create a copy of the directory `test/main/resources/config/` (`$MZS_CONFIG` being the path to the configuration folder)
+
+ ```
+ cp test/main/resources/config/ $MZS_CONFIG
+ ```
+
+1. Ensure that the spring-boot application finds `$MZS_CONFIG/application.yaml`. Option a) Add the folder `$MZS_CONFIG` to the class path of the web application, e.g. by specifying the `common.loader` property (see [Tomcat's Class Loader How-To](https://tomcat.apache.org/tomcat-9.0-doc/class-loader-howto.html)). Option b) Set the system property `spring.config.location` to `$MZS_CONFIG/application.yaml`. In that case, make sure that all paths in `$MZS_CONFIG/application.yaml` are absolute paths.
+
+1. Start tomcat.
# Footnotes