diff --git a/execution/README.md b/execution/README.md index 2ad12f24c1d252194c4e58ec8994548496a09d8c..6c6203ad983549bf0ed2fdb040f4165dc36bd6bd 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 0000000000000000000000000000000000000000..54c996160726504b0965af791c74cff11a860c8e --- /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 new file mode 100644 index 0000000000000000000000000000000000000000..7c129600f8c6168f06ddcf2865ff29bc4e3c942c --- /dev/null +++ b/execution/infrastructure/kubernetes/volume-oci-access.yaml @@ -0,0 +1,20 @@ +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 diff --git a/execution/infrastructure/kubernetes/volume-oci.yaml b/execution/infrastructure/kubernetes/volume-oci.yaml new file mode 100644 index 0000000000000000000000000000000000000000..39d267011661b56021f7e716d860ab427608ed05 --- /dev/null +++ b/execution/infrastructure/kubernetes/volume-oci.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: theodolite-pv-claim +spec: + storageClassName: "oci-bv" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50Gi