diff options
author | Manuel Bentele | 2021-06-02 13:09:44 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-06-02 13:09:44 +0200 |
commit | 208860d5b7997240b3fe8c11005793b54b9b6f72 (patch) | |
tree | 4c331e51988c41b0456191730be2bce09c2142c8 | |
parent | [server] Package build version and timestamp into MANIFEST.MF (diff) | |
download | tutor-module-208860d5.tar.gz tutor-module-208860d5.tar.xz tutor-module-208860d5.zip |
[client,server] Add configuration overwrites to use master-server Docker container
-rw-r--r-- | dozentenmodul/README.md | 12 | ||||
-rw-r--r-- | dozentenmodulserver/README.md | 47 | ||||
-rw-r--r-- | dozentenmodulserver/pom.xml | 16 |
3 files changed, 61 insertions, 14 deletions
diff --git a/dozentenmodul/README.md b/dozentenmodul/README.md index 024e86cc..a14e2bdc 100644 --- a/dozentenmodul/README.md +++ b/dozentenmodul/README.md @@ -43,9 +43,21 @@ The custom configuration file is specified by executing the bwLehrpool-Suite app java -Dlog4j.configuration=file:<CONFIG> -jar <APP> ``` + ## Execution + +### Standalone The bwLehrpool-Suite application can be executed with the following command line call where `<APP>` is a path to the built bwLehrpool-Suite application (Java archive file): ```shell java -jar <APP> ``` + +Note that the bwLehrpool-Suite application started with the above call uses the production default bwLehrpool-Master-Server of the University of Freiburg. + +### Docker infrastructure +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 bwLehrpool-Suite application can be executed according to the above command line call with the following additional command line parameters: + +```shell +java -jar <APP> 192.168.200.10 9090 false +``` 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:<CONFIG> -jar <APP> ``` + ## 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 `<APP>` 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 <APP> ``` + +### 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 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <main.class>org.openslx.bwlp.sat.App</main.class> <maven.build.timestamp.format>yyyy.MM.dd HH:mm</maven.build.timestamp.format> + <dozmod.server.master.host>bwlp-masterserver.ruf.uni-freiburg.de</dozmod.server.master.host> + <dozmod.server.master.port>9091</dozmod.server.master.port> + <dozmod.server.master.ssl>true</dozmod.server.master.ssl> </properties> <repositories> @@ -37,6 +40,14 @@ <profiles> <profile> + <id>dozmod-server:config:custom-master-server</id> + <properties> + <dozmod.server.master.host>192.168.200.10</dozmod.server.master.host> + <dozmod.server.master.port>9090</dozmod.server.master.port> + <dozmod.server.master.ssl>false</dozmod.server.master.ssl> + </properties> + </profile> + <profile> <id>dozmod-server:start</id> <build> <defaultGoal>pre-integration-test</defaultGoal> @@ -55,6 +66,11 @@ </execution> </executions> <configuration> + <environmentVariables> + <DOZMOD_SERVER_MASTER_HOST>${dozmod.server.master.host}</DOZMOD_SERVER_MASTER_HOST> + <DOZMOD_SERVER_MASTER_PORT>${dozmod.server.master.port}</DOZMOD_SERVER_MASTER_PORT> + <DOZMOD_SERVER_MASTER_USE_SSL>${dozmod.server.master.ssl}</DOZMOD_SERVER_MASTER_USE_SSL> + </environmentVariables> <executable>docker-compose</executable> <arguments> <argument>up</argument> |