From c708a97b6bcc1f926fa330e88c9dbe6ebd430d06 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 9 Nov 2023 16:42:23 +1100 Subject: [PATCH 1/9] rejig data-watcher-pusher --- docker-compose.yaml | 17 +- local-dev/api-data | 1 - local-dev/api-data-watcher-pusher/Dockerfile | 7 +- .../api-data/01-populate-api-data-general.gql | 416 +++--------------- .../03-populate-api-data-kubernetes.gql | 46 +- .../04-populate-api-data-organizations.gql | 46 +- .../api-data-watcher-pusher/api-watch-push.sh | 19 +- ...c-86358316-a755-11ed-8206-032901f4c7e3.txt | 49 +++ ...i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt | 21 + ...6-85e36e3c-a755-11ed-abf6-df28d8a74109.txt | 29 ++ .../tasklogs/lagoon-demo/main/task.txt | 0 .../minio-data}/restores/files.tar.gz | Bin services/api/src/apolloServer.js | 4 +- services/api/src/mocks.js | 4 +- ...on-webhook-handler.postman_collection.json | 4 +- 15 files changed, 229 insertions(+), 434 deletions(-) delete mode 120000 local-dev/api-data create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/task.txt rename local-dev/{ => api-data-watcher-pusher/minio-data}/restores/files.tar.gz (100%) diff --git a/docker-compose.yaml b/docker-compose.yaml index d4a3e05ad3..386db3391b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -86,8 +86,8 @@ services: command: yarn run dev environment: - NODE_ENV=development - - KEYCLOAK_API=http://localhost:8088/auth - - GRAPHQL_API=http://localhost:3000/graphql + - KEYCLOAK_API=http://0.0.0.0:8088/auth + - GRAPHQL_API=http://0.0.0.0:3000/graphql ports: - '8888:3003' actions-handler: @@ -210,7 +210,6 @@ services: - api image: ${IMAGE_REPO:-lagoon}/local-api-data-watcher-pusher volumes: - - ./local-dev/api-data:/api-data - ./local-dev/api-data-watcher-pusher:/home local-dbaas-provider: image: ${IMAGE_REPO:-lagoon}/local-dbaas-provider @@ -239,18 +238,6 @@ services: - MINIO_ROOT_PASSWORD=minio123 volumes: - minio_storage:/export - local-minio-upload: - image: minio/mc - entrypoint: sh - command: -c 'mc alias set localminio $${MINIO_SERVER_URL} $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD}; mc ls localminio; mc cp /restores/files.tar.gz localminio/restores/high-cotton-master-files.tar.gz' - volumes: - - ./local-dev/restores:/restores - environment: - - MINIO_SERVER_URL=http://172.17.0.1:9000 - - MINIO_ROOT_USER=minio - - MINIO_ROOT_PASSWORD=minio123 - depends_on: - - local-minio local-registry: image: ${IMAGE_REPO:-lagoon}/local-registry ports: diff --git a/local-dev/api-data b/local-dev/api-data deleted file mode 120000 index db0db03d3e..0000000000 --- a/local-dev/api-data +++ /dev/null @@ -1 +0,0 @@ -./api-data-watcher-pusher/api-data \ No newline at end of file diff --git a/local-dev/api-data-watcher-pusher/Dockerfile b/local-dev/api-data-watcher-pusher/Dockerfile index e093945755..75648dc14a 100644 --- a/local-dev/api-data-watcher-pusher/Dockerfile +++ b/local-dev/api-data-watcher-pusher/Dockerfile @@ -1,7 +1,9 @@ -FROM alpine:3.17.1 +FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} + RUN apk add --no-cache \ bash \ gettext \ + minio-client \ moreutils \ py3-jwt \ tini \ @@ -16,6 +18,7 @@ ENV JWTSECRET=super-secret-string \ TOKEN="eyJhbGciOiJSUzI1NiIsImtpZCI6IjZWamZLTzEzZ2lPSGFtc0d6QXVkWXpDYi1fcmlfLWVBd3JtbEEydGItTHcifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJsYWdvb24iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlY3JldC5uYW1lIjoia3ViZXJuZXRlc2J1aWxkZGVwbG95LXRva2VuLXJxNDg1Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmVybmV0ZXNidWlsZGRlcGxveSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjA3YzViODAxLTI5ZDgtNDU5Ni1hODBlLTZlMmU3MmY3YmMwMCIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpsYWdvb246a3ViZXJuZXRlc2J1aWxkZGVwbG95In0.srj-zZguNXCQbeTIS5GtJw7Jl61k_miC8hXED70NQULm6OAMkImHrURRCfD4kjKPy-jbwEI88m5TNLFP8_0sMfdwj2vr2Gv8fTC55qoAJ589ff_dwv8THSKdKNj6VaHynzEzQ4IfZscd3ogP4HYF9alt-X4mMcJ2BApBt4F13Hg-bE2-4uzO0b_u13pJhzn0XrH8JGXWP0_oMPtE7M0zJL9BfOrBph_MgSb2djSbVBNbhPJ0fs9-eIB5aAu0NmqPhpxj6WL4UOAKX178IsDAq4vtRZrScZwvZxRcaDUxZ-MgwewWI8Ll0yg7UCxtZTdkLglkCgpjTK33Ei0PXWdE4A" COPY api-data /api-data +COPY minio-data /minio-data COPY api-watch-push.sh create_jwt.py /home/ -CMD ["tini", "--", "/home/api-watch-push.sh"] +CMD ["/sbin/tini", "--", "/home/api-watch-push.sh"] diff --git a/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-general.gql b/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-general.gql index 97d4c1d95b..a3e9c0a69d 100644 --- a/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-general.gql +++ b/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-general.gql @@ -1,345 +1,28 @@ mutation PopulateApi { - #### Populate API with needed Objects to run the Credentialstests - - - ### Groups - CredentialtestGroup1: addGroup( - input: { - name: "credentialtest-group1" - } - ) { - id - } - CredentialtestGroup2: addGroup( - input: { - name: "credentialtest-group2" - } - ) { - id - } - CredentialtestGroup3: addGroup( - input: { - name: "credentialtest-group3" - parentGroup: { - name: "credentialtest-group2" - } - } - ) { - id - } - - ### Users - CredentialtestGroupAccessUser: addUser( - input: { - email: "credentialtestbothgroupaccess_user@example.com" - comment: "credentialtestbothgroupaccess_user" - } - ) { - id - } - CredentialtestSubgroupAccessUser: addUser( - input: { - email: "credentialtestsubgroupaccess_user@example.com" - comment: "credentialtestsubgroupaccess_user" - } - ) { - id - } - 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: - CredentialtestCustomerAccessSshKey: addSshKey( - input: { - id: 1 - name: "credentialtestbothgroupaccess" - keyValue: "AAAAB3NzaC1yc2EAAAADAQABAAABAQDHDRxmCLzLCLdo8M8hK+v5Zr5p4q0XQYwCm9xxWWU8ItkyP4LB90fyh8qWFJRQTYrGNe4usDL5kPyHXhUevdZt75jcjWqlWypbtNY4nFfi+HQ9dnR/f7RRkoBWbha3j8mqZdRHXo9xrXMc82wXaN9a9dMbvEmZPkTpi75g+C0KXBrfjJjDR6Lvr7zWoB2nPMmgy1UGLl5dKxJOg7vHYCpAI582knd0nep3t3bRdlxe7l/CxMthZmoJxz6dfoFotDyBjivVYqEiybtjkNBQnRf2xYQ7m6837hu3EkSVKdgbonWASFMenpuFacDE2S2dVftwW3QjzIOtdQERGZuMsi0p" - keyType: SSH_RSA - user: { - email: "credentialtestbothgroupaccess_user@example.com" - } - } - ) { - id - } - CredentialtestSubgroupAccessSshKey: addSshKey( - input: { - id: 2 - name: "credentialtestsubgroupaccess" - keyValue: "AAAAB3NzaC1yc2EAAAADAQABAAABAQDSeDyxIwMWOjeAq7hF2qirbtoD33JZA2RxodsnnesrmWvrRlANn/fYZSR9zc8SMUMA6s6gR6eOLP+Nrz6bz9xIPFDhHpU7yJqWvb8EM2EPpgSppGmBIBDIPN+5YSxiX5fTuLn2dGHyIdgRvl1yXC09Pa16i/gweMIskP7nanFUfVcgUlTNm0nS6F+MzqklRRO7Tw1zOuleEnXohpzGpUJV5xgQmX4CoqiKYuyXssgBdwsrB9oYdGl8i7xi1w7Xlop6FhbaY/vQdy5f9xfoY2jiO7Big6FDeUGccpjL+xZ0MlKfiTl/OIHcsbshQZ1+D9eSmeaaQ8r9cujgTX2Y7umt" - keyType: SSH_RSA - user: { - email: "credentialtestbothgroupaccess_user@example.com" - } - } - ) { - id - } - CiCustomerSshKeyRsa: addSshKey( - input: { - id: 4 - name: "ci-customer-sshkey-rsa" - keyValue: "AAAAB3NzaC1yc2EAAAADAQABAAACAQDEZlms5XsiyWjmnnUyhpt93VgHypse9Bl8kNkmZJTiM3Ex/wZAfwogzqd2LrTEiIOWSH1HnQazR+Cc9oHCmMyNxRrLkS/MEl0yZ38Q+GDfn37h/llCIZNVoHlSgYkqD0MQrhfGL5AulDUKIle93dA6qdCUlnZZjDPiR0vEXR36xGuX7QYAhK30aD2SrrBruTtFGvj87IP/0OEOvUZe8dcU9G/pCoqrTzgKqJRpqs/s5xtkqLkTIyR/SzzplO21A+pCKNax6csDDq3snS8zfx6iM8MwVfh8nvBW9seax1zBvZjHAPSTsjzmZXm4z32/ujAn/RhIkZw3ZgRKrxzryttGnWJJ8OFyF31JTJgwWWuPdH53G15PC83ZbmEgSV3win51RZRVppN4uQUuaqZWG9wwk2a6P5aen1RLCSLpTkd2mAEk9PlgmJrf8vITkiU9pF9n68ENCoo556qSdxW2pxnjrzKVPSqmqO1Xg5K4LOX4/9N4n4qkLEOiqnzzJClhFif3O28RW86RPxERGdPT81UI0oDAcU5euQr8Emz+Hd+PY1115UIld3CIHib5PYL9Ee0bFUKiWpR/acSe1fHB64mCoHP7hjFepGsq7inkvg2651wUDKBshGltpNkMj6+aZedNc0/rKYyjl80nT8g8QECgOSRzpmYp0zli2HpFoLOiWw==" - keyType: SSH_RSA - user: { - email: "ci-customer-user-rsa@example.com" - } - } - ) { - id - } - CiCustomerSshKeyEd25519: addSshKey( - input: { - id: 5 - name: "ci-customer-sshkey-ed25519" - keyValue: "AAAAC3NzaC1lZDI1NTE5AAAAIMdEs1h19jv2UrbtKcqPDatUxT9lPYcbGlEAbInsY8Ka" - keyType: SSH_ED25519 - user: { - email: "ci-customer-user-ed25519@example.com" - } - } - ) { - id - } - CiCustomerSshKeyEcdsa: addSshKey( - input: { - id: 6 - name: "ci-customer-sshkey-ecdsa" - keyValue: "AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAD8E5wfvLg8vvfO9mmHVsZQK8dNgdKM5FrTxL4ORDq66Z50O8zUzBwF1VTO5Zx+qwB7najMdWsnW00BC6PMysSNJQD5HI4CokyKqmGdeSXcROYwvYOjlDQ+jD5qOSmkllRZZnkEYXE5FVBXaZWToyfGUGIoECvKGUQZxkBDHsbK13JdfA==" - keyType: ECDSA_SHA2_NISTP521 - user: { - email: "ci-customer-user-ecdsa@example.com" - } - } - ) { - id - } - - ## credentialtestbothgroupaccess_user: Access to group1 and group2 - CredentialtestCustomerAccessUserAdd1: addUserToGroup( - input: { - user: { - email:"credentialtestbothgroupaccess_user@example.com" - } - group: { - name: "credentialtest-group1" - } - role: OWNER - } - ) { - name - } - CredentialtestCustomerAccessUserAdd2: addUserToGroup( - input: { - user: { - email:"credentialtestbothgroupaccess_user@example.com" - } - group: { - name: "credentialtest-group2" - } - role: OWNER - } - ) { - name - } - - ## credentialtestsubgroupaccess_user: Access to group1 and group3 - CredentialtestSubgroupAccessUserAdd1: addUserToGroup( - input: { - user: { - email:"credentialtestsubgroupaccess_user@example.com" - } - group: { - name: "credentialtest-group3" - } - role: OWNER - } - ) { - name - } - - - #### Filling API with needed Objects for CI - # Customer with a private key that has access to the local-git server - CiGroup: addGroup( - input: { - name: "ci-group" - } - ) { - id - } - 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 - } - - - #### Lagoon Kickstart Objects - # Customer with a private key that has access to the local-git server. - KickstartGroup: addGroup( - input: { - name: "kickstart-group" - } - ) { - id - } - KickstartRocketChat: addNotificationRocketChat( - input: { - name: "amazeeio--lagoon-kickstart" - webhook: "https://amazeeio.rocket.chat/hooks/ikF5XMohDZK7KpsZf/c9BFBt2ch8oMMuycoERJQMSLTPo8nmZhg2Hf2ny68ZpuD4Kn" - channel: "lagoon-kickstart" - } - ) { - id - } - KickstartOpenshift: addOpenshift( - input: { - id: 3 - name: "kickstart-openshift" - consoleUrl: "[REPLACE ME WITH OPENSHIFT URL]" - token: "[REPLACE ME WITH OPENSHIFT LAGOON SERVICEACCOUTN TOKEN]" - } - ) { - id - } - KickstartProject: addProject( - input: { - id: 13 - name: "lagoon" - openshift: 3 - gitUrl: "git@github.com:amazeeio/lagoon.git" - openshiftProjectPattern: "lagoon" - productionEnvironment:"master" - } - ) { - id - } - KickstartProjectGroup4: addGroupsToProject( - input: { - project: { - name: "lagoon" - } - groups: [ - { - name: "kickstart-group" - } - ] - } - ) { - id - } - KickstartRocketChatNotification: addNotificationToProject( - input: { - project: "lagoon" - notificationType: ROCKETCHAT - notificationName: "amazeeio--lagoon-kickstart" - } - ) { - id - } - #### Filling API with needed objects for UI - UIOpenshift: addOpenshift( + + UIKubernetes: addKubernetes( input: { id: 4 - name: "ui-openshift" + name: "ui-kubernetes" consoleUrl: "https://localhost:8443/" } ) { id } UICustomer1: addGroup( - input: { name: "ui-customer" } + input: { name: "lagoon-group" } ) { id } UIProject1: addProject( input: { id: 18 - name: "high-cotton" + name: "lagoon-demo" availability: HIGH openshift: 4 - gitUrl: "ssh://git@172.17.0.1:2222/git/project18.git" - productionEnvironment: "Master" + gitUrl: "ssh://git@example.com/lagoon-demo.git" + productionEnvironment: "main" problemsUi: 1 factsUi: 1 } @@ -349,11 +32,11 @@ mutation PopulateApi { UIProject1Group5: addGroupsToProject( input: { project: { - name: "high-cotton" + name: "lagoon-demo" } groups: [ { - name: "ui-customer" + name: "lagoon-group" } ] } @@ -363,12 +46,12 @@ mutation PopulateApi { UIProject1Environment1: addOrUpdateEnvironment( input: { id: 3 - name: "Master" + name: "main" project: 18 deployType: BRANCH - deployBaseRef: "Master" + deployBaseRef: "main" environmentType: PRODUCTION - openshiftProjectName: "high-cotton-master" + openshiftProjectName: "lagoon-demo-main" } ) { id @@ -377,8 +60,8 @@ mutation PopulateApi { input: { id: 3 patch: { - route: "http://highcotton.org" - routes: "http://highcotton.org,https://varnish-highcotton-org-prod.us.amazee.io,https://nginx-highcotton-org-prod.us.amazee.io" + route: "https://lagoondemo.example.org" + routes: "https://lagoondemo.example.org,https://nginx.main.lagoon-demo.ui-kubernetes.lagoon.sh" } } ) { @@ -420,7 +103,7 @@ mutation PopulateApi { input: { backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280f" status: SUCCESSFUL - restoreLocation: "http://172.17.0.1:9000/restores/high-cotton-master-files.tar.gz" + restoreLocation: "http://172.17.0.1:9000/restores/lagoon-demo-main.tar.gz" execute: false } ) { @@ -461,7 +144,7 @@ mutation PopulateApi { UIProject1Environment1addDeployment1: addDeployment( input: { - name: "build-1" + name: "lagoon-build-123abc" status: COMPLETE remoteId: "86358316-a755-11ed-8206-032901f4c7e3" environment: 3 @@ -474,7 +157,7 @@ mutation PopulateApi { } UIProject1Environment1addDeployment2: addDeployment( input: { - name: "build-2" + name: "lagoon-build-def456" remoteId: "85e36e3c-a755-11ed-abf6-df28d8a74109" status: FAILED environment: 3 @@ -487,7 +170,7 @@ mutation PopulateApi { } UIProject1Environment1addDeployment3: addDeployment( input: { - name: "build-3" + name: "lagoon-build-7g8h9i" remoteId: "84e1dc8a-a755-11ed-a37d-770f36aa3d4e" status: RUNNING environment: 3 @@ -685,7 +368,7 @@ mutation PopulateApi { UIProject1Environment1addFactReference1: addFactReference( input: { fid: 2 - name: "nginx.high-cotton.org" + name: "lagoondemo.example.org" } ) { id @@ -703,12 +386,12 @@ mutation PopulateApi { UIProject1Environment2: addOrUpdateEnvironment( input: { id: 4 - name: "Staging" + name: "staging" project: 18 deployType: BRANCH - deployBaseRef: "Staging" + deployBaseRef: "staging" environmentType: DEVELOPMENT - openshiftProjectName: "high-cotton-staging" + openshiftProjectName: "lagoon-demo-staging" } ) { id @@ -717,8 +400,8 @@ mutation PopulateApi { input: { id: 4 patch: { - route: "https://varnish-highcotton-org-staging.us.amazee.io" - routes: "https://varnish-highcotton-org-staging.us.amazee.io,https://nginx-highcotton-org-staging.us.amazee.io" + route: "https://nginx.staging.lagoon-demo.ui-kubernetes.lagoon.sh" + routes: "https://nginx.staging.lagoon-demo.ui-kubernetes.lagoon.sh" } } ) { @@ -727,12 +410,12 @@ mutation PopulateApi { UIProject1Environment3: addOrUpdateEnvironment( input: { id: 5 - name: "Development" + name: "dev" project: 18 deployType: BRANCH - deployBaseRef: "Development" + deployBaseRef: "dev" environmentType: DEVELOPMENT - openshiftProjectName: "high-cotton-development" + openshiftProjectName: "lagoon-demo-dev" } ) { id @@ -741,8 +424,8 @@ mutation PopulateApi { input: { id: 5 patch: { - route: "https://varnish-highcotton-org-development.us.amazee.io" - routes: "https://varnish-highcotton-org-development.us.amazee.io,https://nginx-highcotton-org-development.us.amazee.io" + route: "" # intentionally empty, for testing + routes: "" # intentionally empty, for testing } } ) { @@ -822,14 +505,14 @@ mutation PopulateApi { UIProject1Environment4: addOrUpdateEnvironment( input: { id: 6 - name: "PR-175" + name: "pr-175" project: 18 deployType: PULLREQUEST deployBaseRef: "target" deployHeadRef: "source" - deployTitle: "PR-175" + deployTitle: "pr-175" environmentType: DEVELOPMENT - openshiftProjectName: "high-cotton-pr-175" + openshiftProjectName: "lagoon-demo-pr-175" } ) { id @@ -838,15 +521,15 @@ mutation PopulateApi { input: { id: 6 patch: { - route: "" # intentionally empty, for testing - routes: "" # intentionally empty, for testing + 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 high-cotton for permissions validations in local testing easily + ## Create some general users with specific role against lagoon-demo for permissions validations in local testing easily UserExampleGuest: addUser( input: { email: "guest@example.com" @@ -892,22 +575,31 @@ mutation PopulateApi { id } - HighCottonGroup: addGroup( + UserExamplePlatformOwner: addUser( + input: { + email: "platformowner@example.com" + comment: "platform owner user" + } + ) { + id + } + + LagoonDemoGroup: addGroup( input: { - name: "high-cotton" + name: "lagoon-demo-group" } ) { id } - HighCottonProjectToGroup: addGroupsToProject( + LagoonDemoToGroup: addGroupsToProject( input: { project: { - name: "high-cotton" + name: "lagoon-demo" } groups: [ { - name: "high-cotton" + name: "lagoon-demo-group" } ] } @@ -921,7 +613,7 @@ mutation PopulateApi { email:"guest@example.com" } group: { - name: "high-cotton" + name: "lagoon-demo-group" } role: GUEST } @@ -935,7 +627,7 @@ mutation PopulateApi { email:"reporter@example.com" } group: { - name: "high-cotton" + name: "lagoon-demo-group" } role: REPORTER } @@ -949,7 +641,7 @@ mutation PopulateApi { email:"developer@example.com" } group: { - name: "high-cotton" + name: "lagoon-demo-group" } role: DEVELOPER } @@ -963,7 +655,7 @@ mutation PopulateApi { email:"maintainer@example.com" } group: { - name: "high-cotton" + name: "lagoon-demo-group" } role: MAINTAINER } @@ -977,7 +669,7 @@ mutation PopulateApi { email:"owner@example.com" } group: { - name: "high-cotton" + name: "lagoon-demo-group" } role: OWNER } diff --git a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql index aab8b26dd9..a046295ee1 100644 --- a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql +++ b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql @@ -1,21 +1,18 @@ mutation PopulateApi { + #### Populate API with needed Objects to run the Kubernetes Tests - #### Populate API with lagoon-remote Openshift - CiLocalKubernetes: addOpenshift( + + ### Groups + CiGroup: addGroup( 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 + name: "ci-group" } ) { id } - CiCustomerUserRsa: addUser( + ### Users + CiCustomerUserRsa: addUser( input: { email: "ci-customer-user-rsa@example.com" comment: "ci-customer-user-rsa" @@ -23,7 +20,6 @@ mutation PopulateApi { ) { id } - CiCustomerUserEd25519: addUser( input: { email: "ci-customer-user-ed25519@example.com" @@ -32,7 +28,6 @@ mutation PopulateApi { ) { id } - CiCustomerUserEcdsa: addUser( input: { email: "ci-customer-user-ecdsa@example.com" @@ -42,6 +37,7 @@ mutation PopulateApi { id } + ### SSH Keys CiCustomerSshKeyRsa: addSshKey( input: { id: 4 @@ -82,14 +78,7 @@ mutation PopulateApi { id } - CiGroup: addGroup( - input: { - name: "ci-group" - } - ) { - id - } - + ### Add Users to Groups CiCustomerUserAddRsa: addUserToGroup( input: { user: { @@ -103,7 +92,6 @@ mutation PopulateApi { ) { name } - CiCustomerUserAddEd25519: addUserToGroup( input: { user: { @@ -117,7 +105,6 @@ mutation PopulateApi { ) { name } - CiCustomerUserAddEcdsa: addUserToGroup( input: { user: { @@ -132,6 +119,21 @@ mutation PopulateApi { name } + #### Populate API with lagoon-remote Kubernetes + CiLocalKubernetes: addKubernetes( + input: { + id: 2001 + name: "ci-local-control-k8s" + consoleUrl: "https://172.17.0.1:16643/" # make-host-docker-internal + routerPattern: "${project}.${environment}.172.17.0.1.nip.io" + sshHost: "lagoon-remote-ssh-portal.lagoon.svc" + sshPort: "2222" + token: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjZWamZLTzEzZ2lPSGFtc0d6QXVkWXpDYi1fcmlfLWVBd3JtbEEydGItTHcifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJsYWdvb24iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlY3JldC5uYW1lIjoia3ViZXJuZXRlc2J1aWxkZGVwbG95LXRva2VuLXJxNDg1Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmVybmV0ZXNidWlsZGRlcGxveSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjA3YzViODAxLTI5ZDgtNDU5Ni1hODBlLTZlMmU3MmY3YmMwMCIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpsYWdvb246a3ViZXJuZXRlc2J1aWxkZGVwbG95In0.srj-zZguNXCQbeTIS5GtJw7Jl61k_miC8hXED70NQULm6OAMkImHrURRCfD4kjKPy-jbwEI88m5TNLFP8_0sMfdwj2vr2Gv8fTC55qoAJ589ff_dwv8THSKdKNj6VaHynzEzQ4IfZscd3ogP4HYF9alt-X4mMcJ2BApBt4F13Hg-bE2-4uzO0b_u13pJhzn0XrH8JGXWP0_oMPtE7M0zJL9BfOrBph_MgSb2djSbVBNbhPJ0fs9-eIB5aAu0NmqPhpxj6WL4UOAKX178IsDAq4vtRZrScZwvZxRcaDUxZ-MgwewWI8Ll0yg7UCxtZTdkLglkCgpjTK33Ei0PXWdE4A" # make-kubernetes-token + } + ) { + id + } + # Real RocketChat Hook on the amazeeio RocketChat for testing CiRocketChat: addNotificationRocketChat( input: { diff --git a/local-dev/api-data-watcher-pusher/api-data/04-populate-api-data-organizations.gql b/local-dev/api-data-watcher-pusher/api-data/04-populate-api-data-organizations.gql index 2c2b44d44a..f4ff79afed 100644 --- a/local-dev/api-data-watcher-pusher/api-data/04-populate-api-data-organizations.gql +++ b/local-dev/api-data-watcher-pusher/api-data/04-populate-api-data-organizations.gql @@ -3,8 +3,8 @@ mutation PopulateApi { # Organizations UIOrganization1: addOrganization(input: { id: 1 - name: "test-organization" - friendlyName: "Test Organization" + name: "lagoon-demo-organization" + friendlyName: "Lagoon Demo Organization" description: "An organization for testing" quotaProject: 5 quotaEnvironment: 4 @@ -21,7 +21,7 @@ mutation PopulateApi { UIOrganizationUser: addUser( input: { - email: "testuser@example.com" + email: "orguser@example.com" comment: "test user that will be in a group in an organization" } ) { @@ -45,7 +45,9 @@ mutation PopulateApi { } UIOrganizationGroup: addGroupToOrganization( - input: { name: "organization-group1", organization: 1} + input: { + name: "lagoon-demo-organization-group" + organization: 1} ) { id } @@ -53,10 +55,10 @@ mutation PopulateApi { UIOrganizationUserToGroup: addUserToGroup( input: { user: { - email:"testuser@example.com" + email:"orguser@example.com" } group: { - name: "organization-group1" + name: "lagoon-demo-organization-group" } role: MAINTAINER } @@ -91,6 +93,7 @@ mutation PopulateApi { UIOrganizationNotificationTeams: addNotificationMicrosoftTeams(input: {organization: 1, name: "teams-test", webhook: "http://teams.example.com/hooks/sdgsgsgs"}) { id } + UILocalKubernetesOrganization: addDeployTargetToOrganization(input:{ deployTarget: 2001 organization: 1 @@ -102,11 +105,11 @@ mutation PopulateApi { input: { id: 180 organization: 1 - name: "organization-cotton" + name: "lagoon-org-demo" availability: HIGH openshift: 2001 - gitUrl: "ssh://git@172.17.0.1:2222/git/project180.git" - productionEnvironment: "master" + gitUrl: "ssh://git@example.com/lagoon-org-demo.git" + productionEnvironment: "main" problemsUi: 1 factsUi: 1 } @@ -118,11 +121,11 @@ mutation PopulateApi { UIOrganizationProjectGroup: addGroupsToProject( input: { project: { - name: "organization-cotton" + name: "lagoon-org-demo" } groups: [ { - name: "organization-group1" + name: "lagoon-demo-organization-group" } ] } @@ -138,17 +141,18 @@ mutation PopulateApi { deployType: BRANCH deployBaseRef: "main" environmentType: PRODUCTION - openshiftProjectName: "organization-cotton-main" + openshiftProjectName: "lagoon-org-demo-main" } ) { id } + UIOrganizationProjectEnvironment1Update: updateEnvironment( input: { id: 30 patch: { - route: "http://cotton.example.org" - routes: "http://cotton.example.org,https://varnish-organization-cotton-main.cluster.example.com,https://nginx-organization-cotton-main.cluster.example.com" + route: "https://lagoonorgdemo.example.org" + routes: "https://lagoonorgdemo.example.org,https://nginx.main.lagoon-org-demo.ui-kubernetes.lagoon.sh" } } ) { @@ -162,7 +166,7 @@ mutation PopulateApi { deployType: BRANCH deployBaseRef: "staging" environmentType: DEVELOPMENT - openshiftProjectName: "organization-cotton-staging" + openshiftProjectName: "lagoon-org-demo-staging" } ) { id @@ -175,7 +179,7 @@ mutation PopulateApi { deployType: BRANCH deployBaseRef: "development" environmentType: DEVELOPMENT - openshiftProjectName: "organization-cotton-development" + openshiftProjectName: "lagoon-org-demo-development" } ) { id @@ -183,12 +187,14 @@ mutation PopulateApi { UIOrganizationProjectEnvironment4: addOrUpdateEnvironment( input: { id: 33 - name: "uat" + name: "pr-15" project: 180 - deployType: BRANCH - deployBaseRef: "uat" + deployType: PULLREQUEST + deployBaseRef: "target" + deployHeadRef: "source" + deployTitle: "pr-15" environmentType: DEVELOPMENT - openshiftProjectName: "organization-cotton-uat" + openshiftProjectName: "lagoon-org-demo-pr-15" } ) { id diff --git a/local-dev/api-data-watcher-pusher/api-watch-push.sh b/local-dev/api-data-watcher-pusher/api-watch-push.sh index 0f486dd1fb..7345d176a2 100755 --- a/local-dev/api-data-watcher-pusher/api-watch-push.sh +++ b/local-dev/api-data-watcher-pusher/api-watch-push.sh @@ -1,12 +1,12 @@ #!/bin/bash # inject variables from environment into the GQL template -envsubst '$GIT_HOST $GIT_PORT $INGRESS_IP $CONSOLE_URL $TOKEN' < /api-data/03-populate-api-data-kubernetes.gql | sponge /api-data/03-populate-api-data-kubernetes.gql +envsubst '$GIT_HOST $GIT_PORT $INGRESS_IP $CONSOLE_URL $TOKEN' < /home/api-data/03-populate-api-data-kubernetes.gql | sponge /home/api-data/03-populate-api-data-kubernetes.gql -clear_gql_file_path="/api-data/00-clear-api-data.gql" -populate_general_gql_file_path="/api-data/01-populate-api-data-general.gql" -populate_kubernetes_gql_file_path="/api-data/03-populate-api-data-kubernetes.gql" -populate_organizations_gql_file_path="/api-data/04-populate-api-data-organizations.gql" +clear_gql_file_path="/home/api-data/00-clear-api-data.gql" +populate_general_gql_file_path="/home/api-data/01-populate-api-data-general.gql" +populate_kubernetes_gql_file_path="/home/api-data/03-populate-api-data-kubernetes.gql" +populate_organizations_gql_file_path="/home/api-data/04-populate-api-data-organizations.gql" send_graphql_query() { local file_path=${1} @@ -24,6 +24,12 @@ send_graphql_query() { 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 +} + watch_apidatafolder() { chsum_clear_prev="" chsum_populate_general_prev="" @@ -43,7 +49,7 @@ watch_apidatafolder() { [[ $chsum_populate_kubernetes_prev != $chsum_populate_kubernetes_curr ]]; [[ $chsum_populate_organizations_prev != $chsum_populate_organizations_curr ]]; then - echo "******* Found changes in gql files in /api-data/, clearing and re-populating" + echo "******* Found changes in gql files in /home/api-data/, clearing and re-populating" if send_graphql_query $clear_gql_file_path; @@ -85,4 +91,5 @@ watch_apidatafolder() { done } +update_minio_files watch_apidatafolder 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/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt new file mode 100644 index 0000000000..9bfb246071 --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-123abc-86358316-a755-11ed-8206-032901f4c7e3.txt @@ -0,0 +1,49 @@ +================================================================================ +Logs on pod lagoon-build-abc123, assigned to cluster ci-local-control-k8s +================================================================================ + +############################################## +build-deploy-tool core-v9.99.9 (built: 2023-11-02T00:00:00+0000 / go 1.18) +############################################## + +############################################## +BEGIN Initial Step +############################################## + +############################################## +STEP Initial Step: Completed at 2023-11-03 00:00:10 (UTC) Duration 00:00:10 Elapsed 00:00:10 +############################################## + +############################################## +BEGIN Second Step +############################################## + +############################################## +STEP Second Step: Completed at 2023-11-03 00:00:20 (UTC) Duration 00:00:10 Elapsed 00:00:20 +############################################## + +############################################## +BEGIN Third Step - no completion time +############################################## + +This step is missing a STEP clause because of a race condition +############################################## +BEGIN Fourth Step +############################################## + +############################################## +STEP Fourth Step: Completed at 2023-11-03 00:00:40 (UTC) Duration 00:00:10 Elapsed 00:00:40 +############################################## + +This step is missing a BEGIN clause because of a race condition +############################################## +STEP Fifth Step: Completed at 2023-11-03 00:00:50 (UTC) Duration 00:00:10 Elapsed 00:00:50 +############################################## + +############################################## +BEGIN Build and Deploy +############################################## + +############################################## +STEP Build and Deploy: Completed at 2023-11-03 00:01:00 (UTC) Duration 00:00:10 Elapsed 00:01:00 +############################################## 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/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt new file mode 100644 index 0000000000..9087c211be --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-7g8h9i-84e1dc8a-a755-11ed-a37d-770f36aa3d4e.txt @@ -0,0 +1,21 @@ +================================================================================ +Logs on pod lagoon-build-7g8h9i, assigned to cluster ci-local-control-k8s +================================================================================ + +############################################## +build-deploy-tool core-v9.99.9 (built: 2023-11-02T00:00:00+0000 / go 1.18) +############################################## + +############################################## +BEGIN Initial Step +############################################## + +############################################## +STEP Initial Step: Completed at 2023-11-03 00:00:10 (UTC) Duration 00:00:10 Elapsed 00:00:10 +############################################## + +############################################## +BEGIN Second Step +############################################## + +This step is still running 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/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt new file mode 100644 index 0000000000..3ddaf8ba7c --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/buildlogs/lagoon-demo/main/lagoon-build-def456-85e36e3c-a755-11ed-abf6-df28d8a74109.txt @@ -0,0 +1,29 @@ +================================================================================ +Logs on pod lagoon-build-def456, assigned to cluster ci-local-control-k8s +================================================================================ + +############################################## +build-deploy-tool core-v9.99.9 (built: 2023-11-02T00:00:00+0000 / go 1.18) +############################################## + +############################################## +BEGIN Initial Step +############################################## + +############################################## +STEP Initial Step: Completed at 2023-11-03 00:00:10 (UTC) Duration 00:00:10 Elapsed 00:00:10 +############################################## + +############################################## +BEGIN Second Step +############################################## + +############################################## +STEP Second Step: Completed at 2023-11-03 00:00:20 (UTC) Duration 00:00:10 Elapsed 00:00:20 +############################################## + +############################################## +BEGIN Third Step - no completion time +############################################## + +This step errored with a nasty error!! diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/task.txt b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/task.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/local-dev/restores/files.tar.gz b/local-dev/api-data-watcher-pusher/minio-data/restores/files.tar.gz similarity index 100% rename from local-dev/restores/files.tar.gz rename to local-dev/api-data-watcher-pusher/minio-data/restores/files.tar.gz diff --git a/services/api/src/apolloServer.js b/services/api/src/apolloServer.js index e4b3e0864e..544c8ddb20 100644 --- a/services/api/src/apolloServer.js +++ b/services/api/src/apolloServer.js @@ -374,9 +374,9 @@ const apolloServer = new ApolloServer({ // operationName is set by the client and optional. rootFieldName is // set by the API type defs. - // operationName would be "getHighCottonProjectId" and rootFieldName + // operationName would be "getLagoonDemoProjectId" and rootFieldName // would be "getProjectByName" with a query like: - // query getHighCottonProjectId { getProjectByName(name: "high-cotton") { id } } + // query getLagoonDemoProjectId { getProjectByName(name: "lagoon-demo") { id } } const transactionName = operationName ? operationName : rootFieldName; newrelic.setTransactionName(`graphql (${transactionName})`); newrelic.addCustomAttribute('gqlQuery', queryString); diff --git a/services/api/src/mocks.js b/services/api/src/mocks.js index 34ae91f6c5..1c157567ce 100644 --- a/services/api/src/mocks.js +++ b/services/api/src/mocks.js @@ -587,8 +587,8 @@ mocks.Query = () => ({ deployments: [ mocks.Deployment() ] }), environmentWithDeployments: () => mocks.Environment(null, { deployments: [ - mocks.Deployment(null, { environment: { openshiftProjectName: "high-cotton-master" }}), - mocks.Deployment(null, { environment: { openshiftProjectName: "high-cotton-master" }}) + mocks.Deployment(null, { environment: { openshiftProjectName: "lagoon-demo-main" }}), + mocks.Deployment(null, { environment: { openshiftProjectName: "lagoon-demo-main" }}) ]}), deploymentByRemoteId: () => mocks.Deployment(), taskByRemoteId: () => mocks.Task(), diff --git a/services/webhook-handler/newman/lagoon-webhook-handler.postman_collection.json b/services/webhook-handler/newman/lagoon-webhook-handler.postman_collection.json index ffffb01ce3..b004643268 100644 --- a/services/webhook-handler/newman/lagoon-webhook-handler.postman_collection.json +++ b/services/webhook-handler/newman/lagoon-webhook-handler.postman_collection.json @@ -357,7 +357,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"high-cotton-master\",\n \"backup_metrics\": {\n \"backup_start_timestamp\": 0,\n \"backup_end_timestamp\": 0,\n \"errors\": 0,\n \"new_files\": 0,\n \"changed_files\": 0,\n \"unmodified_files\": 19,\n \"new_dirs\": 0,\n \"changed_dirs\": 1,\n \"unmodified_dirs\": 0,\n \"data_transferred\": 0,\n \"mounted_PVCs\": [\n \"nginx\",\n \"solr\"\n ]\n },\n \"snapshots\": [\n {\n \"id\": \"8ddac9900b18e8263455d744ca21af429a81f5309173a3c4986da12c02649852\",\n \"time\": \"2018-11-08T20:55:12.240921872Z\",\n \"tree\": \"c69327661323a0c597284dbb976f1d0b63a91f9acc617321f0f74e484327b07b\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"8353d86dd14e8e32009b02ec3b2ff74ae17812a2273fbd8e9e024cce4be3c682\",\n \"time\": \"2018-11-08T20:55:22.405136095Z\",\n \"tree\": \"2c2a1cc0ca1b6f4cdd2f51b5ce60d568ac03fbdcbcee3bb226dda3e96064fd09\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"c951362098638ef9459b40904bcc536de6afb68ef444fd02693f9fff7c62fdf3\",\n \"time\": \"2018-11-12T04:10:41.210628272Z\",\n \"tree\": \"8502f3ebc1dfb22c448947dd26722b69c3e2aaa9a7edcfecc518bf4b3c9df6c1\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"3bf5aac0603225a3181db5335de3b9b7965d99c7e869f751000498b8e22ba2aa\",\n \"time\": \"2018-11-12T04:10:44.546566325Z\",\n \"tree\": \"bc66eb3939bb60ed6c442cf99fcde7bf9a90364c520cc8a61f512ad12a10dc33\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"74373593ba0821c42551bd883531e84e9e0e4e624b61aecab2d9dc8d5ed286d5\",\n \"time\": \"2018-11-12T04:10:57.302416392Z\",\n \"tree\": \"b7108d9ffe1907ce9347978ad3460a1e0cd8761b7a93aabc99c915a8391911c0\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"abf2def9515320c86f1cfc726731cb0ce9abc6c8bde3accdbf46c8ebc2b69762\",\n \"time\": \"2018-11-12T04:12:12.968652711Z\",\n \"tree\": \"87d9e4c7f3f5cbff313988e704a6b8469fa61bba41dab73333c6fd58d30b6745\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"9a9f412e23db313ec1cac1773953d39d865e134f4e9e3332884bb87c35092b0b\",\n \"time\": \"2018-11-12T04:12:16.487622189Z\",\n \"tree\": \"3672d01c9a6d42ae3d37d7279264e3fbcab0093f4404bb60fbf5b3722ce16766\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"90cf5bf5ce930ede3587f6d352435b3d161c471fdef67015496b831072d1f2e1\",\n \"time\": \"2018-11-12T04:12:29.394725402Z\",\n \"tree\": \"aeecb64a023f75910139753f10f9e426c42aac55ed4e9adef26d931ad9c04cff\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"115bd2893671c3cf121c60f14c4900465a315ccc2a03720f8028cc49f75ec20b\",\n \"time\": \"2018-11-12T04:14:12.978278858Z\",\n \"tree\": \"2e355f0315bea8f7525dc8c387a7564b6204df93fde4cd981d6bbe8ab7d4ac3f\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"bfbe0ea503dad5970da16f0ebaeb4ff8aef5f6b1b69d9617cc4c95bf407389f2\",\n \"time\": \"2018-11-12T04:14:16.479753221Z\",\n \"tree\": \"db031c40d2cfa2d7958ab1b3789974f0e75d56a6ffc614a8c06c4f71a074502a\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"ff990cc387c7c14c70587efe73a5f8256bdb9f9a50e433eb01cf87446c135125\",\n \"time\": \"2018-11-12T04:14:28.863763589Z\",\n \"tree\": \"df71d603d6a4414ac86f22c13d21cd2a62dfbe2d2612d82ec143d1b98198a2a5\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"4a638e3738700193018f0668aa408b314d38879b742fa8f19000717e68b5dea0\",\n \"time\": \"2018-11-12T04:16:11.919985836Z\",\n \"tree\": \"c42e6b1a5be92e2c04d93f66e019900b87cad04da4a027b6125ab95e76bfb3c3\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"df743c6d78a0d36e23eea0d28f3a9fa6fa63ef4563b858bc3627147d573a4f10\",\n \"time\": \"2018-11-12T04:16:15.455637908Z\",\n \"tree\": \"350e74235a97434dc906f364993c26060353bad84fbd542b1d59ee4268862802\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"80b698920f97e36616f638cb59c379787967ff45416c9ba23c1807e4e0703414\",\n \"time\": \"2018-11-12T04:16:28.320904074Z\",\n \"tree\": \"e100116d5477c1746402649fde5219ae506a8d6605ed2600f6ada5dd340b5c23\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"96a675f8f8bb34d5fee530c1827e4a0220ced3e02a4ee72861d3f178c57d4a39\",\n \"time\": \"2018-11-12T04:18:13.912808872Z\",\n \"tree\": \"a163ecda8d6fc9e2ef26cfe0eeb5f8d8cc34c50138d8e35552ebd35bf67d2ab8\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"e890459c8636448f1c274df20d56d7887831968856ea7998ea6df0f4f90bc82f\",\n \"time\": \"2018-11-12T04:18:17.475944229Z\",\n \"tree\": \"81946d6d029bb33d11fd9898fce2710b9dd1754e7a5f576be3a0aa9799ee3c50\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"947e5421d5cfb8530aee8fa2d6abf09db67f63b306e227dddd951789ec52c3b9\",\n \"time\": \"2018-11-12T04:18:29.930604593Z\",\n \"tree\": \"0170e129c4d2a14b785ea52a90e89ac5bb4da79d94aae57b12f0fba754b91102\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"8c6eae0022de793ab0d26b0184300141ea551e872860df4168c7ebbcdfe63bca\",\n \"time\": \"2018-11-12T04:20:38.522899482Z\",\n \"tree\": \"724fc18b8273957c46ffc195c208703b1b56ad74a02f260aef559d8e27c93e8a\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"82133ad8fc4eefdca36b59cb1930cf84a462bfc311a6b90dec7d5f2884d0e387\",\n \"time\": \"2018-11-12T04:20:41.839459119Z\",\n \"tree\": \"53f36b66825c53b0b3894a823a6bde47ab473df999ad6a220e0e7e9f634ce46a\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"fbd0d2ac9e70c4fffd21aa3a4cfc3695e79d058c36aa4d7277da64d2fda6c54c\",\n \"time\": \"2018-11-12T04:20:54.078233202Z\",\n \"tree\": \"b3ea647b57cd9998ee187f05b104deb76719dd797fe455fae590f32bcc7a06df\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"32e01dc2871660fbfbc2bf00c4618d90350fdd66140f0c43f5b23b934b35b447\",\n \"time\": \"2018-11-12T04:22:12.35335149Z\",\n \"tree\": \"9a8bf18aa6451b65474b67c25b221e72c0f9ebe971428f263585ab3647740336\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"a624272f203ab3e42daea7e061d27dd9a85ec288f532834a4c9714c8c61bfc31\",\n \"time\": \"2018-11-12T04:22:16.000145366Z\",\n \"tree\": \"e43d9a7f5b34263e846611841305663e42c81402e2cf2b421fb282ba9e2ebe0f\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"37c0cfa208cdc7c1254d45d187294d90161ab0718615a9b1becd66c2e85ceec5\",\n \"time\": \"2018-11-12T04:22:30.23671284Z\",\n \"tree\": \"b272930e53830dbff9d2770ed6c80b1dd115ba60821cc501e0c0799668a7d2e8\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"f56ce6bc50998bed88702f45833ade4a4edce59536bb94e778a276791303e6db\",\n \"time\": \"2018-11-12T04:24:12.958144712Z\",\n \"tree\": \"19da8f40cb4393db1ec858ec65fb2eac45c38c76ff88e5f8f4bfec2bfd3f7852\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"3057caf7a7f8b51bf8588008d5a2eebe151809365ac1a3edffd4d6dc6414d404\",\n \"time\": \"2018-11-12T04:24:16.538215622Z\",\n \"tree\": \"97ca0c4bb778cb5f742c92b51b39fc4d177968944507d528b20d6c892e02cf69\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"f4bb1579222a8f33a806565aaf04990d65a39c02e680b1e80cf4f061db82a483\",\n \"time\": \"2018-11-12T04:24:28.870681932Z\",\n \"tree\": \"a4f7d06be74420cd55a071c363dd4e1cf6358b0067a288ba1543e07cb998c94c\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"428c59183687001c1bd98ffcaa82e24f586fe1faa70235b3567c5d26b7641769\",\n \"time\": \"2018-11-12T04:26:13.210768152Z\",\n \"tree\": \"63be205923e30f6a9faabca56a5bb026ed7bfa74b43932f53bb8b3614b9ae91e\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"42a9e209a7e4b73e323e1f2e9a93dab8bd7f0cf987b1dd448935b9c661718aec\",\n \"time\": \"2018-11-12T04:26:16.951077394Z\",\n \"tree\": \"894cf5cd02d0cedfc449998868f2e03a944a81f57995eaf15cddda0d7577e169\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"d3985dde21eb8507a361672f94c20bfc11760b6c2bd39f8dbe4d712dd3833939\",\n \"time\": \"2018-11-12T04:26:29.534973653Z\",\n \"tree\": \"79a63200d759209a6d844559183253143bd79bfaec980c596c42b98fb89fa460\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"efbe239ae0450975be1057c456808364f42066f500fc84573b952b0b24f09601\",\n \"time\": \"2018-11-12T04:28:13.768913899Z\",\n \"tree\": \"3e1e2e7e506b16d2219cc495dc49895b34f78f034550e8aec2011d84a6706436\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"ea829fab0d6b74f07dca0d2469bfe0ff3fcbc3fb8ae137880ad94e66d536dcbc\",\n \"time\": \"2018-11-12T04:28:17.671811992Z\",\n \"tree\": \"dc8b74eb02ea7a8d53a791a093e1974c89f5dacb96e913bc194766b800f7647a\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"30606c9d3e29371d237eaf85ff51d9e693812569cf2708629339284a21c61803\",\n \"time\": \"2018-11-12T04:28:29.788382743Z\",\n \"tree\": \"5a4e6fc33d5a10935db36163bb08558457be90407ec728f170bb45299274e803\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"95770d85946ecac3b17eb92a230fd1a4ff7832349c80888edd35073295b9e49d\",\n \"time\": \"2018-11-12T04:30:36.959765675Z\",\n \"tree\": \"8419ba476b2fc62159c40ecf3a755729274f3629b30e1935c3811499528e1be5\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"4e1b25eacbe9995d985a7bb708143d69a5d16e0a1bf258084637b5653b606488\",\n \"time\": \"2018-11-12T04:30:40.369368696Z\",\n \"tree\": \"c3e4389f875c3078c0dea25d8ba9cae459ff3760b2c4f3eafaab66fa4e42aa56\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"9ffae0808ad44c412c170a101eb209bbbdff4c793ca3c2892a5041f95a3a071c\",\n \"time\": \"2018-11-12T04:30:52.412839388Z\",\n \"tree\": \"336798912fdfc3ec88e28ea8f20b64d3970bea165c03d51018f87e4dd82e05db\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"33ce8ff15f8c223ba1f795af5115301055d51b9ecbc744e274d40f0551a0ec69\",\n \"time\": \"2018-11-12T04:32:12.640998654Z\",\n \"tree\": \"3cf30ebd3421b2a4367fecf822cd69ba76f33d8665ef5b32c0d4b37b4a96355d\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"f413f858ef817c5f99b837e0be6ce8bcdee799ccd3b08a90f752019e3c9a9674\",\n \"time\": \"2018-11-12T04:32:17.321911747Z\",\n \"tree\": \"2093c0222a98aaa38211717a66fb2d0549d257517d9743b378ec2e58f15ec484\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"ca6d06609501f1d289990d2092c9cbbff3795dc08f0b898aa1de7160ac0ac3eb\",\n \"time\": \"2018-11-12T04:32:29.84245698Z\",\n \"tree\": \"ca231e01303f25304339f00131f2ca373c52cc3f5e81ae54f613bf455817187e\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"3a9d8b5b574fcd1b8b4b4a13765f55d3b1da790bd62a0aea4c2c75c263abd6a9\",\n \"time\": \"2018-11-12T04:34:14.110205851Z\",\n \"tree\": \"543d9242a9956d260357b373a8cf9d2229541411893378cb70b36c67d2e49b81\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"high-cotton-master-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"2789ad33b90024a936a3852f351311151e75a002eaf5ac9c2918378e7383698c\",\n \"time\": \"2018-11-12T04:34:18.228960247Z\",\n \"tree\": \"5fc74fee5af40ce3e8efdc1cfc13f295ca367a5644860ca82c19e980bc36ca6f\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"15cfa0ce8ac6749a7d1af8783749562718a316f5c4a77ae6d60459ff3c2952fd\",\n \"time\": \"2018-11-12T04:34:31.033774542Z\",\n \"tree\": \"32265c58986f48f079b460c65a1e2dd421e970a1ff575b4071a89aa51e1ce151\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"high-cotton-master\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n }\n ]\n}" + "raw": "{\n \"name\": \"lagoon-demo-main\",\n \"backup_metrics\": {\n \"backup_start_timestamp\": 0,\n \"backup_end_timestamp\": 0,\n \"errors\": 0,\n \"new_files\": 0,\n \"changed_files\": 0,\n \"unmodified_files\": 19,\n \"new_dirs\": 0,\n \"changed_dirs\": 1,\n \"unmodified_dirs\": 0,\n \"data_transferred\": 0,\n \"mounted_PVCs\": [\n \"nginx\",\n \"solr\"\n ]\n },\n \"snapshots\": [\n {\n \"id\": \"8ddac9900b18e8263455d744ca21af429a81f5309173a3c4986da12c02649852\",\n \"time\": \"2018-11-08T20:55:12.240921872Z\",\n \"tree\": \"c69327661323a0c597284dbb976f1d0b63a91f9acc617321f0f74e484327b07b\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"8353d86dd14e8e32009b02ec3b2ff74ae17812a2273fbd8e9e024cce4be3c682\",\n \"time\": \"2018-11-08T20:55:22.405136095Z\",\n \"tree\": \"2c2a1cc0ca1b6f4cdd2f51b5ce60d568ac03fbdcbcee3bb226dda3e96064fd09\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"c951362098638ef9459b40904bcc536de6afb68ef444fd02693f9fff7c62fdf3\",\n \"time\": \"2018-11-12T04:10:41.210628272Z\",\n \"tree\": \"8502f3ebc1dfb22c448947dd26722b69c3e2aaa9a7edcfecc518bf4b3c9df6c1\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"3bf5aac0603225a3181db5335de3b9b7965d99c7e869f751000498b8e22ba2aa\",\n \"time\": \"2018-11-12T04:10:44.546566325Z\",\n \"tree\": \"bc66eb3939bb60ed6c442cf99fcde7bf9a90364c520cc8a61f512ad12a10dc33\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"74373593ba0821c42551bd883531e84e9e0e4e624b61aecab2d9dc8d5ed286d5\",\n \"time\": \"2018-11-12T04:10:57.302416392Z\",\n \"tree\": \"b7108d9ffe1907ce9347978ad3460a1e0cd8761b7a93aabc99c915a8391911c0\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"abf2def9515320c86f1cfc726731cb0ce9abc6c8bde3accdbf46c8ebc2b69762\",\n \"time\": \"2018-11-12T04:12:12.968652711Z\",\n \"tree\": \"87d9e4c7f3f5cbff313988e704a6b8469fa61bba41dab73333c6fd58d30b6745\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"9a9f412e23db313ec1cac1773953d39d865e134f4e9e3332884bb87c35092b0b\",\n \"time\": \"2018-11-12T04:12:16.487622189Z\",\n \"tree\": \"3672d01c9a6d42ae3d37d7279264e3fbcab0093f4404bb60fbf5b3722ce16766\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"90cf5bf5ce930ede3587f6d352435b3d161c471fdef67015496b831072d1f2e1\",\n \"time\": \"2018-11-12T04:12:29.394725402Z\",\n \"tree\": \"aeecb64a023f75910139753f10f9e426c42aac55ed4e9adef26d931ad9c04cff\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"115bd2893671c3cf121c60f14c4900465a315ccc2a03720f8028cc49f75ec20b\",\n \"time\": \"2018-11-12T04:14:12.978278858Z\",\n \"tree\": \"2e355f0315bea8f7525dc8c387a7564b6204df93fde4cd981d6bbe8ab7d4ac3f\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"bfbe0ea503dad5970da16f0ebaeb4ff8aef5f6b1b69d9617cc4c95bf407389f2\",\n \"time\": \"2018-11-12T04:14:16.479753221Z\",\n \"tree\": \"db031c40d2cfa2d7958ab1b3789974f0e75d56a6ffc614a8c06c4f71a074502a\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"ff990cc387c7c14c70587efe73a5f8256bdb9f9a50e433eb01cf87446c135125\",\n \"time\": \"2018-11-12T04:14:28.863763589Z\",\n \"tree\": \"df71d603d6a4414ac86f22c13d21cd2a62dfbe2d2612d82ec143d1b98198a2a5\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"4a638e3738700193018f0668aa408b314d38879b742fa8f19000717e68b5dea0\",\n \"time\": \"2018-11-12T04:16:11.919985836Z\",\n \"tree\": \"c42e6b1a5be92e2c04d93f66e019900b87cad04da4a027b6125ab95e76bfb3c3\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"df743c6d78a0d36e23eea0d28f3a9fa6fa63ef4563b858bc3627147d573a4f10\",\n \"time\": \"2018-11-12T04:16:15.455637908Z\",\n \"tree\": \"350e74235a97434dc906f364993c26060353bad84fbd542b1d59ee4268862802\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"80b698920f97e36616f638cb59c379787967ff45416c9ba23c1807e4e0703414\",\n \"time\": \"2018-11-12T04:16:28.320904074Z\",\n \"tree\": \"e100116d5477c1746402649fde5219ae506a8d6605ed2600f6ada5dd340b5c23\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"96a675f8f8bb34d5fee530c1827e4a0220ced3e02a4ee72861d3f178c57d4a39\",\n \"time\": \"2018-11-12T04:18:13.912808872Z\",\n \"tree\": \"a163ecda8d6fc9e2ef26cfe0eeb5f8d8cc34c50138d8e35552ebd35bf67d2ab8\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"e890459c8636448f1c274df20d56d7887831968856ea7998ea6df0f4f90bc82f\",\n \"time\": \"2018-11-12T04:18:17.475944229Z\",\n \"tree\": \"81946d6d029bb33d11fd9898fce2710b9dd1754e7a5f576be3a0aa9799ee3c50\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"947e5421d5cfb8530aee8fa2d6abf09db67f63b306e227dddd951789ec52c3b9\",\n \"time\": \"2018-11-12T04:18:29.930604593Z\",\n \"tree\": \"0170e129c4d2a14b785ea52a90e89ac5bb4da79d94aae57b12f0fba754b91102\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"8c6eae0022de793ab0d26b0184300141ea551e872860df4168c7ebbcdfe63bca\",\n \"time\": \"2018-11-12T04:20:38.522899482Z\",\n \"tree\": \"724fc18b8273957c46ffc195c208703b1b56ad74a02f260aef559d8e27c93e8a\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"82133ad8fc4eefdca36b59cb1930cf84a462bfc311a6b90dec7d5f2884d0e387\",\n \"time\": \"2018-11-12T04:20:41.839459119Z\",\n \"tree\": \"53f36b66825c53b0b3894a823a6bde47ab473df999ad6a220e0e7e9f634ce46a\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"fbd0d2ac9e70c4fffd21aa3a4cfc3695e79d058c36aa4d7277da64d2fda6c54c\",\n \"time\": \"2018-11-12T04:20:54.078233202Z\",\n \"tree\": \"b3ea647b57cd9998ee187f05b104deb76719dd797fe455fae590f32bcc7a06df\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"32e01dc2871660fbfbc2bf00c4618d90350fdd66140f0c43f5b23b934b35b447\",\n \"time\": \"2018-11-12T04:22:12.35335149Z\",\n \"tree\": \"9a8bf18aa6451b65474b67c25b221e72c0f9ebe971428f263585ab3647740336\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"a624272f203ab3e42daea7e061d27dd9a85ec288f532834a4c9714c8c61bfc31\",\n \"time\": \"2018-11-12T04:22:16.000145366Z\",\n \"tree\": \"e43d9a7f5b34263e846611841305663e42c81402e2cf2b421fb282ba9e2ebe0f\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"37c0cfa208cdc7c1254d45d187294d90161ab0718615a9b1becd66c2e85ceec5\",\n \"time\": \"2018-11-12T04:22:30.23671284Z\",\n \"tree\": \"b272930e53830dbff9d2770ed6c80b1dd115ba60821cc501e0c0799668a7d2e8\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"f56ce6bc50998bed88702f45833ade4a4edce59536bb94e778a276791303e6db\",\n \"time\": \"2018-11-12T04:24:12.958144712Z\",\n \"tree\": \"19da8f40cb4393db1ec858ec65fb2eac45c38c76ff88e5f8f4bfec2bfd3f7852\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"3057caf7a7f8b51bf8588008d5a2eebe151809365ac1a3edffd4d6dc6414d404\",\n \"time\": \"2018-11-12T04:24:16.538215622Z\",\n \"tree\": \"97ca0c4bb778cb5f742c92b51b39fc4d177968944507d528b20d6c892e02cf69\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"f4bb1579222a8f33a806565aaf04990d65a39c02e680b1e80cf4f061db82a483\",\n \"time\": \"2018-11-12T04:24:28.870681932Z\",\n \"tree\": \"a4f7d06be74420cd55a071c363dd4e1cf6358b0067a288ba1543e07cb998c94c\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"428c59183687001c1bd98ffcaa82e24f586fe1faa70235b3567c5d26b7641769\",\n \"time\": \"2018-11-12T04:26:13.210768152Z\",\n \"tree\": \"63be205923e30f6a9faabca56a5bb026ed7bfa74b43932f53bb8b3614b9ae91e\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"42a9e209a7e4b73e323e1f2e9a93dab8bd7f0cf987b1dd448935b9c661718aec\",\n \"time\": \"2018-11-12T04:26:16.951077394Z\",\n \"tree\": \"894cf5cd02d0cedfc449998868f2e03a944a81f57995eaf15cddda0d7577e169\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"d3985dde21eb8507a361672f94c20bfc11760b6c2bd39f8dbe4d712dd3833939\",\n \"time\": \"2018-11-12T04:26:29.534973653Z\",\n \"tree\": \"79a63200d759209a6d844559183253143bd79bfaec980c596c42b98fb89fa460\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"efbe239ae0450975be1057c456808364f42066f500fc84573b952b0b24f09601\",\n \"time\": \"2018-11-12T04:28:13.768913899Z\",\n \"tree\": \"3e1e2e7e506b16d2219cc495dc49895b34f78f034550e8aec2011d84a6706436\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"ea829fab0d6b74f07dca0d2469bfe0ff3fcbc3fb8ae137880ad94e66d536dcbc\",\n \"time\": \"2018-11-12T04:28:17.671811992Z\",\n \"tree\": \"dc8b74eb02ea7a8d53a791a093e1974c89f5dacb96e913bc194766b800f7647a\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"30606c9d3e29371d237eaf85ff51d9e693812569cf2708629339284a21c61803\",\n \"time\": \"2018-11-12T04:28:29.788382743Z\",\n \"tree\": \"5a4e6fc33d5a10935db36163bb08558457be90407ec728f170bb45299274e803\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"95770d85946ecac3b17eb92a230fd1a4ff7832349c80888edd35073295b9e49d\",\n \"time\": \"2018-11-12T04:30:36.959765675Z\",\n \"tree\": \"8419ba476b2fc62159c40ecf3a755729274f3629b30e1935c3811499528e1be5\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"4e1b25eacbe9995d985a7bb708143d69a5d16e0a1bf258084637b5653b606488\",\n \"time\": \"2018-11-12T04:30:40.369368696Z\",\n \"tree\": \"c3e4389f875c3078c0dea25d8ba9cae459ff3760b2c4f3eafaab66fa4e42aa56\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"9ffae0808ad44c412c170a101eb209bbbdff4c793ca3c2892a5041f95a3a071c\",\n \"time\": \"2018-11-12T04:30:52.412839388Z\",\n \"tree\": \"336798912fdfc3ec88e28ea8f20b64d3970bea165c03d51018f87e4dd82e05db\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"33ce8ff15f8c223ba1f795af5115301055d51b9ecbc744e274d40f0551a0ec69\",\n \"time\": \"2018-11-12T04:32:12.640998654Z\",\n \"tree\": \"3cf30ebd3421b2a4367fecf822cd69ba76f33d8665ef5b32c0d4b37b4a96355d\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"f413f858ef817c5f99b837e0be6ce8bcdee799ccd3b08a90f752019e3c9a9674\",\n \"time\": \"2018-11-12T04:32:17.321911747Z\",\n \"tree\": \"2093c0222a98aaa38211717a66fb2d0549d257517d9743b378ec2e58f15ec484\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"ca6d06609501f1d289990d2092c9cbbff3795dc08f0b898aa1de7160ac0ac3eb\",\n \"time\": \"2018-11-12T04:32:29.84245698Z\",\n \"tree\": \"ca231e01303f25304339f00131f2ca373c52cc3f5e81ae54f613bf455817187e\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"3a9d8b5b574fcd1b8b4b4a13765f55d3b1da790bd62a0aea4c2c75c263abd6a9\",\n \"time\": \"2018-11-12T04:34:14.110205851Z\",\n \"tree\": \"543d9242a9956d260357b373a8cf9d2229541411893378cb70b36c67d2e49b81\",\n \"paths\": [\n \"/go/src/git.vshn.net/vshn/wrestic/stdin\"\n ],\n \"hostname\": \"lagoon-demo-main-cli\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"2789ad33b90024a936a3852f351311151e75a002eaf5ac9c2918378e7383698c\",\n \"time\": \"2018-11-12T04:34:18.228960247Z\",\n \"tree\": \"5fc74fee5af40ce3e8efdc1cfc13f295ca367a5644860ca82c19e980bc36ca6f\",\n \"paths\": [\n \"/data/nginx\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n },\n {\n \"id\": \"15cfa0ce8ac6749a7d1af8783749562718a316f5c4a77ae6d60459ff3c2952fd\",\n \"time\": \"2018-11-12T04:34:31.033774542Z\",\n \"tree\": \"32265c58986f48f079b460c65a1e2dd421e970a1ff575b4071a89aa51e1ce151\",\n \"paths\": [\n \"/data/solr\"\n ],\n \"hostname\": \"lagoon-demo-main\",\n \"username\": \"\",\n \"uid\": 0,\n \"gid\": 0,\n \"tags\": null\n }\n ]\n}" }, "url": { "raw": "{{hostname}}", @@ -371,4 +371,4 @@ ] } ] -} \ No newline at end of file +} From 1ea339511b2d78406eb50f52e6e8bf740a8ed065 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 9 Nov 2023 17:32:01 +1100 Subject: [PATCH 2/9] cp folders to correct dir --- local-dev/api-data-watcher-pusher/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local-dev/api-data-watcher-pusher/Dockerfile b/local-dev/api-data-watcher-pusher/Dockerfile index 75648dc14a..cc1e503a12 100644 --- a/local-dev/api-data-watcher-pusher/Dockerfile +++ b/local-dev/api-data-watcher-pusher/Dockerfile @@ -17,8 +17,8 @@ ENV JWTSECRET=super-secret-string \ 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 /api-data -COPY minio-data /minio-data +COPY api-data /home/api-data +COPY minio-data /home/minio-data COPY api-watch-push.sh create_jwt.py /home/ CMD ["/sbin/tini", "--", "/home/api-watch-push.sh"] From 7792e61c1ada7ee01a20a0c1bdd12118257dcc26 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 9 Nov 2023 18:57:31 +1100 Subject: [PATCH 3/9] use updated chart --- Makefile | 2 +- .../{files.tar.gz => lagoon-demo-main.tar.gz} | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename local-dev/api-data-watcher-pusher/minio-data/restores/{files.tar.gz => lagoon-demo-main.tar.gz} (100%) diff --git a/Makefile b/Makefile index b84ba29181..cc3abc185f 100644 --- a/Makefile +++ b/Makefile @@ -366,7 +366,7 @@ STERN_VERSION = v2.6.1 CHART_TESTING_VERSION = v3.9.0 K3D_IMAGE = docker.io/rancher/k3s:v1.26.6-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 = testing/updated-dwp TASK_IMAGES = task-activestandby # Symlink the installed kubectl client if the correct version is already diff --git a/local-dev/api-data-watcher-pusher/minio-data/restores/files.tar.gz b/local-dev/api-data-watcher-pusher/minio-data/restores/lagoon-demo-main.tar.gz similarity index 100% rename from local-dev/api-data-watcher-pusher/minio-data/restores/files.tar.gz rename to local-dev/api-data-watcher-pusher/minio-data/restores/lagoon-demo-main.tar.gz From b8f405197d0466235c83242fe8d1f5819be7feb4 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 9 Nov 2023 19:44:58 +1100 Subject: [PATCH 4/9] fix template in 03-kubernetes --- .../api-data/03-populate-api-data-kubernetes.gql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql index a046295ee1..a432c18039 100644 --- a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql +++ b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql @@ -124,11 +124,11 @@ mutation PopulateApi { input: { id: 2001 name: "ci-local-control-k8s" - consoleUrl: "https://172.17.0.1:16643/" # make-host-docker-internal - routerPattern: "${project}.${environment}.172.17.0.1.nip.io" + consoleUrl: "${CONSOLE_URL}" # make-host-docker-internal + routerPattern: "${project}.${environment}.${INGRESS_IP}.nip.io" sshHost: "lagoon-remote-ssh-portal.lagoon.svc" sshPort: "2222" - token: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjZWamZLTzEzZ2lPSGFtc0d6QXVkWXpDYi1fcmlfLWVBd3JtbEEydGItTHcifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJsYWdvb24iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlY3JldC5uYW1lIjoia3ViZXJuZXRlc2J1aWxkZGVwbG95LXRva2VuLXJxNDg1Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmVybmV0ZXNidWlsZGRlcGxveSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjA3YzViODAxLTI5ZDgtNDU5Ni1hODBlLTZlMmU3MmY3YmMwMCIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpsYWdvb246a3ViZXJuZXRlc2J1aWxkZGVwbG95In0.srj-zZguNXCQbeTIS5GtJw7Jl61k_miC8hXED70NQULm6OAMkImHrURRCfD4kjKPy-jbwEI88m5TNLFP8_0sMfdwj2vr2Gv8fTC55qoAJ589ff_dwv8THSKdKNj6VaHynzEzQ4IfZscd3ogP4HYF9alt-X4mMcJ2BApBt4F13Hg-bE2-4uzO0b_u13pJhzn0XrH8JGXWP0_oMPtE7M0zJL9BfOrBph_MgSb2djSbVBNbhPJ0fs9-eIB5aAu0NmqPhpxj6WL4UOAKX178IsDAq4vtRZrScZwvZxRcaDUxZ-MgwewWI8Ll0yg7UCxtZTdkLglkCgpjTK33Ei0PXWdE4A" # make-kubernetes-token + token: "${TOKEN}" # make-kubernetes-token } ) { id From 8419e8e9dd587000049f545a4e214fc108a2f2e3 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Fri, 10 Nov 2023 16:57:06 +1100 Subject: [PATCH 5/9] rejig data init steps --- docker-compose.yaml | 5 - local-dev/api-data-watcher-pusher/Dockerfile | 5 +- ...l => 01-populate-api-data-lagoon-demo.gql} | 111 ++++++++++++------ ... 02-populate-api-data-lagoon-demo-org.gql} | 21 +++- ...opulate-api-data-ci-local-control-k8s.gql} | 0 .../api-data-watcher-pusher/api-watch-push.sh | 95 --------------- .../api-data-watcher-pusher/data-init-push.sh | 67 +++++++++++ ...3-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt | 2 + ...4-50573da4-f0dd-477a-9261-c4785ac2adff.txt | 4 + ...5-e3869563-126d-4922-b6c4-36289a374edb.txt | 2 + ...6-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt | 2 + .../tasklogs/lagoon-demo/main/task.txt | 0 .../restores/lagoon-demo-main.tar.gz | Bin 150 -> 304 bytes .../task-files/sample-task-file.txt | 1 + 14 files changed, 173 insertions(+), 142 deletions(-) rename local-dev/api-data-watcher-pusher/api-data/{01-populate-api-data-general.gql => 01-populate-api-data-lagoon-demo.gql} (88%) rename local-dev/api-data-watcher-pusher/api-data/{04-populate-api-data-organizations.gql => 02-populate-api-data-lagoon-demo-org.gql} (92%) rename local-dev/api-data-watcher-pusher/api-data/{03-populate-api-data-kubernetes.gql => 03-populate-api-data-ci-local-control-k8s.gql} (100%) delete mode 100755 local-dev/api-data-watcher-pusher/api-watch-push.sh create mode 100755 local-dev/api-data-watcher-pusher/data-init-push.sh create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt create mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt delete mode 100644 local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/task.txt create mode 100644 local-dev/api-data-watcher-pusher/minio-data/task-files/sample-task-file.txt diff --git a/docker-compose.yaml b/docker-compose.yaml index 386db3391b..6b98c127c9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -236,8 +236,6 @@ services: environment: - MINIO_ROOT_USER=minio - MINIO_ROOT_PASSWORD=minio123 - volumes: - - minio_storage:/export local-registry: image: ${IMAGE_REPO:-lagoon}/local-registry ports: @@ -250,6 +248,3 @@ services: version: '2' api-redis: image: ${IMAGE_REPO:-lagoon}/api-redis - -volumes: - minio_storage: {} diff --git a/local-dev/api-data-watcher-pusher/Dockerfile b/local-dev/api-data-watcher-pusher/Dockerfile index cc1e503a12..986aab7eef 100644 --- a/local-dev/api-data-watcher-pusher/Dockerfile +++ b/local-dev/api-data-watcher-pusher/Dockerfile @@ -2,6 +2,7 @@ FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} RUN apk add --no-cache \ bash \ + curl \ gettext \ minio-client \ moreutils \ @@ -19,6 +20,6 @@ ENV JWTSECRET=super-secret-string \ COPY api-data /home/api-data COPY minio-data /home/minio-data -COPY api-watch-push.sh create_jwt.py /home/ +COPY data-init-push.sh create_jwt.py /home/ -CMD ["/sbin/tini", "--", "/home/api-watch-push.sh"] +CMD ["/sbin/tini", "--", "/home/data-init-push.sh"] diff --git a/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-general.gql b/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-lagoon-demo.gql similarity index 88% rename from local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-general.gql rename to local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-lagoon-demo.gql index a3e9c0a69d..20a1a71159 100644 --- a/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-general.gql +++ b/local-dev/api-data-watcher-pusher/api-data/01-populate-api-data-lagoon-demo.gql @@ -10,11 +10,13 @@ mutation PopulateApi { ) { id } + UICustomer1: addGroup( input: { name: "lagoon-group" } ) { id } + UIProject1: addProject( input: { id: 18 @@ -29,6 +31,7 @@ mutation PopulateApi { ) { id } + UIProject1Group5: addGroupsToProject( input: { project: { @@ -43,6 +46,7 @@ mutation PopulateApi { ) { id } + UIProject1Environment1: addOrUpdateEnvironment( input: { id: 3 @@ -56,6 +60,7 @@ mutation PopulateApi { ) { id } + UIProject1Environment1Update: updateEnvironment( input: { id: 3 @@ -71,9 +76,9 @@ mutation PopulateApi { UIProject1Environment1Backup1: addBackup( input: { environment: 3 - source: "files" + source: "mariadb" backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280d" - created: "2018-10-14 00:33:16" + created: "2023-10-14 00:33:16" } ) { id @@ -91,9 +96,9 @@ mutation PopulateApi { UIProject1Environment1Backup2: addBackup( input: { environment: 3 - source: "mariadb" + source: "files" backupId: "e2e1d31b4a7dfc1687f469b6673f6bf2c0aabee0cc6b3f1bdbde710a9bc6280f" - created: "2018-10-14 00:33:16" + created: "2023-10-14 00:33:16" } ) { id @@ -113,9 +118,9 @@ mutation PopulateApi { UIProject1Environment1Backup3: addBackup( input: { environment: 3 - source: "files" + source: "mariadb" backupId: "e260f07c374e4a3319c5d46e688dab6f1eb23c3e61c166a37609d55762d2ee0b" - created: "2018-10-13 00:33:16" + created: "2023-10-13 00:33:16" } ) { id @@ -134,9 +139,9 @@ mutation PopulateApi { UIProject1Environment1Backup4: addBackup( input: { environment: 3 - source: "mariadb" + source: "files" backupId: "bf072a09e17726da54adc79936ec8745521993599d41211dfc9466dfd5bc32a5" - created: "2018-10-13 00:33:16" + created: "2023-10-13 00:33:16" } ) { id @@ -148,9 +153,9 @@ mutation PopulateApi { status: COMPLETE remoteId: "86358316-a755-11ed-8206-032901f4c7e3" environment: 3 - created: "2018-10-07 23:02:41" - started: "2018-10-07 23:03:41" - completed: "2018-10-07 23:20:41" + created: "2023-10-07 23:02:41" + started: "2023-10-07 23:03:41" + completed: "2023-10-07 23:20:41" } ) { id @@ -161,9 +166,9 @@ mutation PopulateApi { remoteId: "85e36e3c-a755-11ed-abf6-df28d8a74109" status: FAILED environment: 3 - created: "2018-10-07 23:02:41" - started: "2018-10-07 23:03:41" - completed: "2018-10-07 23:20:41" + created: "2023-10-07 23:02:41" + started: "2023-10-07 23:03:41" + completed: "2023-10-07 23:20:41" } ) { id @@ -174,8 +179,8 @@ mutation PopulateApi { remoteId: "84e1dc8a-a755-11ed-a37d-770f36aa3d4e" status: RUNNING environment: 3 - created: "2018-10-07 23:02:41" - started: "2018-10-07 23:03:41" + created: "2023-10-07 23:02:41" + started: "2023-10-07 23:03:41" } ) { id @@ -183,13 +188,16 @@ mutation PopulateApi { UIProject1Environment1addTask1: addTask( input: { - name: "Site Status" - status: PENDING + name: "Developer task" + id: 123 + remoteId: "5b21aff1-689c-41b7-80d7-6de9f5bff1f3" + status: FAILED environment: 3 service: "cli" - command: "drush status" - created: "2018-10-07 23:02:41" - started: "2018-10-07 23:03:41" + 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 } ) { @@ -198,14 +206,16 @@ mutation PopulateApi { UIProject1Environment1addTask2: addTask( input: { - name: "Drupal Archive" + name: "Maintainer task" + id: 124 + remoteId: "50573da4-f0dd-477a-9261-c4785ac2adff" status: COMPLETE environment: 3 service: "cli" - command: "drush archive-dump" - created: "2018-10-07 23:02:41" - started: "2018-10-07 23:03:41" - completed: "2018-10-07 23:13:41" + 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 } ) { @@ -214,14 +224,15 @@ mutation PopulateApi { UIProject1Environment1addTask3: addTask( input: { - name: "Drupal Archive" - status: FAILED + name: "Maintainer task" + id: 125 + remoteId: "e3869563-126d-4922-b6c4-36289a374edb" + status: PENDING environment: 3 service: "cli" - command: "drush archive-dump" - created: "2018-10-07 23:02:41" - started: "2018-10-07 23:03:41" - completed: "2018-10-07 23:05:41" + command: "site-status" + created: "2023-10-07 23:02:00" + started: "2023-10-07 23:02:10" execute: false } ) { @@ -234,7 +245,7 @@ mutation PopulateApi { description: "A task that only admins can see and run (logs also only visible to admin)" type: COMMAND service: "cli" - command: "env" + command: "site-status" permission: MAINTAINER project: 18 adminOnlyView: true @@ -253,11 +264,11 @@ mutation PopulateApi { UIProjectAdvancedTask2: addAdvancedTaskDefinition( input:{ - name: "Mainter task" - description: "A task that maintainers can run" + name: "Maintainer task" + description: "A task that only maintainers can run" type: COMMAND service: "cli" - command: "env" + command: "site-status" permission: MAINTAINER project: 18 } @@ -277,7 +288,7 @@ mutation PopulateApi { description: "A task that developers can run" type: COMMAND service: "cli" - command: "env" + command: "site-status" permission: DEVELOPER project: 18 } @@ -291,7 +302,30 @@ mutation PopulateApi { } } - UIProject1Environment1addServices: setEnvironmentServices(input:{environment:3, services:["cli", "nginx", "mariadb"]}) { + UIProjectInvokeAdvancedTask1: invokeRegisteredTask( + advancedTaskDefinition: 1 + environment: 3 + ) { + id + } + + UIProjectUpdateAdvancedTask1: updateTask( + input:{ + id: 126 + patch: { + remoteId: "0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a" + } + } + ) { + id + } + + UIProject1Environment1addServices: setEnvironmentServices( + input:{ + environment:3, + services:["cli", "nginx", "mariadb"] + } + ) { id } @@ -407,6 +441,7 @@ mutation PopulateApi { ) { id } + UIProject1Environment3: addOrUpdateEnvironment( input: { id: 5 diff --git a/local-dev/api-data-watcher-pusher/api-data/04-populate-api-data-organizations.gql b/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-lagoon-demo-org.gql similarity index 92% rename from local-dev/api-data-watcher-pusher/api-data/04-populate-api-data-organizations.gql rename to local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-lagoon-demo-org.gql index f4ff79afed..8f41564ba6 100644 --- a/local-dev/api-data-watcher-pusher/api-data/04-populate-api-data-organizations.gql +++ b/local-dev/api-data-watcher-pusher/api-data/02-populate-api-data-lagoon-demo-org.gql @@ -94,8 +94,25 @@ mutation PopulateApi { id } - UILocalKubernetesOrganization: addDeployTargetToOrganization(input:{ - deployTarget: 2001 + 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 diff --git a/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql b/local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-ci-local-control-k8s.gql similarity index 100% rename from local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-kubernetes.gql rename to local-dev/api-data-watcher-pusher/api-data/03-populate-api-data-ci-local-control-k8s.gql diff --git a/local-dev/api-data-watcher-pusher/api-watch-push.sh b/local-dev/api-data-watcher-pusher/api-watch-push.sh deleted file mode 100755 index 7345d176a2..0000000000 --- a/local-dev/api-data-watcher-pusher/api-watch-push.sh +++ /dev/null @@ -1,95 +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-kubernetes.gql | sponge /home/api-data/03-populate-api-data-kubernetes.gql - -clear_gql_file_path="/home/api-data/00-clear-api-data.gql" -populate_general_gql_file_path="/home/api-data/01-populate-api-data-general.gql" -populate_kubernetes_gql_file_path="/home/api-data/03-populate-api-data-kubernetes.gql" -populate_organizations_gql_file_path="/home/api-data/04-populate-api-data-organizations.gql" - -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 -} - -watch_apidatafolder() { - chsum_clear_prev="" - chsum_populate_general_prev="" - chsum_populate_kubernetes_prev="" - chsum_populate_organizations_prev="" - - while [[ true ]] - do - chsum_clear_curr=`md5sum $clear_gql_file_path` - chsum_populate_general_curr=`md5sum $populate_general_gql_file_path` - chsum_populate_kubernetes_curr=`md5sum $populate_kubernetes_gql_file_path` - chsum_populate_organizations_curr=`md5sum $populate_organizations_gql_file_path` - - if - [[ $chsum_clear_prev != $chsum_clear_curr ]] || - [[ $chsum_populate_general_prev != $chsum_populate_general_curr ]] || - [[ $chsum_populate_kubernetes_prev != $chsum_populate_kubernetes_curr ]]; - [[ $chsum_populate_organizations_prev != $chsum_populate_organizations_curr ]]; - then - echo "******* Found changes in gql files in /home/api-data/, clearing and re-populating" - - if - send_graphql_query $clear_gql_file_path; - then - chsum_clear_prev=$chsum_clear_curr - else - echo '**** ERROR while clearing, will try again.' - fi - - if - send_graphql_query $populate_general_gql_file_path; - then - chsum_populate_general_prev=$chsum_populate_general_curr - else - echo "**** ERROR while re-populating $populate_general_gql_file_path, will try again." - fi - - if - send_graphql_query $populate_kubernetes_gql_file_path; - then - chsum_populate_kubernetes_prev=$chsum_populate_kubernetes_curr - else - echo "**** ERROR while re-populating $populate_kubernetes_gql_file_path, will try again." - fi - - if - send_graphql_query $populate_organizations_gql_file_path; - then - chsum_populate_organizations_prev=$chsum_populate_organizations_curr - else - echo "**** ERROR while re-populating $populate_organizations_gql_file_path, will try again." - fi - - # notify intial push completed - touch /tmp/api-data-pushed - fi - - sleep 2 - done -} - -update_minio_files -watch_apidatafolder diff --git a/local-dev/api-data-watcher-pusher/data-init-push.sh b/local-dev/api-data-watcher-pusher/data-init-push.sh new file mode 100755 index 0000000000..476ed20587 --- /dev/null +++ b/local-dev/api-data-watcher-pusher/data-init-push.sh @@ -0,0 +1,67 @@ +#!/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 + +clear_gql_file_path="/home/api-data/00-clear-api-data.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" + +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} +} + +# Optionally clear *some* API data prior to reloading - not really necessary any more +# send_graphql_query $clear_gql_file_path + +# 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 + +touch /tmp/api-data-pushed 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/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt new file mode 100644 index 0000000000..c05c3c589e --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/123-5b21aff1-689c-41b7-80d7-6de9f5bff1f3.txt @@ -0,0 +1,2 @@ +LAGOON_USER: Developer +Site Status report: failed! 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/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt new file mode 100644 index 0000000000..63899e5f12 --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/124-50573da4-f0dd-477a-9261-c4785ac2adff.txt @@ -0,0 +1,4 @@ +LAGOON_USER: maintainer +FILE_UPLOADED: sample-task-file.txt + +Site Status report: success 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/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt new file mode 100644 index 0000000000..dd289580bd --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/125-e3869563-126d-4922-b6c4-36289a374edb.txt @@ -0,0 +1,2 @@ +LAGOON_USER: maintainer +Site Status report: pending 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/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt new file mode 100644 index 0000000000..2fde7fa942 --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/126-0ba18cc1-03e7-4dd6-b6e9-95c1ff54103a.txt @@ -0,0 +1,2 @@ +LAGOON_USER: admin +Site Status report: pending diff --git a/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/task.txt b/local-dev/api-data-watcher-pusher/minio-data/lagoon-files/tasklogs/lagoon-demo/main/task.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/local-dev/api-data-watcher-pusher/minio-data/restores/lagoon-demo-main.tar.gz b/local-dev/api-data-watcher-pusher/minio-data/restores/lagoon-demo-main.tar.gz index a8911cb7818d7843024ab93201dae6548728210e..47ac4be78ebad4573578468e08cc7966b2efe468 100644 GIT binary patch literal 304 zcmV-00nh#)iwFQrbWLRd1Jl!IpgAxwFfcbaRRGe4=B5V7G#n@xniw0KnHriHn3^aU z7#f(Gn=mMt(%xwd45h^-iA6xCB&FuzRYyo3>JK;Q&`nVAVG@o#KuV9KCiKm)g6fDs=5G>mpQARPZj!1y;cGBz?dGBh*<#=jX*h|cj} zlAlzWl$w)Mo}ZtBO&uZmAsYXNTm$WbQ817oGdD3kRj(i~orZQ0%KwH&#<2WvXl@27 z|IG}IjYso8JwRuGpF1y?6sQ#7_4IHF0@92i%)tgE|gSFnPN@^tlcS?83{G;p371*2dTjDk@>Gynk7mz~`J5C8yG C#(|Xp literal 150 zcmb2|=3oE==C>Dpxeht-v^|tb)q7C#&!~7_m{y0OfBv%9 w?+R@Cx7lSiOM4%%Tz>!acSRP_$5MYjJv;xI9bz|x+z{)3_DAYZ1`P%V0Dgi(SpWb4 diff --git a/local-dev/api-data-watcher-pusher/minio-data/task-files/sample-task-file.txt b/local-dev/api-data-watcher-pusher/minio-data/task-files/sample-task-file.txt new file mode 100644 index 0000000000..abc1fc694d --- /dev/null +++ b/local-dev/api-data-watcher-pusher/minio-data/task-files/sample-task-file.txt @@ -0,0 +1 @@ +This file was generated by a sample task From 0cb91f1097831f343a300fbc9fc3cbf94da64bcc Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Sat, 11 Nov 2023 12:56:07 +1100 Subject: [PATCH 6/9] fix missing DT --- .../api-data/02-populate-api-data-lagoon-demo-org.gql | 2 +- local-dev/api-data-watcher-pusher/data-init-push.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 index 8f41564ba6..d4b64ec854 100644 --- 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 @@ -124,7 +124,7 @@ mutation PopulateApi { organization: 1 name: "lagoon-org-demo" availability: HIGH - openshift: 2001 + openshift: 5 gitUrl: "ssh://git@example.com/lagoon-org-demo.git" productionEnvironment: "main" problemsUi: 1 diff --git a/local-dev/api-data-watcher-pusher/data-init-push.sh b/local-dev/api-data-watcher-pusher/data-init-push.sh index 476ed20587..b7025a8c93 100755 --- a/local-dev/api-data-watcher-pusher/data-init-push.sh +++ b/local-dev/api-data-watcher-pusher/data-init-push.sh @@ -64,4 +64,5 @@ 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 From 48f6716238adb57ca5a962282044bf1e97879c54 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Mon, 13 Nov 2023 10:15:43 +1100 Subject: [PATCH 7/9] consistent naming --- docker-compose.yaml | 4 ++-- .../02-populate-api-data-lagoon-demo-org.gql | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 6b98c127c9..2488615664 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -86,8 +86,8 @@ services: command: yarn run dev environment: - NODE_ENV=development - - KEYCLOAK_API=http://0.0.0.0:8088/auth - - GRAPHQL_API=http://0.0.0.0:3000/graphql + - KEYCLOAK_API=http:/localhost:8088/auth + - GRAPHQL_API=http://localhost:3000/graphql ports: - '8888:3003' actions-handler: 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 index d4b64ec854..7137afd70b 100644 --- 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 @@ -122,10 +122,10 @@ mutation PopulateApi { input: { id: 180 organization: 1 - name: "lagoon-org-demo" + name: "lagoon-demo-org" availability: HIGH openshift: 5 - gitUrl: "ssh://git@example.com/lagoon-org-demo.git" + gitUrl: "ssh://git@example.com/lagoon-demo-org.git" productionEnvironment: "main" problemsUi: 1 factsUi: 1 @@ -138,7 +138,7 @@ mutation PopulateApi { UIOrganizationProjectGroup: addGroupsToProject( input: { project: { - name: "lagoon-org-demo" + name: "lagoon-demo-org" } groups: [ { @@ -158,7 +158,7 @@ mutation PopulateApi { deployType: BRANCH deployBaseRef: "main" environmentType: PRODUCTION - openshiftProjectName: "lagoon-org-demo-main" + openshiftProjectName: "lagoon-demo-org-main" } ) { id @@ -168,8 +168,8 @@ mutation PopulateApi { input: { id: 30 patch: { - route: "https://lagoonorgdemo.example.org" - routes: "https://lagoonorgdemo.example.org,https://nginx.main.lagoon-org-demo.ui-kubernetes.lagoon.sh" + route: "https://lagoondemoorg.example.org" + routes: "https://lagoondemoorg.example.org,https://nginx.main.lagoon-demo-org.ui-kubernetes.lagoon.sh" } } ) { @@ -183,7 +183,7 @@ mutation PopulateApi { deployType: BRANCH deployBaseRef: "staging" environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-org-demo-staging" + openshiftProjectName: "lagoon-demo-org-staging" } ) { id @@ -196,7 +196,7 @@ mutation PopulateApi { deployType: BRANCH deployBaseRef: "development" environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-org-demo-development" + openshiftProjectName: "lagoon-demo-org-development" } ) { id @@ -211,7 +211,7 @@ mutation PopulateApi { deployHeadRef: "source" deployTitle: "pr-15" environmentType: DEVELOPMENT - openshiftProjectName: "lagoon-org-demo-pr-15" + openshiftProjectName: "lagoon-demo-org-pr-15" } ) { id From e92cd0282629e1ffdaf3875521c4d3c788db71c6 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Mon, 13 Nov 2023 11:37:20 +1100 Subject: [PATCH 8/9] final fixup? --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 2488615664..762fac276f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -86,7 +86,7 @@ services: command: yarn run dev environment: - NODE_ENV=development - - KEYCLOAK_API=http:/localhost:8088/auth + - KEYCLOAK_API=http://localhost:8088/auth - GRAPHQL_API=http://localhost:3000/graphql ports: - '8888:3003' From 249754a75a3c78d838b7b4472ad4598f397bccd4 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Mon, 13 Nov 2023 11:44:07 +1100 Subject: [PATCH 9/9] makefile updates --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index cc3abc185f..955913989b 100644 --- a/Makefile +++ b/Makefile @@ -358,15 +358,15 @@ ui-logs-development: build-ui-logs-development ## CI targets -KUBECTL_VERSION := v1.26.6 -HELM_VERSION := v3.12.2 -K3D_VERSION = v5.5.1 +KUBECTL_VERSION := v1.27.3 +HELM_VERSION := v3.13.1 +K3D_VERSION = v5.6.0 GOJQ_VERSION = v0.12.13 STERN_VERSION = v2.6.1 -CHART_TESTING_VERSION = v3.9.0 -K3D_IMAGE = docker.io/rancher/k3s:v1.26.6-k3s1 +CHART_TESTING_VERSION = v3.10.1 +K3D_IMAGE = docker.io/rancher/k3s:v1.27.3-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 = testing/updated-dwp +CHARTS_TREEISH = prerelease/lagoon_v217 TASK_IMAGES = task-activestandby # Symlink the installed kubectl client if the correct version is already