diff --git a/compose/cryostat.yml b/compose/cryostat.yml index 8a0f2d516..bfb853ca1 100644 --- a/compose/cryostat.yml +++ b/compose/cryostat.yml @@ -1,11 +1,6 @@ version: "3" services: cryostat: - depends_on: - db: - condition: service_healthy - s3: - condition: service_healthy deploy: resources: limits: diff --git a/compose/db.yml b/compose/db.yml index aea89af84..098bf2961 100644 --- a/compose/db.yml +++ b/compose/db.yml @@ -1,6 +1,9 @@ version: "3" services: cryostat: + depends_on: + db: + condition: service_healthy environment: QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION: ${DATABASE_GENERATION:-drop-and-create} QUARKUS_DATASOURCE_USERNAME: cryostat3 diff --git a/compose/s3-cloudserver.yml b/compose/s3-cloudserver.yml index 2abeb1039..2bb75985d 100644 --- a/compose/s3-cloudserver.yml +++ b/compose/s3-cloudserver.yml @@ -1,6 +1,9 @@ version: "3" services: cryostat: + depends_on: + s3: + condition: service_healthy environment: STORAGE_BUCKETS_ARCHIVES_NAME: archivedrecordings QUARKUS_S3_ENDPOINT_OVERRIDE: http://s3:8000 diff --git a/compose/s3-localstack.yml b/compose/s3-localstack.yml index a05b09163..839110b0d 100644 --- a/compose/s3-localstack.yml +++ b/compose/s3-localstack.yml @@ -1,6 +1,9 @@ version: "3" services: cryostat: + depends_on: + s3: + condition: service_healthy environment: STORAGE_BUCKETS_ARCHIVES_NAME: archivedrecordings QUARKUS_S3_ENDPOINT_OVERRIDE: http://s3:4566 diff --git a/compose/s3-minio.yml b/compose/s3-minio.yml index 9d51fd28b..c6885ba34 100644 --- a/compose/s3-minio.yml +++ b/compose/s3-minio.yml @@ -1,6 +1,9 @@ version: "3" services: cryostat: + depends_on: + s3: + condition: service_healthy environment: STORAGE_BUCKETS_ARCHIVES_NAME: archivedrecordings QUARKUS_S3_ENDPOINT_OVERRIDE: http://s3:9000 diff --git a/compose/s3-none.yml b/compose/s3-none.yml new file mode 100644 index 000000000..e1da591be --- /dev/null +++ b/compose/s3-none.yml @@ -0,0 +1,12 @@ +version: "3" +services: + cryostat: + environment: + QUARKUS_S3_ENDPOINT_OVERRIDE: http://s3:4566 + QUARKUS_S3_PATH_STYLE_ACCESS: "true" # needed since compose setup does not support DNS subdomain resolution + QUARKUS_S3_AWS_REGION: us-east-1 + 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 diff --git a/compose/s3-seaweed.yml b/compose/s3-seaweed.yml index bb91c1fae..ccf2c61cb 100644 --- a/compose/s3-seaweed.yml +++ b/compose/s3-seaweed.yml @@ -1,6 +1,9 @@ version: "3" services: cryostat: + depends_on: + s3: + condition: service_healthy environment: STORAGE_BUCKETS_ARCHIVES_NAME: archivedrecordings CRYOSTAT_SERVICES_REPORTS_STORAGE_CACHE_NAME: archivedreports diff --git a/smoketest.bash b/smoketest.bash index 5548ead1c..5145af5a7 100755 --- a/smoketest.bash +++ b/smoketest.bash @@ -103,7 +103,10 @@ if [ "${USE_PROXY}" = "true" ]; then CRYOSTAT_HTTP_PORT=8181 GRAFANA_DASHBOARD_EXT_URL=http://localhost:8080/grafana/ else - FILES+=("${DIR}/compose/no_proxy.yml" "${DIR}/compose/s3_no_proxy.yml") + FILES+=("${DIR}/compose/no_proxy.yml") + if [ "${s3}" != "none" ]; then + FILES+=("${DIR}/compose/s3_no_proxy.yml") + fi if [ "${DEPLOY_GRAFANA}" = "true" ]; then FILES+=("${DIR}/compose/grafana_no_proxy.yml") fi @@ -115,16 +118,19 @@ export GRAFANA_DASHBOARD_EXT_URL export DATABASE_GENERATION s3Manifest="${DIR}/compose/s3-${s3}.yml" -STORAGE_PORT="$(yq '.services.*.expose[0]' "${s3Manifest}" | grep -v null)" -export STORAGE_PORT -export PRECREATE_BUCKETS - if [ ! -f "${s3Manifest}" ]; then echo "Unknown S3 selection: ${s3}" display_usage exit 2 fi FILES+=("${s3Manifest}") +if [ "${s3}" = "none" ]; then + STORAGE_PORT="4566" +else + STORAGE_PORT="$(yq '.services.*.expose[0]' "${s3Manifest}" | grep -v null)" +fi +export STORAGE_PORT +export PRECREATE_BUCKETS unshift() { local -n ary=$1;