From b8f5dfcdb2848dfb6b18caa4182d06e813fc7189 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Thu, 7 Sep 2023 05:14:16 +0530 Subject: [PATCH 01/15] Air Gap AlmaLinux VM --- .../grid/vagrant/almalinux_9/arm_64/Vagrantfile | 15 +++++++++++++++ .../grid/vagrant/almalinux_9/x86_64/Vagrantfile | 15 +++++++++++++++ .../fedora_38}/arm_64/Vagrantfile | 0 .../fedora_38}/x86_64/Vagrantfile | 0 4 files changed, 30 insertions(+) create mode 100644 packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile create mode 100644 packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile rename packages/grid/{podman/vagrant => vagrant/fedora_38}/arm_64/Vagrantfile (100%) rename packages/grid/{podman/vagrant => vagrant/fedora_38}/x86_64/Vagrantfile (100%) diff --git a/packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile b/packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile new file mode 100644 index 00000000000..7de57f8127d --- /dev/null +++ b/packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile @@ -0,0 +1,15 @@ +Vagrant.configure("2") do |config| + config.vm.box = "almalinux/9.aarch64" + config.vm.hostname = "almalinux-9" + + config.vm.provider "virtualbox" do |vb| + vb.memory = "4096" + vb.cpus = "2" + end + + config.vm.provider "vmware_desktop" do |vd| + vd.memory = "4096" + vd.cpus = "2" + end + + end \ No newline at end of file diff --git a/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile b/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile new file mode 100644 index 00000000000..fb5550e8cf2 --- /dev/null +++ b/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile @@ -0,0 +1,15 @@ +Vagrant.configure("2") do |config| + config.vm.box = "almalinux/9" + config.vm.hostname = "almalinux-9" + + config.vm.provider "virtualbox" do |vb| + vb.memory = "4096" + vb.cpus = "2" + end + + config.vm.provider "vmware_desktop" do |vd| + vd.memory = "4096" + vd.cpus = "2" + end + + end \ No newline at end of file diff --git a/packages/grid/podman/vagrant/arm_64/Vagrantfile b/packages/grid/vagrant/fedora_38/arm_64/Vagrantfile similarity index 100% rename from packages/grid/podman/vagrant/arm_64/Vagrantfile rename to packages/grid/vagrant/fedora_38/arm_64/Vagrantfile diff --git a/packages/grid/podman/vagrant/x86_64/Vagrantfile b/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile similarity index 100% rename from packages/grid/podman/vagrant/x86_64/Vagrantfile rename to packages/grid/vagrant/fedora_38/x86_64/Vagrantfile From 3a636e7f189989f53c96b0fb794c256d8776cfa8 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Thu, 7 Sep 2023 05:52:11 +0530 Subject: [PATCH 02/15] Integration.k8s tests --- .github/workflows/pr-tests-stack.yml | 2 +- tox.ini | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-tests-stack.yml b/.github/workflows/pr-tests-stack.yml index 2dcc1ec2f0e..7bae860e080 100644 --- a/.github/workflows/pr-tests-stack.yml +++ b/.github/workflows/pr-tests-stack.yml @@ -547,7 +547,7 @@ jobs: curl -sSL https://github.com/loft-sh/devspace/releases/download/${DEVSPACE_VERSION}/devspace-linux-amd64 -o ./devspace chmod +x devspace devspace version - # tox -e stack.test.integration.k8s + tox -e stack.test.integration.k8s tox -e syft.build.helm tox -e syft.package.helm # tox -e syft.test.helm diff --git a/tox.ini b/tox.ini index d0ed8ec06d1..c512ed9aa02 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,8 @@ basepython = python3 install_command = pip install {opts} {packages} commands = python --version - +setenv = + TEST_NOTEBOOK_PATHS = {env:TEST_NOTEBOOK_PATHS:api/0.8,tutorials} # Syft [testenv:syft] deps = @@ -600,6 +601,7 @@ allowlist_externals = setenv = ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:k8s} NODE_PORT = {env:NODE_PORT:9082} + TEST_NOTEBOOK_PATHS = {env:TEST_NOTEBOOK_PATHS:api/0.8,tutorials} commands = k3d version From 55cd37e319dcd24b2437946117b1f0fdd546e8b5 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Sat, 16 Sep 2023 16:57:37 +0530 Subject: [PATCH 03/15] Name update to Integration tests --- .github/workflows/pr-tests-stack.yml | 2 +- tox.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-tests-stack.yml b/.github/workflows/pr-tests-stack.yml index 7bae860e080..c0b5387de7d 100644 --- a/.github/workflows/pr-tests-stack.yml +++ b/.github/workflows/pr-tests-stack.yml @@ -529,7 +529,7 @@ jobs: chmod 700 get_helm.sh ./get_helm.sh - - name: Run integration tests + - name: Run K8s & Helm integration tests if: steps.changes.outputs.stack == 'true' timeout-minutes: 60 env: diff --git a/tox.ini b/tox.ini index c512ed9aa02..faa7a3cac6c 100644 --- a/tox.ini +++ b/tox.ini @@ -583,6 +583,7 @@ disable_error_code = attr-defined, valid-type, no-untyped-call, arg-type [testenv:stack.test.integration.k8s] description = Integration Tests for Core Stack +basepython = python3 deps = {[testenv:syft]deps} {[testenv:hagrid]deps} From 522982367023af559355762391ce319b2d187470 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Sat, 16 Sep 2023 17:33:01 +0530 Subject: [PATCH 04/15] path fix for podman-kube --- packages/grid/vagrant/fedora_38/arm_64/Vagrantfile | 2 +- packages/grid/vagrant/fedora_38/x86_64/Vagrantfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grid/vagrant/fedora_38/arm_64/Vagrantfile b/packages/grid/vagrant/fedora_38/arm_64/Vagrantfile index 1d6c6eaaac9..8d4d9b73445 100644 --- a/packages/grid/vagrant/fedora_38/arm_64/Vagrantfile +++ b/packages/grid/vagrant/fedora_38/arm_64/Vagrantfile @@ -11,7 +11,7 @@ Vagrant.configure("2") do |config| vd.memory = "4096" vd.cpus = "2" end - config.vm.synced_folder "../../podman-kube", "/home/vagrant/podman-kube" ,type: "rsync" + config.vm.synced_folder "../../../podman/podman-kube", "/home/vagrant/podman-kube" ,type: "rsync" config.vm.box_check_update = false config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1" diff --git a/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile b/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile index 382c9938468..32dcebaf91e 100644 --- a/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile +++ b/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile @@ -11,7 +11,7 @@ Vagrant.configure("2") do |config| vd.memory = "4096" vd.cpus = "2" end - config.vm.synced_folder "../../podman-kube", "/home/vagrant/podman-kube" ,type: "rsync" + config.vm.synced_folder "../../../podman/podman-kube", "/home/vagrant/podman-kube" ,type: "rsync" config.vm.box_check_update = false config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1" From 268aae3b1e51290cd07cbb632e1970645f160076 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Sat, 16 Sep 2023 18:06:42 +0530 Subject: [PATCH 05/15] Firewall settings --- .../vagrant/almalinux_9/x86_64/Vagrantfile | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile b/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile index fb5550e8cf2..08229ef8b5d 100644 --- a/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile +++ b/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile @@ -12,4 +12,26 @@ Vagrant.configure("2") do |config| vd.cpus = "2" end + + config.vm.provision "shell", inline: <<-SHELL + #!/bin/bash + echo "Hello from the inline Bash script!" + # Flush existing rules + iptables-save > rules.v4.old + iptables -F + + # Set the default policies to DROP + iptables -P INPUT DROP + iptables -P FORWARD DROP + iptables -P OUTPUT ACCEPT + + # Allow incoming SSH traffic + iptables -A INPUT -p tcp --dport 22 -j ACCEPT + + # Save the rules so they persist across reboots + iptables-save > rules.v4.new + pwd + + SHELL + end \ No newline at end of file From dafff02a788f4850c18adf057bba082da85905f7 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Sun, 17 Sep 2023 19:05:09 +0530 Subject: [PATCH 06/15] bento/fedora-38 name-fix --- packages/grid/vagrant/fedora_38/x86_64/Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile b/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile index 32dcebaf91e..b39b162957c 100644 --- a/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile +++ b/packages/grid/vagrant/fedora_38/x86_64/Vagrantfile @@ -1,6 +1,6 @@ Vagrant.configure("2") do |config| - config.vm.box = "bento/fedora-38-x86_64" - config.vm.hostname = "fedora-38" + config.vm.box = "bento/fedora-38" + config.vm.hostname = "fedora-38-x86_64" config.vm.provider "virtualbox" do |vb| vb.memory = "4096" From aea738012b38104ee14636112501680535f63b08 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Tue, 19 Sep 2023 15:08:10 +0530 Subject: [PATCH 07/15] Adding pytest -s for debug --- .github/workflows/pr-tests-stack.yml | 2 +- k3d_integration.sh | 136 +++++++++++++++++++++++++++ tox.ini | 2 +- 3 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 k3d_integration.sh diff --git a/.github/workflows/pr-tests-stack.yml b/.github/workflows/pr-tests-stack.yml index c0b5387de7d..4e13fe1da20 100644 --- a/.github/workflows/pr-tests-stack.yml +++ b/.github/workflows/pr-tests-stack.yml @@ -547,7 +547,7 @@ jobs: curl -sSL https://github.com/loft-sh/devspace/releases/download/${DEVSPACE_VERSION}/devspace-linux-amd64 -o ./devspace chmod +x devspace devspace version - tox -e stack.test.integration.k8s + tox -e tox -e syft.build.helm tox -e syft.package.helm # tox -e syft.test.helm diff --git a/k3d_integration.sh b/k3d_integration.sh new file mode 100644 index 00000000000..a6ba195257f --- /dev/null +++ b/k3d_integration.sh @@ -0,0 +1,136 @@ +#!/bin/bash +commands = + k3d version + + # "docker rm $(docker ps -aq) --force || true" + # "k3d cluster delete test-gateway-1 || true" + "k3d cluster delete test-domain-1 || true" + # "k3d cluster delete test-domain-2 || true" + "k3d registry delete k3d-registry.localhost || true" + # "docker volume rm k3d-test-gateway-1-images --force || true" + "docker volume rm k3d-test-domain-1-images --force || true" + # "docker volume rm k3d-test-domain-2-images --force || true" + + 'k3d registry create registry.localhost --port 12345 -v `pwd`/k3d-registry:/var/lib/registry || true' + + # 'NODE_NAME=test-gateway-1 NODE_PORT=9081 && \ + # k3d cluster create $NODE_NAME -p "$NODE_PORT:80@loadbalancer" --registry-use k3d-registry.localhost || true \ + # k3d cluster start $NODE_NAME' + + # 'NODE_NAME=test-gateway-1 NODE_PORT=9081 && \ + # cd packages/grid && \ + # devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ + # --var DOMAIN_NAME=$NODE_NAME \ + # --var NETWORK_CHECK_INTERVAL=5 \ + # --var TEST_MODE=1 \ + # --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ + # build -b' + + # 'NODE_NAME=test-gateway-1 NODE_PORT=9081 && \ + # cd packages/grid && \ + # (r=5#while ! \ + # devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ + # --var DOMAIN_NAME=$NODE_NAME \ + # --var NETWORK_CHECK_INTERVAL=5 \ + # --var ASSOCIATION_TIMEOUT=100 \ + # --var TEST_MODE=1 \ + # --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ + # deploy -b -p gateway# \ + # do ((--r))||exit#echo "retrying" && sleep 20#done)' + + 'NODE_NAME=test-domain-1 NODE_PORT=9082 && \ + k3d cluster create $NODE_NAME -p "$NODE_PORT:80@loadbalancer" --registry-use k3d-registry.localhost || true \ + k3d cluster start $NODE_NAME' + + # paramm: error here + NODE_NAME=test-domain-1 NODE_PORT=9082 && \ + cd packages/grid && \ + (r=5#while ! \ + devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ + --var DOMAIN_NAME=$NODE_NAME \ + --var DOMAIN_CHECK_INTERVAL=5 \ + --var ASSOCIATION_TIMEOUT=100 \ + --var TEST_MODE=1 \ + --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ + deploy -b# \ + do ((--r))||exit#echo "retrying" && sleep 20#done) + + # 'NODE_NAME=test-domain-2 NODE_PORT=9083 && \ + # k3d cluster create $NODE_NAME -p "$NODE_PORT:80@loadbalancer" --registry-use k3d-registry.localhost || true \ + # k3d cluster start $NODE_NAME' + + # 'NODE_NAME=test-domain-2 NODE_PORT=9083 && \ + # cd packages/grid && \ + # (r=5#while ! \ + # devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ + # --var DOMAIN_NAME=$NODE_NAME \ + # --var DOMAIN_CHECK_INTERVAL=5 \ + # --var ASSOCIATION_TIMEOUT=100 \ + # --var TEST_MODE=1 \ + # --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ + # deploy -b -p domain# \ + # do ((--r))||exit#echo "retrying" && sleep 20#done)' + + sleep 30 + + # wait for front end + bash packages/grid/scripts/wait_for.sh service frontend --context k3d-test-domain-1 --namespace test-domain-1 + '(kubectl logs service/frontend --context k3d-test-domain-1 --namespace test-domain-1 -f &) | grep -q -E "Network:\s+https?://[a-zA-Z0-9.-]+:[0-9]+/" || true' + + # wait for everything else to be loaded + # bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-gateway-1 --namespace test-gateway-1 + # bash packages/grid/scripts/wait_for.sh service queue --context k3d-test-gateway-1 --namespace test-gateway-1 + # bash packages/grid/scripts/wait_for.sh service redis --context k3d-test-gateway-1 --namespace test-gateway-1 + # bash packages/grid/scripts/wait_for.sh service mongo --context k3d-test-gateway-1 --namespace test-gateway-1 + # bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-gateway-1 --namespace test-gateway-1 + # bash packages/grid/scripts/wait_for.sh service backend-stream --context k3d-test-gateway-1 --namespace test-gateway-1 + # bash packages/grid/scripts/wait_for.sh service headscale --context k3d-test-gateway-1 --namespace test-gateway-1 + + # bash packages/grid/scripts/wait_for.sh service frontend --context k3d-test-domain-1 --namespace test-domain-1 + # bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-1 --namespace test-domain-1 + # bash packages/grid/scripts/wait_for.sh service queue --context k3d-test-domain-1 --namespace test-domain-1 + # bash packages/grid/scripts/wait_for.sh service redis --context k3d-test-domain-1 --namespace test-domain-1 + bash packages/grid/scripts/wait_for.sh service mongo --context k3d-test-domain-1 --namespace test-domain-1 + bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-domain-1 --namespace test-domain-1 + bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-1 --namespace test-domain-1 + # bash packages/grid/scripts/wait_for.sh service backend-stream --context k3d-test-domain-1 --namespace test-domain-1 + # bash packages/grid/scripts/wait_for.sh service seaweedfs --context k3d-test-domain-1 --namespace test-domain-1 + + # bash packages/grid/scripts/wait_for.sh service frontend --context k3d-test-domain-2 --namespace test-domain-2 + # bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-2 --namespace test-domain-2 + # bash packages/grid/scripts/wait_for.sh service queue --context k3d-test-domain-2 --namespace test-domain-2 + # bash packages/grid/scripts/wait_for.sh service redis --context k3d-test-domain-2 --namespace test-domain-2 + # bash packages/grid/scripts/wait_for.sh service db --context k3d-test-domain-2 --namespace test-domain-2 + # bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-domain-2 --namespace test-domain-2 + # bash packages/grid/scripts/wait_for.sh service backend-stream --context k3d-test-domain-2 --namespace test-domain-2 + # bash packages/grid/scripts/wait_for.sh service seaweedfs --context k3d-test-domain-2 --namespace test-domain-2 + + # pytest tests/integration -m frontend -p no:randomly --co + # "CONTAINER_HOST=$CONTAINER_HOST pytest tests/integration -m frontend -vvvv -p no:randomly -p no:benchmark -o log_cli=True --capture=no" + + '(kubectl logs service/backend --context k3d-test-domain-1 --namespace test-domain-1 -f &) | grep -q "Application startup complete" || true' + + # frontend + 'if [[ "$PYTEST_MODULES" == *"frontend"* ]]# then \ + echo "Starting frontend"# date# \ + pytest tests/integration -m frontend -p no:randomly -k "test_serves_domain_frontend" --co# \ + pytest tests/integration -m frontend -vvvv -p no:randomly -p no:benchmark -o log_cli=True --capture=no -k "test_serves_domain_frontend"# \ + return=$?# \ + echo "Finished frontend"# date# \ + exit $return# \ + fi' + + # ignore 06 because of opendp on arm64 + pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 06' + + # "k3d cluster delete test-gateway-1 || true" + "k3d cluster delete test-domain-1 || true" + # "k3d cluster delete test-domain-2 || true" + "k3d registry delete k3d-registry.localhost || true" + "docker rm $(docker ps -aq) --force || true" + # "docker volume rm k3d-test-gateway-1-images --force || true" + "docker volume rm k3d-test-domain-1-images --force || true" + # "docker volume rm k3d-test-domain-2-images --force || true" + + +[testenv:syft.build.helm] diff --git a/tox.ini b/tox.ini index faa7a3cac6c..fe7e2eb6da3 100644 --- a/tox.ini +++ b/tox.ini @@ -724,7 +724,7 @@ commands = fi' ; ignore 06 because of opendp on arm64 - pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 06' + pytest -s --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 06' ; bash -c "k3d cluster delete test-gateway-1 || true" bash -c "k3d cluster delete test-domain-1 || true" From 43c24c887488e16680cc5c370778be2aafb34c91 Mon Sep 17 00:00:00 2001 From: Param-29 Date: Thu, 28 Sep 2023 07:42:44 +0530 Subject: [PATCH 08/15] stack.test.integration.k8s in pr-tests-stack.yml --- .github/workflows/pr-tests-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-tests-stack.yml b/.github/workflows/pr-tests-stack.yml index 3f62146f7c3..47571ce5dfa 100644 --- a/.github/workflows/pr-tests-stack.yml +++ b/.github/workflows/pr-tests-stack.yml @@ -549,7 +549,7 @@ jobs: curl -sSL https://github.com/loft-sh/devspace/releases/download/${DEVSPACE_VERSION}/devspace-linux-amd64 -o ./devspace chmod +x devspace devspace version - tox -e + tox -e stack.test.integration.k8s tox -e syft.build.helm tox -e syft.package.helm # tox -e syft.test.helm From 35a983135f5cf46f9a9a3702f0dab45f38397f4f Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:59:48 +0530 Subject: [PATCH 09/15] added example domain name --- packages/grid/helm/syft/values.yaml | 2 +- packages/grid/k8s/manifests/ingress.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index 8389c09d4e0..9640645f013 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -22,7 +22,7 @@ db: node: settings: - hostname: "" + hostname: "example.com" nodeName: "mynode" nodeType: "domain" versionHash: "abc" diff --git a/packages/grid/k8s/manifests/ingress.yaml b/packages/grid/k8s/manifests/ingress.yaml index 6dfc106550f..dc2f36f2aa3 100644 --- a/packages/grid/k8s/manifests/ingress.yaml +++ b/packages/grid/k8s/manifests/ingress.yaml @@ -12,10 +12,10 @@ spec: number: 80 tls: - hosts: - - "" + - "example.com" # secretName: Add custom TLS secret here or default certificate is used rules: - - host: "" + - host: "example.com" http: paths: - backend: From 7954dd1e8380c7d17f41412cc8c003e524cd08fe Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:17:28 +0530 Subject: [PATCH 10/15] changed to localhost --- packages/grid/helm/syft/values.yaml | 2 +- packages/grid/k8s/manifests/ingress.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index 9640645f013..ae9ee621c0d 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -22,7 +22,7 @@ db: node: settings: - hostname: "example.com" + hostname: "localhost" nodeName: "mynode" nodeType: "domain" versionHash: "abc" diff --git a/packages/grid/k8s/manifests/ingress.yaml b/packages/grid/k8s/manifests/ingress.yaml index dc2f36f2aa3..9826a206200 100644 --- a/packages/grid/k8s/manifests/ingress.yaml +++ b/packages/grid/k8s/manifests/ingress.yaml @@ -12,10 +12,10 @@ spec: number: 80 tls: - hosts: - - "example.com" + - "localhost" # secretName: Add custom TLS secret here or default certificate is used rules: - - host: "example.com" + - host: "localhost" http: paths: - backend: From 7c68143e04302aa8e4349394b350bfad00ebf4bc Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Tue, 3 Oct 2023 15:59:24 +0530 Subject: [PATCH 11/15] [ci] enable scheduled deployment & registry cleanup --- .github/workflows/cd-syft-dev.yml | 39 ++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-syft-dev.yml b/.github/workflows/cd-syft-dev.yml index 65fc02e9093..9160f0892ee 100644 --- a/.github/workflows/cd-syft-dev.yml +++ b/.github/workflows/cd-syft-dev.yml @@ -1,9 +1,8 @@ name: CD - Syft - Deploy `dev` to K8s on: - # TODO: Re-enable once merged & tested - # schedule: - # - cron: "0 */3 * * *" + schedule: + - cron: "0 */3 * * *" workflow_dispatch: inputs: @@ -15,6 +14,19 @@ jobs: deploy-syft-dev: runs-on: om-ci-16vcpu-ubuntu2204 steps: + - name: Check for new changes + id: cache + if: github.event_name == 'schedule' + uses: actions/cache@v3 + with: + path: scripts/commit_hash # we don't care about the file, just the key + key: dev-commit-${{ github.sha }} + lookup-only: true + + - name: Quit if no new changes + if: github.event_name == 'schedule' && steps.cache.outputs.cache-hit == 'true' + run: exit 0 + - name: Permission to home directory run: | sudo chown -R $USER:$USER $HOME @@ -150,3 +162,24 @@ jobs: add: "." push: "origin main" cwd: "./infrastructure/" + + - name: Cleanup Azure Container Registry + uses: azure/CLI@v1 + with: + # SKIP_LINES = latest version dev & dev- (2 lines) + keep "n" previous version (n lines) + 1 + inlineScript: | + ACR_REGISTRY_NAME=${{ secrets.ACR_REGISTRY_NAME }} + REPO_LIST=$(az acr repository list -n $ACR_REGISTRY_NAME -o tsv) + + KEEP_PREV_VERSIONS=1 + TAIL_FROM_LINE=$((2 + $KEEP_PREV_VERSIONS + 1)) + + for repo in $REPO_LIST + do + echo "Cleaning up '$repo'" + az acr repository show-tags --name $ACR_REGISTRY_NAME --repository $repo --orderby time_desc --output tsv | tail -n +$TAIL_FROM_LINE | xargs -r -I% az acr repository delete --name $ACR_REGISTRY_NAME --image $repo:% --yes + done + + - name: Save Commit SHA + # only for cache to hit + run: echo "${{ github.sha }}" > scripts/commit_hash From 2b337b9b591b5bf48e8dff22042b03cd370f53b0 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:00:24 +0530 Subject: [PATCH 12/15] updated ingress yaml --- packages/grid/helm/helm.py | 8 +++----- packages/grid/helm/syft/values.yaml | 2 +- packages/grid/k8s/manifests/ingress.yaml | 7 +------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/grid/helm/helm.py b/packages/grid/helm/helm.py index 52ac37f377d..1b4d4395118 100644 --- a/packages/grid/helm/helm.py +++ b/packages/grid/helm/helm.py @@ -64,11 +64,9 @@ def replace_variables(d: Any) -> None: if "kubernetes.io/ingress.class" in d: d["kubernetes.io/ingress.class"] = "{{ .Values.ingress.ingressClass }}" - if "host" in d: - d["host"] = "{{ .Values.node.settings.hostname }}" - - if "hosts" in d: - d["hosts"] = ["{{ .Values.node.settings.hostname }}"] + if "kind" in d and d["kind"] == "Ingress" and "spec" in d: + d["spec"]["tls"] = [{"hosts": ["{{ .Values.node.settings.hostname }}"]}] + d["spec"]["rules"][0]["host"] = "{{ .Values.node.settings.hostname }}" # parse whole tree diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index ae9ee621c0d..8389c09d4e0 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -22,7 +22,7 @@ db: node: settings: - hostname: "localhost" + hostname: "" nodeName: "mynode" nodeType: "domain" versionHash: "abc" diff --git a/packages/grid/k8s/manifests/ingress.yaml b/packages/grid/k8s/manifests/ingress.yaml index 9826a206200..072e54dedb0 100644 --- a/packages/grid/k8s/manifests/ingress.yaml +++ b/packages/grid/k8s/manifests/ingress.yaml @@ -10,13 +10,8 @@ spec: name: proxy port: number: 80 - tls: - - hosts: - - "localhost" - # secretName: Add custom TLS secret here or default certificate is used rules: - - host: "localhost" - http: + - http: paths: - backend: service: From c908c10b4646f9242da9ca821a950a116df306ca Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 4 Oct 2023 11:14:44 +0530 Subject: [PATCH 13/15] cleanup before merge: --- k3d_integration.sh | 136 --------------------------------------------- tox.ini | 6 +- 2 files changed, 2 insertions(+), 140 deletions(-) delete mode 100644 k3d_integration.sh diff --git a/k3d_integration.sh b/k3d_integration.sh deleted file mode 100644 index a6ba195257f..00000000000 --- a/k3d_integration.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash -commands = - k3d version - - # "docker rm $(docker ps -aq) --force || true" - # "k3d cluster delete test-gateway-1 || true" - "k3d cluster delete test-domain-1 || true" - # "k3d cluster delete test-domain-2 || true" - "k3d registry delete k3d-registry.localhost || true" - # "docker volume rm k3d-test-gateway-1-images --force || true" - "docker volume rm k3d-test-domain-1-images --force || true" - # "docker volume rm k3d-test-domain-2-images --force || true" - - 'k3d registry create registry.localhost --port 12345 -v `pwd`/k3d-registry:/var/lib/registry || true' - - # 'NODE_NAME=test-gateway-1 NODE_PORT=9081 && \ - # k3d cluster create $NODE_NAME -p "$NODE_PORT:80@loadbalancer" --registry-use k3d-registry.localhost || true \ - # k3d cluster start $NODE_NAME' - - # 'NODE_NAME=test-gateway-1 NODE_PORT=9081 && \ - # cd packages/grid && \ - # devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ - # --var DOMAIN_NAME=$NODE_NAME \ - # --var NETWORK_CHECK_INTERVAL=5 \ - # --var TEST_MODE=1 \ - # --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ - # build -b' - - # 'NODE_NAME=test-gateway-1 NODE_PORT=9081 && \ - # cd packages/grid && \ - # (r=5#while ! \ - # devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ - # --var DOMAIN_NAME=$NODE_NAME \ - # --var NETWORK_CHECK_INTERVAL=5 \ - # --var ASSOCIATION_TIMEOUT=100 \ - # --var TEST_MODE=1 \ - # --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ - # deploy -b -p gateway# \ - # do ((--r))||exit#echo "retrying" && sleep 20#done)' - - 'NODE_NAME=test-domain-1 NODE_PORT=9082 && \ - k3d cluster create $NODE_NAME -p "$NODE_PORT:80@loadbalancer" --registry-use k3d-registry.localhost || true \ - k3d cluster start $NODE_NAME' - - # paramm: error here - NODE_NAME=test-domain-1 NODE_PORT=9082 && \ - cd packages/grid && \ - (r=5#while ! \ - devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ - --var DOMAIN_NAME=$NODE_NAME \ - --var DOMAIN_CHECK_INTERVAL=5 \ - --var ASSOCIATION_TIMEOUT=100 \ - --var TEST_MODE=1 \ - --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ - deploy -b# \ - do ((--r))||exit#echo "retrying" && sleep 20#done) - - # 'NODE_NAME=test-domain-2 NODE_PORT=9083 && \ - # k3d cluster create $NODE_NAME -p "$NODE_PORT:80@loadbalancer" --registry-use k3d-registry.localhost || true \ - # k3d cluster start $NODE_NAME' - - # 'NODE_NAME=test-domain-2 NODE_PORT=9083 && \ - # cd packages/grid && \ - # (r=5#while ! \ - # devspace --no-warn --kube-context "k3d-$NODE_NAME" --namespace $NODE_NAME \ - # --var DOMAIN_NAME=$NODE_NAME \ - # --var DOMAIN_CHECK_INTERVAL=5 \ - # --var ASSOCIATION_TIMEOUT=100 \ - # --var TEST_MODE=1 \ - # --var CONTAINER_REGISTRY=k3d-registry.localhost:12345/ \ - # deploy -b -p domain# \ - # do ((--r))||exit#echo "retrying" && sleep 20#done)' - - sleep 30 - - # wait for front end - bash packages/grid/scripts/wait_for.sh service frontend --context k3d-test-domain-1 --namespace test-domain-1 - '(kubectl logs service/frontend --context k3d-test-domain-1 --namespace test-domain-1 -f &) | grep -q -E "Network:\s+https?://[a-zA-Z0-9.-]+:[0-9]+/" || true' - - # wait for everything else to be loaded - # bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-gateway-1 --namespace test-gateway-1 - # bash packages/grid/scripts/wait_for.sh service queue --context k3d-test-gateway-1 --namespace test-gateway-1 - # bash packages/grid/scripts/wait_for.sh service redis --context k3d-test-gateway-1 --namespace test-gateway-1 - # bash packages/grid/scripts/wait_for.sh service mongo --context k3d-test-gateway-1 --namespace test-gateway-1 - # bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-gateway-1 --namespace test-gateway-1 - # bash packages/grid/scripts/wait_for.sh service backend-stream --context k3d-test-gateway-1 --namespace test-gateway-1 - # bash packages/grid/scripts/wait_for.sh service headscale --context k3d-test-gateway-1 --namespace test-gateway-1 - - # bash packages/grid/scripts/wait_for.sh service frontend --context k3d-test-domain-1 --namespace test-domain-1 - # bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-1 --namespace test-domain-1 - # bash packages/grid/scripts/wait_for.sh service queue --context k3d-test-domain-1 --namespace test-domain-1 - # bash packages/grid/scripts/wait_for.sh service redis --context k3d-test-domain-1 --namespace test-domain-1 - bash packages/grid/scripts/wait_for.sh service mongo --context k3d-test-domain-1 --namespace test-domain-1 - bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-domain-1 --namespace test-domain-1 - bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-1 --namespace test-domain-1 - # bash packages/grid/scripts/wait_for.sh service backend-stream --context k3d-test-domain-1 --namespace test-domain-1 - # bash packages/grid/scripts/wait_for.sh service seaweedfs --context k3d-test-domain-1 --namespace test-domain-1 - - # bash packages/grid/scripts/wait_for.sh service frontend --context k3d-test-domain-2 --namespace test-domain-2 - # bash packages/grid/scripts/wait_for.sh service proxy --context k3d-test-domain-2 --namespace test-domain-2 - # bash packages/grid/scripts/wait_for.sh service queue --context k3d-test-domain-2 --namespace test-domain-2 - # bash packages/grid/scripts/wait_for.sh service redis --context k3d-test-domain-2 --namespace test-domain-2 - # bash packages/grid/scripts/wait_for.sh service db --context k3d-test-domain-2 --namespace test-domain-2 - # bash packages/grid/scripts/wait_for.sh service backend --context k3d-test-domain-2 --namespace test-domain-2 - # bash packages/grid/scripts/wait_for.sh service backend-stream --context k3d-test-domain-2 --namespace test-domain-2 - # bash packages/grid/scripts/wait_for.sh service seaweedfs --context k3d-test-domain-2 --namespace test-domain-2 - - # pytest tests/integration -m frontend -p no:randomly --co - # "CONTAINER_HOST=$CONTAINER_HOST pytest tests/integration -m frontend -vvvv -p no:randomly -p no:benchmark -o log_cli=True --capture=no" - - '(kubectl logs service/backend --context k3d-test-domain-1 --namespace test-domain-1 -f &) | grep -q "Application startup complete" || true' - - # frontend - 'if [[ "$PYTEST_MODULES" == *"frontend"* ]]# then \ - echo "Starting frontend"# date# \ - pytest tests/integration -m frontend -p no:randomly -k "test_serves_domain_frontend" --co# \ - pytest tests/integration -m frontend -vvvv -p no:randomly -p no:benchmark -o log_cli=True --capture=no -k "test_serves_domain_frontend"# \ - return=$?# \ - echo "Finished frontend"# date# \ - exit $return# \ - fi' - - # ignore 06 because of opendp on arm64 - pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 06' - - # "k3d cluster delete test-gateway-1 || true" - "k3d cluster delete test-domain-1 || true" - # "k3d cluster delete test-domain-2 || true" - "k3d registry delete k3d-registry.localhost || true" - "docker rm $(docker ps -aq) --force || true" - # "docker volume rm k3d-test-gateway-1-images --force || true" - "docker volume rm k3d-test-domain-1-images --force || true" - # "docker volume rm k3d-test-domain-2-images --force || true" - - -[testenv:syft.build.helm] diff --git a/tox.ini b/tox.ini index 8fd527df6ca..c69a4431a01 100644 --- a/tox.ini +++ b/tox.ini @@ -30,8 +30,7 @@ basepython = python3 install_command = pip install {opts} {packages} commands = python --version -setenv = - TEST_NOTEBOOK_PATHS = {env:TEST_NOTEBOOK_PATHS:api/0.8,tutorials} + # Syft [testenv:syft] deps = @@ -604,7 +603,6 @@ allowlist_externals = setenv = ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:k8s} NODE_PORT = {env:NODE_PORT:9082} - TEST_NOTEBOOK_PATHS = {env:TEST_NOTEBOOK_PATHS:api/0.8,tutorials} commands = k3d version @@ -726,7 +724,7 @@ commands = fi' ; ignore 06 because of opendp on arm64 - pytest -s --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 06' + pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 06' ; bash -c "k3d cluster delete test-gateway-1 || true" bash -c "k3d cluster delete test-domain-1 || true" From 91397dee6c913eb9ce4876ad123d037b5fc45fa1 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 4 Oct 2023 12:17:29 +0530 Subject: [PATCH 14/15] commit arm changes --- .../vagrant/almalinux_9/arm_64/Vagrantfile | 23 +++++++++++++++++++ .../vagrant/almalinux_9/x86_64/Vagrantfile | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile b/packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile index 7de57f8127d..617003eb4f2 100644 --- a/packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile +++ b/packages/grid/vagrant/almalinux_9/arm_64/Vagrantfile @@ -12,4 +12,27 @@ Vagrant.configure("2") do |config| vd.cpus = "2" end + config.vm.box_check_update = false + + config.vm.provision "shell", inline: <<-SHELL + #!/bin/bash + echo "Hello from the inline Bash script!" + # Flush existing rules + iptables-save > rules.v4.old + iptables -F + + # Set the default policies to DROP + iptables -P INPUT DROP + iptables -P FORWARD DROP + iptables -P OUTPUT ACCEPT + + # Allow incoming SSH traffic + iptables -A INPUT -p tcp --dport 22 -j ACCEPT + + # Save the rules so they persist across reboots + iptables-save > rules.v4.new + pwd + + SHELL + end \ No newline at end of file diff --git a/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile b/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile index 08229ef8b5d..20fe9b8d652 100644 --- a/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile +++ b/packages/grid/vagrant/almalinux_9/x86_64/Vagrantfile @@ -11,7 +11,7 @@ Vagrant.configure("2") do |config| vd.memory = "4096" vd.cpus = "2" end - + config.vm.box_check_update = false config.vm.provision "shell", inline: <<-SHELL #!/bin/bash From e1497b1dfcd030ef44536f0113f9171a5d88d9eb Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Wed, 4 Oct 2023 14:03:23 +0530 Subject: [PATCH 15/15] [ci] handle devspace & helm.py errors gracefully --- .github/workflows/cd-syft-dev.yml | 19 ++++++++++++------- .gitignore | 3 +++ packages/grid/helm/helm.py | 13 ++++++++++--- packages/grid/helm/manifests.yaml | 14 +++++--------- tox.ini | 7 +++++-- 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cd-syft-dev.yml b/.github/workflows/cd-syft-dev.yml index 9160f0892ee..7493ffe23ad 100644 --- a/.github/workflows/cd-syft-dev.yml +++ b/.github/workflows/cd-syft-dev.yml @@ -51,7 +51,12 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 - - name: Login to Azure container registry + - name: Login to Azure CLI + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS_GITHUB_CI }}} + + - name: Login to Azure Container Registry uses: azure/docker-login@v1 with: login-server: ${{ secrets.ACR_SERVER }} @@ -63,7 +68,7 @@ jobs: shell: bash run: echo "GRID_VERSION=$(python packages/grid/VERSION)" >> $GITHUB_OUTPUT - - name: Build and push `grid-backend` image to DockerHub + - name: Build and push `grid-backend` image to registry uses: docker/build-push-action@v4 with: context: ./packages @@ -74,7 +79,7 @@ jobs: ${{ secrets.ACR_SERVER }}/openmined/grid-backend:dev ${{ secrets.ACR_SERVER }}/openmined/grid-backend:dev-${{ github.sha }} - - name: Build and push `grid-frontend` image to DockerHub + - name: Build and push `grid-frontend` image to registry uses: docker/build-push-action@v4 with: context: ./packages/grid/frontend @@ -86,7 +91,7 @@ jobs: target: grid-ui-development # TODO: Re-enable once we have Enclave up and running - # - name: Build and push `grid-enclave` image to DockerHub + # - name: Build and push `grid-enclave` image to registry # uses: docker/build-push-action@v4 # with: # context: ./packages @@ -97,7 +102,7 @@ jobs: # ${{ secrets.ACR_SERVER }}/openmined/grid-enclave:dev # ${{ secrets.ACR_SERVER }}/openmined/grid-enclave:dev-${{ github.sha }} - - name: Build and push `grid-headscale` image to DockerHub + - name: Build and push `grid-headscale` image to registry uses: docker/build-push-action@v4 with: context: ./packages/grid/vpn @@ -107,7 +112,7 @@ jobs: ${{ secrets.ACR_SERVER }}/openmined/grid-headscale:dev ${{ secrets.ACR_SERVER }}/openmined/grid-headscale:dev-${{ github.sha }} - - name: Build and push `grid-tailscale` image to DockerHub + - name: Build and push `grid-tailscale` image to registry uses: docker/build-push-action@v4 with: context: ./packages/grid/vpn @@ -117,7 +122,7 @@ jobs: ${{ secrets.ACR_SERVER }}/openmined/grid-tailscale:dev ${{ secrets.ACR_SERVER }}/openmined/grid-tailscale:dev-${{ github.sha }} - - name: Build and push `grid-vpn-iptables` image to DockerHub + - name: Build and push `grid-vpn-iptables` image to registry uses: docker/build-push-action@v2 with: context: ./packages/grid/vpn diff --git a/.gitignore b/.gitignore index 7e3663fc0b6..d1d111048d6 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,6 @@ js/node_modules/* #nohup nohup.out + +# tox syft.build.helm generated file +out.txt diff --git a/packages/grid/helm/helm.py b/packages/grid/helm/helm.py index 1b4d4395118..1b8eed22949 100644 --- a/packages/grid/helm/helm.py +++ b/packages/grid/helm/helm.py @@ -98,8 +98,8 @@ def main() -> None: ) args = parser.parse_args() helm_dir = "helm" - text = args.file.read() + file_count = 0 # input_file = f"{helm_dir}/raw_manifests.yaml" # with open(input_file, "w") as f: @@ -115,12 +115,12 @@ def main() -> None: ) input_data = "---\n" + "\n".join(lines[first_index - 1 :]) except StopIteration: - print("helm.py error: No line starting with 'apiVersion' found in the input.") + print("❌ Error: No line starting with 'apiVersion' found in the input.") print("------------------------------") print("Got input text:") print(text) print("------------------------------") - return + exit(1) helm_chart_template_dir = f"{helm_dir}/syft/templates" @@ -166,6 +166,13 @@ def main() -> None: with open(new_file, "w") as f: f.write(yaml_dump) # add document separator + file_count += 1 + + if file_count > 0: + print(f"✅ Done: Generated {file_count} template files") + else: + print("❌ Failed: Generated zero files. Check input file for errors.") + exit(1) if __name__ == "__main__": diff --git a/packages/grid/helm/manifests.yaml b/packages/grid/helm/manifests.yaml index f4ced279e18..e65ae44e901 100644 --- a/packages/grid/helm/manifests.yaml +++ b/packages/grid/helm/manifests.yaml @@ -1,21 +1,21 @@ --- # Source: component-chart/templates/deployment.yaml # Create headless service for StatefulSet +--- + --- # Source: component-chart/templates/ingress.yaml # --- - +# Source: component-chart/templates/deployment.yaml +# Create headless service for StatefulSet --- # Source: component-chart/templates/ingress.yaml # ---- -# Source: component-chart/templates/deployment.yaml -# Create headless service for StatefulSet --- --- @@ -337,8 +337,7 @@ spec: port: number: 80 rules: - - host: "" - http: + - http: paths: - backend: service: @@ -347,9 +346,6 @@ spec: number: 80 path: / pathType: Prefix - tls: - - hosts: - - "" --- # Source: component-chart/templates/service.yaml diff --git a/tox.ini b/tox.ini index c69a4431a01..66531bccc70 100644 --- a/tox.ini +++ b/tox.ini @@ -763,12 +763,15 @@ commands = bash -c 'k3d cluster create build || true && \ k3d cluster start build' - bash -c 'rm packages/grid/helm/syft/templates/* || true' + bash -c 'rm -rf packages/grid/helm/syft/templates/ && mkdir -p packages/grid/helm/syft/templates/' bash -c 'cd packages/grid && \ [[ -n "$CONTAINER_REGISTRY" ]] && REGISTRY_FLAG="--var CONTAINER_REGISTRY=$CONTAINER_REGISTRY" || REGISTRY_FLAG="" && \ [[ -n "$VERSION" ]] && VERSION_FLAG="--var VERSION=$VERSION" || VERSION_FLAG="" && \ - devspace deploy --render --skip-build --build-sequential --no-warn --silent ${REGISTRY_FLAG} ${VERSION_FLAG} --kube-context "k3d-build" 2>/dev/null | python3 helm/helm.py' + devspace deploy --render --skip-build --no-warn --silent ${REGISTRY_FLAG} ${VERSION_FLAG} --kube-context "k3d-build" > out.txt' + + bash -c 'cd packages/grid && \ + python3 helm/helm.py out.txt' bash -c 'cd packages/grid/helm && \ helm lint syft'