-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add initial docker compose file for testing
- Loading branch information
fonhorst
committed
Jan 6, 2024
1 parent
7ca5f2c
commit c551f4a
Showing
10 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
services: | ||
redis: | ||
image: redis:6.2 | ||
ports: | ||
- "6379:6379" | ||
networks: | ||
- test_autotm_net | ||
healthcheck: | ||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] | ||
|
||
rabbitmq: | ||
image: rabbitmq:3.8-management-alpin | ||
ports: | ||
- "5672:5672" | ||
- "15672:15672" | ||
networks: | ||
- test_autotm_net | ||
configs: | ||
- source: rabbitmq_conf | ||
target: /etc/rabbitmq/rabbitmq.conf | ||
- source: rabbitmq_enabled_plugins | ||
target: /etc/rabbitmq/enabled_plugins | ||
- source: rabbitmq_consumer_settings | ||
target: /etc/rabbitmq/conf.d/consumer-settings.conf | ||
healthcheck: | ||
test: rabbitmq-diagnostics -q ping | ||
interval: 30s | ||
timeout: 30s | ||
retries: 3 | ||
|
||
flower: | ||
image: mher/flower | ||
depends_on: | ||
- rabbitmq | ||
ports: | ||
- "5555:5555" | ||
networks: | ||
- test_autotm_net | ||
environment: | ||
CELERY_BROKER_URL: "amqp://guest:guest@rabbitmq:5672" | ||
CELERY_RESULT_BACKEND: "redis://redis:6379/1" | ||
|
||
# todo: "/var/lib/mysql" | ||
mlflow-db: | ||
image: mysql/mysql-server:5.7.28 | ||
ports: | ||
- "3306:3306" | ||
networks: | ||
- test_autotm_net | ||
environment: | ||
MYSQL_DATABASE: "mlflow" | ||
MYSQL_USER: "mlflow" | ||
MYSQL_PASSWORD: "mlflow" | ||
MYSQL_ROOT_PASSWORD: "mlflow" | ||
configs: | ||
- source: mysql_conf | ||
target: /etc/mysql/my.cnf | ||
healthcheck: | ||
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] | ||
timeout: 20s | ||
retries: 10 | ||
|
||
# todo: set correct image | ||
# todo: "/var/lib/mlruns" | ||
# todo: shared artifact folder | ||
mlflow: | ||
image: "mlflow-webserver:latest" | ||
command: [ | ||
"--backend-store-uri", "mysql+pymysql://mlflow:mlflow@mlflow-db:3306/mlflow", | ||
"--default-artifact-root", "/var/lib/mlruns", | ||
"--host", "0.0.0.0" | ||
] | ||
depends_on: | ||
- mlflow-db | ||
ports: | ||
- "5000:5000" | ||
networks: | ||
- test_autotm_net | ||
healthcheck: | ||
test: [ "CMD-SHELL", "curl -f http://localhost:5000 || exit 1" ] | ||
timeout: 10s | ||
retries: 10 | ||
|
||
# todo: /var/lib/mongodb | ||
mongo: | ||
image: "mongo:4.4.6-bionic" | ||
command: [ | ||
"--dbpath", "/var/lib/mongodb", | ||
"--bind_ip_all" | ||
] | ||
ports: | ||
- "27017:27017" | ||
networks: | ||
- test_autotm_net | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: "mongoadmin" | ||
MONGO_INITDB_ROOT_PASSWORD: "secret" | ||
healthcheck: | ||
test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet 1 | ||
timeout: 10s | ||
retries: 10 | ||
|
||
mongo-express: | ||
image: "mongo-express:latest" | ||
ports: | ||
- "8081:8081" | ||
networks: | ||
- test_autotm_net | ||
environment: | ||
ME_CONFIG_MONGODB_ADMINUSERNAME: "mongoadmin" | ||
ME_CONFIG_MONGODB_ADMINPASSWORD: "secret" | ||
ME_CONFIG_MONGODB_SERVER: "mongo" | ||
ME_CONFIG_MONGODB_PORT: "27017" | ||
healthcheck: | ||
test: [ "CMD-SHELL", "curl -f http://localhost:8081 || exit 1" ] | ||
timeout: 10s | ||
retries: 10 | ||
|
||
configs: | ||
rabbitmq_consumer_settings: | ||
file: rabbitmq/consumer-settings.conf | ||
|
||
rabbitmq_conf: | ||
file: rabbitmq/rabbitmq.conf | ||
|
||
rabbitmq_enabled_plugins: | ||
file: rabbitmq/enabled_plugins | ||
|
||
mysql_conf: | ||
file: mysql/my.cnf | ||
|
||
networks: | ||
test_autotm_net: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[mysqld] | ||
max_connections=500 | ||
wait_timeout=15 | ||
interactive_timeout=15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Consumer timeout | ||
## If a message delivered to a consumer has not been acknowledge before this timer | ||
## triggers the channel will be force closed by the broker. This ensure that | ||
## faultly consumers that never ack will not hold on to messages indefinitely. | ||
## | ||
consumer_timeout = 1800000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[rabbitmq_management,rabbitmq_prometheus]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
management.tcp.port = 15672 | ||
management.tcp.ip = 0.0.0.0 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import pytest | ||
import os | ||
|
||
|
||
# Override the following 3 fixtures to make pytest-docker running with externally started docker compose | ||
@pytest.fixture(scope="session") | ||
def docker_compose_project_name(): | ||
return "" | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def docker_setup(): | ||
return None | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def docker_cleanup(): | ||
return None | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def docker_compose_file(pytestconfig): | ||
return os.path.join(str(pytestconfig.rootpath), "tests", "deploy", "compose.yaml") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def test_distributed_fit_predict(): | ||
pass |