Mirror of https://github.com/roostorg/osprey
github.com/roostorg/osprey
1# Test-specific docker-compose that extends the main one
2# Usage: docker compose -f docker-compose.yaml -f docker-compose.test.yaml --profile test <command>
3
4services:
5 postgres:
6 ports: !reset []
7 volumes: !reset []
8
9 minio:
10 volumes: !reset []
11
12 etcd:
13 container_name: etcd
14 image: quay.io/coreos/etcd:v3.4.18
15 ports:
16 - "127.0.0.1:2379:2379"
17 environment:
18 - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
19 - ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
20 - ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
21 - ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd:2380
22 - ETCD_INITIAL_CLUSTER=etcd=http://etcd:2380
23 - ETCD_NAME=etcd
24 - ETCD_DATA_DIR=/etcd-data
25 - ETCD_ENABLE_V2=true
26 healthcheck:
27 test:
28 [
29 "CMD",
30 "etcdctl",
31 "--endpoints=http://localhost:2379",
32 "endpoint",
33 "health",
34 ]
35 interval: 10s
36 timeout: 5s
37 retries: 5
38 restart: unless-stopped
39
40 test_runner:
41 container_name: osprey_test_runner
42 build:
43 context: .
44 dockerfile: osprey_worker/Dockerfile
45 depends_on:
46 osprey-kafka:
47 condition: service_healthy
48 osprey-kafka-topic-creator:
49 condition: service_completed_successfully
50 bigtable:
51 condition: service_healthy
52 bigtable-initializer:
53 condition: service_completed_successfully
54 minio:
55 condition: service_healthy
56 minio-bucket-init:
57 condition: service_completed_successfully
58 postgres:
59 condition: service_healthy
60 snowflake-id-worker:
61 condition: service_started
62 etcd:
63 condition: service_healthy
64 profiles:
65 - test
66 environment:
67 - PYTHONPATH=/osprey
68 - OSPREY_INPUT_STREAM_SOURCE=kafka
69 - OSPREY_STDOUT_OUTPUT_SINK=True
70 - OSPREY_KAFKA_BOOTSTRAP_SERVERS=["osprey-kafka:29092"]
71 - OSPREY_KAFKA_INPUT_STREAM_TOPIC=osprey.actions_input
72 - OSPREY_KAFKA_INPUT_STREAM_CLIENT_ID=localhost
73 - OSPREY_KAFKA_OUTPUT_SINK=True
74 - OSPREY_KAFKA_OUTPUT_TOPIC=osprey.execution_results
75 - OSPREY_KAFKA_OUTPUT_CLIENT_ID=localhost
76 - DD_TRACE_ENABLED=False
77 - DD_DOGSTATSD_DISABLE=True
78 - OSPREY_RULES_SINK_NUM_WORKERS=1
79 - BIGTABLE_EMULATOR_HOST=bigtable:8361
80 - OSPREY_EXECUTION_RESULT_STORAGE_BACKEND=minio
81 - OSPREY_MINIO_ENDPOINT=minio:9000
82 - OSPREY_MINIO_ACCESS_KEY=minioadmin
83 - OSPREY_MINIO_SECRET_KEY=minioadmin123
84 - OSPREY_MINIO_SECURE=false
85 - OSPREY_MINIO_EXECUTION_RESULTS_BUCKET=execution-output
86 - SNOWFLAKE_API_ENDPOINT=http://snowflake-id-worker:8088
87 - SNOWFLAKE_EPOCH=1420070400000
88 - OSPREY_RULES_PATH=./example_rules
89 - OSPREY_DISABLE_VALIDATION_EXPORTER=true
90 - DRUID_URL=http://druid-broker:8082
91 - POSTGRES_HOSTS={"osprey_db":"postgresql://osprey:FoolishPassword@postgres:5432/osprey"}
92 - ETCD_PEERS=http://etcd:2379
93 - TESTING=true
94 volumes:
95 - ./osprey_worker:/osprey/osprey_worker
96 - ./osprey_rpc:/osprey/osprey_rpc
97 - ./example_rules:/osprey/example_rules
98 - ./entrypoint.sh:/osprey/entrypoint.sh
99 - /tmp/test-results:/tmp/test-results
100 command: ["run-tests"]