From 439b145fb053c404e4582f871f74b0b6de3609dd Mon Sep 17 00:00:00 2001
From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de>
Date: Fri, 16 Apr 2021 10:16:55 +0200
Subject: [PATCH] Add additional documentation

---
 execution/README.md       | 10 ++++++++--
 execution/theodolite.yaml | 32 +++++++++++++++++---------------
 2 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/execution/README.md b/execution/README.md
index 7b0a4dc6b..eb6ade9f2 100644
--- a/execution/README.md
+++ b/execution/README.md
@@ -225,15 +225,21 @@ Theodolite locally on your machine see the description below.
 see the [Configuration](#configuration) section below. Note, that you might uncomment the `serviceAccountName` line if
 RBAC is enabled on your cluster (see installation of [Theodolite RBAC](#Theodolite-RBAC)).
 
-To start the execution of a benchmark run (with `<your-theodolite-yaml>` being your job definition):
+To start the execution of a benchmark create a ConfigMap which containts all required Kubernetes resource files for the SUT and the load generator, a ConfigMap for the execution and a ConfigMap for the benchmark.
 
 ```sh
-kubectl create -f <your-theodolite-yaml>
 kubectl create configmap app-resources-configmap --from-file=<folder-with-all-required-k8s-resources>
 kubectl create configmap execution-configmap --from-file=<execution.yaml>
 kubectl create configmap benchmark-configmap --from-file=<benchmark.yaml>
 ```
 
+This will create three ConfigMaps. You can verify this via `kubectl get configmaps`.
+
+Start the Theodolite job (with `<your-theodolite-yaml>` being your job definition):
+
+```sh
+kubectl create -f <your-theodolite-yaml>
+```
 
 This will create a pod with a name such as `your-job-name-xxxxxx`. You can verifiy this via `kubectl get pods`. With
 `kubectl logs -f <your-job-name-xxxxxx>`, you can follow the benchmark execution logs.
diff --git a/execution/theodolite.yaml b/execution/theodolite.yaml
index 1282531b5..3665e3d91 100644
--- a/execution/theodolite.yaml
+++ b/execution/theodolite.yaml
@@ -1,12 +1,12 @@
 apiVersion: batch/v1
 kind: Job
 metadata:
-  name: bw-theodolite
+  name: theodolite
 spec:
   template:
     spec:
       securityContext:
-        runAsUser: 0
+        runAsUser: 0 # Set the permissions for write access to the volumes.
       containers:
         - name: lag-analysis
           image: ghcr.io/cau-se/theodolite-slo-checker-lag-trend:theodolite-kotlin-latest
@@ -14,35 +14,37 @@ spec:
           - containerPort: 80
             name: analysis
         - name: theodolite
-          image: benediktwetzel/theodolite-test #ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
+          image: ghcr.io/cau-se/theodolite:theodolite-kotlin-latest
           imagePullPolicy: Always
           env:
             - name: NAMESPACE
               value: theodolite-she
-            - name: MODE
-              value: yaml-executor
+            # - name: MODE
+            #   value: yaml-executor # Default is `yaml-executor`
             - name: THEODOLITE_EXECUTION
-              value: /etc/execution/example-execution-yaml-resource.yaml
+              value: /etc/execution/example-execution-yaml-resource.yaml # The name of this file must correspond to the filename of the execution, from which the config map is created.
             - name: THEODOLITE_BENCHMARK
-              value: /etc/benchmark/example-benchmark-yaml-resource.yaml
+              value: /etc/benchmark/example-benchmark-yaml-resource.yaml # The name of this file must correspond to the filename of the benchmark, from which the config map is created.
             - name: THEODOLITE_APP_RESOURCES
               value: /etc/app-resources
-            - name: RESULTS_FOLDER
-              value: results
-            - name: CREATE_RESULTS_FOLDER
-              value: "true"
+            - name: RESULTS_FOLDER # Folder for saving results
+              value: results # Default is the pwd (/deployments)
+            # - name: CREATE_RESULTS_FOLDER # Specify whether the specified result folder should be created if it does not exist.
+            #   value: "false" # Default is false.
           volumeMounts:
-            - mountPath: "/deployments/results"
+            - mountPath: "/deployments/results" # the mounted path must corresponds to the value of `RESULT_FOLDER`.
               name: theodolite-pv-storage
-            - mountPath: "/etc/app-resources"
+            - mountPath: "/etc/app-resources" # must be corresponds to the value of `THEODOLITE_APP_RESOURCES`.
               name: app-resources
-            - mountPath: "/etc/benchmark" 
+            - mountPath: "/etc/benchmark"  # must be corresponds to the value of `THEODOLITE_BENCHMARK`.
               name: benchmark
-            - mountPath: "/etc/execution"
+            - mountPath: "/etc/execution" # must be corresponds to the value of `THEODOLITE_EXECUTION`.
               name: execution
       restartPolicy: Never
       # Uncomment if RBAC is enabled and configured
       serviceAccountName: theodolite
+      # Multiple volumes are needed to provide the corresponding files.
+      # The names must correspond to the created configmaps and the volumeMounts.
       volumes:
         - name: theodolite-pv-storage
           persistentVolumeClaim:
-- 
GitLab