From 66611478a567b6b5d56fce5851a2c798459f33b2 Mon Sep 17 00:00:00 2001 From: Gloria Ciavarrini Date: Thu, 18 Jun 2026 13:29:21 +0200 Subject: [PATCH 1/4] Point E2E deploy at control-plane monolith stack Clone control-plane compose, single health URL, updated versions and provider overlays; align run-e2e and CI validate-scripts. Assisted-By: Claude (Anthropic) Signed-off-by: Gloria Ciavarrini --- .github/workflows/validate-scripts.yaml | 8 +- README.md | 12 +-- providers/acm-cluster.conf | 2 +- providers/k8s-container.conf | 2 +- providers/kubevirt.conf | 2 +- providers/three-tier-app-demo.conf | 2 +- scripts/deploy-dcm.sh | 111 ++++++++++---------- tests/compose-k8s-container-sp-2.yaml | 4 +- tests/compose-k8s-container-sp-3.yaml | 4 +- tests/compose-three-tier-app-demo-sp-2.yaml | 4 +- tests/compose-three-tier-app-demo-sp-3.yaml | 4 +- tests/compose-three-tier-app-demo-sp.yaml | 4 +- tests/e2e/api_health_test.go | 26 ++--- tests/e2e/api_helpers_test.go | 4 +- tests/e2e/cli_helpers_test.go | 9 +- tests/e2e/rehydration_persistence_test.go | 2 +- tests/run-e2e.sh | 14 +-- 17 files changed, 100 insertions(+), 114 deletions(-) diff --git a/.github/workflows/validate-scripts.yaml b/.github/workflows/validate-scripts.yaml index e467897..f643718 100644 --- a/.github/workflows/validate-scripts.yaml +++ b/.github/workflows/validate-scripts.yaml @@ -94,8 +94,8 @@ jobs: run_case "--help contains core flags" \ --expect-exit "--help" 0 \ - --expect-contains "--api-gateway-repo" "api-gateway-repo flag" \ - --expect-contains "--api-gateway-branch" "api-gateway-branch flag" \ + --expect-contains "--control-plane-repo" "control-plane-repo flag" \ + --expect-contains "--control-plane-branch" "control-plane-branch flag" \ --expect-contains "--kubeconfig" "kubeconfig flag" \ --expect-contains "--compose-file" "compose-file flag" \ --expect-contains "--cleanup-on-failure" "cleanup-on-failure flag" \ @@ -133,8 +133,8 @@ jobs: run_case "--kubeconfig requires a value" \ --expect-exit "--kubeconfig" 1 - run_case "--api-gateway-repo requires a value" \ - --expect-exit "--api-gateway-repo" 1 + run_case "--control-plane-repo requires a value" \ + --expect-exit "--control-plane-repo" 1 run_case "--compose-file requires a value" \ --expect-exit "--compose-file" 1 diff --git a/README.md b/README.md index a7f304f..f05883f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DCM Utilities -Common scripts and tooling shared across the [DCM](https://github.com/dcm-project) ecosystem. Provides the E2E deploy script for bringing up the full DCM stack locally and a Ginkgo/Gomega E2E test suite that validates the stack through the API gateway and DCM CLI. +Common scripts and tooling shared across the [DCM](https://github.com/dcm-project) ecosystem. Provides the E2E deploy script for bringing up the full DCM stack locally and a Ginkgo/Gomega E2E test suite that validates the stack through the control-plane API and DCM CLI. ## Contents @@ -20,7 +20,7 @@ Both deploy mode and `--running-versions` produce a `dcm-versions.json` mapping ```json { - "quay.io/dcm-project/catalog-manager:latest": { + "quay.io/dcm-project/control-plane:latest": { "image_digest": "sha256:1cdf5482f586ce513724074c0a132b718672d2be5cbae600a47e94324078b01e", "git_sha": "2388248" }, @@ -35,7 +35,7 @@ Both deploy mode and `--running-versions` produce a `dcm-versions.json` mapping `scripts/deploy-dcm.sh` automates the full DCM stack lifecycle for E2E testing: -1. Clones the [api-gateway](https://github.com/dcm-project/api-gateway) repo (which owns the `compose.yaml`) +1. Clones the [control-plane](https://github.com/dcm-project/control-plane) repo (`deploy/compose.yaml`) 2. Starts all services with `podman-compose up` 3. Polls health endpoints until every service responds 2xx 4. Resolves running container images to git commit SHAs via the Quay.io API @@ -80,7 +80,7 @@ Run `./scripts/deploy-dcm.sh --help` for all flags and environment variable over ## E2E Tests -The test suite uses [Ginkgo](https://onsi.github.io/ginkgo/) and [Gomega](https://onsi.github.io/gomega/) to validate the full DCM stack through the API gateway and the DCM CLI. +The test suite uses [Ginkgo](https://onsi.github.io/ginkgo/) and [Gomega](https://onsi.github.io/gomega/) to validate the full DCM stack through the control-plane API and the DCM CLI. ### Quick Start @@ -119,7 +119,7 @@ make help | Variable | Default | Description | |----------|---------|-------------| -| `DCM_GATEWAY_URL` | `http://localhost:9080/api/v1alpha1` | API gateway base URL | +| `DCM_GATEWAY_URL` | `http://localhost:8080/api/v1alpha1` | Control plane API base URL | | `DCM_CONTAINER_SP_URL` | `http://localhost:8082/api/v1alpha1` | Container SP direct URL (requires published port) | | `DCM_ACM_CLUSTER_SP_URL` | `http://localhost:8083/api/v1alpha1` | ACM Cluster SP direct URL (requires published port) | | `DCM_NATS_URL` | `nats://localhost:4222` | NATS server URL for status event tests | @@ -136,7 +136,7 @@ The test harness (`tests/run-e2e.sh`) supports additional flags for fine-grained ./tests/run-e2e.sh --skip-cli # Skip CLI binary resolution ./tests/run-e2e.sh --dcm-cli-path ~/bin/dcm # Use a specific CLI binary ./tests/run-e2e.sh --label-filter smoke # Run only smoke tests -./tests/run-e2e.sh --gateway-url http://... # Override gateway URL +./tests/run-e2e.sh --gateway-url http://... # Override control plane API URL ./tests/run-e2e.sh --junit-report results.xml # Write JUnit XML report # Service provider tests diff --git a/providers/acm-cluster.conf b/providers/acm-cluster.conf index f3e41fb..2c90089 100644 --- a/providers/acm-cluster.conf +++ b/providers/acm-cluster.conf @@ -6,7 +6,7 @@ PROVIDER_LABEL="acm-cluster" PROVIDER_FLAG="acm-cluster-service-provider" PROVIDER_DESCRIPTION="Enable the ACM cluster service provider (requires OCP + ACM/MCE)" -# Compose integration — profile defined in api-gateway compose.yaml; +# Compose integration — profile defined in control-plane deploy/compose.yaml; # override publishes the SP port to the host for direct API access. COMPOSE_PROFILE="acm-cluster" COMPOSE_OVERRIDE="tests/compose-acm-cluster-sp.yaml" diff --git a/providers/k8s-container.conf b/providers/k8s-container.conf index 6a5e59a..8b670f5 100644 --- a/providers/k8s-container.conf +++ b/providers/k8s-container.conf @@ -5,7 +5,7 @@ PROVIDER_LABEL="k8s-container" PROVIDER_FLAG="k8s-container-service-provider" PROVIDER_DESCRIPTION="Enable the k8s container service provider" -# Compose integration — profile defined in api-gateway compose.yaml; +# Compose integration — profile defined in control-plane deploy/compose.yaml; # override publishes the SP port to the host for direct API access. COMPOSE_PROFILE="k8s-container" COMPOSE_OVERRIDE="tests/compose-sp-test.yaml" diff --git a/providers/kubevirt.conf b/providers/kubevirt.conf index 8a94edb..d0a8775 100644 --- a/providers/kubevirt.conf +++ b/providers/kubevirt.conf @@ -5,7 +5,7 @@ PROVIDER_LABEL="kubevirt" PROVIDER_FLAG="kubevirt-service-provider" PROVIDER_DESCRIPTION="Enable the kubevirt service provider (requires OCP + CNV)" -# Compose integration — profile defined in api-gateway compose.yaml +# Compose integration — profile defined in control-plane deploy/compose.yaml COMPOSE_PROFILE="kubevirt" COMPOSE_OVERRIDE="" diff --git a/providers/three-tier-app-demo.conf b/providers/three-tier-app-demo.conf index 6a4736d..cdfc001 100644 --- a/providers/three-tier-app-demo.conf +++ b/providers/three-tier-app-demo.conf @@ -6,7 +6,7 @@ PROVIDER_LABEL="three-tier-app-demo" PROVIDER_FLAG="three-tier-app-demo-service-provider" PROVIDER_DESCRIPTION="Enable the three-tier app demo service provider (Pet Clinic)" -# Compose integration — not in api-gateway compose.yaml, uses override +# Compose integration — not in control-plane deploy/compose.yaml, uses override COMPOSE_PROFILE="" COMPOSE_OVERRIDE="tests/compose-three-tier-app-demo-sp.yaml" diff --git a/scripts/deploy-dcm.sh b/scripts/deploy-dcm.sh index 44077c2..912e849 100755 --- a/scripts/deploy-dcm.sh +++ b/scripts/deploy-dcm.sh @@ -2,36 +2,32 @@ set -euo pipefail # DCM E2E Deploy Script -# Clones the api-gateway repo, brings up the full DCM stack via podman-compose, +# Clones the control-plane repo, brings up the full DCM stack via podman-compose, # and verifies all services are healthy. # # Service providers are configured via providers/*.conf files. To add a new # provider, drop a .conf file in the providers/ directory — no changes to # this script are required. -readonly DEFAULT_API_GATEWAY_REPO="https://github.com/dcm-project/api-gateway.git" -readonly DEFAULT_API_GATEWAY_BRANCH="main" -readonly DEFAULT_API_GATEWAY_TMP_DIR="/tmp/dcm-e2e" -readonly GATEWAY_PORT="9080" +readonly DEFAULT_CONTROL_PLANE_REPO="https://github.com/dcm-project/control-plane.git" +readonly DEFAULT_CONTROL_PLANE_BRANCH="main" +readonly DEFAULT_CONTROL_PLANE_TMP_DIR="/tmp/dcm-e2e" +export COMPOSE_PROJECT_NAME="dcm-e2e" +readonly GATEWAY_PORT="8080" readonly HEALTH_TIMEOUT_SECONDS=90 readonly HEALTH_POLL_INTERVAL=5 readonly HEALTH_ENDPOINTS=( - "/api/v1alpha1/health/providers" - "/api/v1alpha1/health/catalog" - "/api/v1alpha1/health/policies" - "/api/v1alpha1/health/placement" + "/api/v1alpha1/health" ) readonly DEFAULT_ACM_CLUSTER_SP_REPO="https://github.com/dcm-project/acm-cluster-service-provider.git" readonly DEFAULT_ACM_CLUSTER_SP_BRANCH="main" -readonly QUAY_VERSION_REPO="catalog-manager" +readonly QUAY_VERSION_REPO="control-plane" readonly VERSION_ENV_VARS=( - SERVICE_PROVIDER_MANAGER_VERSION - CATALOG_MANAGER_VERSION - POLICY_MANAGER_VERSION - PLACEMENT_MANAGER_VERSION + CONTROL_PLANE_VERSION + DCM_UI_VERSION KUBEVIRT_SERVICE_PROVIDER_VERSION K8S_CONTAINER_SERVICE_PROVIDER_VERSION ACM_CLUSTER_SERVICE_PROVIDER_VERSION @@ -111,14 +107,14 @@ usage() { cat </dev/null || true + podman-compose -f "${deploy_dir}/deploy/compose.yaml" ${compose_profiles[@]+"${compose_profiles[@]}"} down -v 2>/dev/null || true - local project_name - project_name=$(basename "${deploy_dir}") + local project_name="${COMPOSE_PROJECT_NAME}" local remaining remaining=$(podman ps -a --filter "name=${project_name}_" --format '{{.ID}}' 2>/dev/null || true) if [[ -n "${remaining}" ]]; then @@ -531,7 +526,7 @@ get_running_versions() { if [[ ! -f "${compose_file}" ]]; then err "Compose file not found: ${compose_file}" - err "Is the DCM stack deployed? Use --api-gateway-dir to specify the deploy directory." + err "Is the DCM stack deployed? Use --control-plane-dir to specify the deploy directory." return 1 fi @@ -629,11 +624,11 @@ collect_provider_compose() { # --- Argument parsing ------------------------------------------------------ # DCM_VERSION="${DCM_VERSION:-}" -API_GATEWAY_REPO="${API_GATEWAY_REPO:-${DEFAULT_API_GATEWAY_REPO}}" -API_GATEWAY_BRANCH_EXPLICIT=false -[[ -n "${API_GATEWAY_BRANCH:-}" ]] && API_GATEWAY_BRANCH_EXPLICIT=true -API_GATEWAY_BRANCH="${API_GATEWAY_BRANCH:-${DEFAULT_API_GATEWAY_BRANCH}}" -API_GATEWAY_TMP_DIR="${API_GATEWAY_TMP_DIR:-${DEFAULT_API_GATEWAY_TMP_DIR}}" +CONTROL_PLANE_REPO="${CONTROL_PLANE_REPO:-${DEFAULT_CONTROL_PLANE_REPO}}" +CONTROL_PLANE_BRANCH_EXPLICIT=false +[[ -n "${CONTROL_PLANE_BRANCH:-}" ]] && CONTROL_PLANE_BRANCH_EXPLICIT=true +CONTROL_PLANE_BRANCH="${CONTROL_PLANE_BRANCH:-${DEFAULT_CONTROL_PLANE_BRANCH}}" +CONTROL_PLANE_TMP_DIR="${CONTROL_PLANE_TMP_DIR:-${DEFAULT_CONTROL_PLANE_TMP_DIR}}" TEAR_DOWN=false RUNNING_VERSIONS=false CLEANUP_ON_FAILURE=false @@ -682,16 +677,16 @@ while [[ $# -gt 0 ]]; do --version) require_arg "$1" "${2:-}" DCM_VERSION="${2:-}"; shift 2 ;; - --api-gateway-repo) + --control-plane-repo) require_arg "$1" "${2:-}" - API_GATEWAY_REPO="${2:-}"; shift 2 ;; - --api-gateway-branch) + CONTROL_PLANE_REPO="${2:-}"; shift 2 ;; + --control-plane-branch) require_arg "$1" "${2:-}" - API_GATEWAY_BRANCH="${2:-}" - API_GATEWAY_BRANCH_EXPLICIT=true; shift 2 ;; - --api-gateway-dir) + CONTROL_PLANE_BRANCH="${2:-}" + CONTROL_PLANE_BRANCH_EXPLICIT=true; shift 2 ;; + --control-plane-dir) require_arg "$1" "${2:-}" - API_GATEWAY_TMP_DIR="${2:-}"; shift 2 ;; + CONTROL_PLANE_TMP_DIR="${2:-}"; shift 2 ;; --all-service-providers) for i in $(seq 0 $((PROV_COUNT - 1))); do PROV_ENABLED[i]=true @@ -754,7 +749,7 @@ while [[ $# -gt 0 ]]; do esac done -validate_deploy_dir "${API_GATEWAY_TMP_DIR}" || exit 1 +validate_deploy_dir "${CONTROL_PLANE_TMP_DIR}" || exit 1 # --- Build compose args from enabled providers ----------------------------- # @@ -778,13 +773,13 @@ done if [[ "${RUNNING_VERSIONS}" == true ]]; then check_required_tools podman podman-compose curl jq || exit 1 ensure_podman_running || exit 1 - get_running_versions "${API_GATEWAY_TMP_DIR}/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} || exit 1 + get_running_versions "${CONTROL_PLANE_TMP_DIR}/deploy/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} || exit 1 exit 0 fi if [[ "${TEAR_DOWN}" == true ]]; then ensure_podman_running || exit 1 - tear_down "${API_GATEWAY_TMP_DIR}" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} + tear_down "${CONTROL_PLANE_TMP_DIR}" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} exit 0 fi @@ -1051,10 +1046,10 @@ if [[ -n "${DCM_VERSION}" ]]; then info "Resolved: ${DCM_VERSION}" fi - if [[ "${DCM_VERSION}" != "main" ]] && [[ "${API_GATEWAY_BRANCH_EXPLICIT}" == false ]]; then + if [[ "${DCM_VERSION}" != "main" ]] && [[ "${CONTROL_PLANE_BRANCH_EXPLICIT}" == false ]]; then RELEASE_TAG="${DCM_VERSION%%-*}" - API_GATEWAY_BRANCH="release/${RELEASE_TAG}" - info "Auto-derived api-gateway branch: ${API_GATEWAY_BRANCH}" + CONTROL_PLANE_BRANCH="release/${RELEASE_TAG}" + info "Auto-derived control-plane branch: ${CONTROL_PLANE_BRANCH}" fi log "Pinning all DCM images to version: ${DCM_VERSION}" @@ -1065,21 +1060,21 @@ fi # --- Clone ----------------------------------------------------------------- # -log "Preparing deploy directory: ${API_GATEWAY_TMP_DIR}" +log "Preparing deploy directory: ${CONTROL_PLANE_TMP_DIR}" -if [[ -d "${API_GATEWAY_TMP_DIR}" ]]; then +if [[ -d "${CONTROL_PLANE_TMP_DIR}" ]]; then info "Cleaning existing deploy directory..." - podman-compose -f "${API_GATEWAY_TMP_DIR}/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} down -v 2>/dev/null || true - rm -rf "${API_GATEWAY_TMP_DIR}" + podman-compose -f "${CONTROL_PLANE_TMP_DIR}/deploy/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} down -v 2>/dev/null || true + rm -rf "${CONTROL_PLANE_TMP_DIR}" fi -log "Cloning api-gateway (repo=${API_GATEWAY_REPO}, branch=${API_GATEWAY_BRANCH})" -git clone --branch "${API_GATEWAY_BRANCH}" --single-branch --depth 1 "${API_GATEWAY_REPO}" "${API_GATEWAY_TMP_DIR}" +log "Cloning control-plane (repo=${CONTROL_PLANE_REPO}, branch=${CONTROL_PLANE_BRANCH})" +git clone --branch "${CONTROL_PLANE_BRANCH}" --single-branch --depth 1 "${CONTROL_PLANE_REPO}" "${CONTROL_PLANE_TMP_DIR}" # --- Deploy ---------------------------------------------------------------- # if [[ "${CLEANUP_ON_FAILURE}" == true ]]; then - trap 'err "Deploy failed — cleaning up"; tear_down "${API_GATEWAY_TMP_DIR}" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"}' ERR + trap 'err "Deploy failed — cleaning up"; tear_down "${CONTROL_PLANE_TMP_DIR}" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"}' ERR fi log "Starting DCM stack" @@ -1090,20 +1085,20 @@ done if [[ ${#ENABLED_LABELS[@]} -gt 0 ]]; then info "Enabled providers: ${ENABLED_LABELS[*]}" fi -podman-compose -f "${API_GATEWAY_TMP_DIR}/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} up -d +podman-compose -f "${CONTROL_PLANE_TMP_DIR}/deploy/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} up -d echo log "Container status" -podman-compose -f "${API_GATEWAY_TMP_DIR}/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} ps +podman-compose -f "${CONTROL_PLANE_TMP_DIR}/deploy/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} ps -verify_health "${API_GATEWAY_TMP_DIR}/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} || exit 1 +verify_health "${CONTROL_PLANE_TMP_DIR}/deploy/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} || exit 1 -get_running_versions "${API_GATEWAY_TMP_DIR}/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} || info "Version collection failed (non-fatal)" +get_running_versions "${CONTROL_PLANE_TMP_DIR}/deploy/compose.yaml" ${COMPOSE_EXTRA_FILE_ARGS[@]+"${COMPOSE_EXTRA_FILE_ARGS[@]}"} ${COMPOSE_PROFILES[@]+"${COMPOSE_PROFILES[@]}"} || info "Version collection failed (non-fatal)" GATEWAY_URL="http://localhost:${GATEWAY_PORT}" log "DCM stack is up and healthy at ${GATEWAY_URL}" -if [[ "${API_GATEWAY_TMP_DIR}" != "${DEFAULT_API_GATEWAY_TMP_DIR}" ]]; then - info "To tear down: $(basename "$0") --api-gateway-dir ${API_GATEWAY_TMP_DIR} --tear-down" +if [[ "${CONTROL_PLANE_TMP_DIR}" != "${DEFAULT_CONTROL_PLANE_TMP_DIR}" ]]; then + info "To tear down: $(basename "$0") --control-plane-dir ${CONTROL_PLANE_TMP_DIR} --tear-down" else info "To tear down: $(basename "$0") --tear-down" fi diff --git a/tests/compose-k8s-container-sp-2.yaml b/tests/compose-k8s-container-sp-2.yaml index 1f5e010..7f3b488 100644 --- a/tests/compose-k8s-container-sp-2.yaml +++ b/tests/compose-k8s-container-sp-2.yaml @@ -16,7 +16,7 @@ services: SP_K8S_NAMESPACE: ${K8S_CONTAINER_SP_2_NAMESPACE:-rehydrate-ns-b} SP_K8S_KUBECONFIG: "/kubeconfig" SP_K8S_EXTERNAL_SVC_TYPE: "NodePort" - DCM_REGISTRATION_URL: "http://service-provider-manager:8080/api/v1alpha1" + DCM_REGISTRATION_URL: "http://control-plane:8080/api/v1alpha1" SP_NATS_URL: "nats://nats:4222" expose: - "8080" @@ -25,5 +25,5 @@ services: volumes: - ${K8S_CONTAINER_SP_2_KUBECONFIG:-~/.kube/config}:/kubeconfig:ro,z depends_on: - service-provider-manager: { condition: service_started } + control-plane: { condition: service_started } nats: { condition: service_started } diff --git a/tests/compose-k8s-container-sp-3.yaml b/tests/compose-k8s-container-sp-3.yaml index 096e8eb..4831226 100644 --- a/tests/compose-k8s-container-sp-3.yaml +++ b/tests/compose-k8s-container-sp-3.yaml @@ -16,7 +16,7 @@ services: SP_K8S_NAMESPACE: ${K8S_CONTAINER_SP_3_NAMESPACE:-rehydrate-ns-c} SP_K8S_KUBECONFIG: "/kubeconfig" SP_K8S_EXTERNAL_SVC_TYPE: "NodePort" - DCM_REGISTRATION_URL: "http://service-provider-manager:8080/api/v1alpha1" + DCM_REGISTRATION_URL: "http://control-plane:8080/api/v1alpha1" SP_NATS_URL: "nats://nats:4222" expose: - "8080" @@ -25,5 +25,5 @@ services: volumes: - ${K8S_CONTAINER_SP_3_KUBECONFIG:-~/.kube/config}:/kubeconfig:ro,z depends_on: - service-provider-manager: { condition: service_started } + control-plane: { condition: service_started } nats: { condition: service_started } diff --git a/tests/compose-three-tier-app-demo-sp-2.yaml b/tests/compose-three-tier-app-demo-sp-2.yaml index 4700a75..fb36f8f 100644 --- a/tests/compose-three-tier-app-demo-sp-2.yaml +++ b/tests/compose-three-tier-app-demo-sp-2.yaml @@ -28,7 +28,7 @@ services: SP_NAME: "three-tier-sp-b" SP_REGION: "east" SP_ENDPOINT: "http://three-tier-app-demo-sp-b:8080" - DCM_REGISTRATION_URL: "http://service-provider-manager:8080/api/v1alpha1" + DCM_REGISTRATION_URL: "http://control-plane:8080/api/v1alpha1" SP_NATS_URL: "nats://nats:4222" expose: - "8080" @@ -36,5 +36,5 @@ services: - "8085:8080" depends_on: postgres: { condition: service_healthy } - service-provider-manager: { condition: service_started } + control-plane: { condition: service_started } nats: { condition: service_started } diff --git a/tests/compose-three-tier-app-demo-sp-3.yaml b/tests/compose-three-tier-app-demo-sp-3.yaml index 24a0a9e..a4cce4c 100644 --- a/tests/compose-three-tier-app-demo-sp-3.yaml +++ b/tests/compose-three-tier-app-demo-sp-3.yaml @@ -29,7 +29,7 @@ services: SP_NAME: "three-tier-sp-c" SP_REGION: "west" SP_ENDPOINT: "http://three-tier-app-demo-sp-c:8080" - DCM_REGISTRATION_URL: "http://service-provider-manager:8080/api/v1alpha1" + DCM_REGISTRATION_URL: "http://control-plane:8080/api/v1alpha1" SP_NATS_URL: "nats://nats:4222" expose: - "8080" @@ -37,5 +37,5 @@ services: - "8086:8080" depends_on: postgres: { condition: service_healthy } - service-provider-manager: { condition: service_started } + control-plane: { condition: service_started } nats: { condition: service_started } diff --git a/tests/compose-three-tier-app-demo-sp.yaml b/tests/compose-three-tier-app-demo-sp.yaml index 7b89e4b..bbcf348 100644 --- a/tests/compose-three-tier-app-demo-sp.yaml +++ b/tests/compose-three-tier-app-demo-sp.yaml @@ -27,7 +27,7 @@ services: DB_PASS: ${POSTGRES_PASSWORD:-adminpass} SP_NAME: ${THREE_TIER_DEMO_SP_NAME:-three-tier-demo-sp} SP_ENDPOINT: "http://three-tier-app-demo-service-provider:8080" - DCM_REGISTRATION_URL: "http://service-provider-manager:8080/api/v1alpha1" + DCM_REGISTRATION_URL: "http://control-plane:8080/api/v1alpha1" SP_NATS_URL: "nats://nats:4222" expose: - "8080" @@ -35,5 +35,5 @@ services: - "8084:8080" depends_on: postgres: { condition: service_healthy } - service-provider-manager: { condition: service_started } + control-plane: { condition: service_started } nats: { condition: service_started } diff --git a/tests/e2e/api_health_test.go b/tests/e2e/api_health_test.go index 0202694..384eb6c 100644 --- a/tests/e2e/api_health_test.go +++ b/tests/e2e/api_health_test.go @@ -10,23 +10,15 @@ import ( ) var _ = Describe("Health Endpoints", Label("smoke"), func() { - healthEndpoints := map[string]string{ - "providers": "/health/providers", - "catalog": "/health/catalog", - "policies": "/health/policies", - "placement": "/health/placement", - } + It("reports healthy control-plane", func() { + resp, err := doRequest(http.MethodGet, "/health", "") + Expect(err).NotTo(HaveOccurred()) - for serviceName, path := range healthEndpoints { - It("reports healthy "+serviceName, func() { - resp, err := doRequest(http.MethodGet, path, "") - Expect(err).NotTo(HaveOccurred()) + Expect(resp.StatusCode).To(Equal(http.StatusOK)) - Expect(resp.StatusCode).To(Equal(http.StatusOK)) - - var body map[string]interface{} - decodeJSON(resp, &body) - Expect(body).To(HaveKeyWithValue("status", "ok")) - }) - } + var body map[string]interface{} + decodeJSON(resp, &body) + Expect(body).To(HaveKeyWithValue("status", "ok")) + Expect(body).To(HaveKeyWithValue("path", "/api/v1alpha1/health")) + }) }) diff --git a/tests/e2e/api_helpers_test.go b/tests/e2e/api_helpers_test.go index fc5bc47..a325052 100644 --- a/tests/e2e/api_helpers_test.go +++ b/tests/e2e/api_helpers_test.go @@ -15,7 +15,7 @@ import ( . "github.com/onsi/gomega" ) -const defaultGatewayURL = "http://localhost:9080/api/v1alpha1" +const defaultGatewayURL = "http://localhost:8080/api/v1alpha1" var ( gatewayBaseURL string @@ -35,7 +35,7 @@ var _ = BeforeSuite(func() { // Wait for the stack to be reachable before running any tests. Eventually(func() error { - resp, err := httpClient.Get(gatewayBaseURL + "/health/providers") + resp, err := httpClient.Get(gatewayBaseURL + "/health") if err != nil { return err } diff --git a/tests/e2e/cli_helpers_test.go b/tests/e2e/cli_helpers_test.go index ed45e86..0946a1d 100644 --- a/tests/e2e/cli_helpers_test.go +++ b/tests/e2e/cli_helpers_test.go @@ -46,15 +46,14 @@ func requireCLI() { } } -// cliGatewayURL returns the gateway base URL without the /api/v1alpha1 suffix, -// which is what the CLI expects for --api-gateway-url. -func cliGatewayURL() string { +// cliControlPlaneURL returns the control plane base URL without the /api/v1alpha1 suffix. +func cliControlPlaneURL() string { return strings.TrimSuffix(gatewayBaseURL, "/api/v1alpha1") } // runDCM executes the DCM CLI binary with the given arguments and returns // stdout, stderr, and the exit code. It automatically injects -// --api-gateway-url and --config flags for test isolation. +// --control-plane-url and --config flags for test isolation. func runDCM(args ...string) (stdout string, stderr string, exitCode int) { requireCLI() @@ -62,7 +61,7 @@ func runDCM(args ...string) (stdout string, stderr string, exitCode int) { // /dev/null won't work — Viper rejects it as unsupported config type. configPath := filepath.Join(os.TempDir(), "dcm-e2e-nonexistent.yaml") fullArgs := []string{ - "--api-gateway-url", cliGatewayURL(), + "--control-plane-url", cliControlPlaneURL(), "--config", configPath, } fullArgs = append(fullArgs, args...) diff --git a/tests/e2e/rehydration_persistence_test.go b/tests/e2e/rehydration_persistence_test.go index e024d8b..8cae410 100644 --- a/tests/e2e/rehydration_persistence_test.go +++ b/tests/e2e/rehydration_persistence_test.go @@ -49,7 +49,7 @@ var _ = Describe("Rehydration Persistence", Label("rehydration", "disruptive"), restartSPRM() Eventually(func() error { - resp, err := doRequest(http.MethodGet, "/health/providers", "") + resp, err := doRequest(http.MethodGet, "/health", "") if err != nil { return err } diff --git a/tests/run-e2e.sh b/tests/run-e2e.sh index 8c3f593..89d1ac0 100755 --- a/tests/run-e2e.sh +++ b/tests/run-e2e.sh @@ -28,15 +28,15 @@ Options: --skip-teardown Leave the stack running after tests --skip-cli Skip CLI binary resolution (CLI tests will be skipped) --dcm-cli-path PATH Path to pre-built dcm binary (skips resolution) - --gateway-url URL Override DCM_GATEWAY_URL (default: http://localhost:9080/api/v1alpha1) + --gateway-url URL Override DCM_GATEWAY_URL (default: http://localhost:8080/api/v1alpha1) --label-filter EXPR Ginkgo label filter (e.g. "smoke", "cli") --junit-report FILE Write JUnit XML report to FILE --help Show this help message Deploy passthrough flags (forwarded to deploy-dcm.sh): - --api-gateway-branch REF Branch to clone - --api-gateway-dir PATH Directory to clone into - --api-gateway-repo URL Git repo for api-gateway + --control-plane-branch REF Branch to clone + --control-plane-dir PATH Directory to clone into + --control-plane-repo URL Git repo for control-plane --cleanup-on-failure Tear down on deployment failure Service provider flags (forwarded to deploy-dcm.sh): @@ -58,7 +58,7 @@ Environment variables: DCM_CONTAINER_SP_URL Container SP direct URL (default: http://localhost:8082/api/v1alpha1) DCM_ACM_CLUSTER_SP_URL ACM Cluster SP direct URL (default: http://localhost:8083/api/v1alpha1) DCM_NATS_URL NATS URL for event tests (default: nats://localhost:4222) - DCM_GATEWAY_URL Gateway URL (default: http://localhost:9080/api/v1alpha1) + DCM_GATEWAY_URL Control plane API URL (default: http://localhost:8080/api/v1alpha1) CLI binary resolution order: 1. --dcm-cli-path flag or DCM_CLI_PATH env var @@ -72,7 +72,7 @@ Examples: $(basename "$0") --skip-deploy --label-filter smoke $(basename "$0") --dcm-cli-path ~/git/dcm/cli/bin/dcm $(basename "$0") --skip-cli --label-filter '!cli' - $(basename "$0") --api-gateway-branch feature-x --skip-teardown + $(basename "$0") --control-plane-branch feature-x --skip-teardown $(basename "$0") --k8s-container-service-provider --cluster-api https://api.example.com:6443 $(basename "$0") --skip-deploy --label-filter "sp && container" EOF @@ -183,7 +183,7 @@ while [[ $# -gt 0 ]]; do --junit-report) JUNIT_REPORT="$2" shift 2 ;; - --api-gateway-branch|--api-gateway-dir|--api-gateway-repo) + --control-plane-branch|--control-plane-dir|--control-plane-repo) DEPLOY_ARGS+=("$1" "$2") shift 2 ;; --cleanup-on-failure) From 6f5e12ffb39f470a2163e31c31ecbd9bf70bdeb7 Mon Sep 17 00:00:00 2001 From: Gloria Ciavarrini Date: Thu, 18 Jun 2026 13:29:28 +0200 Subject: [PATCH 2/4] Fix policy E2E sample Rego for current evaluator Use main := {"rejected": false} instead of `default allow = true` as per `FLPATH-4248`. Assisted-By: Claude (Anthropic) Signed-off-by: Gloria Ciavarrini --- tests/e2e/api_policies_test.go | 2 +- tests/e2e/cli_policy_test.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/e2e/api_policies_test.go b/tests/e2e/api_policies_test.go index d70efe7..1e21705 100644 --- a/tests/e2e/api_policies_test.go +++ b/tests/e2e/api_policies_test.go @@ -34,7 +34,7 @@ var _ = Describe("Policies API", func() { "policy_type": "GLOBAL", "priority": 100, "description": "Created by E2E test suite", - "rego_code": "package authz\ndefault allow = true" + "rego_code": "package authz\n\nmain := {\"rejected\": false}" }`, policyDisplayName) resp, err := doRequest(http.MethodPost, "/policies", payload) diff --git a/tests/e2e/cli_policy_test.go b/tests/e2e/cli_policy_test.go index 5c76570..aee4322 100644 --- a/tests/e2e/cli_policy_test.go +++ b/tests/e2e/cli_policy_test.go @@ -25,7 +25,10 @@ priority: 100 description: Created by E2E test suite rego_code: | package authz - default allow = true + + main := { + "rejected": false + } `, policyDisplayName) AfterAll(func() { From 2dfa0af71bdf7d57ccf22181b44506c267a50544 Mon Sep 17 00:00:00 2001 From: Gloria Ciavarrini Date: Thu, 18 Jun 2026 13:29:35 +0200 Subject: [PATCH 3/4] Refresh agent prompts and CLAUDE for control-plane E2E Assisted-By: Claude (Anthropic) Signed-off-by: Gloria Ciavarrini --- .cursor/prompts/check-versions.md | 4 ++-- .cursor/prompts/deploy-dcm.md | 22 +++++++++--------- .cursor/prompts/tear-down.md | 2 +- .cursor/prompts/troubleshoot-deploy.md | 31 ++++++++++---------------- .cursor/rules/deploy-script.mdc | 2 +- .cursor/rules/e2e-tests.mdc | 6 ++--- CLAUDE.md | 12 +++++----- 7 files changed, 36 insertions(+), 43 deletions(-) diff --git a/.cursor/prompts/check-versions.md b/.cursor/prompts/check-versions.md index 61270b2..99c7f36 100644 --- a/.cursor/prompts/check-versions.md +++ b/.cursor/prompts/check-versions.md @@ -11,7 +11,7 @@ Query running DCM containers and resolve their image digests to git commit SHAs. ### Custom deploy directory ```bash -./scripts/deploy-dcm.sh --api-gateway-dir /path/to/deploy --running-versions +./scripts/deploy-dcm.sh --control-plane-dir /path/to/deploy --running-versions ``` ## Prerequisites @@ -25,7 +25,7 @@ Writes `dcm-versions.json` to the current directory. Example: ```json { - "quay.io/dcm-project/catalog-manager:latest": { + "quay.io/dcm-project/control-plane:latest": { "image_digest": "sha256:1cdf5482f586...", "git_sha": "2388248" }, diff --git a/.cursor/prompts/deploy-dcm.md b/.cursor/prompts/deploy-dcm.md index 6a3bb82..6cfb2da 100644 --- a/.cursor/prompts/deploy-dcm.md +++ b/.cursor/prompts/deploy-dcm.md @@ -23,23 +23,23 @@ Deploy the full DCM stack for E2E testing using `scripts/deploy-dcm.sh`. # Auto-resolve the latest semver tag from Quay.io ./scripts/deploy-dcm.sh --version release -# Explicit version with a custom api-gateway branch -./scripts/deploy-dcm.sh --version v0.1.0-rc.1 --api-gateway-branch my-branch +# Explicit version with a custom control-plane branch +./scripts/deploy-dcm.sh --version v0.1.0-rc.1 --control-plane-branch my-branch ``` ### Deploy from a Different Branch ```bash -./scripts/deploy-dcm.sh --api-gateway-branch feature-x +./scripts/deploy-dcm.sh --control-plane-branch feature-x ``` ### Deploy from a Fork ```bash -./scripts/deploy-dcm.sh --api-gateway-repo https://github.com/myfork/api-gateway.git +./scripts/deploy-dcm.sh --control-plane-repo https://github.com/myfork/control-plane.git ``` ### Deploy to a Custom Directory ```bash -./scripts/deploy-dcm.sh --api-gateway-dir /tmp/my-dcm-deploy +./scripts/deploy-dcm.sh --control-plane-dir /tmp/my-dcm-deploy ``` ### Deploy with Auto-Cleanup on Failure @@ -90,9 +90,9 @@ When any service provider is enabled, the script resolves cluster access in this | Variable | Flag equivalent | |----------|----------------| | `DCM_VERSION` | `--version` | -| `API_GATEWAY_REPO` | `--api-gateway-repo` | -| `API_GATEWAY_BRANCH` | `--api-gateway-branch` | -| `API_GATEWAY_TMP_DIR` | `--api-gateway-dir` | +| `CONTROL_PLANE_REPO` | `--control-plane-repo` | +| `CONTROL_PLANE_BRANCH` | `--control-plane-branch` | +| `CONTROL_PLANE_TMP_DIR` | `--control-plane-dir` | | `KUBECONFIG` | `--kubeconfig` | | `KUBEVIRT_VM_NAMESPACE` | `--kubevirt-vm-namespace` | | `K8S_CONTAINER_SP_NAMESPACE` | `--k8s-container-namespace` | @@ -104,14 +104,14 @@ Flags take precedence over environment variables. ## What Happens -1. Clones api-gateway (owns `compose.yaml`) +1. Clones control-plane (`deploy/compose.yaml`) 2. Runs `podman-compose up -d` 3. Verifies all containers are running -4. Polls `/api/v1alpha1/health/*` endpoints (90s timeout) +4. Polls `/api/v1alpha1/health` (90s timeout) 5. Resolves container images to git commit SHAs via Quay.io API 6. Writes `dcm-versions.json` ## Output -- Stack available at `http://localhost:9080` +- Stack available at `http://localhost:8080` - Version info written to `dcm-versions.json` diff --git a/.cursor/prompts/tear-down.md b/.cursor/prompts/tear-down.md index 620fa38..ad1d8a7 100644 --- a/.cursor/prompts/tear-down.md +++ b/.cursor/prompts/tear-down.md @@ -11,7 +11,7 @@ Stop and clean up a running DCM deployment. ### Custom deploy directory ```bash -./scripts/deploy-dcm.sh --api-gateway-dir /path/to/deploy --tear-down +./scripts/deploy-dcm.sh --control-plane-dir /path/to/deploy --tear-down ``` ## What Happens diff --git a/.cursor/prompts/troubleshoot-deploy.md b/.cursor/prompts/troubleshoot-deploy.md index bef26df..c73e90e 100644 --- a/.cursor/prompts/troubleshoot-deploy.md +++ b/.cursor/prompts/troubleshoot-deploy.md @@ -51,35 +51,28 @@ oc get crd virtualmachines.kubevirt.io ### Containers fail to start ```bash # Check container status -podman-compose -f /tmp/dcm-e2e/compose.yaml ps +podman-compose -f /tmp/dcm-e2e/deploy/compose.yaml ps # View logs for a failing service -podman-compose -f /tmp/dcm-e2e/compose.yaml logs --tail=50 +podman-compose -f /tmp/dcm-e2e/deploy/compose.yaml logs --tail=50 # Check for port conflicts -podman ps --format '{{.Ports}}' | grep 9080 +podman ps --format '{{.Ports}}' | grep 8080 ``` ### Health check timeouts ```bash # Manual health check -curl -v http://localhost:9080/api/v1alpha1/health/providers +curl -v http://localhost:8080/api/v1alpha1/health -# All health endpoints -for ep in providers catalog policies placement; do - echo -n "$ep: " - curl -s -o /dev/null -w "%{http_code}" "http://localhost:9080/api/v1alpha1/health/$ep" - echo -done - -# Check gateway logs -podman-compose -f /tmp/dcm-e2e/compose.yaml logs --tail=50 api-gateway +# Check control-plane logs +podman-compose -f /tmp/dcm-e2e/deploy/compose.yaml logs --tail=50 control-plane ``` ### Compose file not found ```bash # Verify clone worked -ls -la /tmp/dcm-e2e/compose.yaml +ls -la /tmp/dcm-e2e/deploy/compose.yaml # Re-deploy (cleans and re-clones) ./scripts/deploy-dcm.sh @@ -87,8 +80,8 @@ ls -la /tmp/dcm-e2e/compose.yaml ### Port already in use ```bash -# Find what's using port 9080 -lsof -i :9080 +# Find what's using port 8080 +lsof -i :8080 # Tear down and redeploy ./scripts/deploy-dcm.sh --tear-down @@ -99,13 +92,13 @@ lsof -i :9080 ```bash # All container status -podman-compose -f /tmp/dcm-e2e/compose.yaml ps +podman-compose -f /tmp/dcm-e2e/deploy/compose.yaml ps # Recent container logs (all services) -podman-compose -f /tmp/dcm-e2e/compose.yaml logs --tail=20 +podman-compose -f /tmp/dcm-e2e/deploy/compose.yaml logs --tail=20 # Specific service logs -podman-compose -f /tmp/dcm-e2e/compose.yaml logs --tail=50 +podman-compose -f /tmp/dcm-e2e/deploy/compose.yaml logs --tail=50 # Container resource usage podman stats --no-stream diff --git a/.cursor/rules/deploy-script.mdc b/.cursor/rules/deploy-script.mdc index c34b12a..433c274 100644 --- a/.cursor/rules/deploy-script.mdc +++ b/.cursor/rules/deploy-script.mdc @@ -13,7 +13,7 @@ See `CLAUDE.md` → "Key Script: scripts/deploy-dcm.sh" for the full description - New functions go above the argument parsing section - New flags need entries in both `usage()` and the `while/case` loop - Add corresponding environment variable overrides where appropriate -- Compose variable names (`KUBEVIRT_KUBECONFIG`, `K8S_CONTAINER_SP_KUBECONFIG`, etc.) are owned by api-gateway's compose.yaml — see the contract comment at the top of the script +- Compose variable names (`KUBEVIRT_KUBECONFIG`, `K8S_CONTAINER_SP_KUBECONFIG`, etc.) are owned by control-plane's `deploy/compose.yaml` — see the contract comment at the top of the script - Run `shellcheck scripts/deploy-dcm.sh` after changes ## Podman / Compose diff --git a/.cursor/rules/e2e-tests.mdc b/.cursor/rules/e2e-tests.mdc index a0f5c41..66891b2 100644 --- a/.cursor/rules/e2e-tests.mdc +++ b/.cursor/rules/e2e-tests.mdc @@ -12,11 +12,11 @@ Files follow `{layer}_{subject}_test.go` with a matching `{layer}_helpers_test.g | Prefix | Interface | Helpers | |--------|-----------|---------| -| `api_` | Gateway HTTP API (`doRequest` → `localhost:9080`) | `api_helpers_test.go` | +| `api_` | Control plane HTTP API (`doRequest` → `localhost:8080`) | `api_helpers_test.go` | | `cli_` | CLI binary (`runDCM` → `os/exec`) | `cli_helpers_test.go` | | `sp_container_` | Container SP direct API + NATS (`doContainerSPRequest` → `localhost:8082`) | `sp_helpers_test.go` | | `sp_acm_cluster_` | ACM Cluster SP direct API (`doAcmClusterSPRequest` → `localhost:8083`) | `sp_acm_cluster_helpers_test.go` | -| `core_` | Cross-service provisioning flow via gateway (`doRequest`) | `api_helpers_test.go`, `sp_helpers_test.go` | +| `core_` | Cross-service provisioning flow via control plane (`doRequest`) | `api_helpers_test.go`, `sp_helpers_test.go` | When adding a new service provider, add `sp_{provider}_{concern}_test.go` (e.g. `sp_kubevirt_api_test.go`). Each provider gets its own helpers file (`sp_{provider}_helpers_test.go`). Shared infrastructure (kubectl, podman, NATS collector) stays in `sp_helpers_test.go`. @@ -37,7 +37,7 @@ When adding a new service provider, add `sp_{provider}_{concern}_test.go` (e.g. ## Environment Variables | Variable | Default | Purpose | |----------|---------|---------| -| `DCM_GATEWAY_URL` | `http://localhost:9080/api/v1alpha1` | Gateway API | +| `DCM_GATEWAY_URL` | `http://localhost:8080/api/v1alpha1` | Control plane API | | `DCM_CONTAINER_SP_URL` | `http://localhost:8082/api/v1alpha1` | Container SP direct API | | `DCM_ACM_CLUSTER_SP_URL` | `http://localhost:8083/api/v1alpha1` | ACM Cluster SP direct API | | `DCM_NATS_URL` | `nats://localhost:4222` | NATS for status events | diff --git a/CLAUDE.md b/CLAUDE.md index bedd5eb..36a14ef 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,9 +26,9 @@ CI runs ShellCheck on changed `*.sh` files via `.github/workflows/lint.yaml` (on ## Key Script: `scripts/deploy-dcm.sh` -Deploys the full DCM stack for E2E testing by cloning api-gateway (which owns `compose.yaml`), running `podman-compose up`, and polling health endpoints until all services respond 2xx. +Deploys the full DCM stack for E2E testing by cloning control-plane (`deploy/compose.yaml`), running `podman-compose up`, and polling health endpoints until all services respond 2xx. -**Flow:** clone api-gateway → `podman-compose up -d` → verify containers running → poll `/api/v1alpha1/health/*` endpoints → collect container versions from Quay.io API → write `dcm-versions.json`. +**Flow:** clone control-plane → `podman-compose up -d` → verify containers running → poll `/api/v1alpha1/health` → collect container versions from Quay.io API → write `dcm-versions.json`. **Modes:** The script has three mutually exclusive modes: - **Deploy** (default): full clone + bring-up + health check. Pass `--cleanup-on-failure` to auto-teardown on error (default leaves partial state for debugging). @@ -40,7 +40,7 @@ Deploys the full DCM stack for E2E testing by cloning api-gateway (which owns `c - `--version v0.1.0-rc.1` — pin all images to an explicit tag - `--version release` — auto-resolve the latest semver tag from Quay.io -When a non-main version is specified, `--api-gateway-branch` is auto-derived to the corresponding release branch (e.g. `v0.1.0-rc.1` → `release/v0.1.0`) unless explicitly passed. +When a non-main version is specified, `--control-plane-branch` is auto-derived to the corresponding release branch (e.g. `v0.1.0-rc.1` → `release/v0.1.0`) unless explicitly passed. **Service providers:** Configured via `providers/*.conf` files (see "Provider Registry" below). Enable with `--