From 94b3a12d2a497286c961ae97745e404a10398821 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 15 Jan 2024 16:01:26 -0500 Subject: [PATCH 1/6] test(storage): swap seaweedfs upstream image for cryostat-storage --- smoketest.bash | 11 ----------- smoketest/compose/s3-seaweed.yml | 18 +++++++++--------- smoketest/compose/seaweed_cfg.json | 28 ---------------------------- 3 files changed, 9 insertions(+), 48 deletions(-) delete mode 100644 smoketest/compose/seaweed_cfg.json diff --git a/smoketest.bash b/smoketest.bash index 13267307e..29c9e77ec 100755 --- a/smoketest.bash +++ b/smoketest.bash @@ -146,8 +146,6 @@ cleanup() { down "${downFlags[@]}" ${container_engine} rm proxy_cfg_helper || true ${container_engine} volume rm auth_proxy_cfg || true - ${container_engine} rm seaweed_cfg_helper || true - ${container_engine} volume rm seaweed_cfg || true # podman kill hoster || true truncate -s 0 "${HOSTSFILE}" for i in "${PIDS[@]}"; do @@ -172,15 +170,6 @@ if [ "${USE_PROXY}" = "true" ]; then createProxyCfgVolume fi -createSeaweedConfigVolume() { - "${container_engine}" volume create seaweed_cfg - "${container_engine}" container create --name seaweed_cfg_helper -v seaweed_cfg:/tmp busybox - "${container_engine}" cp "${DIR}/smoketest/compose/seaweed_cfg.json" seaweed_cfg_helper:/tmp/seaweed_cfg.json -} -if [ "${s3}" = "seaweed" ]; then - createSeaweedConfigVolume -fi - setupUserHosts() { # FIXME this is broken: it puts the containers' bridge-internal IP addresses # into the user hosts file, but these IPs are in a subnet not reachable from the host. diff --git a/smoketest/compose/s3-seaweed.yml b/smoketest/compose/s3-seaweed.yml index e496a6e68..1f9c6bb35 100644 --- a/smoketest/compose/s3-seaweed.yml +++ b/smoketest/compose/s3-seaweed.yml @@ -13,15 +13,16 @@ services: AWS_ACCESS_KEY_ID: access_key AWS_SECRET_ACCESS_KEY: secret_key s3: - image: ${SEAWEEDFS_IMAGE:-docker.io/chrislusf/seaweedfs:latest} + image: ${SEAWEEDFS_IMAGE:-quay.io/cryostat/cryostat-storage:latest} hostname: s3 - command: server -dir=/data -s3 -s3.config=/opt/seaweed_cfg.json environment: + CRYOSTAT_ACCESS_KEY: access_key + CRYOSTAT_SECRET_KEY: secret_key + DATA_DIR: /data IP_BIND: 0.0.0.0 WEED_V: '4' # glog logging level volumes: - seaweed_data:/data - - seaweed_cfg:/opt expose: - "8333" labels: @@ -30,10 +31,11 @@ services: healthcheck: test: - CMD-SHELL - - wget - - --tries=1 - - --spider - - http://s3:8333/ + - timeout + - 5s + - bash + - -c + - :> /dev/tcp/127.0.0.1/8333 interval: 10s retries: 3 start_period: 30s @@ -42,5 +44,3 @@ services: volumes: seaweed_data: driver: local - seaweed_cfg: - external: true diff --git a/smoketest/compose/seaweed_cfg.json b/smoketest/compose/seaweed_cfg.json deleted file mode 100644 index 1b1d020d3..000000000 --- a/smoketest/compose/seaweed_cfg.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "identities": [ - { - "name": "anonymous", - "actions": [ - "Read" - ] - }, - { - "name": "cryostat", - "credentials": [ - { - "accessKey": "access_key", - "secretKey": "secret_key" - } - ], - "actions": [ - "Admin", - "Read", - "ReadAcp", - "List", - "Tagging", - "Write", - "WriteAcp" - ] - } - ] -} From 54afdbe0e87168e9ccd9be7fb3564e053e24fe9c Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Wed, 17 Jan 2024 09:53:56 -0500 Subject: [PATCH 2/6] request archivedrecordings,archivedreports bucket pre-init --- smoketest/compose/s3-seaweed.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/smoketest/compose/s3-seaweed.yml b/smoketest/compose/s3-seaweed.yml index 1f9c6bb35..9bc66269f 100644 --- a/smoketest/compose/s3-seaweed.yml +++ b/smoketest/compose/s3-seaweed.yml @@ -16,6 +16,7 @@ services: image: ${SEAWEEDFS_IMAGE:-quay.io/cryostat/cryostat-storage:latest} hostname: s3 environment: + CRYOSTAT_BUCKETS: archivedrecordings,archivedreports CRYOSTAT_ACCESS_KEY: access_key CRYOSTAT_SECRET_KEY: secret_key DATA_DIR: /data From 2e124c749b5aa751b221180f8d3b26905dea5066 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Wed, 17 Jan 2024 09:54:07 -0500 Subject: [PATCH 3/6] expose seaweed filer UI --- smoketest/compose/s3-seaweed.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/smoketest/compose/s3-seaweed.yml b/smoketest/compose/s3-seaweed.yml index 9bc66269f..95624844c 100644 --- a/smoketest/compose/s3-seaweed.yml +++ b/smoketest/compose/s3-seaweed.yml @@ -24,6 +24,8 @@ services: WEED_V: '4' # glog logging level volumes: - seaweed_data:/data + ports: + - "8888:8888" expose: - "8333" labels: From 55e547993fe750de6982e5417c66a97f120b746f Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Wed, 17 Jan 2024 14:03:27 -0500 Subject: [PATCH 4/6] rename variable --- smoketest/compose/s3-seaweed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smoketest/compose/s3-seaweed.yml b/smoketest/compose/s3-seaweed.yml index 95624844c..7ba63a668 100644 --- a/smoketest/compose/s3-seaweed.yml +++ b/smoketest/compose/s3-seaweed.yml @@ -13,7 +13,7 @@ services: AWS_ACCESS_KEY_ID: access_key AWS_SECRET_ACCESS_KEY: secret_key s3: - image: ${SEAWEEDFS_IMAGE:-quay.io/cryostat/cryostat-storage:latest} + image: ${STORAGE_IMAGE:-quay.io/cryostat/cryostat-storage:latest} hostname: s3 environment: CRYOSTAT_BUCKETS: archivedrecordings,archivedreports From 1d0452cda1263dae1f666191e746849893c685be Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Wed, 17 Jan 2024 14:08:08 -0500 Subject: [PATCH 5/6] ensure correct archived reports bucket used --- smoketest/compose/s3-seaweed.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/smoketest/compose/s3-seaweed.yml b/smoketest/compose/s3-seaweed.yml index 7ba63a668..03852be29 100644 --- a/smoketest/compose/s3-seaweed.yml +++ b/smoketest/compose/s3-seaweed.yml @@ -3,6 +3,7 @@ services: cryostat: environment: STORAGE_BUCKETS_ARCHIVES_NAME: archivedrecordings + CRYOSTAT_SERVICES_REPORTS_STORAGE_CACHE_NAME: archivedreports QUARKUS_S3_ENDPOINT_OVERRIDE: http://s3:8333 STORAGE_EXT_URL: http://localhost:8080/storage/ QUARKUS_S3_PATH_STYLE_ACCESS: "true" # needed since compose setup does not support DNS subdomain resolution From 94094540060c008508c332239dccc812dd309a96 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 22 Jan 2024 16:48:04 -0500 Subject: [PATCH 6/6] remove unused env vars --- smoketest/compose/s3-cloudserver.yml | 2 -- smoketest/compose/s3-localstack.yml | 2 -- smoketest/compose/s3-minio.yml | 2 -- smoketest/compose/s3-seaweed.yml | 2 -- 4 files changed, 8 deletions(-) diff --git a/smoketest/compose/s3-cloudserver.yml b/smoketest/compose/s3-cloudserver.yml index 2abeb1039..232aca1dd 100644 --- a/smoketest/compose/s3-cloudserver.yml +++ b/smoketest/compose/s3-cloudserver.yml @@ -10,8 +10,6 @@ services: QUARKUS_S3_AWS_CREDENTIALS_TYPE: static QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_ACCESS_KEY_ID: accessKey1 QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY: verySecretKey1 - AWS_ACCESS_KEY_ID: accessKey1 - AWS_SECRET_ACCESS_KEY: verySecretKey1 s3: image: ${CLOUDSERVER_IMAGE:-docker.io/zenko/cloudserver:latest} hostname: s3 diff --git a/smoketest/compose/s3-localstack.yml b/smoketest/compose/s3-localstack.yml index 8945031b9..a30d207a5 100644 --- a/smoketest/compose/s3-localstack.yml +++ b/smoketest/compose/s3-localstack.yml @@ -10,8 +10,6 @@ services: QUARKUS_S3_AWS_CREDENTIALS_TYPE: static QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_ACCESS_KEY_ID: unused QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY: unused - AWS_ACCESS_KEY_ID: unused - AWS_SECRET_ACCESS_KEY: unused s3: image: ${LOCALSTACK_IMAGE:-docker.io/localstack/localstack:latest} hostname: s3 diff --git a/smoketest/compose/s3-minio.yml b/smoketest/compose/s3-minio.yml index 2006e4a97..87d1ef081 100644 --- a/smoketest/compose/s3-minio.yml +++ b/smoketest/compose/s3-minio.yml @@ -10,8 +10,6 @@ services: QUARKUS_S3_AWS_CREDENTIALS_TYPE: static QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_ACCESS_KEY_ID: minioroot QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY: minioroot - AWS_ACCESS_KEY_ID: minioroot - AWS_SECRET_ACCESS_KEY: minioroot s3: image: ${MINIO_IMAGE:-docker.io/minio/minio:latest} hostname: s3 diff --git a/smoketest/compose/s3-seaweed.yml b/smoketest/compose/s3-seaweed.yml index 03852be29..da5c10283 100644 --- a/smoketest/compose/s3-seaweed.yml +++ b/smoketest/compose/s3-seaweed.yml @@ -11,8 +11,6 @@ services: QUARKUS_S3_AWS_CREDENTIALS_TYPE: static QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_ACCESS_KEY_ID: access_key QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY: secret_key - AWS_ACCESS_KEY_ID: access_key - AWS_SECRET_ACCESS_KEY: secret_key s3: image: ${STORAGE_IMAGE:-quay.io/cryostat/cryostat-storage:latest} hostname: s3