Skip to content
Snippets Groups Projects
Commit 5bccec73 authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

Enhance readme for theodolite-kotlin

parent b748f88a
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!116Add image build documentation,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
...@@ -7,6 +7,7 @@ If you want to learn more about Quarkus, please visit its website: https://quark ...@@ -7,6 +7,7 @@ If you want to learn more about Quarkus, please visit its website: https://quark
## Running the application in dev mode ## Running the application in dev mode
You can run your application in dev mode using: You can run your application in dev mode using:
```shell script ```shell script
./gradlew quarkusDev ./gradlew quarkusDev
``` ```
...@@ -14,13 +15,16 @@ You can run your application in dev mode using: ...@@ -14,13 +15,16 @@ You can run your application in dev mode using:
## Packaging and running the application ## Packaging and running the application
The application can be packaged using: The application can be packaged using:
```shell script ```shell script
./gradlew build ./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: If you want to build an _über-jar_, execute the following command:
```shell script ```shell script
./gradlew build -Dquarkus.package.type=uber-jar ./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- ...@@ -30,11 +34,13 @@ The application is now runnable using `java -jar build/theodolite-quarkus-1.0.0-
## Creating a native executable ## Creating a native executable
You can create a native executable using: You can create a native executable using:
```shell script ```shell script
./gradlew build -Dquarkus.package.type=native ./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: Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
```shell script ```shell script
./gradlew build -Dquarkus.package.type=native -Dquarkus.native.container-build=true ./gradlew build -Dquarkus.package.type=native -Dquarkus.native.container-build=true
``` ```
...@@ -47,52 +53,58 @@ If you want to learn more about building native executables, please consult http ...@@ -47,52 +53,58 @@ If you want to learn more about building native executables, please consult http
## Build docker images ## Build docker images
For the jvm version use: For the jvm version use:
```shell script ```shell script
./gradlew build ./gradlew build
docker build -f src/main/docker/Dockerfile.jvm -t theodolite-quarkus-jvm . docker build -f src/main/docker/Dockerfile.jvm -t theodolite-quarkus-jvm .
``` ```
For the native image version use: For the native image version use:
```shell script ```shell script
./gradlew build -Dquarkus.package.type=native ./gradlew build -Dquarkus.package.type=native
docker build -f src/main/docker/Dockerfile.native -t theodolite-quarkus-native . docker build -f src/main/docker/Dockerfile.native -t theodolite-quarkus-native .
``` ```
## Execute docker images: ## Execute docker images:
Remember to set the environment variables first. Remember to set the environment variables first.
Jvm version: Jvm version:
```shell script ```shell script
docker run -i --rm theodolite-quarkus-jvm docker run -i --rm theodolite-quarkus-jvm
``` ```
Native image version: Native image version:
```shell script ```shell script
docker run -i --rm theodolite-quarkus-native docker run -i --rm theodolite-quarkus-native
``` ```
## Environment variables ## Environment variables
**Production:** **Production:** (Docker-Container)
| Variables name | Default value |Usage | | Variables name | Default value |Usage |
| -----------------------------|:----------------------------------:| ------------:| | -----------------------------|:----------------------------------:| ------------:|
| `NAMESPACE` | `default` |Determines the namesspace of the KubernetesClient. Used in the KubernetesBenchmark| | `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_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_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 ressources for the subexperiments are found. Used in the KubernetesBenchmark| | `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`| | `MODE` | `yaml-executor` | Defines the mode of operation: either `yaml-executor` or `operator`|
**Development:** **Development:** (local)
| Variables name | Default value |Usage | | Variables name | Default value |Usage |
| -----------------------------|:----------------------------------:| ------------:| | -----------------------------|:----------------------------------:| ------------:|
| `NAMESPACE` | `default` |Determines the namesspace of the KubernetesClient. Used in the KubernetesBenchmark| | `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_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_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 ressources for the subexperiments are found. Used in the KubernetesBenchmark| | `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`| | `MODE` | `yaml-executor` | Defines the mode of operation: either `yaml-executor` or `operator`|
For Development gradle.run configuration: For the development gradle run configuration in intelij:
``` ```
NAMESPACE=default;THEODOLITE_BENCHMARK=./../../../../config/BenchmarkType.yaml;THEODOLITE_APP_RESOURCES=./../../../../config;THEODOLITE_EXECUTION=./../../../../config/BenchmarkExecution.yaml;MODE=operator NAMESPACE=default;THEODOLITE_BENCHMARK=./../../../../config/BenchmarkType.yaml;THEODOLITE_APP_RESOURCES=./../../../../config;THEODOLITE_EXECUTION=./../../../../config/BenchmarkExecution.yaml;MODE=operator
...@@ -112,7 +124,6 @@ export MODE=operator ...@@ -112,7 +124,6 @@ export MODE=operator
#### Install Detekt Code analysis Plugin #### Install Detekt Code analysis Plugin
Install https://plugins.jetbrains.com/plugin/10761-detekt Install https://plugins.jetbrains.com/plugin/10761-detekt
- Install the plugin - Install the plugin
...@@ -120,11 +131,10 @@ Install https://plugins.jetbrains.com/plugin/10761-detekt ...@@ -120,11 +131,10 @@ Install https://plugins.jetbrains.com/plugin/10761-detekt
- Check Enable Detekt - Check Enable Detekt
- Specify your detekt configuration and baseline file (optional) - Specify your detekt configuration and baseline file (optional)
-> detekt issues will be annotated on-the-fly while coding -> detekt issues will be annotated on-the-fly while coding
**ingore Failures in build:** add **ingore Failures in build:** add
```ignoreFailures = true``` ```ignoreFailures = true```
to build.gradle detekt task to build.gradle detekt task
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment