From a3b67c489a842e67f74d48de0552105465726612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Henning?= <soeren.henning@email.uni-kiel.de> Date: Thu, 11 Feb 2021 18:35:34 +0100 Subject: [PATCH] Add documentation for OCI and volume access --- execution/README.md | 33 +++++++++++++++++-- .../kubernetes/volume-access.yaml | 30 +++++++++++++++++ .../kubernetes/volume-oci-access.yaml | 20 ----------- 3 files changed, 61 insertions(+), 22 deletions(-) create mode 100644 execution/infrastructure/kubernetes/volume-access.yaml delete mode 100644 execution/infrastructure/kubernetes/volume-oci-access.yaml diff --git a/execution/README.md b/execution/README.md index 2ad12f24c..6c6203ad9 100644 --- a/execution/README.md +++ b/execution/README.md @@ -170,18 +170,47 @@ access (e.g. via SSH) to one of your cluster nodes. You first need to create a directory on a selected node where all benchmark results should be stored. Next, modify `infrastructure/kubernetes/volume-local.yaml` by setting `<node-name>` to your selected node. (This node will most likely also execute the [Theodolite job](#Execution).) Further, you have to set `path` to the directory on the node you just created. To deploy -you volume run: +your volume run: ```sh kubectl apply -f infrastructure/kubernetes/volume-local.yaml ``` +##### *Oracle Cloud Infrastructure* volume + +When you are running in the Oracle Cloud, you can provision a persistent volume claim by attaching a volume from the +Oracle Cloud Infrastructure Block Volume service. To create your volume, run: + +```sh +kubectl apply -f infrastructure/kubernetes/volume-oci.yaml +``` + +More information can be found in the official documentation: +[Oracle Cloud Infrastructure: Creating a Persistent Volume Claim](https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim.htm) + ##### Other volumes -To use volumes provided by public cloud providers or network-based file systems, you can use the definitions in +To use volumes provided by other public cloud providers or network-based file systems, you can use the definitions in `infrastructure/kubernetes/` as a starting point. See the offical [volumes documentation](https://kubernetes.io/docs/concepts/storage/volumes/) for additional information. +##### Accessing benchmark results via Kubernetes + +In cases where you do not have direct access to the underlying storage infrasturcture of your volume (e.g., if your +admin configures a local or hostPath volume for you and you do not have SSH access to the node), you can deploy our +Theodolite results access deployment: + +```sh +kubectl apply -f infrastructure/kubernetes/volume-access.yaml +``` + +It allows you to browse the benchmark results or copy files your Kubernetes client via the following commands: + +```sh +kubectl exec -it $(kubectl get pods -o=name -l app=theodolite-results-access) -- sh +kubectl cp $(kubectl get pods --no-headers -o custom-columns=":metadata.name" -l app=theodolite-results-access):app/results <target-dir> +``` + ## Execution diff --git a/execution/infrastructure/kubernetes/volume-access.yaml b/execution/infrastructure/kubernetes/volume-access.yaml new file mode 100644 index 000000000..54c996160 --- /dev/null +++ b/execution/infrastructure/kubernetes/volume-access.yaml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: theodolite-results-access + labels: + app: theodolite-results-access +spec: + replicas: 1 + selector: + matchLabels: + app: theodolite-results-access + template: + metadata: + labels: + app: theodolite-results-access + spec: + containers: + - name: theodolite-results-access + image: busybox:latest + command: + - sh + - -c + - exec tail -f /dev/null + volumeMounts: + - mountPath: /app/results + name: theodolite-pv-storage + volumes: + - name: theodolite-pv-storage + persistentVolumeClaim: + claimName: theodolite-pv-claim diff --git a/execution/infrastructure/kubernetes/volume-oci-access.yaml b/execution/infrastructure/kubernetes/volume-oci-access.yaml deleted file mode 100644 index 7c129600f..000000000 --- a/execution/infrastructure/kubernetes/volume-oci-access.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: theodolite-results-access -spec: - restartPolicy: Always - containers: - - name: theodolite-results-access - image: busybox:latest - command: - - sh - - -c - - exec tail -f /dev/null - volumeMounts: - - mountPath: /app/results - name: theodolite-pv-storage - volumes: - - name: theodolite-pv-storage - persistentVolumeClaim: - claimName: theodolite-pv-claim -- GitLab