From 208860d5b7997240b3fe8c11005793b54b9b6f72 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Wed, 2 Jun 2021 13:09:44 +0200 Subject: [client,server] Add configuration overwrites to use master-server Docker container --- dozentenmodulserver/README.md | 47 ++++++++++++++++++++++++++++++------------- dozentenmodulserver/pom.xml | 16 +++++++++++++++ 2 files changed, 49 insertions(+), 14 deletions(-) (limited to 'dozentenmodulserver') diff --git a/dozentenmodulserver/README.md b/dozentenmodulserver/README.md index 4cdf7ba6..92c0673c 100644 --- a/dozentenmodulserver/README.md +++ b/dozentenmodulserver/README.md @@ -22,20 +22,6 @@ mvn clean package A build of the bwLehrpool-Server application creates a Java archive file (\*.jar) that can be found at `target/dozmod-server-*-jar-with-dependencies.jar`. -### Docker Container -A docker image of the bwLehrpool-Server and its required infrastructure can be built and started with the following command line call: - -```shell -mvn -P dozmod-server:start -``` - -Note that a complete Docker infrastructure (images, containers, networks, and volumes) is created and started automatically after this call using [docker-compose](https://docs.docker.com/compose). -To stop the bwLehrpool-Server container and its entire infrastructure, use the following command line call: - -```shell -mvn -P dozmod-server:stop -``` - ## Configuration @@ -74,7 +60,10 @@ The custom configuration file is specified by execute the bwLehrpool-Server appl java -Dlog4j.configuration=file: -jar ``` + ## Execution + +### Standalone An execution of the bwLehrpool-Server application requires an already finalized bwLehrpool-Server configuration file located in the current working directory. This configuration file can be created from a configuration template as explained above. Then, the bwLehrpool-Server application can be executed with the following command line call where `` is a path to the built bwLehrpool-Server application (Java archive file): @@ -82,3 +71,33 @@ Then, the bwLehrpool-Server application can be executed with the following comma ```shell java -jar ``` + +### Docker Infrastructure +This project also provides a Docker infrastructure (images, containers, networks, and volumes) in which the bwLehrpool-Server application can be embedded and executed for test purposes. +The infrastructure consists of the following services and is created and started automatically using [docker-compose](https://docs.docker.com/compose): + +| Service | Container | IPv4 Address | IPv6 Address | +|:------------------|:------------------|:---------------|:----------------------| +| bwLehrpool-Server | dozmod-server | 192.168.200.20 | fd03:4b1d:5707:c8::14 | +| MariaDB | dozmod-database | 192.168.200.21 | fd03:4b1d:5707:c8::15 | +| phpMyAdmin | dozmod-phpmyadmin | 192.168.200.22 | fd03:4b1d:5707:c8::16 | + +A Docker image of the bwLehrpool-Server application and its required infrastructure (images, containers, networks, and volumes) is created and started automatically with the following command line call: + +```shell +mvn -P dozmod-server:start +``` + +The Docker infrastructure started with the above call uses the production default bwLehrpool-Master-Server of the University of Freiburg. +If the custom bwLehrpool-Master-Server of the Docker infrastructure from the [masterserver](https://git.openslx.org/bwlp/masterserver.git) repository should be used instead, the default configuration of the above command line call can be overwritten by using the following command line call instead: + +```shell +mvn -P dozmod-server:start -P dozmod-server:config:custom-master-server +``` + +Note that the complete Docker infrastructure (images, containers, networks, and volumes) is created and started automatically after a start call. +To stop the bwLehrpool-Server container and its entire infrastructure, use the following command line call: + +```shell +mvn -P dozmod-server:stop +``` diff --git a/dozentenmodulserver/pom.xml b/dozentenmodulserver/pom.xml index c54ce5bf..15c297e9 100644 --- a/dozentenmodulserver/pom.xml +++ b/dozentenmodulserver/pom.xml @@ -17,6 +17,9 @@ UTF-8 org.openslx.bwlp.sat.App yyyy.MM.dd HH:mm + bwlp-masterserver.ruf.uni-freiburg.de + 9091 + true @@ -36,6 +39,14 @@ + + dozmod-server:config:custom-master-server + + 192.168.200.10 + 9090 + false + + dozmod-server:start @@ -55,6 +66,11 @@ + + ${dozmod.server.master.host} + ${dozmod.server.master.port} + ${dozmod.server.master.ssl} + docker-compose up -- cgit v1.2.3-55-g7522