From 7f58052c0cdd89938ad6a21c4a1e3c0436553856 Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Mon, 6 Jan 2025 09:22:46 +1100 Subject: [PATCH] chore: remove api-data-watcher-pusher replace with seed --- .gitignore | 1 + Jenkinsfile | 2 +- Makefile | 94 +- docker-bake.hcl | 12 - docker-compose.local-dev.yaml | 3 - docker-compose.yaml | 6 - .../developing-lagoon.md | 3 +- local-dev/api-data-watcher-pusher/Dockerfile | 24 - .../01-populate-api-data-lagoon-demo.gql | 848 ------------------ .../02-populate-api-data-lagoon-demo-org.gql | 246 ----- ...populate-api-data-ci-local-control-k8s.gql | 131 --- .../api-data-watcher-pusher/create_jwt.py | 11 - .../api-data-watcher-pusher/data-init-push.sh | 73 -- .../00-populate-kubernetes.gql | 115 ++- .../configure-webauthn.sh | 0 ...c-86358316-a755-11ed-8206-032901f4c7e3.txt | 0 ...i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt | 0 ...6-85e36e3c-a755-11ed-abf6-df28d8a74109.txt | 0 ...3-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt | 0 ...4-50573da4-f0dd-477a-9261-c4785ac2adff.txt | 0 ...5-e3869563-126d-4922-b6c4-36289a374edb.txt | 0 ...6-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt | 0 .../restores/lagoon-demo-main.tar.gz | Bin .../task-files/sample-task-file.txt | 0 .../seed-example-sso.sh | 0 .../seed-users.sh | 0 26 files changed, 182 insertions(+), 1387 deletions(-) delete mode 100644 local-dev/api-data-watcher-pusher/Dockerfile delete mode 100644 local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-lagoon-demo.gql delete mode 100644 local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-lagoon-demo-org.gql delete mode 100644 local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-ci-local-control-k8s.gql delete mode 100755 local-dev/api-data-watcher-pusher/create_jwt.py delete mode 100755 local-dev/api-data-watcher-pusher/data-init-push.sh rename local-dev/{k3d-seed-data => seed-data}/00-populate-kubernetes.gql (88%) rename local-dev/{k3d-seed-data => seed-data}/configure-webauthn.sh (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/restores/lagoon-demo-main.tar.gz (100%) rename local-dev/{api-data-watcher-pusher => seed-data}/minio-data/task-files/sample-task-file.txt (100%) rename local-dev/{k3d-seed-data => seed-data}/seed-example-sso.sh (100%) rename local-dev/{k3d-seed-data => seed-data}/seed-users.sh (100%) diff --git a/.gitignore b/.gitignore index fd27fe1a76..232f749f2e 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ local-dev/kind local-dev/kubectl local-dev/jq local-dev/stern +local-dev/mcli **/v8-* node_modules/ build/* diff --git a/Jenkinsfile b/Jenkinsfile index 17a636f509..d787ab1654 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -90,7 +90,7 @@ pipeline { steps { sh script: "make local-dev-tools", label: "Configure k3d" sh script: "./local-dev/k3d cluster delete --all", label: "Delete any remnant clusters" - sh script: "make k3d/test TESTS=[nginx] BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Setup cluster and run nginx smoketest" + sh script: "make k3d/test TESTS=[nginx] BRANCH_NAME=${SAFEBRANCH_NAME}", label: "run nginx smoketest" sh script: "pkill -f './local-dev/stern'", label: "Closing off test-suite-0 log after test completion" // script { // skipRemainingStages = true diff --git a/Makefile b/Makefile index 5e0e1894b7..77332635eb 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ HELM = $(realpath ./local-dev/helm) KUBECTL = $(realpath ./local-dev/kubectl) JQ = $(realpath ./local-dev/jq) K3D = $(realpath ./local-dev/k3d) +MCLI = $(realpath ./local-dev/mcli) ####### ####### Functions @@ -209,12 +210,10 @@ build/ssh: services/ssh/Dockerfile service-images += ssh build/local-git: local-dev/git/Dockerfile -build/local-api-data-watcher-pusher: local-dev/api-data-watcher-pusher/Dockerfile build/workflows: services/workflows/Dockerfile # Images for local helpers that exist in another folder than the service images -localdevimages := local-git \ - local-api-data-watcher-pusher +localdevimages := local-git service-images += $(localdevimages) build-localdevimages = $(foreach image,$(localdevimages),build/$(image)) @@ -262,27 +261,45 @@ build-ui-logs-development: wait-for-keycloak: @$(info Waiting for Keycloak to be ready....) @grep -m 1 "Config of Keycloak done." <(docker compose -p $(CI_BUILD_TAG) --compatibility logs -f keycloak 2>&1) - @docker compose -p $(CI_BUILD_TAG) cp ./local-dev/k3d-seed-data/seed-users.sh keycloak:/tmp/seed-users.sh \ - && docker compose -p $(CI_BUILD_TAG) exec -it keycloak bash '/tmp/seed-users.sh' \ - && echo "You will be able to log in with these seed user email addresses and the passwords will be the same as the email address" \ - && echo "eg. maintainer@example.com has the password maintainer@example.com" \ - && echo "" \ - && echo "If you want to create an example SSO identity provider and example user, run make compose/example-sso" \ - && echo "If you want to configure simple webauthn browswer flow, run make compose/configure-webauthn" \ - && echo "" + @export LAGOON_LEGACY_ADMIN=$$(docker run \ + -e JWTSECRET="super-secret-string" \ + -e JWTAUDIENCE=api.dev \ + -e JWTUSER=localadmin \ + uselagoon/tests \ + python3 /ansible/tasks/api/admin_token.py) && \ + echo "Loading API seed data" && \ + export SSH_PORTAL_HOST="lagoon-remote-ssh-portal.lagoon.svc" && \ + export SSH_PORTAL_PORT="2222" && \ + export CONSOLE_URL="https://172.17.0.1:16643/" && \ + export KUBERNETES_TOKEN="eyJhbGciOiJSUzI1NiIsImtpZCI6IjZWamZLTzEzZ2lPSGFtc0d6QXVkWXpDYi1fcmlfLWVBd3JtbEEydGItTHcifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJsYWdvb24iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlY3JldC5uYW1lIjoia3ViZXJuZXRlc2J1aWxkZGVwbG95LXRva2VuLXJxNDg1Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmVybmV0ZXNidWlsZGRlcGxveSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjA3YzViODAxLTI5ZDgtNDU5Ni1hODBlLTZlMmU3MmY3YmMwMCIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpsYWdvb246a3ViZXJuZXRlc2J1aWxkZGVwbG95In0.srj-zZguNXCQbeTIS5GtJw7Jl61k_miC8hXED70NQULm6OAMkImHrURRCfD4kjKPy-jbwEI88m5TNLFP8_0sMfdwj2vr2Gv8fTC55qoAJ589ff_dwv8THSKdKNj6VaHynzEzQ4IfZscd3ogP4HYF9alt-X4mMcJ2BApBt4F13Hg-bE2-4uzO0b_u13pJhzn0XrH8JGXWP0_oMPtE7M0zJL9BfOrBph_MgSb2djSbVBNbhPJ0fs9-eIB5aAu0NmqPhpxj6WL4UOAKX178IsDAq4vtRZrScZwvZxRcaDUxZ-MgwewWI8Ll0yg7UCxtZTdkLglkCgpjTK33Ei0PXWdE4A" && \ + export ROUTER_PATTERN="\$${project}.\$${environment}.172.17.0.1" && \ + export SEED_DATA=$$(envsubst < ./local-dev/seed-data/00-populate-kubernetes.gql | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $$0} else {printf "\\n"$$0}}') && \ + export SEED_DATA_JSON="{\"query\": \"$$SEED_DATA\"}" && \ + wget --quiet --header "Content-Type: application/json" --header "Authorization: bearer $${LAGOON_LEGACY_ADMIN}" "http://172.17.0.1:3000/graphql" --post-data "$$SEED_DATA_JSON" --content-on-error -O - && \ + $(MCLI) config host add local-minio http://172.17.0.1:9000 minio minio123 && \ + $(MCLI) cp --recursive local-dev/seed-data/minio-data/lagoon-files/ local-minio/lagoon-files && \ + $(MCLI) cp --recursive local-dev/seed-data/minio-data/restores/ local-minio/restores && \ + docker compose -p $(CI_BUILD_TAG) cp ./local-dev/seed-data/seed-users.sh keycloak:/tmp/seed-users.sh && \ + docker compose -p $(CI_BUILD_TAG) exec -it keycloak bash '/tmp/seed-users.sh' && \ + echo "You will be able to log in with these seed user email addresses and the passwords will be the same as the email address" && \ + echo "eg. maintainer@example.com has the password maintainer@example.com" && \ + echo "" && \ + echo "If you want to create an example SSO identity provider and example user, run make compose/example-sso" && \ + echo "If you want to configure simple webauthn browswer flow, run make compose/configure-webauthn" && \ + echo "" .PHONY: compose/example-sso compose/example-sso: - @docker compose -p $(CI_BUILD_TAG) cp ./local-dev/k3d-seed-data/seed-example-sso.sh keycloak:/tmp/seed-example-sso.sh \ + @docker compose -p $(CI_BUILD_TAG) cp ./local-dev/seed-data/seed-example-sso.sh keycloak:/tmp/seed-example-sso.sh \ && docker compose -p $(CI_BUILD_TAG) exec -it keycloak bash '/tmp/seed-example-sso.sh' .PHONY: compose/configure-webauthn compose/configure-webauthn: - @docker compose -p $(CI_BUILD_TAG) cp ./local-dev/k3d-seed-data/configure-webauthn.sh keycloak:/tmp/configure-webauthn.sh \ + @docker compose -p $(CI_BUILD_TAG) cp ./local-dev/seed-data/configure-webauthn.sh keycloak:/tmp/configure-webauthn.sh \ && docker compose -p $(CI_BUILD_TAG) exec -it keycloak bash '/tmp/configure-webauthn.sh' # Define a list of which Lagoon Services are needed for running any deployment testing -main-test-services = actions-handler broker api-sidecar-handler logs2notifications api api-db api-redis api-sidecar-handler keycloak keycloak-db ssh auth-server local-git local-api-data-watcher-pusher local-minio +main-test-services = actions-handler broker api-sidecar-handler logs2notifications api api-db api-redis api-sidecar-handler keycloak keycloak-db ssh auth-server local-git local-minio # List of Lagoon Services needed for webhook endpoint testing webhooks-test-services = webhook-handler webhooks2tasks backup-handler @@ -380,12 +397,12 @@ local-dev-yarn-stop: .PHONY: ui-development ui-development: build-ui-logs-development - IMAGE_REPO=$(CI_BUILD_TAG) docker compose -p $(CI_BUILD_TAG) -f docker-compose.yaml -f docker-compose.local-dev.yaml --compatibility up -d api api-db api-sidecar-handler local-api-data-watcher-pusher ui keycloak keycloak-db broker api-redis + IMAGE_REPO=$(CI_BUILD_TAG) docker compose -p $(CI_BUILD_TAG) -f docker-compose.yaml -f docker-compose.local-dev.yaml --compatibility up -d api api-db api-sidecar-handler ui keycloak keycloak-db broker api-redis $(MAKE) wait-for-keycloak .PHONY: api-development api-development: build-ui-logs-development - IMAGE_REPO=$(CI_BUILD_TAG) docker compose -p $(CI_BUILD_TAG) -f docker-compose.yaml -f docker-compose.local-dev.yaml --compatibility up -d api api-db api-sidecar-handler local-api-data-watcher-pusher keycloak keycloak-db broker api-redis + IMAGE_REPO=$(CI_BUILD_TAG) docker compose -p $(CI_BUILD_TAG) -f docker-compose.yaml -f docker-compose.local-dev.yaml --compatibility up -d api api-db api-sidecar-handler keycloak keycloak-db broker api-redis $(MAKE) wait-for-keycloak .PHONY: ui-logs-development @@ -404,7 +421,7 @@ api-logs-development: build-ui-logs-development # ADDITIONAL_SERVICES - a way to pass through additional services ("ui", "ui ssh", etc..) .PHONY: compose-api-logs-development compose-api-logs-development: - docker compose -p $(COMPOSE_STACK_NAME) $(ADDITIONAL_FLAGS) --compatibility up -d $(ADDITIONAL_SERVICES) api api-db api-sidecar-handler actions-handler local-api-data-watcher-pusher keycloak keycloak-db broker api-redis logs2notifications local-minio mailhog + docker compose -p $(COMPOSE_STACK_NAME) $(ADDITIONAL_FLAGS) --compatibility up -d $(ADDITIONAL_SERVICES) api api-db api-sidecar-handler actions-handler keycloak keycloak-db broker api-redis logs2notifications local-minio mailhog $(MAKE) CI_BUILD_TAG=$(COMPOSE_STACK_NAME) wait-for-keycloak ## CI targets @@ -414,10 +431,11 @@ HELM_VERSION := v3.16.1 K3D_VERSION = v5.7.4 GOJQ_VERSION = v0.12.16 STERN_VERSION = v2.6.1 +MCLI_VERSION = RELEASE.2024-11-21T17-21-54Z CHART_TESTING_VERSION = v3.11.0 K3D_IMAGE = docker.io/rancher/k3s:v1.31.1-k3s1 TESTS = [nginx,api,features-kubernetes,bulk-deployment,features-kubernetes-2,features-variables,active-standby-kubernetes,tasks,drush,python,gitlab,github,bitbucket,services,workflows] -CHARTS_TREEISH = main +CHARTS_TREEISH = remove-data-watcher-pusher CHARTS_REPOSITORY = https://github.com/uselagoon/lagoon-charts.git #CHARTS_REPOSITORY = ../lagoon-charts TASK_IMAGES = task-activestandby @@ -565,8 +583,23 @@ ifneq ($(STERN_VERSION), v$(shell ./local-dev/stern --version 2>/dev/null | sed endif endif +# Symlink the installed minio client if the correct version is already +# installed, otherwise downloads it. +.PHONY: local-dev/mcli +local-dev/mcli: +ifeq ($(MCLI_VERSION), $(shell mcli --version 2>/dev/null | grep -oi RELEASE.*Z)) + $(info linking local mcli version $(MCLI_VERSION)) + ln -sf $(shell command -v mcli) ./local-dev/mcli +else +ifneq ($(MCLI_VERSION), $(shell ./local-dev/mcli --version 2>/dev/null | grep -oi RELEASE.*Z)) + $(info downloading mcli version $(MCLI_VERSION) for $(ARCH)) + curl -sSLo local-dev/mcli https://dl.min.io/client/mc/release/$(ARCH)-amd64/mc + chmod a+x local-dev/mcli +endif +endif + .PHONY: local-dev-tools -local-dev-tools: local-dev/k3d local-dev/jq local-dev/helm local-dev/kubectl local-dev/stern +local-dev-tools: local-dev/k3d local-dev/jq local-dev/helm local-dev/kubectl local-dev/stern local-dev/mcli .PHONY: helm/repos helm/repos: local-dev/helm @@ -618,13 +651,13 @@ ifeq ($(ARCH), darwin) tcp-listen:32080,fork,reuseaddr tcp-connect:target:32080 endif -K3D_SERVICES = api api-db api-redis auth-server actions-handler broker api-sidecar-handler keycloak keycloak-db logs2notifications webhook-handler webhooks2tasks local-api-data-watcher-pusher local-git ssh tests workflows $(TASK_IMAGES) -K3D_TESTS = local-api-data-watcher-pusher local-git tests +K3D_SERVICES = api api-db api-redis auth-server actions-handler broker api-sidecar-handler keycloak keycloak-db logs2notifications webhook-handler webhooks2tasks local-git ssh tests workflows $(TASK_IMAGES) +K3D_TESTS = local-git tests K3D_TOOLS = k3d helm kubectl jq stern # install lagoon charts and run lagoon test suites in a k3d cluster .PHONY: k3d/test -k3d/test: k3d/setup k3d/install-lagoon k3d/retest +k3d/test: k3d/setup k3d/install-lagoon k3d/seed-data k3d/retest LOCAL_DEV_SERVICES = api auth-server actions-handler api-sidecar-handler logs2notifications webhook-handler webhooks2tasks @@ -833,21 +866,26 @@ endif echo "Loading API seed data" && \ export SSH_PORTAL_HOST="$$($(KUBECTL) -n lagoon get services lagoon-remote-ssh-portal -o jsonpath='{.status.loadBalancer.ingress[0].ip}')" && \ export SSH_PORTAL_PORT="$$($(KUBECTL) -n lagoon get services lagoon-remote-ssh-portal -o jsonpath='{.spec.ports[0].port}')" && \ + export CONSOLE_URL="https://kubernetes.default.svc/" && \ + export KUBERNETES_TOKEN="$$($(KUBECTL) get secret -n lagoon lagoon-remote-ssh-core-token -o jsonpath="{.data.token}" | base64 --decode)" && \ export ROUTER_PATTERN="\$${project}.\$${environment}.$$($(KUBECTL) -n ingress-nginx get services ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}')" && \ export SEED_DATA=$$(if [ $(INSTALL_STABLE_CORE) = true ]; then \ - envsubst < <(curl -s https://raw.githubusercontent.com/uselagoon/lagoon/refs/tags/$(STABLE_CORE_CHART_APP_VERSION)/local-dev/k3d-seed-data/00-populate-kubernetes.gql) | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $$0} else {printf "\\n"$$0}}'; \ + envsubst < <(curl -s https://raw.githubusercontent.com/uselagoon/lagoon/refs/tags/$(STABLE_CORE_CHART_APP_VERSION)/local-dev/seed-data/00-populate-kubernetes.gql) | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $$0} else {printf "\\n"$$0}}'; \ else \ - envsubst < ./local-dev/k3d-seed-data/00-populate-kubernetes.gql | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $$0} else {printf "\\n"$$0}}'; \ + envsubst < ./local-dev/seed-data/00-populate-kubernetes.gql | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $$0} else {printf "\\n"$$0}}'; \ fi) && \ export SEED_DATA_JSON="{\"query\": \"$$SEED_DATA\"}" && \ wget --quiet --header "Content-Type: application/json" --header "Authorization: bearer $${LAGOON_LEGACY_ADMIN}" "http://lagoon-api.$$($(KUBECTL) -n ingress-nginx get services ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}').nip.io/graphql" --post-data "$$SEED_DATA_JSON" --content-on-error -O - && \ + $(MCLI) config host add local-minio http://minio-api.$$($(KUBECTL) -n ingress-nginx get services ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}').nip.io lagoonFilesAccessKey lagoonFilesSecretKey && \ + $(MCLI) cp --recursive local-dev/seed-data/minio-data/lagoon-files/ local-minio/lagoon-files && \ + $(MCLI) cp --recursive local-dev/seed-data/minio-data/restores/ local-minio/restores && \ echo "Loading API seed users" && \ if [ $(INSTALL_STABLE_CORE) = true ]; then \ - cat <(curl -s https://raw.githubusercontent.com/uselagoon/lagoon/refs/tags/$(STABLE_CORE_CHART_APP_VERSION)/local-dev/k3d-seed-data/seed-users.sh) \ + cat <(curl -s https://raw.githubusercontent.com/uselagoon/lagoon/refs/tags/$(STABLE_CORE_CHART_APP_VERSION)/local-dev/seed-data/seed-users.sh) \ | $(KUBECTL) -n lagoon-core exec -i $$($(KUBECTL) -n lagoon-core get pods \ -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- sh -c "cat > /tmp/seed-users.sh"; \ else \ - cat ./local-dev/k3d-seed-data/seed-users.sh \ + cat ./local-dev/seed-data/seed-users.sh \ | $(KUBECTL) -n lagoon-core exec -i $$($(KUBECTL) -n lagoon-core get pods \ -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- sh -c "cat > /tmp/seed-users.sh"; \ fi \ @@ -862,13 +900,13 @@ endif .PHONY: k3d/example-sso k3d/example-sso: @export KUBECONFIG="$$(realpath ./kubeconfig.k3d.$(CI_BUILD_TAG))" && \ - cat ./local-dev/k3d-seed-data/seed-example-sso.sh | $(KUBECTL) -n lagoon-core exec -i $$($(KUBECTL) -n lagoon-core get pods -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- sh -c "cat > /tmp/seed-example-sso.sh" \ + cat ./local-dev/seed-data/seed-example-sso.sh | $(KUBECTL) -n lagoon-core exec -i $$($(KUBECTL) -n lagoon-core get pods -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- sh -c "cat > /tmp/seed-example-sso.sh" \ && $(KUBECTL) -n lagoon-core exec -it $$($(KUBECTL) -n lagoon-core get pods -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- bash '/tmp/seed-example-sso.sh' .PHONY: k3d/configure-webauthn k3d/configure-webauthn: @export KUBECONFIG="$$(realpath ./kubeconfig.k3d.$(CI_BUILD_TAG))" && \ - cat ./local-dev/k3d-seed-data/configure-webauthn.sh | $(KUBECTL) -n lagoon-core exec -i $$($(KUBECTL) -n lagoon-core get pods -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- sh -c "cat > /tmp/configure-webauthn.sh" \ + cat ./local-dev/seed-data/configure-webauthn.sh | $(KUBECTL) -n lagoon-core exec -i $$($(KUBECTL) -n lagoon-core get pods -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- sh -c "cat > /tmp/configure-webauthn.sh" \ && $(KUBECTL) -n lagoon-core exec -it $$($(KUBECTL) -n lagoon-core get pods -l app.kubernetes.io/component=lagoon-core-keycloak -o json | $(JQ) -r '.items[0].metadata.name') -- bash '/tmp/configure-webauthn.sh' # Use k3d/port-forwards to create local ports for the UI (6060), API (7070) and Keycloak (8080). These ports will always diff --git a/docker-bake.hcl b/docker-bake.hcl index 30df12fd1e..316f16f81a 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -54,7 +54,6 @@ group "default" { "api-sidecar-handler", "keycloak-db", "keycloak", - "local-api-data-watcher-pusher", "local-git", "logs2notifications", "ssh", @@ -76,14 +75,12 @@ group "ui-logs-development" { "api-sidecar-handler", "keycloak-db", "keycloak", - "local-api-data-watcher-pusher", "logs2notifications" ] } group "local-dev" { targets = [ - "local-api-data-watcher-pusher", "local-git" ] } @@ -282,15 +279,6 @@ target "task-activestandby" { tags = ["${IMAGE_REPO}/task-activestandby:${TAG}"] } -target "local-api-data-watcher-pusher" { - inherits = ["default"] - context = "local-dev/api-data-watcher-pusher" - labels = { - "org.opencontainers.image.title": "lagoon-core/local-api-data-watcher-pusher - the local-dev data pusher image for Lagoon" - } - tags = ["${IMAGE_REPO}/local-api-data-watcher-pusher:${TAG}"] -} - target "local-git" { inherits = ["default"] context = "local-dev/git" diff --git a/docker-compose.local-dev.yaml b/docker-compose.local-dev.yaml index f5e00b0ce5..55c76c8a61 100644 --- a/docker-compose.local-dev.yaml +++ b/docker-compose.local-dev.yaml @@ -41,6 +41,3 @@ services: - "./services/keycloak/startup-scripts:/opt/keycloak/startup-scripts" - "./services/keycloak/themes/lagoon:/opt/keycloak/themes/lagoon" - "./local-dev/keycloak:/lagoon/keycloak" - local-api-data-watcher-pusher: - volumes: - - ./local-dev/api-data-watcher-pusher:/home diff --git a/docker-compose.yaml b/docker-compose.yaml index 8b0ac7b293..499e51caa4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -188,12 +188,6 @@ services: - DELETED_STATUS_CODE=404 volumes: - ./tests:/ansible - local-api-data-watcher-pusher: - depends_on: - - api - image: ${IMAGE_REPO:-lagoon}/local-api-data-watcher-pusher:${IMAGE_REPO_API_DATA_WATCHER_TAG:-${IMAGE_REPO_TAG:-latest}} - environment: - - CLEAR_API_DATA=false local-minio: image: minio/minio entrypoint: sh diff --git a/docs/contributing-to-lagoon/developing-lagoon.md b/docs/contributing-to-lagoon/developing-lagoon.md index cc181d1285..dd7f6dbb62 100644 --- a/docs/contributing-to-lagoon/developing-lagoon.md +++ b/docs/contributing-to-lagoon/developing-lagoon.md @@ -320,7 +320,7 @@ make k3d/local-dev-logging #### Re run specific tests -This will re-run a suite of tests \(defined in the `TESTS` variable\) against the existing cluster. It will re-push the images needed for tests \(tests, local-git, and the data-watcher-pusher\). You can specify tests to run by passing the TESTS variable inline. +This will re-run a suite of tests \(defined in the `TESTS` variable\) against the existing cluster. It will re-push the images needed for tests \(tests, local-git). You can specify tests to run by passing the TESTS variable inline. ```bash title="Re-run tests." make k3d/retest @@ -371,7 +371,6 @@ The configuration for these tests is held in three services: * `tests` is the Ansible test services themselves. The local testing routine runs each individual test as a separate container within a test-suite pod. These are listed below. * `local-git` is a Git server hosted in the cluster that holds the source files for the tests. Ansible pulls and pushes to this repository throughout the tests -* `api-data-watcher-pusher` is a set of GraphQL mutations that pre-populates local Lagoon with the necessary Kubernetes configuration, test user accounts and SSH keys, and the necessary groups and notifications. **Note that this will wipe local projects and environments on each run.** The individual routines relevant to Kubernetes are: diff --git a/local-dev/api-data-watcher-pusher/Dockerfile b/local-dev/api-data-watcher-pusher/Dockerfile deleted file mode 100644 index 93e55b0975..0000000000 --- a/local-dev/api-data-watcher-pusher/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} - -RUN apk add --no-cache \ - bash \ - curl \ - gettext \ - minio-client \ - moreutils \ - py3-jwt \ - wget - -ENV JWTSECRET=super-secret-string \ - JWTAUDIENCE=api.dev \ - GIT_HOST="172.17.0.1" \ - GIT_PORT="2222" \ - CONSOLE_URL="https://172.17.0.1:16643/" \ - INGRESS_IP="172.17.0.1" \ - TOKEN="eyJhbGciOiJSUzI1NiIsImtpZCI6IjZWamZLTzEzZ2lPSGFtc0d6QXVkWXpDYi1fcmlfLWVBd3JtbEEydGItTHcifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJsYWdvb24iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlY3JldC5uYW1lIjoia3ViZXJuZXRlc2J1aWxkZGVwbG95LXRva2VuLXJxNDg1Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmVybmV0ZXNidWlsZGRlcGxveSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjA3YzViODAxLTI5ZDgtNDU5Ni1hODBlLTZlMmU3MmY3YmMwMCIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpsYWdvb246a3ViZXJuZXRlc2J1aWxkZGVwbG95In0.srj-zZguNXCQbeTIS5GtJw7Jl61k_miC8hXED70NQULm6OAMkImHrURRCfD4kjKPy-jbwEI88m5TNLFP8_0sMfdwj2vr2Gv8fTC55qoAJ589ff_dwv8THSKdKNj6VaHynzEzQ4IfZscd3ogP4HYF9alt-X4mMcJ2BApBt4F13Hg-bE2-4uzO0b_u13pJhzn0XrH8JGXWP0_oMPtE7M0zJL9BfOrBph_MgSb2djSbVBNbhPJ0fs9-eIB5aAu0NmqPhpxj6WL4UOAKX178IsDAq4vtRZrScZwvZxRcaDUxZ-MgwewWI8Ll0yg7UCxtZTdkLglkCgpjTK33Ei0PXWdE4A" - -COPY api-data /home/api-data -COPY minio-data /home/minio-data -COPY data-init-push.sh create_jwt.py /home/ - -CMD ["/sbin/tini", "--", "/home/data-init-push.sh"] \ No newline at end of file diff --git a/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-lagoon-demo.gql b/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-lagoon-demo.gql deleted file mode 100644 index 80106d3e9f..0000000000 --- a/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-lagoon-demo.gql +++ /dev/null @@ -1,848 +0,0 @@ -mutation PopulateApi { - #### Filling API with needed objects for UI - - UIKubernetes: addKubernetes( - input: { - id: 4 - name: "ui-kubernetes" - consoleUrl: "https://localhost:8443/" - } - ) { - id - } - - UICustomer1: addGroup( - input: { name: "lagoon-group" } - ) { - id - } - - UIProject1: addProject( - input: { - id: 18 - name: "lagoon-demo" - availability: HIGH - openshift: 4 - gitUrl: "ssh://git@example.com/lagoon-demo.git" - productionEnvironment: "main" - problemsUi: 1 - factsUi: 1 - } - ) { - id - } - - UIProject1Group5: addGroupsToProject( - input: { - project: { - name: "lagoon-demo" - } - groups: [ - { - name: "lagoon-group" - } - ] - } - ) { - id - } - - UIProject1Environment1: addOrUpdateEnvironment( - input: { - id: 3 - name: "main" - project: 18 - deployType: BRANCH - deployBaseRef: "main" - environmentType: PRODUCTION - openshiftProjectName: "lagoon-demo-main" - } - ) { - id - } - - UIProject1Environment1Update: updateEnvironment( - input: { - id: 3 - patch: { - route: "https://lagoondemo.example.org" - routes: "https://lagoondemo.example.org,https://nginx.main.lagoon-demo.ui-kubernetes.lagoon.sh" - } - } - ) { - id - } - - UIProject1Environment1Backup1: addBackup( - input: { - environment: 3 - source: "mariadb" - backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280d" - created: "2023-10-14 00:33:16" - } - ) { - id - } - - UIProject1Environment1Backup1Restore: addRestore( - input: { - backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280d" - execute: false - } - ) { - id - } - - UIProject1Environment1Backup2: addBackup( - input: { - environment: 3 - source: "files" - backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280f" - created: "2023-10-14 00:33:16" - } - ) { - id - } - - UIProject1Environment1Backup2Restore: addRestore( - input: { - backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280f" - status: SUCCESSFUL - restoreLocation: "http://172.17.0.1:9000/restores/lagoon-demo-main.tar.gz" - execute: false - } - ) { - id - } - - UIProject1Environment1Backup3: addBackup( - input: { - environment: 3 - source: "mariadb" - backupId: "e260f07c374e4a3319c5d46e688dab6f1eb23c3e61c166a37609d55762d2ee0b" - created: "2023-10-13 00:33:16" - } - ) { - id - } - - UIProject1Environment1Backup3Restore: addRestore( - input: { - backupId: "e260f07c374e4a3319c5d46e688dab6f1eb23c3e61c166a37609d55762d2ee0b" - status: FAILED - execute: false - } - ) { - id - } - - UIProject1Environment1Backup4: addBackup( - input: { - environment: 3 - source: "files" - backupId: "bf072a09e17726da54adc79936ec8745521993599d41211dfc9466dfd5bc32a5" - created: "2023-10-13 00:33:16" - } - ) { - id - } - - UIProject1Environment1addDeployment1: addDeployment( - input: { - name: "lagoon-build-123abc" - status: COMPLETE - remoteId: "86358316-a755-11ed-8206-032901f4c7e3" - environment: 3 - created: "2023-10-07 23:02:41" - started: "2023-10-07 23:03:41" - completed: "2023-10-07 23:20:41" - } - ) { - id - } - UIProject1Environment1addDeployment2: addDeployment( - input: { - name: "lagoon-build-def456" - remoteId: "85e36e3c-a755-11ed-abf6-df28d8a74109" - status: FAILED - environment: 3 - created: "2023-10-07 23:02:41" - started: "2023-10-07 23:03:41" - completed: "2023-10-07 23:20:41" - } - ) { - id - } - UIProject1Environment1addDeployment3: addDeployment( - input: { - name: "lagoon-build-7g8h9i" - remoteId: "84e1dc8a-a755-11ed-a37d-770f36aa3d4e" - status: RUNNING - environment: 3 - created: "2023-10-07 23:02:41" - started: "2023-10-07 23:03:41" - } - ) { - id - } - - UIProject1Environment1addTask1: addTask( - input: { - name: "Developer task" - id: 123 - remoteId: "5b21aff1-689c-41b7-80d7-6de9f5bff1f3" - status: FAILED - environment: 3 - service: "cli" - command: "site-status" - created: "2023-10-07 23:00:00" - started: "2023-10-07 23:00:10" - completed: "2023-10-07 23:00:20" - execute: false - } - ) { - id - } - - UIProject1Environment1addTask2: addTask( - input: { - name: "Maintainer task" - id: 124 - remoteId: "50573da4-f0dd-477a-9261-c4785ac2adff" - status: COMPLETE - environment: 3 - service: "cli" - command: "site-status" - created: "2023-10-07 23:01:00" - started: "2023-10-07 23:01:10" - completed: "2023-10-07 23:01:30" - execute: false - } - ) { - id - } - - UIProject1Environment1addTask3: addTask( - input: { - name: "Maintainer task" - id: 125 - remoteId: "e3869563-126d-4922-b6c4-36289a374edb" - status: PENDING - environment: 3 - service: "cli" - command: "site-status" - created: "2023-10-07 23:02:00" - started: "2023-10-07 23:02:10" - execute: false - } - ) { - id - } - - UIProjectAdvancedTask1: addAdvancedTaskDefinition( - input:{ - name: "Admin only task" - description: "A task that only admins can see and run (logs also only visible to admin)" - type: COMMAND - service: "cli" - command: "site-status" - permission: MAINTAINER - project: 18 - adminOnlyView: true - deployTokenInjection: true - projectKeyInjection: true - } - ){ - ... on AdvancedTaskDefinitionCommand { - id - name - description - service - command - } - } - - UIProjectAdvancedTask2: addAdvancedTaskDefinition( - input:{ - name: "Maintainer task" - description: "A task that only maintainers can run" - type: COMMAND - service: "cli" - command: "site-status" - permission: MAINTAINER - project: 18 - } - ){ - ... on AdvancedTaskDefinitionCommand { - id - name - description - service - command - } - } - - UIProjectAdvancedTask3: addAdvancedTaskDefinition( - input:{ - name: "Developer task" - description: "A task that developers can run" - type: COMMAND - service: "cli" - command: "site-status" - permission: DEVELOPER - project: 18 - } - ){ - ... on AdvancedTaskDefinitionCommand { - id - name - description - service - command - } - } - - UIProjectInvokeAdvancedTask1: invokeRegisteredTask( - advancedTaskDefinition: 1 - environment: 3 - ) { - id - } - - UIProjectUpdateAdvancedTask1: updateTask( - input:{ - id: 126 - patch: { - remoteId: "0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a" - } - } - ) { - id - } - - UIProject1Environment1addServices1: addOrUpdateEnvironmentService( - input: { - environment: 3 - name: "cli" - type: "cli-persistent" - containers: [{name: "cli"}] - } - ){ - id - name - type - } - UIProject1Environment1addServices2: addOrUpdateEnvironmentService( - input: { - environment: 3 - name: "nginx" - type: "nginx-php-persistent" - containers: [{name: "nginx"},{name:"php"}] - } - ){ - id - name - type - } - UIProject1Environment1addServices3: addOrUpdateEnvironmentService( - input: { - environment: 3 - name: "mariadb" - type: "mariadb-single" - containers: [{name: "mariadb"}] - } - ){ - id - name - type - } - - UIProject1Environment1addStorage1: addOrUpdateStorageOnEnvironment(input:{ - environment: 3 - persistentStorageClaim: "nginx" - kibUsed: 200000 - }) { - id - kibUsed - } - - UIProject1Environment1addStorage2: addOrUpdateStorageOnEnvironment(input:{ - environment: 3 - persistentStorageClaim: "mariadb" - kibUsed: 200000 - }) { - id - kibUsed - } - - UIProject1Environment1addFacts: addFacts( - input: { - facts: [ - { - name: "lagoon-category" - value: "saas" - environment: 3 - source: "" - description: "Category of the site" - category: "Lagoon" - keyFact: true - }, - { - name: "drupal-core" - value: "9.0.1" - environment: 3 - source: "drush-pml" - description: "Drupal CMS version found on environment" - category: "Framework" - keyFact: true - }, - { - name: "php-version" - value: "8.0.3" - environment: 3 - source: "php-version" - description: "PHP version found on environment" - category: "Programming language" - keyFact: true - }, - { - name: "Lagoon" - value: "21.3.0" - environment: 3 - source: "env" - description: "Lagoon version" - category: "Platform" - keyFact: true - }, - { - name: "interesting-package" - value: "1.0.0" - environment: 3 - source: "local-dev" - description: "Description of interesting php package" - category: "Composer package" - }, - { - name: "npm-module" - value: "2.0.0" - environment: 3 - source: "local-dev" - description: "Description of node module" - category: "Node package" - }, - { - name: "site-code-status" - value: "200" - environment: 3 - source: "curl" - description: "Health check of site" - category: "Performance" - keyFact: true - } - ] - } - ) { - id - } - - UIProject1Environment1addFactReference1: addFactReference( - input: { - fid: 2 - name: "lagoondemo.example.org" - } - ) { - id - } - - UIProject1Environment1addFactReference2: addFactReference( - input: { - fid: 2 - name: "cli" - } - ) { - id - } - - UIProject1Environment2: addOrUpdateEnvironment( - input: { - id: 4 - name: "staging" - project: 18 - deployType: BRANCH - deployBaseRef: "staging" - environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-demo-staging" - } - ) { - id - } - UIProject1Environment2Update: updateEnvironment( - input: { - id: 4 - patch: { - route: "https://nginx.staging.lagoon-demo.ui-kubernetes.lagoon.sh" - routes: "https://nginx.staging.lagoon-demo.ui-kubernetes.lagoon.sh" - } - } - ) { - id - } - - UIProject1Environment3: addOrUpdateEnvironment( - input: { - id: 5 - name: "dev" - project: 18 - deployType: BRANCH - deployBaseRef: "dev" - environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-demo-dev" - } - ) { - id - } - UIProject1Environment3Update: updateEnvironment( - input: { - id: 5 - patch: { - route: "" # intentionally empty, for testing - routes: "" # intentionally empty, for testing - } - } - ) { - id - } - - UIProject1Environment3addFacts: addFacts( - input: { - facts: [ - { - name: "lagoon-category" - value: "saas" - environment: 5 - source: "" - description: "Category of the site" - category: "Lagoon" - keyFact: true - }, - { - name: "drupal-core" - value: "9.0.1" - environment: 5 - source: "drush-pml" - description: "Drupal CMS version found on environment" - category: "Framework" - keyFact: true - }, - { - name: "php-version" - value: "8.0.3" - environment: 5 - source: "php-version" - description: "PHP version found on environment" - category: "Programming language" - keyFact: true - }, - { - name: "Lagoon" - value: "21.3.0" - environment: 5 - source: "env" - description: "Lagoon version" - category: "Platform" - keyFact: true - }, - { - name: "interesting-package" - value: "1.0.0" - environment: 5 - source: "local-dev" - description: "Description of interesting php package" - category: "Composer package" - }, - { - name: "npm-module" - value: "2.0.0" - environment: 5 - source: "local-dev" - description: "Description of node module" - category: "Node package" - }, - { - name: "site-code-status" - value: "403" - environment: 5 - source: "curl" - description: "Health check of site" - category: "Performance" - keyFact: true - } - ] - } - ) { - id - } - - UIProject1Environment4: addOrUpdateEnvironment( - input: { - id: 6 - name: "pr-175" - project: 18 - deployType: PULLREQUEST - deployBaseRef: "target" - deployHeadRef: "source" - deployTitle: "pr-175" - environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-demo-pr-175" - } - ) { - id - } - UIProject1Environment4Update: updateEnvironment( - input: { - id: 6 - patch: { - route: "https://nginx.pr-175.lagoon-demo.ui-kubernetes.lagoon.sh" - routes: "https://nginx.pr-175.lagoon-demo.ui-kubernetes.lagoon.sh" - } - } - ) { - id - } - - ## Create some general users with specific role against lagoon-demo for permissions validations in local testing easily - UserExampleGuest: addUser( - input: { - email: "guest@example.com" - comment: "guest user" - } - ) { - id - } - - UserExampleReporter: addUser( - input: { - email: "reporter@example.com" - comment: "reporter user" - } - ) { - id - } - - UserExampleDeveloper: addUser( - input: { - email: "developer@example.com" - comment: "developer user" - } - ) { - id - } - - UserExampleMaintainer: addUser( - input: { - email: "maintainer@example.com" - comment: "maintainer user" - } - ) { - id - } - - UserExampleOwner: addUser( - input: { - email: "owner@example.com" - comment: "owner user" - } - ) { - id - } - - UserExamplePlatformOwner: addUser( - input: { - email: "platformowner@example.com" - comment: "platform owner user" - } - ) { - id - } - - UserExamplePlatformViewer: addUser( - input: { - email: "platformviewer@example.com" - comment: "platform viewer user" - } - ) { - id - } - - UserExamplePlatformOrgOwner: addUser( - input: { - email: "platformorgowner@example.com" - comment: "platform organization owner user" - } - ) { - id - } - - ## Assign platform owner role - UserExamplePlatformOwnerRole: addPlatformRoleToUser( - user:{ - email:"platformowner@example.com" - } - role: OWNER - ){ - email - platformRoles - } - - ## Assign platform viewer role - UserExamplePlatformViewerRole: addPlatformRoleToUser( - user:{ - email:"platformviewer@example.com" - } - role: VIEWER - ){ - email - platformRoles - } - - ## Assign platform owner role - UserExamplePlatformOrgOwnerRole: addPlatformRoleToUser( - user:{ - email:"platformorgowner@example.com" - } - role: ORGANIZATION_OWNER - ){ - email - platformRoles - } - - LagoonDemoGroup: addGroup( - input: { - name: "lagoon-demo-group" - } - ) { - id - } - - LagoonDemoToGroup: addGroupsToProject( - input: { - project: { - name: "lagoon-demo" - } - groups: [ - { - name: "lagoon-demo-group" - } - ] - } - ) { - id - } - - UserExampleGuestGroup: addUserToGroup( - input: { - user: { - email:"guest@example.com" - } - group: { - name: "lagoon-demo-group" - } - role: GUEST - } - ) { - name - } - - UserExampleReporterGroup: addUserToGroup( - input: { - user: { - email:"reporter@example.com" - } - group: { - name: "lagoon-demo-group" - } - role: REPORTER - } - ) { - name - } - - UserExampleDeveloperGroup: addUserToGroup( - input: { - user: { - email:"developer@example.com" - } - group: { - name: "lagoon-demo-group" - } - role: DEVELOPER - } - ) { - name - } - - UserExampleMaintainerGroup: addUserToGroup( - input: { - user: { - email:"maintainer@example.com" - } - group: { - name: "lagoon-demo-group" - } - role: MAINTAINER - } - ) { - name - } - - UserExampleOwnerGroup: addUserToGroup( - input: { - user: { - email:"owner@example.com" - } - group: { - name: "lagoon-demo-group" - } - role: OWNER - } - ) { - name - } - PlatformOwnerSshKeyEd25519: addUserSSHPublicKey( - input: { - id: 5 - name: "sshkey-platform-owner-ed25519" - publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" - user: { - email: "platformowner@example.com" - } - } - ) { - id - } - MaintainerSshKeyEcdsa: addUserSSHPublicKey( - input: { - id: 6 - name: "sshkey-maintainer-ecdsa" - publicKey: "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAD8E5wfvLg8vvfO9mmHVsZQK8dNgdKM5FrTxL4ORDq66Z50O8zUzBwF1VTO5Zx+qwB7najMdWsnW00BC6PMysSNJQD5HI4CokyKqmGdeSXcROYwvYOjlDQ+jD5qOSmkllRZZnkEYXE5FVBXaZWToyfGUGIoECvKGUQZxkBDHsbK13JdfA==" - user: { - email: "maintainer@example.com" - } - } - ) { - id - } - - MaintainerSshKeyEd25519SK: addUserSSHPublicKey( - input: { - id: 7 - name: "sshkey-maintainer-ed25519-sk" - publicKey: "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPjqGSQd+w7qQxioI6qj+KWX/pEg9mNvVGZ7aUoXfsC0AAAABHNzaDo=" - user: { - email: "maintainer@example.com" - } - } - ) { - id - } -} diff --git a/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-lagoon-demo-org.gql b/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-lagoon-demo-org.gql deleted file mode 100644 index a6f0b6b9e0..0000000000 --- a/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-lagoon-demo-org.gql +++ /dev/null @@ -1,246 +0,0 @@ -mutation PopulateApi { - - # Organizations - UIOrganization1: addOrganization(input: { - id: 1 - name: "lagoon-demo-organization" - friendlyName: "Lagoon Demo Organization" - description: "An organization for testing" - quotaProject: 5 - quotaEnvironment: 4 - quotaGroup: 10 - quotaNotification: 10 - }) { - id - name - quotaProject - quotaEnvironment - quotaGroup - quotaNotification - } - - UIOrganizationUser: addUser( - input: { - email: "orguser@example.com" - comment: "test user that will be in a group in an organization" - } - ) { - id - } - UIOrganizationViewer: addUser( - input: { - email: "orgviewer@example.com" - comment: "user that will be an organization viewer" - } - ) { - id - } - UIOrganizationAdmin: addUser( - input: { - email: "orgadmin@example.com" - comment: "user that will be an organization admin" - } - ) { - id - } - UIOrganizationOwner: addUser( - input: { - email: "orgowner@example.com" - comment: "user that will be an organization owner" - } - ) { - id - } - - UIOrganizationGroup: addGroupToOrganization( - input: { - name: "lagoon-demo-organization-group" - organization: 1} - ) { - id - } - - UIOrganizationUserToGroup: addUserToGroup( - input: { - user: { - email:"orguser@example.com" - } - group: { - name: "lagoon-demo-organization-group" - } - role: MAINTAINER - } - ) { - name - } - - UIOrganizationUserInviteToGroup: addUserToGroup( - input: { - user: { - email:"invite@example.com" - } - group: { - name: "lagoon-demo-organization-group" - } - role: GUEST - inviteUser: true - } - ) { - name - } - - UIOrganizationAddViewer: addAdminToOrganization(input: {user: {email: "orgviewer@example.com"}, organization: {id: 1}, role: VIEWER}) { - id - } - - UIOrganizationAddAdmin: addAdminToOrganization(input: {user: {email: "orgadmin@example.com"}, organization: {id: 1}, role: ADMIN}) { - id - } - - UIOrganizationAddOwner: addAdminToOrganization(input: {user: {email: "orgowner@example.com"}, organization: {id: 1}, role: OWNER}) { - id - } - - UIOrganizationNotificationSlack: addNotificationSlack(input: {organization: 1, name: "slack-test", channel: "lobby", webhook: "http://slack.example.com/hooks/abcdefg"}) { - id - } - - UIOrganizationNotificationRocketChat: addNotificationRocketChat(input: {organization: 1, name: "rocketchat-test", channel: "lobby", webhook: "http://rocketchat.example.com/hooks/abcdefg"}) { - id - } - - UIOrganizationNotificationEmail: addNotificationEmail(input: {organization: 1, name: "email-test", emailAddress: "fake@example.com"}) { - id - } - - UIOrganizationNotificationWebhook: addNotificationWebhook(input: {organization: 1, name: "webhook-test", webhook: "http://webhook.example.com"}) { - id - } - - UIOrganizationNotificationTeams: addNotificationMicrosoftTeams(input: {organization: 1, name: "teams-test", webhook: "http://teams.example.com/hooks/sdgsgsgs"}) { - id - } - - AddUIKubernetesToOrganization: addDeployTargetToOrganization(input:{ - deployTarget: 4 - organization: 1 - }) { - id - } - - UIKubernetes2: addKubernetes( - input: { - id: 5 - name: "ui-kubernetes-2" - consoleUrl: "https://localhost:8443/" - } - ) { - id - } - - AddUIKubernetes2ToOrganization: addDeployTargetToOrganization(input:{ - deployTarget: 5 - organization: 1 - }) { - id - } - - UIProject1: addProject( - input: { - id: 180 - organization: 1 - name: "lagoon-demo-org" - availability: HIGH - openshift: 5 - gitUrl: "ssh://git@example.com/lagoon-demo-org.git" - productionEnvironment: "main" - problemsUi: 1 - factsUi: 1 - } - ) { - id - } - - - UIOrganizationProjectGroup: addGroupsToProject( - input: { - project: { - name: "lagoon-demo-org" - } - groups: [ - { - name: "lagoon-demo-organization-group" - } - ] - } - ) { - id - } - - UIOrganizationProjectEnvironment1: addOrUpdateEnvironment( - input: { - id: 30 - name: "main" - project: 180 - deployType: BRANCH - deployBaseRef: "main" - environmentType: PRODUCTION - openshiftProjectName: "lagoon-demo-org-main" - } - ) { - id - } - - UIOrganizationProjectEnvironment1Update: updateEnvironment( - input: { - id: 30 - patch: { - route: "https://lagoondemoorg.example.org" - routes: "https://lagoondemoorg.example.org,https://nginx.main.lagoon-demo-org.ui-kubernetes.lagoon.sh" - } - } - ) { - id - } - UIOrganizationProjectEnvironment2: addOrUpdateEnvironment( - input: { - id: 31 - name: "staging" - project: 180 - deployType: BRANCH - deployBaseRef: "staging" - environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-demo-org-staging" - } - ) { - id - } - UIOrganizationProjectEnvironment3: addOrUpdateEnvironment( - input: { - id: 32 - name: "development" - project: 180 - deployType: BRANCH - deployBaseRef: "development" - environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-demo-org-development" - } - ) { - id - } - UIOrganizationProjectEnvironment4: addOrUpdateEnvironment( - input: { - id: 33 - name: "pr-15" - project: 180 - deployType: PULLREQUEST - deployBaseRef: "target" - deployHeadRef: "source" - deployTitle: "pr-15" - environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-demo-org-pr-15" - } - ) { - id - } -} diff --git a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-ci-local-control-k8s.gql b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-ci-local-control-k8s.gql deleted file mode 100644 index f897a2927d..0000000000 --- a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-ci-local-control-k8s.gql +++ /dev/null @@ -1,131 +0,0 @@ -mutation PopulateApi { - #### Populate API with needed Objects to run the Kubernetes Tests - - - ### Groups - CiGroup: addGroup( - input: { - name: "ci-group" - } - ) { - id - } - - ### Users - CiCustomerUserRsa: addUser( - input: { - email: "ci-customer-user-rsa@example.com" - comment: "ci-customer-user-rsa" - } - ) { - id - } - CiCustomerUserEd25519: addUser( - input: { - email: "ci-customer-user-ed25519@example.com" - comment: "ci-customer-user-ed25519" - } - ) { - id - } - CiCustomerUserEcdsa: addUser( - input: { - email: "ci-customer-user-ecdsa@example.com" - comment: "ci-customer-user-ecdsa" - } - ) { - id - } - - ### SSH Keys - CiCustomerSshKeyRsa: addUserSSHPublicKey( - input: { - id: 4 - name: "sshkey-ci-customer-user-rsa" - publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - user: { - email: "ci-customer-user-rsa@example.com" - } - } - ) { - id - } - - ### Add Users to Groups - CiCustomerUserAddRsa: addUserToGroup( - input: { - user: { - email:"ci-customer-user-rsa@example.com" - } - group: { - name: "ci-group" - } - role: OWNER - } - ) { - name - } - CiCustomerUserAddEd25519: addUserToGroup( - input: { - user: { - email:"ci-customer-user-ed25519@example.com" - } - group: { - name: "ci-group" - } - role: OWNER - } - ) { - name - } - CiCustomerUserAddEcdsa: addUserToGroup( - input: { - user: { - email:"ci-customer-user-ecdsa@example.com" - } - group: { - name: "ci-group" - } - role: OWNER - } - ) { - name - } - - #### Populate API with lagoon-remote Kubernetes - CiLocalKubernetes: addKubernetes( - input: { - id: 2001 - name: "ci-local-control-k8s" - consoleUrl: "${CONSOLE_URL}" # make-host-docker-internal - routerPattern: "${project}.${environment}.${INGRESS_IP}.nip.io" - sshHost: "lagoon-remote-ssh-portal.lagoon.svc" - sshPort: "2222" - token: "${TOKEN}" # make-kubernetes-token - } - ) { - id - } - - # Real RocketChat Hook on the amazeeio RocketChat for testing - CiRocketChat: addNotificationRocketChat( - input: { - name: "amazeeio--lagoon-local-ci" - webhook: "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn" - channel: "lagoon-local-ci" - } - ) { - id - } - - # Fake email address for testing - CiEmail: addNotificationEmail( - input: { - name: "local-email-testing", - emailAddress: "mail@example.com" - } - ) { - id - } - -} diff --git a/local-dev/api-data-watcher-pusher/create_jwt.py b/local-dev/api-data-watcher-pusher/create_jwt.py deleted file mode 100755 index d5ad471a3a..0000000000 --- a/local-dev/api-data-watcher-pusher/create_jwt.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 - -import os -import jwt - -payload = {'role': 'admin', 'iss': 'api-data-watcher-pusher', - 'aud': os.environ['JWTAUDIENCE'], 'sub': 'api-data-watcher-pusher'} - -access_token = jwt.encode(payload, os.environ['JWTSECRET'], algorithm='HS256') - -print(access_token) diff --git a/local-dev/api-data-watcher-pusher/data-init-push.sh b/local-dev/api-data-watcher-pusher/data-init-push.sh deleted file mode 100755 index 8c1cd0d154..0000000000 --- a/local-dev/api-data-watcher-pusher/data-init-push.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# inject variables from environment into the GQL template -envsubst '$GIT_HOST $GIT_PORT $INGRESS_IP $CONSOLE_URL $TOKEN' < /home/api-data/03-populate-api-data-ci-local-control-k8s.gql | sponge /home/api-data/03-populate-api-data-ci-local-control-k8s.gql - -populate_demo_lagoon_gql_file_path="/home/api-data/01-populate-api-data-lagoon-demo.gql" -populate_demo_lagoon_org_gql_file_path="/home/api-data/02-populate-api-data-lagoon-demo-org.gql" -populate_ci_local_control_k8s_gql_file_path="/home/api-data/03-populate-api-data-ci-local-control-k8s.gql" -sample_task_file_path="/home/minio-data/task-files/sample-task-file.txt" - -wait_for_services() { - echo "waiting for ${API_HOST:-api}:${API_PORT:-3000}" - wait-for ${API_HOST:-api}:${API_PORT:-3000} -t 600 - echo "connected to API" -} - -send_graphql_query() { - local file_path=${1} - - API_ADMIN_JWT_TOKEN=$(/home/create_jwt.py) - - bearer="Authorization: bearer $API_ADMIN_JWT_TOKEN" - - # GraphQL query on single line with \\n for newlines and escaped quotes - data=$(cat $file_path | sed 's/"/\\"/g' | sed 's/\\n/\\\\n/g' | awk -F'\n' '{if(NR == 1) {printf $0} else {printf "\\n"$0}}') - - # Create a correct json string - json="{\"query\": \"$data\"}" - - wget --header "Content-Type: application/json" --header "$bearer" "${API_HOST:-api}:${API_PORT:-3000}/graphql" --post-data "$json" --content-on-error -O - -} - -update_minio_files() { - mcli config host add local-minio ${MINIO_SERVER_URL-http://local-minio:9000} ${MINIO_ROOT_USER:-minio} ${MINIO_ROOT_PASSWORD:-minio123} - mcli cp --recursive /home/minio-data/lagoon-files/ local-minio/lagoon-files - mcli cp --recursive /home/minio-data/restores/ local-minio/restores -} - -send_task_data() { - local task_id=${1} - local file_path=${2} - - API_ADMIN_JWT_TOKEN=$(/home/create_jwt.py) - - bearer="Authorization: bearer $API_ADMIN_JWT_TOKEN" - - curl -sS "${API_HOST:-api}:${API_PORT:-3000}/graphql" \ - -H "${bearer}" \ - -F operations='{ "query": "mutation ($task: Int!, $files: [Upload!]!) { uploadFilesForTask(input:{task:$task, files:$files}) { id files { filename } } }", "variables": { "task": '"${task_id}"', "files": [null] } }' \ - -F map='{ "0": ["variables.files.0"] }' \ - -F 0=@${file_path} -} - -# Waiting for the API to be ready -wait_for_services - -# Create the lagoon-demo project and associated users, groups, deployments, tasks etc -send_graphql_query $populate_demo_lagoon_gql_file_path - -# Add the deployment and task logs -update_minio_files - -# Add the task file to a sample task -send_task_data 124 $sample_task_file_path - -# Create the lagoon-demo-org Organization and related users, groups and projects -send_graphql_query $populate_demo_lagoon_org_gql_file_path - -# Prepare the api with the necessary test fixtures for ci-local-control-k8s testing -send_graphql_query $populate_ci_local_control_k8s_gql_file_path - -echo "Lagoon init complete" -touch /tmp/api-data-pushed diff --git a/local-dev/k3d-seed-data/00-populate-kubernetes.gql b/local-dev/seed-data/00-populate-kubernetes.gql similarity index 88% rename from local-dev/k3d-seed-data/00-populate-kubernetes.gql rename to local-dev/seed-data/00-populate-kubernetes.gql index 1039d1e0c6..18ed4f03a0 100644 --- a/local-dev/k3d-seed-data/00-populate-kubernetes.gql +++ b/local-dev/seed-data/00-populate-kubernetes.gql @@ -5,11 +5,11 @@ mutation PopulateApi { input: { id: 2001 name: "ci-local-control-k8s" - consoleUrl: "https://localhost:8443/" + consoleUrl: "${CONSOLE_URL}" routerPattern: "${ROUTER_PATTERN}.nip.io" sshHost: "${SSH_PORTAL_HOST}" sshPort: "${SSH_PORTAL_PORT}" - token: "${TOKEN}" + token: "${KUBERNETES_TOKEN}" } ) { id @@ -1065,4 +1065,115 @@ mutation PopulateApi { id } + ### These are used IN CI and tests + ### Groups + CiGroup: addGroup( + input: { + name: "ci-group" + } + ) { + id + } + + ### Users + CiCustomerUserRsa: addUser( + input: { + email: "ci-customer-user-rsa@example.com" + comment: "ci-customer-user-rsa" + } + ) { + id + } + CiCustomerUserEd25519: addUser( + input: { + email: "ci-customer-user-ed25519@example.com" + comment: "ci-customer-user-ed25519" + } + ) { + id + } + CiCustomerUserEcdsa: addUser( + input: { + email: "ci-customer-user-ecdsa@example.com" + comment: "ci-customer-user-ecdsa" + } + ) { + id + } + + ### SSH Keys + CiCustomerSshKeyRsa: addUserSSHPublicKey( + input: { + id: 4 + name: "sshkey-ci-customer-user-rsa" + publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" + user: { + email: "ci-customer-user-rsa@example.com" + } + } + ) { + id + } + + ### Add Users to Groups + CiCustomerUserAddRsa: addUserToGroup( + input: { + user: { + email:"ci-customer-user-rsa@example.com" + } + group: { + name: "ci-group" + } + role: OWNER + } + ) { + name + } + CiCustomerUserAddEd25519: addUserToGroup( + input: { + user: { + email:"ci-customer-user-ed25519@example.com" + } + group: { + name: "ci-group" + } + role: OWNER + } + ) { + name + } + CiCustomerUserAddEcdsa: addUserToGroup( + input: { + user: { + email:"ci-customer-user-ecdsa@example.com" + } + group: { + name: "ci-group" + } + role: OWNER + } + ) { + name + } + + # Real RocketChat Hook on the amazeeio RocketChat for testing + CiRocketChat: addNotificationRocketChat( + input: { + name: "amazeeio--lagoon-local-ci" + webhook: "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn" + channel: "lagoon-local-ci" + } + ) { + id + } + + # Fake email address for testing + CiEmail: addNotificationEmail( + input: { + name: "local-email-testing", + emailAddress: "mail@example.com" + } + ) { + id + } } diff --git a/local-dev/k3d-seed-data/configure-webauthn.sh b/local-dev/seed-data/configure-webauthn.sh similarity index 100% rename from local-dev/k3d-seed-data/configure-webauthn.sh rename to local-dev/seed-data/configure-webauthn.sh diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt b/local-dev/seed-data/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt rename to local-dev/seed-data/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt b/local-dev/seed-data/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt rename to local-dev/seed-data/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt b/local-dev/seed-data/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt rename to local-dev/seed-data/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt b/local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt rename to local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt b/local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt rename to local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt b/local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt rename to local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt b/local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt rename to local-dev/seed-data/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt diff --git a/local-dev/api-data-watcher-pusher/minio-data/restores/lagoon-demo-main.tar.gz b/local-dev/seed-data/minio-data/restores/lagoon-demo-main.tar.gz similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/restores/lagoon-demo-main.tar.gz rename to local-dev/seed-data/minio-data/restores/lagoon-demo-main.tar.gz diff --git a/local-dev/api-data-watcher-pusher/minio-data/task-files/sample-task-file.txt b/local-dev/seed-data/minio-data/task-files/sample-task-file.txt similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/task-files/sample-task-file.txt rename to local-dev/seed-data/minio-data/task-files/sample-task-file.txt diff --git a/local-dev/k3d-seed-data/seed-example-sso.sh b/local-dev/seed-data/seed-example-sso.sh similarity index 100% rename from local-dev/k3d-seed-data/seed-example-sso.sh rename to local-dev/seed-data/seed-example-sso.sh diff --git a/local-dev/k3d-seed-data/seed-users.sh b/local-dev/seed-data/seed-users.sh similarity index 100% rename from local-dev/k3d-seed-data/seed-users.sh rename to local-dev/seed-data/seed-users.sh