aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-08-20 15:06:28 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-08-23 14:56:54 +0200
commit66d12f41b530a063dc17a4add8dc3f2f842f04f6 (patch)
treeb23e293c8ae9fc27c718cbd8d0cdd78b6df72cee
parent5d125d6167a57517296c8c8ea5bdd2366b9f9191 (diff)
downloadmoa-zs-66d12f41b530a063dc17a4add8dc3f2f842f04f6.tar.gz
moa-zs-66d12f41b530a063dc17a4add8dc3f2f842f04f6.tar.bz2
moa-zs-66d12f41b530a063dc17a4add8dc3f2f842f04f6.zip
Update Readme
- Fix Code Blocks
-rw-r--r--readme.md97
1 files changed, 70 insertions, 27 deletions
diff --git a/readme.md b/readme.md
index ff9c5e3..433f5a6 100644
--- a/readme.md
+++ b/readme.md
@@ -14,48 +14,91 @@ mvn test
### Run Integration Tests
-Integration tests start with the prefix `IT`. Note that some integration tests have additional requirements (e.g. ITMsgClientTest also tests the TLS connection and Client Authentication). Ensure that these requirements are met as well.
+Integration tests start with the prefix `IT`. Run them with the following command:
+```
+mvn test -P integration-tests
+```
+
+### Run All Tests
Command:
```
-mvn test -P integration-test
+mvn test -P all-tests
```
+Note that some integration tests (prefix `ITSSL`) rely on a TLS connection and Client Authentication. The following guide
+expalins how to set up TLS and Client Authentication with Apache 2.
+
#### Quick Guide: Set Up SSL (inc. Client Authentication) in Apache 2.
-Some tests in ITMsgClientTest require SSL protection of the service endpoint with SSL Client Authentication. Here's a quick guide how to set up an Apache 2 service on localhost as a SSL terminating reverse proxy to the zusemsg endpoint that runs on http://localhost:8081/ :
+Some tests require SSL protection of the service endpoint with SSL Client Authentication. Here's a quick guide how to set up an Apache 2 service on localhost as a SSL terminating reverse proxy to the zusemsg endpoint that runs on <http://localhost:8081/>. This guide is only needed for running all integration tests.
-1. Install Apache 2.
-1. Ensure that mod-proxy is installed and enabled.
-1. In `default-ssl.conf` add the following lines to proxy requests from `https://localhost/zusemsg` to `http://localhost:8081`:
-```
-ProxyRequests off
-ProxyPass /zusemsg/ http://localhost:8081/
-ProxyPassReverse /zusemsg/ http://localhost:8081/
-<Proxy *>
- Order allow,deny
- allow from all
-</Proxy>
-```
-1. Use certificate and key provided in this repository for the TLS connection and add the following directives to `default-ssl.conf`:
-```
-SSLCertificateFile <path/to/repo/ssl/server>/server.localhost.cert.pem
-SSLCertificateKeyFile <path/to/repo/ssl/server>/server.localhost.key.pem
-SSLCertificateChainFile <path/to/repo/ssl/server>/ca-chain.cert.pem
-```
-1. Trust the client certificate with the following directive in `default-ssl-conf`:
-```
-SSLCACertificateFile <path/to/repo/ssl>/trusted-cas-bundle.pem
-```
+1. Install Apache 2.
+1. Ensure that mod-proxy is installed and enabled.
+1. In `default-ssl.conf` add the following lines to proxy requests from `https://localhost/zusemsg` to `http://localhost:8081`:
+
+ ```
+ ProxyRequests off
+ ProxyPass /zusemsg/ http://localhost:8081/
+ ProxyPassReverse /zusemsg/ http://localhost:8081/
+ <Proxy *>
+ Order allow,deny
+ allow from all
+ </Proxy>
+ ```
+
+1. Use certificate and key provided in this repository for the TLS connection and add the following directives to `default-ssl.conf`:
+
+ ```
+ SSLCertificateFile <path/to/repo/ssl/server>/server.localhost.cert.pem
+ SSLCertificateKeyFile <path/to/repo/ssl/server>/server.localhost.key.pem
+ SSLCertificateChainFile <path/to/repo/ssl/server>/ca-chain.cert.pem
+ ```
+
+1. Trust the client certificate with the following directive in `default-ssl-conf`:
-## Package to .war
+ ```
+ SSLCACertificateFile <path/to/repo/ssl>/trusted-cas-bundle.pem
+ ```
+
+
+### Package to .war
+
+The application can be packaged to a web application archive by running the following command:
```
-mvn clean package
+mvn package
```
Find the war file in the `target/` folder.
+## Deployment
+
+After packaging the application to a `war` file, the application can be deployed into a servlet container or as a standalone application.
+
+### Deploy as Standalone Application
+
+1. Create a new directory that serves as the application's working directory.
+
+ ```
+ mkdir standalone
+ ```
+
+1. Copy the `war` file into the applications working directory.
+
+ ```
+ cp target/moa-zs-$MZS_VERSION.war standalone/
+ ```
+
+1. Copy the directory `test/main/resources/config/` into the applications working directory.
+
+ ```
+ cp test/main/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.
+
+
# Footnotes
[1] https://bugs.openjdk.java.net/browse/JDK-8214098