From f025fb5efd6fcadd861a1efba81ce7042235e559 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 29 Mar 2023 22:39:48 -0600 Subject: [PATCH 1/5] try doing tests with kind Signed-off-by: vsoch --- .github/workflows/main.yaml | 17 ++++++++++------- examples/tests/existing-volumes/post-run.sh | 7 ++++--- examples/tests/existing-volumes/pre-run.sh | 8 ++++---- examples/tests/snakemake/pre-run.sh | 11 ++++------- examples/tests/volumes/minicluster.yaml | 4 +--- examples/tests/volumes/post-run.sh | 4 ++-- examples/tests/volumes/pre-run.sh | 8 ++++---- script/kind-config.yaml | 7 +++++++ 8 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 script/kind-config.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 922a1661..0ee8f238 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -84,23 +84,26 @@ jobs: with: go-version: ^1.18 - - name: Start minikube - uses: medyagh/setup-minikube@697f2b7aaed5f70bf2a94ee21a4ec3dde7b12f92 # v0.0.9 + - name: Create k8s Kind Cluster + uses: helm/kind-action@v1.4.0 + with: + # prepares host mount at /tmp/data + config: ./script/kind-config.yaml - name: Create the namespace run: kubectl create namespace flux-operator - - name: Pull Docker Containers to MiniKube + - name: Pull Docker Containers env: container: ${{ matrix.test[1] }} test: ${{ matrix[0] }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - export SHELL=/bin/bash - eval $(minikube -p minikube docker-env) - minikube ssh docker pull ${container} + docker pull ${container} + kind load docker-image ${container} if [[ "${test}" == "nginx-service" ]]; then - minikube ssh docker pull nginx + docker pull nginx + kind load docker-image nginx fi make make install diff --git a/examples/tests/existing-volumes/post-run.sh b/examples/tests/existing-volumes/post-run.sh index 948f62de..622172e8 100644 --- a/examples/tests/existing-volumes/post-run.sh +++ b/examples/tests/existing-volumes/post-run.sh @@ -2,11 +2,12 @@ HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -echo "Cleaning up /tmp/data in minikube" +echo "Cleaning up /tmp/data" + +sudo rm -rf /tmp/data/* # pods usually need to be deleted before the pvc/pv kubectl delete -f ${HERE}/minicluster.yaml kubectl delete -n flux-operator pods --all --grace-period=0 --force kubectl delete -n flux-operator pvc --all --grace-period=0 --force -kubectl delete -n flux-operator pv --all --grace-period=0 --force -minikube ssh -- sudo rm -rf /tmp/data +kubectl delete -n flux-operator pv --all --grace-period=0 --force \ No newline at end of file diff --git a/examples/tests/existing-volumes/pre-run.sh b/examples/tests/existing-volumes/pre-run.sh index ef57964b..6d05eb7e 100644 --- a/examples/tests/existing-volumes/pre-run.sh +++ b/examples/tests/existing-volumes/pre-run.sh @@ -3,11 +3,11 @@ HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) TESTS=$(dirname ${HERE}) -echo "Copying local volume to /tmp/data-volumes in minikube" +echo "Copying local volume to /tmp/data for kind" +mkdir -p /tmp/data # The "data" volume will be mounted at /mnt/data -minikube ssh -- mkdir -p /tmp/data -minikube cp ${TESTS}/data/pancakes.txt /tmp/data/pancakes.txt -minikube ssh ls /tmp/data +cp ${TESTS}/data/pancakes.txt /tmp/data/pancakes.txt +ls /tmp/data kubectl apply -f ${HERE}/pv.yaml kubectl apply -f ${HERE}/pvc.yaml \ No newline at end of file diff --git a/examples/tests/snakemake/pre-run.sh b/examples/tests/snakemake/pre-run.sh index 269c2310..be629253 100644 --- a/examples/tests/snakemake/pre-run.sh +++ b/examples/tests/snakemake/pre-run.sh @@ -3,12 +3,9 @@ HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) echo "Cloning snakemake run data to /tmp/workflow" -git clone --depth 1 https://github.com/snakemake/snakemake-tutorial-data /tmp/workflow -wget -O /tmp/workflow/Snakefile https://raw.githubusercontent.com/rse-ops/flux-hpc/main/snakemake/atacseq/Snakefile -mkdir -p /tmp/workflow/scripts -wget -O /tmp/workflow/scripts/plot-quals.py https://raw.githubusercontent.com/rse-ops/flux-hpc/main/snakemake/atacseq/scripts/plot-quals.py +git clone --depth 1 https://github.com/snakemake/snakemake-tutorial-data /tmp/data -echo "Preparing to mount into MiniKube" -minikube ssh -- mkdir -p /tmp/data -minikube mount /tmp/workflow:/tmp/data & +wget -O /tmp/data/Snakefile https://raw.githubusercontent.com/rse-ops/flux-hpc/main/snakemake/atacseq/Snakefile +mkdir -p /tmp/data/scripts +wget -O /tmp/data/scripts/plot-quals.py https://raw.githubusercontent.com/rse-ops/flux-hpc/main/snakemake/atacseq/scripts/plot-quals.py \ No newline at end of file diff --git a/examples/tests/volumes/minicluster.yaml b/examples/tests/volumes/minicluster.yaml index 7c7570c4..6670376b 100644 --- a/examples/tests/volumes/minicluster.yaml +++ b/examples/tests/volumes/minicluster.yaml @@ -12,13 +12,11 @@ spec: size: 2 # Make this kind of persistent volume and claim available to pods - # This is a path in minikube (e.g., minikube ssh) + # This is a path in minikube or kind (e.g., minikube ssh) volumes: data: storageClass: hostpath path: /tmp/data - labels: - type: "local" # This is a list because a pod can support multiple containers containers: diff --git a/examples/tests/volumes/post-run.sh b/examples/tests/volumes/post-run.sh index fccc4e7a..1f6c8d19 100644 --- a/examples/tests/volumes/post-run.sh +++ b/examples/tests/volumes/post-run.sh @@ -1,4 +1,4 @@ #!/bin/bash -echo "Cleaning up /tmp/data in minikube" -minikube ssh -- sudo rm -rf /tmp/data +echo "Cleaning up /tmp/data bound to kind" +sudo rm -rf /tmp/data/* \ No newline at end of file diff --git a/examples/tests/volumes/pre-run.sh b/examples/tests/volumes/pre-run.sh index 4e56a1df..4fc44afb 100644 --- a/examples/tests/volumes/pre-run.sh +++ b/examples/tests/volumes/pre-run.sh @@ -3,9 +3,9 @@ HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) TESTS=$(dirname ${HERE}) -echo "Copying local volume to /tmp/data-volumes in minikube" +echo "Copying local volume to /tmp/data mounted in kind" # The "data" volume will be mounted at /mnt/data -minikube ssh -- mkdir -p /tmp/data -minikube cp ${TESTS}/data/pancakes.txt /tmp/data/pancakes.txt -minikube ssh ls /tmp/data +mkdir -p /tmp/data +cp ${TESTS}/data/pancakes.txt /tmp/data/pancakes.txt +ls /tmp/data diff --git a/script/kind-config.yaml b/script/kind-config.yaml new file mode 100644 index 00000000..48a91da5 --- /dev/null +++ b/script/kind-config.yaml @@ -0,0 +1,7 @@ +apiVersion: kind.x-k8s.io/v1alpha4 +kind: Cluster +nodes: + - role: control-plane + extraMounts: + - hostPath: /tmp/data + containerPath: /tmp/data \ No newline at end of file From 8699ccc8f940160d3ea47d43cd09cd05ad41fbc7 Mon Sep 17 00:00:00 2001 From: vsoch Date: Wed, 29 Mar 2023 22:47:19 -0600 Subject: [PATCH 2/5] try manual install Signed-off-by: vsoch --- .github/workflows/main.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0ee8f238..17e74886 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -85,10 +85,12 @@ jobs: go-version: ^1.18 - name: Create k8s Kind Cluster - uses: helm/kind-action@v1.4.0 - with: + run: | + curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.17.0/kind-$(uname)-amd64" + chmod +x ./kind + sudo mv ./kind /usr/local/bin/kind # prepares host mount at /tmp/data - config: ./script/kind-config.yaml + kind create cluster --config ./script/kind-config.yaml - name: Create the namespace run: kubectl create namespace flux-operator From cda2bc4e85218ffe0fb5b4951f6e58fdf8d90a26 Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 30 Mar 2023 00:16:48 -0600 Subject: [PATCH 3/5] update tests for kind Signed-off-by: vsoch --- .github/workflows/main.yaml | 28 ++++---- .github/workflows/test-python.yaml | 19 ++++-- docs/development/developer-guide.md | 8 ++- examples/tests/existing-volumes/post-run.sh | 2 +- .../tests/existing-volumes/test.out.correct | 2 +- examples/tests/hello-world/test.out.correct | 2 +- examples/tests/hello-world/test.sh | 26 -------- .../nginx-sidecar-service/test.out.correct | 46 ++++++------- examples/tests/pokemon/test.out.correct | 64 +++++++++---------- examples/tests/post/test.out.correct | 4 +- examples/tests/snakemake/post-run.sh | 4 ++ examples/tests/volumes/post-run.sh | 2 +- examples/tests/volumes/test.out.correct | 2 +- script/test.sh | 2 +- 14 files changed, 100 insertions(+), 111 deletions(-) delete mode 100755 examples/tests/hello-world/test.sh create mode 100644 examples/tests/snakemake/post-run.sh diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 17e74886..8654d061 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -60,20 +60,20 @@ jobs: strategy: fail-fast: false matrix: - test: [["hello-world", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["post", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["batch", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["singularity", "ghcr.io/rse-ops/singularity:tag-mamba", 40], - ["nginx-sidecar-service", "ghcr.io/flux-framework/flux-restful-api:latest", 40], - ["nginx-service", "ghcr.io/flux-framework/flux-restful-api:latest", 40], - ["lammps", "ghcr.io/rse-ops/lammps:flux-sched-focal-v0.24.0", 30], - ["pokemon", "ghcr.io/rse-ops/pokemon:app-latest", 30], - ["timed", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["debug", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["flux-resource-list", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 30], - ["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 30]] + test: [["hello-world", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["post", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["batch", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["singularity", "ghcr.io/rse-ops/singularity:tag-mamba", 50], + ["nginx-sidecar-service", "ghcr.io/flux-framework/flux-restful-api:latest", 50], + ["nginx-service", "ghcr.io/flux-framework/flux-restful-api:latest", 50], + ["lammps", "ghcr.io/rse-ops/lammps:flux-sched-focal-v0.24.0", 40], + ["pokemon", "ghcr.io/rse-ops/pokemon:app-latest", 40], + ["timed", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["debug", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["flux-resource-list", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 40]] steps: - name: Clone the code diff --git a/.github/workflows/test-python.yaml b/.github/workflows/test-python.yaml index 9d879d19..37b55a63 100644 --- a/.github/workflows/test-python.yaml +++ b/.github/workflows/test-python.yaml @@ -49,25 +49,30 @@ jobs: with: go-version: ^1.18 - - name: Start minikube - uses: medyagh/setup-minikube@697f2b7aaed5f70bf2a94ee21a4ec3dde7b12f92 # v0.0.9 + - name: Create k8s Kind Cluster + run: | + curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.17.0/kind-$(uname)-amd64" + chmod +x ./kind + sudo mv ./kind /usr/local/bin/kind + # prepares host mount at /tmp/data + kind create cluster --config ./script/kind-config.yaml - name: Create the namespace run: kubectl create namespace flux-operator - - name: Pull Docker Containers to MiniKube + - name: Pull Docker Containers env: container: ${{ matrix.test[1] }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - export SHELL=/bin/bash - eval $(minikube -p minikube docker-env) - minikube ssh docker pull ${container} + docker pull ${container} + kind load docker-image ${container} make make install make docker-build printf "Loading Flux Operator latest image...\n" - minikube image load ghcr.io/flux-framework/flux-operator:latest + docker pull ghcr.io/flux-framework/flux-operator:latest + kind load docker-image ghcr.io/flux-framework/flux-operator:latest kubectl apply -f ./examples/dist/flux-operator.yaml - name: Test ${{ matrix.test[0] }} diff --git a/docs/development/developer-guide.md b/docs/development/developer-guide.md index 0b04dcfb..c45d393e 100644 --- a/docs/development/developer-guide.md +++ b/docs/development/developer-guide.md @@ -174,7 +174,13 @@ examples/tests/ └── minicluster.yaml ``` -Thus, to run the full example for hello-world you can do: +You'll first want to create a kind cluster that mounts `/tmp/data`: + +```bash +$ kind create cluster --config ./script/kind-config.yaml +``` + +Then, to run the full example for hello-world you can do: ```bash $ bash script/test.sh hello-world diff --git a/examples/tests/existing-volumes/post-run.sh b/examples/tests/existing-volumes/post-run.sh index 622172e8..b40b4161 100644 --- a/examples/tests/existing-volumes/post-run.sh +++ b/examples/tests/existing-volumes/post-run.sh @@ -4,7 +4,7 @@ HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) echo "Cleaning up /tmp/data" -sudo rm -rf /tmp/data/* +rm -rf /tmp/data/* # pods usually need to be deleted before the pvc/pv kubectl delete -f ${HERE}/minicluster.yaml diff --git a/examples/tests/existing-volumes/test.out.correct b/examples/tests/existing-volumes/test.out.correct index 0e3c1821..6cf89a3c 100644 --- a/examples/tests/existing-volumes/test.out.correct +++ b/examples/tests/existing-volumes/test.out.correct @@ -1 +1 @@ -pancakes.txt +pancakes.txt diff --git a/examples/tests/hello-world/test.out.correct b/examples/tests/hello-world/test.out.correct index f35d3e67..3b18e512 100644 --- a/examples/tests/hello-world/test.out.correct +++ b/examples/tests/hello-world/test.out.correct @@ -1 +1 @@ -hello world +hello world diff --git a/examples/tests/hello-world/test.sh b/examples/tests/hello-world/test.sh deleted file mode 100755 index 8c267278..00000000 --- a/examples/tests/hello-world/test.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -NAME=${1:test} -NAMESPACE=${2:-flux-operator} - -TEST_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -echo "Namespace: ${NAMESPACE}" -kubectl get -n ${NAMESPACE} pod -pods=$(kubectl get -n ${NAMESPACE} pod --output=jsonpath={.items..metadata.name}); -echo "Pods: ${pods}" -pod="${pods%% *}" -echo "Pod: ${pod}" - -# Prepare actual and tested comparison -expected=${TEST_DIR}/test.out -actual=${TEST_DIR}/${NAME}-test.out -kubectl logs -n ${NAMESPACE} ${pod} -f > ${actual} 2>&1 - -echo "Expected:" -cat ${expected} - -echo "Actual:" -cat ${actual} - -diff ${expected} ${actual} diff --git a/examples/tests/nginx-sidecar-service/test.out.correct b/examples/tests/nginx-sidecar-service/test.out.correct index 8e952e12..babf6837 100644 --- a/examples/tests/nginx-sidecar-service/test.out.correct +++ b/examples/tests/nginx-sidecar-service/test.out.correct @@ -1,24 +1,24 @@ Defaulted container "flux-sample" out of: flux-sample, nginx - - - -Welcome to nginx! - - - -

Welcome to nginx!

-

If you see this page, the nginx web server is successfully installed and -working. Further configuration is required.

- -

For online documentation and support please refer to -nginx.org.
-Commercial support is available at -nginx.com.

- -

Thank you for using nginx.

- - + + + +Welcome to nginx! + + + +

Welcome to nginx!

+

If you see this page, the nginx web server is successfully installed and +working. Further configuration is required.

+ +

For online documentation and support please refer to +nginx.org.
+Commercial support is available at +nginx.com.

+ +

Thank you for using nginx.

+ + diff --git a/examples/tests/pokemon/test.out.correct b/examples/tests/pokemon/test.out.correct index 55e09085..88be41ae 100644 --- a/examples/tests/pokemon/test.out.correct +++ b/examples/tests/pokemon/test.out.correct @@ -1,32 +1,32 @@ -@@@@@@@@@@,::,@@@@@@@@@@@@@@@@@@@@@@@@,,,,@@@@@@@@@@@@@@@@@@ -@@@@@@@@@,*,,:,@@@@@@@@@@@@@@@@@@@@,,:::*:@@@@@@@@@@@@@@@@@@ -@@@@@@@@,*:,::*@@@@@@@@@@@@@@@@@@,::*:::*,@@@@@@@@@@@@@@@@@@ -@@@@@@@@:*,,:*::@@@@@@@@@@@@@@@,:::::::.:@@@@@@@@@@@@@@@@@@@ -@@@@@@@@::,::.:*@,,::***:::,,@,:::::::::*@@@@@@@@@@@@@@@@@@@ -@@@@@@@@@*,::**.*.......**.*..:,*::::,,*:@@@@@@@@@@@@@@@@@@@ -@@@@@@@@:**,:..*************..,*::::,,*:@@@@@@@@@@@@@@@@@@@@ -@@@@@@@@*::**::*************.*:*,::::*:@@@@@@@@@@@@@@@@@@@@@ -@@@@@@@@,**+:****************.::,,,:*,@@@@@@@@@,,,:::,,@@@@@ -@@@@@@@@@@*..**************.*..*::::,@@@@@@@@,:::,:::::*:@@@ -@@@@@@@@@@:...*********....,*.+++S.:@@@@@@@,*:,,,:***:::*,@@ -@@@@@@@@@@,.:...*****..+%?S@*++++S*.*,@@@@@*:,,::**:::::*:@@ -@@@@@@@@@@@**.%+********S%+,.S++SS.+++.**:*.::::::.*::***,@@ -@@@@@,,:::*.+...*********..+S.SSS+******.......*::*..**.,@@@ -@,::.*******.++++.+.....++SS++.+++.*********.+:*+*:.::::*@@@ -:*.*.*.*****..++*..S.....%.+*::*S+++.....**.:.S...*.****.,@@ -:*SS.*+..++++++:,,,,*S.S+*:,,,,,*+S++++++++S+**:::.*:::::::@ -@@,**.++++++++S,,,,,,,::,,,,,,,,,,.++++.S+++.::::***,:**,,** -@@@@@@@,,,,,,,*,@,,,,,:*,,,,,,,,,,,::*.,++.+.:::*::****:,,:. -@@@@@@@@@@@@@@,*,,,,,,,*,,,,,,,,,,:**.+:.S++S::::::::::,:::* -@@@@@@@@@@@@@@@*:,::::,**,,,,::::****:..*.+S+::::::*:,::::*, -@@@@@@@@@@@@@@@:.,@,,,,:.:,,,,,,::::*.+S+++..:::::**:::::*,@ -@@@@@@@@@@@@@,*...:,,,,,,*,,,,,::::.+++++++S.:***::::::*:@@@ -@@@@@@@@@@@@,.***..*,,,,,**:::*:::.+++++++++S+*::::::::,@@@@ -@@@@@@@@@@@,.***...+++.**:::*****.+*.***...++S+:::::,@@@@@@@ -@@@@@@@@@@@:S...+++SS..+*:*******.++**:****.++S*,@@@@@@@@@@@ -@@@@@@@@@@@:SSSSSSSSSS:,@@,,,,,,,,,:..**...++++S,@@@@@@@@@@@ -@@@@@@@@@@,.+SSSSSSS+,@@@@@@@@@@@@@@,++++++++++S.@@@@@@@@@@@ -@@@@@@@@@@@@@*+.:*+*@@@@@@@@@@@@@@@@@*S++++++++.+:@@@@@@@@@@ -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:*:::*+.:,,:,@@@@@@@@@@ - -convergedcomputingftw +@@@@@@@@@@,::,@@@@@@@@@@@@@@@@@@@@@@@@,,,,@@@@@@@@@@@@@@@@@@ +@@@@@@@@@,*,,:,@@@@@@@@@@@@@@@@@@@@,,:::*:@@@@@@@@@@@@@@@@@@ +@@@@@@@@,*:,::*@@@@@@@@@@@@@@@@@@,::*:::*,@@@@@@@@@@@@@@@@@@ +@@@@@@@@:*,,:*::@@@@@@@@@@@@@@@,:::::::.:@@@@@@@@@@@@@@@@@@@ +@@@@@@@@::,::.:*@,,::***:::,,@,:::::::::*@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@*,::**.*.......**.*..:,*::::,,*:@@@@@@@@@@@@@@@@@@@ +@@@@@@@@:**,:..*************..,*::::,,*:@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@*::**::*************.*:*,::::*:@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@,**+:****************.::,,,:*,@@@@@@@@@,,,:::,,@@@@@ +@@@@@@@@@@*..**************.*..*::::,@@@@@@@@,:::,:::::*:@@@ +@@@@@@@@@@:...*********....,*.+++S.:@@@@@@@,*:,,,:***:::*,@@ +@@@@@@@@@@,.:...*****..+%?S@*++++S*.*,@@@@@*:,,::**:::::*:@@ +@@@@@@@@@@@**.%+********S%+,.S++SS.+++.**:*.::::::.*::***,@@ +@@@@@,,:::*.+...*********..+S.SSS+******.......*::*..**.,@@@ +@,::.*******.++++.+.....++SS++.+++.*********.+:*+*:.::::*@@@ +:*.*.*.*****..++*..S.....%.+*::*S+++.....**.:.S...*.****.,@@ +:*SS.*+..++++++:,,,,*S.S+*:,,,,,*+S++++++++S+**:::.*:::::::@ +@@,**.++++++++S,,,,,,,::,,,,,,,,,,.++++.S+++.::::***,:**,,** +@@@@@@@,,,,,,,*,@,,,,,:*,,,,,,,,,,,::*.,++.+.:::*::****:,,:. +@@@@@@@@@@@@@@,*,,,,,,,*,,,,,,,,,,:**.+:.S++S::::::::::,:::* +@@@@@@@@@@@@@@@*:,::::,**,,,,::::****:..*.+S+::::::*:,::::*, +@@@@@@@@@@@@@@@:.,@,,,,:.:,,,,,,::::*.+S+++..:::::**:::::*,@ +@@@@@@@@@@@@@,*...:,,,,,,*,,,,,::::.+++++++S.:***::::::*:@@@ +@@@@@@@@@@@@,.***..*,,,,,**:::*:::.+++++++++S+*::::::::,@@@@ +@@@@@@@@@@@,.***...+++.**:::*****.+*.***...++S+:::::,@@@@@@@ +@@@@@@@@@@@:S...+++SS..+*:*******.++**:****.++S*,@@@@@@@@@@@ +@@@@@@@@@@@:SSSSSSSSSS:,@@,,,,,,,,,:..**...++++S,@@@@@@@@@@@ +@@@@@@@@@@,.+SSSSSSS+,@@@@@@@@@@@@@@,++++++++++S.@@@@@@@@@@@ +@@@@@@@@@@@@@*+.:*+*@@@@@@@@@@@@@@@@@*S++++++++.+:@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:*:::*+.:,,:,@@@@@@@@@@ + +convergedcomputingftw diff --git a/examples/tests/post/test.out.correct b/examples/tests/post/test.out.correct index d7afc3bf..784d4367 100644 --- a/examples/tests/post/test.out.correct +++ b/examples/tests/post/test.out.correct @@ -1,2 +1,2 @@ -hello world -hello post +hello world +hello post diff --git a/examples/tests/snakemake/post-run.sh b/examples/tests/snakemake/post-run.sh new file mode 100644 index 00000000..491416fc --- /dev/null +++ b/examples/tests/snakemake/post-run.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Cleaning up /tmp/data bound to kind" +rm -rf /tmp/data/* \ No newline at end of file diff --git a/examples/tests/volumes/post-run.sh b/examples/tests/volumes/post-run.sh index 1f6c8d19..491416fc 100644 --- a/examples/tests/volumes/post-run.sh +++ b/examples/tests/volumes/post-run.sh @@ -1,4 +1,4 @@ #!/bin/bash echo "Cleaning up /tmp/data bound to kind" -sudo rm -rf /tmp/data/* \ No newline at end of file +rm -rf /tmp/data/* \ No newline at end of file diff --git a/examples/tests/volumes/test.out.correct b/examples/tests/volumes/test.out.correct index 0e3c1821..6cf89a3c 100644 --- a/examples/tests/volumes/test.out.correct +++ b/examples/tests/volumes/test.out.correct @@ -1 +1 @@ -pancakes.txt +pancakes.txt diff --git a/script/test.sh b/script/test.sh index ba20f6ac..49eb431b 100755 --- a/script/test.sh +++ b/script/test.sh @@ -8,7 +8,7 @@ cd ${ROOT} set -eEu -o pipefail name=${1} -jobtime=${2:-30} +jobtime=${2:-40} echo " Name: ${name}" echo "Jobtime: ${jobtime}" From f24ad655f2ce8e52d6c1300be6864775bfd79287 Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 30 Mar 2023 01:05:41 -0600 Subject: [PATCH 4/5] more time for volumes Signed-off-by: vsoch --- .github/workflows/main.yaml | 4 ++-- examples/tests/snakemake/minicluster.yaml | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8654d061..b1d7bd69 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -71,8 +71,8 @@ jobs: ["timed", "ghcr.io/flux-framework/flux-restful-api:latest", 40], ["debug", "ghcr.io/flux-framework/flux-restful-api:latest", 40], ["flux-resource-list", "ghcr.io/flux-framework/flux-restful-api:latest", 40], - ["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 40], - ["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 40], + ["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 50], + ["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 50], ["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 40]] steps: diff --git a/examples/tests/snakemake/minicluster.yaml b/examples/tests/snakemake/minicluster.yaml index 10aa246c..c916f6f8 100644 --- a/examples/tests/snakemake/minicluster.yaml +++ b/examples/tests/snakemake/minicluster.yaml @@ -21,8 +21,6 @@ spec: data: storageClass: hostpath path: /tmp/data - labels: - type: "local" # This is a list because a pod can support multiple containers containers: @@ -35,11 +33,11 @@ spec: # in the container volumes: data: - path: /workflow + path: /tmp/data # readOnly defaults to false # This is the directory we will bind the data to - workingDir: /workflow + workingDir: /tmp/data command: snakemake --cores 1 --flux --jobs 1 # Give the command directly to flux start, instead of wrapping in flux submit From a3b2203e4611f7739357a69f4922a7baef63720f Mon Sep 17 00:00:00 2001 From: vsoch Date: Thu, 30 Mar 2023 01:23:22 -0600 Subject: [PATCH 5/5] remove cleanup Signed-off-by: vsoch --- .github/workflows/main.yaml | 2 +- examples/tests/existing-volumes/post-run.sh | 13 ------------- examples/tests/volumes/post-run.sh | 4 ---- 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 examples/tests/existing-volumes/post-run.sh delete mode 100644 examples/tests/volumes/post-run.sh diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b1d7bd69..cf04e7f7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -114,4 +114,4 @@ jobs: env: name: ${{ matrix.test[0] }} jobtime: ${{ matrix.test[2] }} - run: /bin/bash ./script/test.sh ${name} ${jobtime} + run: /bin/bash ./script/test.sh ${name} ${jobtime} \ No newline at end of file diff --git a/examples/tests/existing-volumes/post-run.sh b/examples/tests/existing-volumes/post-run.sh deleted file mode 100644 index b40b4161..00000000 --- a/examples/tests/existing-volumes/post-run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -echo "Cleaning up /tmp/data" - -rm -rf /tmp/data/* - -# pods usually need to be deleted before the pvc/pv -kubectl delete -f ${HERE}/minicluster.yaml -kubectl delete -n flux-operator pods --all --grace-period=0 --force -kubectl delete -n flux-operator pvc --all --grace-period=0 --force -kubectl delete -n flux-operator pv --all --grace-period=0 --force \ No newline at end of file diff --git a/examples/tests/volumes/post-run.sh b/examples/tests/volumes/post-run.sh deleted file mode 100644 index 491416fc..00000000 --- a/examples/tests/volumes/post-run.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Cleaning up /tmp/data bound to kind" -rm -rf /tmp/data/* \ No newline at end of file