2026-01-23 00:42:05 +00:00
|
|
|
# Copyright 2021 Collate
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
# Distributed Search Indexing Test Environment
|
|
|
|
|
# This compose file sets up multiple OM servers sharing a common MySQL and OpenSearch
|
|
|
|
|
|
|
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
mysql-data:
|
|
|
|
|
opensearch-data:
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
distributed-test-net:
|
|
|
|
|
name: distributed_test_network
|
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
# Shared MySQL Database
|
|
|
|
|
mysql:
|
|
|
|
|
image: mysql:8.0
|
|
|
|
|
container_name: distributed_test_mysql
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-password}
|
|
|
|
|
command: >
|
|
|
|
|
--sort_buffer_size=10M
|
|
|
|
|
--max_connections=500
|
|
|
|
|
ports:
|
|
|
|
|
- "${MYSQL_PORT:-3306}:3306"
|
|
|
|
|
networks:
|
|
|
|
|
- distributed-test-net
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p${MYSQL_ROOT_PASSWORD:-password}"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 10
|
|
|
|
|
volumes:
|
|
|
|
|
- mysql-data:/var/lib/mysql
|
|
|
|
|
- ./config/mysql-init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
|
|
|
|
|
|
|
|
# Shared OpenSearch
|
|
|
|
|
opensearch:
|
2026-02-07 13:24:13 +00:00
|
|
|
image: opensearchproject/opensearch:3.4.0
|
2026-01-23 00:42:05 +00:00
|
|
|
container_name: distributed_test_opensearch
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
- discovery.type=single-node
|
|
|
|
|
- plugins.security.disabled=true
|
|
|
|
|
- "OPENSEARCH_JAVA_OPTS=${OPENSEARCH_JAVA_OPTS:--Xms512m -Xmx512m}"
|
|
|
|
|
ports:
|
|
|
|
|
- "${OPENSEARCH_PORT:-9200}:9200"
|
|
|
|
|
- "9600:9600"
|
|
|
|
|
networks:
|
|
|
|
|
- distributed-test-net
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -qE '\"status\":\"(green|yellow)\"'"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 10
|
|
|
|
|
volumes:
|
|
|
|
|
- opensearch-data:/usr/share/opensearch/data
|
|
|
|
|
|
|
|
|
|
# Database migration (runs once)
|
|
|
|
|
migrate:
|
|
|
|
|
build:
|
|
|
|
|
context: ../../../.
|
|
|
|
|
dockerfile: docker/development/Dockerfile
|
|
|
|
|
container_name: distributed_test_migrate
|
|
|
|
|
command: "./bootstrap/openmetadata-ops.sh -d migrate --force"
|
|
|
|
|
environment:
|
|
|
|
|
LOG_LEVEL: INFO
|
|
|
|
|
DB_DRIVER_CLASS: com.mysql.cj.jdbc.Driver
|
|
|
|
|
DB_SCHEME: mysql
|
|
|
|
|
DB_HOST: mysql
|
|
|
|
|
DB_PORT: 3306
|
|
|
|
|
DB_USER: ${DB_USER:-openmetadata_user}
|
|
|
|
|
DB_USER_PASSWORD: ${DB_USER_PASSWORD:-openmetadata_password}
|
|
|
|
|
OM_DATABASE: ${OM_DATABASE:-openmetadata_db}
|
|
|
|
|
DB_PARAMS: allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
|
|
|
|
|
SEARCH_TYPE: opensearch
|
|
|
|
|
ELASTICSEARCH_HOST: opensearch
|
|
|
|
|
ELASTICSEARCH_PORT: 9200
|
|
|
|
|
ELASTICSEARCH_SCHEME: http
|
|
|
|
|
depends_on:
|
|
|
|
|
mysql:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
opensearch:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
networks:
|
|
|
|
|
- distributed-test-net
|
|
|
|
|
|
|
|
|
|
# OpenMetadata Server 1 (Primary - can trigger reindex)
|
|
|
|
|
openmetadata-server-1:
|
|
|
|
|
build:
|
|
|
|
|
context: ../../../.
|
|
|
|
|
dockerfile: docker/development/Dockerfile
|
|
|
|
|
container_name: distributed_test_om_server_1
|
|
|
|
|
hostname: om-server-1
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
SERVER_PORT: 8585
|
|
|
|
|
SERVER_ADMIN_PORT: 8586
|
|
|
|
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
|
|
|
|
OPENMETADATA_CLUSTER_NAME: distributed-test
|
|
|
|
|
|
|
|
|
|
# Unique server identifier for distributed indexing
|
|
|
|
|
OM_SERVER_ID: server-1
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
|
DB_DRIVER_CLASS: com.mysql.cj.jdbc.Driver
|
|
|
|
|
DB_SCHEME: mysql
|
|
|
|
|
DB_HOST: mysql
|
|
|
|
|
DB_PORT: 3306
|
|
|
|
|
DB_USER: ${DB_USER:-openmetadata_user}
|
|
|
|
|
DB_USER_PASSWORD: ${DB_USER_PASSWORD:-openmetadata_password}
|
|
|
|
|
OM_DATABASE: ${OM_DATABASE:-openmetadata_db}
|
|
|
|
|
DB_PARAMS: allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
|
|
|
|
|
|
|
|
|
|
# Search
|
|
|
|
|
SEARCH_TYPE: opensearch
|
|
|
|
|
ELASTICSEARCH_HOST: opensearch
|
|
|
|
|
ELASTICSEARCH_PORT: 9200
|
|
|
|
|
ELASTICSEARCH_SCHEME: http
|
|
|
|
|
|
|
|
|
|
# Auth
|
|
|
|
|
AUTHENTICATION_PROVIDER: basic
|
|
|
|
|
AUTHORIZER_ADMIN_PRINCIPALS: "[admin]"
|
|
|
|
|
AUTHENTICATION_PUBLIC_KEYS: "[http://localhost:8585/api/v1/system/config/jwks]"
|
|
|
|
|
|
|
|
|
|
# Pipeline service disabled for testing
|
|
|
|
|
PIPELINE_SERVICE_CLIENT_ENABLED: "false"
|
|
|
|
|
|
|
|
|
|
# Heap
|
|
|
|
|
OPENMETADATA_HEAP_OPTS: ${OPENMETADATA_HEAP_OPTS:--Xmx1G -Xms1G}
|
|
|
|
|
ports:
|
|
|
|
|
- "8585:8585"
|
|
|
|
|
- "8586:8586"
|
|
|
|
|
depends_on:
|
|
|
|
|
migrate:
|
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
networks:
|
|
|
|
|
- distributed-test-net
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8586/healthcheck"]
|
|
|
|
|
interval: 15s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 10
|
|
|
|
|
|
|
|
|
|
# OpenMetadata Server 2
|
|
|
|
|
openmetadata-server-2:
|
|
|
|
|
build:
|
|
|
|
|
context: ../../../.
|
|
|
|
|
dockerfile: docker/development/Dockerfile
|
|
|
|
|
container_name: distributed_test_om_server_2
|
|
|
|
|
hostname: om-server-2
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
SERVER_PORT: 8585
|
|
|
|
|
SERVER_ADMIN_PORT: 8586
|
|
|
|
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
|
|
|
|
OPENMETADATA_CLUSTER_NAME: distributed-test
|
|
|
|
|
|
|
|
|
|
# Unique server identifier for distributed indexing
|
|
|
|
|
OM_SERVER_ID: server-2
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
|
DB_DRIVER_CLASS: com.mysql.cj.jdbc.Driver
|
|
|
|
|
DB_SCHEME: mysql
|
|
|
|
|
DB_HOST: mysql
|
|
|
|
|
DB_PORT: 3306
|
|
|
|
|
DB_USER: ${DB_USER:-openmetadata_user}
|
|
|
|
|
DB_USER_PASSWORD: ${DB_USER_PASSWORD:-openmetadata_password}
|
|
|
|
|
OM_DATABASE: ${OM_DATABASE:-openmetadata_db}
|
|
|
|
|
DB_PARAMS: allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
|
|
|
|
|
|
|
|
|
|
# Search
|
|
|
|
|
SEARCH_TYPE: opensearch
|
|
|
|
|
ELASTICSEARCH_HOST: opensearch
|
|
|
|
|
ELASTICSEARCH_PORT: 9200
|
|
|
|
|
ELASTICSEARCH_SCHEME: http
|
|
|
|
|
|
|
|
|
|
# Auth
|
|
|
|
|
AUTHENTICATION_PROVIDER: basic
|
|
|
|
|
AUTHORIZER_ADMIN_PRINCIPALS: "[admin]"
|
|
|
|
|
AUTHENTICATION_PUBLIC_KEYS: "[http://localhost:8587/api/v1/system/config/jwks]"
|
|
|
|
|
|
|
|
|
|
# Pipeline service disabled for testing
|
|
|
|
|
PIPELINE_SERVICE_CLIENT_ENABLED: "false"
|
|
|
|
|
|
|
|
|
|
# Heap
|
|
|
|
|
OPENMETADATA_HEAP_OPTS: ${OPENMETADATA_HEAP_OPTS:--Xmx1G -Xms1G}
|
|
|
|
|
ports:
|
|
|
|
|
- "8587:8585"
|
|
|
|
|
- "8588:8586"
|
|
|
|
|
depends_on:
|
|
|
|
|
migrate:
|
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
networks:
|
|
|
|
|
- distributed-test-net
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8586/healthcheck"]
|
|
|
|
|
interval: 15s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 10
|
|
|
|
|
|
|
|
|
|
# OpenMetadata Server 3
|
|
|
|
|
openmetadata-server-3:
|
|
|
|
|
build:
|
|
|
|
|
context: ../../../.
|
|
|
|
|
dockerfile: docker/development/Dockerfile
|
|
|
|
|
container_name: distributed_test_om_server_3
|
|
|
|
|
hostname: om-server-3
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
SERVER_PORT: 8585
|
|
|
|
|
SERVER_ADMIN_PORT: 8586
|
|
|
|
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
|
|
|
|
OPENMETADATA_CLUSTER_NAME: distributed-test
|
|
|
|
|
|
|
|
|
|
# Unique server identifier for distributed indexing
|
|
|
|
|
OM_SERVER_ID: server-3
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
|
DB_DRIVER_CLASS: com.mysql.cj.jdbc.Driver
|
|
|
|
|
DB_SCHEME: mysql
|
|
|
|
|
DB_HOST: mysql
|
|
|
|
|
DB_PORT: 3306
|
|
|
|
|
DB_USER: ${DB_USER:-openmetadata_user}
|
|
|
|
|
DB_USER_PASSWORD: ${DB_USER_PASSWORD:-openmetadata_password}
|
|
|
|
|
OM_DATABASE: ${OM_DATABASE:-openmetadata_db}
|
|
|
|
|
DB_PARAMS: allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
|
|
|
|
|
|
|
|
|
|
# Search
|
|
|
|
|
SEARCH_TYPE: opensearch
|
|
|
|
|
ELASTICSEARCH_HOST: opensearch
|
|
|
|
|
ELASTICSEARCH_PORT: 9200
|
|
|
|
|
ELASTICSEARCH_SCHEME: http
|
|
|
|
|
|
|
|
|
|
# Auth
|
|
|
|
|
AUTHENTICATION_PROVIDER: basic
|
|
|
|
|
AUTHORIZER_ADMIN_PRINCIPALS: "[admin]"
|
|
|
|
|
AUTHENTICATION_PUBLIC_KEYS: "[http://localhost:8589/api/v1/system/config/jwks]"
|
|
|
|
|
|
|
|
|
|
# Pipeline service disabled for testing
|
|
|
|
|
PIPELINE_SERVICE_CLIENT_ENABLED: "false"
|
|
|
|
|
|
|
|
|
|
# Heap
|
|
|
|
|
OPENMETADATA_HEAP_OPTS: ${OPENMETADATA_HEAP_OPTS:--Xmx1G -Xms1G}
|
|
|
|
|
ports:
|
|
|
|
|
- "8589:8585"
|
|
|
|
|
- "8590:8586"
|
|
|
|
|
depends_on:
|
|
|
|
|
migrate:
|
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
networks:
|
|
|
|
|
- distributed-test-net
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8586/healthcheck"]
|
|
|
|
|
interval: 15s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 10
|