Skip to content

Commit

Permalink
ci: BI-0 add US PG healthcheck in test compose files, move US service… (
Browse files Browse the repository at this point in the history
#725)

* ci: BI-0 add US PG healthcheck in test compose files, move US service to common compose

* Remove unused x-constants

* remove override in dl_api_lib

* fix override in dl_api_lib

* fix it finally
  • Loading branch information
KonstantAnxiety authored and juliarbkv committed Nov 22, 2024
1 parent cb8ea79 commit 91ce431
Show file tree
Hide file tree
Showing 19 changed files with 144 additions and 366 deletions.
6 changes: 3 additions & 3 deletions lib/dl_api_lib/dl_api_lib_tests/db/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
CORE_TEST_CONFIG = CoreTestEnvironmentConfiguration(
host_us_http=get_test_container_hostport("us", fallback_port=52500).host,
port_us_http=get_test_container_hostport("us", fallback_port=52500).port,
host_us_pg=get_test_container_hostport("db-postgres", fallback_port=52509).host,
port_us_pg_5432=get_test_container_hostport("db-postgres", fallback_port=52509).port,
host_us_pg=get_test_container_hostport("pg-us", fallback_port=52509).host,
port_us_pg_5432=get_test_container_hostport("pg-us", fallback_port=52509).port,
us_master_token="AC1ofiek8coB",
core_connector_ep_names=["clickhouse", "postgresql"],
compeng_url=(
f"postgresql://us:us@"
f'{get_test_container_hostport("db-postgres", fallback_port=52509).as_pair()}/us-db-ci_purgeable'
f'{get_test_container_hostport("pg-us", fallback_port=52509).as_pair()}/us-db-ci_purgeable'
),
redis_host=get_test_container_hostport("redis-caches").host,
redis_port=get_test_container_hostport("redis-caches", fallback_port=52505).port,
Expand Down
29 changes: 7 additions & 22 deletions lib/dl_api_lib/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"

services:
redis-caches:
# image: "bitnami/redis:5.0.8"
Expand All @@ -21,28 +18,16 @@ services:
dockerfile: Dockerfile.db-clickhouse

# PostgreSQL is used both for US and COMPENG
db-postgres:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
pg-us:
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- "52509:5432"

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
depends_on:
- db-postgres
environment:
POSTGRES_DSN_LIST: "postgres://us:us@db-postgres:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- "52500:8083"
27 changes: 6 additions & 21 deletions lib/dl_connector_bigquery/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"

services:

# INFRA
pg-us:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- "51609:5432"

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
depends_on:
- pg-us
environment:
POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- "51600:8083"

Expand Down
27 changes: 6 additions & 21 deletions lib/dl_connector_bitrix_gds/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"

services:
# COMPENG
db-postgres-13:
Expand All @@ -18,27 +15,15 @@ services:

# INFRA
pg-us:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- "51910:5432"

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
depends_on:
- pg-us
environment:
POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- "51911:8083"
31 changes: 7 additions & 24 deletions lib/dl_connector_bundle_chs3/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"
REDIS_PASSWORD: &c-redis-password "AwockEuvavDyinmeakmiRiopanbesBepsensUrdIz5"


services:
redis:
image: "bitnami/redis:5.0.8@sha256:3127620da977815556439a9dc347fff89432a79b6bb6e93a16f20ac4a34ce337"
environment:
REDIS_PASSWORD: *c-redis-password
REDIS_PASSWORD: AwockEuvavDyinmeakmiRiopanbesBepsensUrdIz5
ports:
- 52604:6379

Expand All @@ -33,27 +28,15 @@ services:
- 52620:8000

pg-us:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- 52609:5432

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- 52600:8083
depends_on:
- pg-us
environment:
POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
27 changes: 6 additions & 21 deletions lib/dl_connector_clickhouse/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"

services:
db-clickhouse-21-8:
ports:
Expand Down Expand Up @@ -33,28 +30,16 @@ services:

# INFRA
pg-us:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- "52210:5432"

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
depends_on:
- pg-us
environment:
POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- "52211:8083"

Expand Down
27 changes: 6 additions & 21 deletions lib/dl_connector_greenplum/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"

services:
# yes, greenplum tests run on a postgres db
db-postgres-13:
Expand All @@ -18,28 +15,16 @@ services:

# INFRA
pg-us:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- "52310:5432"

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
depends_on:
- pg-us
environment:
POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- "52311:8083"

Expand Down
27 changes: 6 additions & 21 deletions lib/dl_connector_metrica/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"

services:
# INFRA
pg-us:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- "51910:5432"

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
depends_on:
- pg-us
environment:
POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- "51911:8083"
27 changes: 6 additions & 21 deletions lib/dl_connector_mssql/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: '3.7'

x-constants:
US_MASTER_TOKEN: &c-us-master-token "AC1ofiek8coB"

services:
db-mssql-14:
labels:
Expand All @@ -18,28 +15,16 @@ services:

# INFRA
pg-us:
build:
context: ../testenv-common/images
dockerfile: Dockerfile.pg-us
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
extends:
file: ../testenv-common/docker-compose.common.yml
service: pg-us
ports:
- "52110:5432"

us:
labels:
datalens.ci.service: united-storage
build:
context: ../testenv-common/images
dockerfile: Dockerfile.us
depends_on:
- pg-us
environment:
POSTGRES_DSN_LIST: "postgres://us:us@pg-us:5432/us-db-ci_purgeable"
AUTH_POLICY: "required"
MASTER_TOKEN: *c-us-master-token
extends:
file: ../testenv-common/docker-compose.common.yml
service: us
ports:
- "52111:8083"

Expand Down
Loading

0 comments on commit 91ce431

Please sign in to comment.