diff --git a/slope-evaluator/README.md b/slope-evaluator/README.md index 5929fb157a7c783bd37497885a5e3bc373b84aa0..12e8a61783532efce9e8722f500cf5ff880bace7 100644 --- a/slope-evaluator/README.md +++ b/slope-evaluator/README.md @@ -8,7 +8,7 @@ For development: uvicorn main:app --reload ``` -Build the docker image: +## Build the docker image: ```sh docker build . -t theodolite-evaluator diff --git a/theodolite-quarkus/README.md b/theodolite-quarkus/README.md index bb99f34e80f8b61b42f9b10b4c1d988871b74cb0..fc1d1bfe4a9c20a515cf6e69208657f74694d80e 100644 --- a/theodolite-quarkus/README.md +++ b/theodolite-quarkus/README.md @@ -1,4 +1,4 @@ -# theodolite-quarkus project +# Theodolite-quarkus project This project uses Quarkus, the Supersonic Subatomic Java Framework. @@ -6,7 +6,8 @@ If you want to learn more about Quarkus, please visit its website: https://quark ## Running the application in dev mode -You can run your application in dev mode that enables live coding using: +You can run your application in dev mode using: + ```shell script ./gradlew quarkusDev ``` @@ -14,13 +15,16 @@ You can run your application in dev mode that enables live coding using: ## Packaging and running the application The application can be packaged using: + ```shell script ./gradlew build ``` -It produces the `theodolite-quarkus-1.0.0-SNAPSHOT-runner.jar` file in the `/build` directory. -Be aware that it’s not an _über-jar_ as the dependencies are copied into the `build/lib` directory. + +It produces the `theodolite-quarkus-1.0.0-SNAPSHOT-runner.jar` file in the `/build` directory. Be aware that it’s not +an _über-jar_ as the dependencies are copied into the `build/lib` directory. If you want to build an _über-jar_, execute the following command: + ```shell script ./gradlew build -Dquarkus.package.type=uber-jar ``` @@ -30,11 +34,13 @@ The application is now runnable using `java -jar build/theodolite-quarkus-1.0.0- ## Creating a native executable You can create a native executable using: + ```shell script ./gradlew build -Dquarkus.package.type=native ``` Or, if you don't have GraalVM installed, you can run the native executable build in a container using: + ```shell script ./gradlew build -Dquarkus.package.type=native -Dquarkus.native.container-build=true ``` @@ -44,20 +50,73 @@ You can then execute your native executable with: If you want to learn more about building native executables, please consult https://quarkus.io/guides/gradle-tooling. -# RESTEasy JAX-RS +## Build docker images + +For the jvm version use: + +```shell script +./gradlew build +docker build -f src/main/docker/Dockerfile.jvm -t theodolite-quarkus-jvm . +``` + +For the native image version use: + +```shell script +./gradlew build -Dquarkus.package.type=native +docker build -f src/main/docker/Dockerfile.native -t theodolite-quarkus-native . +``` + +## Execute docker images: -<p>A Hello World RESTEasy resource</p> +Remember to set the environment variables first. -Guide: https://quarkus.io/guides/rest-json +Jvm version: -## Build and afterwards run the application in Docker container +```shell script +docker run -i --rm theodolite-quarkus-jvm +``` + +Native image version: -```build_jvm.sh``` to build the jvm version +```shell script +docker run -i --rm theodolite-quarkus-native +``` -```build_native.sh``` to build the native image graal version +## Environment variables -## Install Detekt Code analysis Plugin +**Production:** (Docker-Container) +| Variables name | Default value |Usage | +| -----------------------------|:----------------------------------:| ------------:| +| `NAMESPACE` | `default` |Determines the namespace of the Theodolite will be executed in. Used in the KubernetesBenchmark| +| `THEODOLITE_EXECUTION` | `./config/BenchmarkExecution.yaml`|The complete path to the benchmarkExecution file. Used in the TheodoliteYamlExecutor. | +| `THEODOLITE_BENCHMARK_TYPE` | `./config/BenchmarkType.yaml` |The complete path to the benchmarkType file. Used in the TheodoliteYamlExecutor.| +| `THEODOLITE_APP_RESOURCES` | `./config` |The path under which the yamls for the resources for the subexperiments are found. Used in the KubernetesBenchmark| +| `MODE` | `yaml-executor` | Defines the mode of operation: either `yaml-executor` or `operator`| + +**Development:** (local via Intellij) + +When running Theodolite from within IntelliJ via +[Run Configurations](https://www.jetbrains.com/help/idea/work-with-gradle-tasks.html#gradle_run_config), set the * +Environment variables* field to: + +``` +NAMESPACE=default;THEODOLITE_BENCHMARK=./../../../../config/BenchmarkType.yaml;THEODOLITE_APP_RESOURCES=./../../../../config;THEODOLITE_EXECUTION=./../../../../config/BenchmarkExecution.yaml;MODE=operator +``` + +Alternative: + +``` sh +export NAMESPACE=default +export THEODOLITE_BENCHMARK=./../../../../config/BenchmarkType.yaml +export THEODOLITE_APP_RESOURCES=./../../../../config +export THEODOLITE_EXECUTION=./../../../../config/BenchmarkExecution.yaml +export MODE=operator +./gradlew quarkusDev + +``` + +#### Install Detekt Code analysis Plugin Install https://plugins.jetbrains.com/plugin/10761-detekt @@ -66,11 +125,10 @@ Install https://plugins.jetbrains.com/plugin/10761-detekt - Check Enable Detekt - Specify your detekt configuration and baseline file (optional) - -> detekt issues will be annotated on-the-fly while coding **ingore Failures in build:** add ```ignoreFailures = true``` - to build.gradle detekt task +to build.gradle detekt task