Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conf/docker/.env.setup
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ MC_INFRA_CONNECTOR_REST_URL=http://mc-infra-connector:1024/spider
MC_INFRA_CONNECTOR_URL=mc-infra-connector
MC_INFRA_CONNECTOR_API_USERNAME=default
MC_INFRA_CONNECTOR_API_PASSWORD=default
MC_INFRA_CONNECTOR_POSTGRES_USER=spider
MC_INFRA_CONNECTOR_POSTGRES_PASSWORD=spider
MC_INFRA_CONNECTOR_POSTGRES_DB=spider

## mc-infra-manager
MC_INFRA_MANAGER_API_USERNAME=default
Expand Down
29 changes: 28 additions & 1 deletion conf/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ services:
protocol: tcp
volumes:
- ./tool/mcc:/app/tool/mcc
- ./container-volume/mc-infra-connector/meta_db/:/root/go/src/github.com/cloud-barista/cb-spider/meta_db/
- ./container-volume/mc-infra-connector/log/:/root/go/src/github.com/cloud-barista/cb-spider/log/
environment:
- SERVER_ADDRESS=0.0.0.0:1024
- SPIDER_USERNAME=${MC_INFRA_CONNECTOR_API_USERNAME:-default}
- SPIDER_PASSWORD=${MC_INFRA_CONNECTOR_API_PASSWORD:-default}
- SPIDER_METADB_ENDPOINT=mc-infra-connector-postgres:5432
- SPIDER_METADB_USER=${MC_INFRA_CONNECTOR_POSTGRES_USER:-spider}
- SPIDER_METADB_PASSWORD=${MC_INFRA_CONNECTOR_POSTGRES_PASSWORD:-spider}
- SPIDER_METADB_DATABASE=${MC_INFRA_CONNECTOR_POSTGRES_DB:-cb_spider}
- SPIDER_LOG_LEVEL=${MC_INFRA_CONNECTOR_LOG_LEVEL:-error}
- SPIDER_HISCALL_LOG_LEVEL=${MC_INFRA_CONNECTOR_HISCALL_LOG_LEVEL:-error}
- ID_TRANSFORM_MODE=OFF
Expand All @@ -53,6 +56,30 @@ services:
test: [ "CMD", "/app/tool/mcc", "rest", "get", "http://localhost:1024/spider/readyz" ]
<<: *default-health-check

# This is used for storing CB-Spider metadata (replaces the legacy SQLite-based meta_db).
mc-infra-connector-postgres:
image: postgres:16-alpine
container_name: mc-infra-connector-postgres
restart: always
networks:
- mc-infra-connector-network
# # Enable external network for outbound access (not ideal for security)
# - external_network
ports:
- ${MC_INFRA_CONNECTOR_POSTGRES_HOST_PORT}:5432
volumes:
- ./container-volume/mc-infra-connector/meta_db/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${MC_INFRA_CONNECTOR_POSTGRES_USER:-spider}
- POSTGRES_PASSWORD=${MC_INFRA_CONNECTOR_POSTGRES_PASSWORD:-spider}
- POSTGRES_DB=${MC_INFRA_CONNECTOR_POSTGRES_DB:-cb_spider}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${MC_INFRA_CONNECTOR_POSTGRES_USER:-spider}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s

##### MC-INFRA-MANAGER #########################################################################################################################

mc-infra-manager:
Expand Down