docker-compose.e2e.dbs.extended.yml
Rama main · réplica de lectura del repositorio original.
# Extended E2E DB fixtures — Tier-1 test engines (SQL Server, ClickHouse, Oracle).
#
# SEPARATE from docker-compose.e2e.dbs.yml (mysql/postgres/mongo) so the standard
# gate is untouched. Own compose project (`rsync-ai-e2e-ext`) but attaches every
# service to the SHARED external network `rsync-ai_default` (same as the base e2e
# DBs) so Kafka-Connect/Debezium and the MCP connectors can resolve them by the
# network aliases below (`sqlserver-e2e`, `clickhouse-e2e`, `oracle-e2e`).
#
# Bare-label hostnames (no dot) are classified LOCAL by the connectors'
# _is_local_db_host / IsLocalDBHost, so their self-signed TLS is auto-trusted on
# both the MCP-validation and Debezium capture paths.
#
# Bring up only what a given test needs, e.g.:
# docker compose -f docker-compose.e2e.dbs.extended.yml up -d sqlserver-e2e sqlserver-e2e-init
#
# These are DISPOSABLE fixtures on an isolated test VM. The SA/admin passwords
# below are throwaway fixture credentials (overridable via env), NOT real secrets.
name: rsync-ai-e2e-ext
services:
# ==========================================================================
# SQL Server 2022 — native CDC source. Agent ON (required for CDC capture
# jobs). Executor auto-provisions sp_cdc_enable_db + sp_cdc_enable_table
# (PR #396); the fixture only needs the DB to exist + Agent running.
# ==========================================================================
sqlserver-e2e:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: rsync-ai-sqlserver-e2e
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=${SS_E2E_SA_PWD:-Rsync_E2E_Strong!42}
- MSSQL_PID=Developer
- MSSQL_AGENT_ENABLED=true
ports:
- "${RSYNC_HP_SQLSERVER_E2E:-1433}:1433"
healthcheck:
# tools18 (with -C to trust the self-signed cert) on current images, else
# legacy tools17. Unhealthy only if neither client can log in.
# SQLCMDPASSWORD, not -P: this runs every 10s, and -P puts the SA password on
# the process listing each time. sqlcmd reads the env var natively in both
# tools17 and tools18 (verified against 2022-latest + mssql-tools:latest).
test: ["CMD-SHELL", "SQLCMDPASSWORD=\"$$MSSQL_SA_PASSWORD\" /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -C -Q 'SELECT 1' || SQLCMDPASSWORD=\"$$MSSQL_SA_PASSWORD\" /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -Q 'SELECT 1'"]
interval: 10s
timeout: 5s
retries: 24
start_period: 30s
networks:
rsync-ai_default:
aliases:
- sqlserver-e2e
# One-shot: wait for SQL Server, then CREATE the test database. Uses the
# mssql-tools image (deterministic sqlcmd) with its own retry loop so it does
# not depend on the server's healthcheck tool path.
sqlserver-e2e-init:
image: mcr.microsoft.com/mssql-tools:latest
depends_on:
sqlserver-e2e:
condition: service_started
environment:
# Read directly by sqlcmd, so the password never appears in -P (and so the
# script no longer has to shadow the shell's own PWD to carry it).
- SQLCMDPASSWORD=${SS_E2E_SA_PWD:-Rsync_E2E_Strong!42}
entrypoint: ["/bin/bash", "-lc"]
command:
- |
DB="${SS_E2E_DB:-ss_e2e_db}"
for i in $(seq 1 40); do
if /opt/mssql-tools/bin/sqlcmd -S sqlserver-e2e -U sa -Q "SELECT 1" >/dev/null 2>&1; then
echo "sqlserver-e2e reachable (attempt $$i)"; break
fi
echo "waiting for sqlserver-e2e ($$i)"; sleep 3
done
/opt/mssql-tools/bin/sqlcmd -S sqlserver-e2e -U sa -Q \
"IF DB_ID('$$DB') IS NULL BEGIN CREATE DATABASE [$$DB]; END" \
&& echo "database $$DB ready" \
|| { echo "FAILED to create $$DB"; exit 1; }
restart: "no"
networks:
rsync-ai_default: {}
# ==========================================================================
# ClickHouse — batch source/destination (NOT a CDC-merge dest). Native TCP
# 9000 + HTTP 8123. Default user, no password (fixture only).
# ==========================================================================
clickhouse-e2e:
image: clickhouse/clickhouse-server:24.8
container_name: rsync-ai-clickhouse-e2e
environment:
- CLICKHOUSE_DB=${CH_E2E_DB:-ch_e2e_db}
- CLICKHOUSE_USER=${CH_E2E_USER:-e2e_user}
- CLICKHOUSE_PASSWORD=${CH_E2E_PWD:-e2e_password}
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
ports:
- "${RSYNC_HP_CLICKHOUSE_HTTP_E2E:-8123}:8123"
- "${RSYNC_HP_CLICKHOUSE_TCP_E2E:-9100}:9000"
ulimits:
nofile:
soft: 262144
hard: 262144
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8123/ping | grep -q Ok."]
interval: 5s
timeout: 5s
retries: 24
start_period: 10s
networks:
rsync-ai_default:
aliases:
- clickhouse-e2e
# ==========================================================================
# Oracle Free 23ai — LogMiner CDC source (HARDEST fixture). The executor only
# auto-provisions per-table supplemental logging; ARCHIVELOG mode, DB-level
# supplemental logging and the LogMiner user are provisioned by
# scripts/oracle_cdc_provision.sh (an in-container SHUTDOWN/STARTUP MOUNT bounce
# to enable ARCHIVELOG, then the c##rsync_cdc common user + grants).
#
# Pin: MUST predate Oracle's "Oracle AI Database 26ai" rebrand (the floating
# `23-slim` tag rolled forward to 23.26 which reports PRODUCT='Oracle AI
# Database 26ai Free'). Debezium 3.1.3.Final resolves the DB version with
# `PRODUCT LIKE 'Oracle Database %'`, which matches "Oracle Database 23ai Free"
# (23.6) but NOT the rebranded 26ai string → HTTP 400 "Failed to resolve
# Oracle database version" on connector create. 23.6-slim is prod-representative
# (real customers run 19c/21c/23ai, all reporting "Oracle Database …").
# ==========================================================================
oracle-e2e:
image: gvenzl/oracle-free:23.6-slim
container_name: rsync-ai-oracle-e2e
environment:
- ORACLE_PASSWORD=${ORA_E2E_SYS_PWD:-Rsync_E2E_Strong!42}
- APP_USER=${ORA_E2E_APP_USER:-rsynctest}
- APP_USER_PASSWORD=${ORA_E2E_APP_PWD:-Rsync_E2E_Strong!42}
ports:
- "${RSYNC_HP_ORACLE_E2E:-1521}:1521"
healthcheck:
test: ["CMD-SHELL", "healthcheck.sh"]
interval: 10s
timeout: 10s
retries: 30
start_period: 60s
networks:
rsync-ai_default:
aliases:
- oracle-e2e
networks:
# Shared app network — same one the base e2e DBs attach to. Created by the
# main stack; must already exist.
rsync-ai_default:
external: true
name: rsync-ai_default