-
Notifications
You must be signed in to change notification settings - Fork 8
/
compose.yaml
191 lines (179 loc) · 7.13 KB
/
compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
services:
materialized:
image: materialize/materialized:latest
container_name: materialized
command:
- '--cluster-replica-sizes={"3xsmall": {"workers": 1, "scale": 1, "credits_per_hour": "1", "is_cc": false}, "2xsmall": {"workers": 1, "scale": 1, "credits_per_hour": "1", "is_cc": false}, "25cc": {"workers": 1, "scale": 1, "credits_per_hour": "1"}, "50cc": {"workers": 1, "scale": 1, "credits_per_hour": "1"}}'
- --bootstrap-default-cluster-replica-size=3xsmall
- --bootstrap-builtin-system-cluster-replica-size=3xsmall
- --bootstrap-builtin-catalog-server-cluster-replica-size=3xsmall
- --bootstrap-builtin-support-cluster-replica-size=3xsmall
- --bootstrap-builtin-probe-cluster-replica-size=3xsmall
- --bootstrap-builtin-analytics-cluster-replica-size=3xsmall
- --availability-zone=test1
- --availability-zone=test2
- --aws-account-id=123456789000
- --aws-external-id-prefix=eb5cb59b-e2fe-41f3-87ca-d2176a495345
- --aws-connection-role-arn=arn:aws:iam::123456789000:role/MaterializeConnection
- --system-parameter-default=max_clusters=100
- --system-parameter-default=max_sources=100
- --system-parameter-default=max_aws_privatelink_connections=10
- --all-features
environment:
MZ_NO_TELEMETRY: 1
ports:
- 6875:6875
- 6877:6877
- 6878:6878
healthcheck: {test: curl -f localhost:6878/api/readyz, interval: 1s, start_period: 35s}
materialized2:
image: materialize/materialized:latest
container_name: materialized2
command:
- '--cluster-replica-sizes={"3xsmall": {"workers": 1, "scale": 1, "credits_per_hour": "1", "is_cc": false}, "2xsmall": {"workers": 1, "scale": 1, "credits_per_hour": "1", "is_cc": false}, "25cc": {"workers": 1, "scale": 1, "credits_per_hour": "1"}, "50cc": {"workers": 1, "scale": 1, "credits_per_hour": "1"}}'
- --bootstrap-default-cluster-replica-size=3xsmall
- --bootstrap-builtin-system-cluster-replica-size=3xsmall
- --bootstrap-builtin-catalog-server-cluster-replica-size=3xsmall
- --bootstrap-builtin-support-cluster-replica-size=3xsmall
- --bootstrap-builtin-probe-cluster-replica-size=3xsmall
- --bootstrap-builtin-analytics-cluster-replica-size=3xsmall
- --availability-zone=test1
- --availability-zone=test2
- --aws-account-id=123456789000
- --aws-external-id-prefix=eb5cb59b-e2fe-41f3-87ca-d2176a495345
- --aws-connection-role-arn=arn:aws:iam::123456789000:role/MaterializeConnection
- --system-parameter-default=max_clusters=100
- --system-parameter-default=max_sources=100
- --system-parameter-default=max_aws_privatelink_connections=10
- --system-parameter-default=transaction_isolation=serializable
- --all-features
environment:
MZ_NO_TELEMETRY: 1
MZ_SQL_LISTEN_ADDR: 0.0.0.0:7875
MZ_HTTP_LISTEN_ADDR: 0.0.0.0:7876
MZ_INTERNAL_SQL_LISTEN_ADDR: 0.0.0.0:7877
MZ_INTERNAL_HTTP_LISTEN_ADDR: 0.0.0.0:7878
ports:
- 7875:7875
- 7877:7877
- 7878:7878
healthcheck: {test: curl -f localhost:7878/api/readyz, interval: 1s, start_period: 35s}
materialized_init:
image: postgres
container_name: materialized_init
depends_on:
materialized: {condition: service_healthy}
command: >-
sh -c '
echo "Waiting for materialized to start..." &&
sleep 15 &&
psql -h materialized -U mz_system -d materialize -p 6877 -c "CREATE CONNECTION \"materialize\".\"public\".\"privatelink_conn\" TO AWS PRIVATELINK (AVAILABILITY ZONES = ('\''use1-az2'\'', '\''use1-az6'\''), SERVICE NAME = '\''com.amazonaws.us-east-1.materialize.example'\'');"
'
redpanda:
container_name: redpanda
image: redpandadata/redpanda:v23.3.5
depends_on:
- postgres
command:
- redpanda start
- --overprovisioned
- --smp 1
- --memory 1G
- --reserve-memory 0M
- --node-id 0
- --check=false
- --kafka-addr 0.0.0.0:9092
- --advertise-kafka-addr ${EXTERNAL_IP:-redpanda}:9092
- --pandaproxy-addr 0.0.0.0:8082
- --advertise-pandaproxy-addr ${EXTERNAL_IP:-redpanda}:8082
- --set redpanda.enable_transactions=true
- --set redpanda.enable_idempotence=true
- --set redpanda.auto_create_topics_enabled=true
- --set redpanda.default_topic_partitions=1
ports:
- 9092:9092
- 8081:8081
- 8082:8082
healthcheck: {test: curl -f localhost:9644/v1/status/ready, interval: 1s, start_period: 30s}
postgres:
container_name: postgres
build:
context: ./integration/postgres
volumes:
- ${PWD}/integration/postgres:/docker-entrypoint-initdb.d
init: true
ports:
- 5432:5432
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-c2VjcmV0Cg==}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
localstack:
container_name: localstack
image: localstack/localstack:1.4.0
ports:
- 4566:4566
environment:
HOSTNAME: localhost
SERVICES: iam
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
volumes:
- ./integration/localstack/local_stack.sh:/docker-entrypoint-initaws.d/create_localstack_infra.sh
mysql:
container_name: mysql
image: mysql:8.0
volumes:
- ./integration/mysql/mysql.cnf:/etc/mysql/conf.d/mysql.cnf
- ./integration/mysql:/docker-entrypoint-initdb.d
ports:
- 3306:3306
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-c2VjcmV0Cg==}
MYSQL_USER: ${MYSQL_USER:-mysqluser}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-c2VjcmV0Cg==}
MYSQL_DATABASE: ${MYSQL_DATABASE:-shop}
provider:
build:
context: .
container_name: provider
depends_on:
materialized: {condition: service_healthy}
redpanda: {condition: service_healthy}
volumes:
- ./integration:/usr/src/app/integration
environment:
TF_LOG: INFO
command: >
sh -c "tail -F /dev/null"
test-certs:
image: materialize/test-certs:v0.116.0
volumes:
- certs:/secrets
frontegg:
image: materialize/frontegg-mock:v0.116.0
depends_on:
- test-certs
ports:
- "3000:3000"
volumes:
- certs:/secrets
command: >
--listen-addr 0.0.0.0:3000
--users '[{"id": "1b2a3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "email": "mz_system", "password": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b", "tenant_id": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b", "initial_api_tokens": [{"client_id": "1b2a3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "secret": "7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b"}], "roles": ["Organization Admin", "Organization Member"]}]'
--roles '[{"id":"1", "name": "Organization Admin", "key": "MaterializePlatformAdmin"}, {"id":"2", "name": "Organization Member", "key": "MaterializePlatform"}]'
--issuer "http://frontegg-mock:6880"
--encoding-key-file /secrets/frontegg-mock.key
--decoding-key-file /secrets/frontegg-mock.crt
cloud:
container_name: cloud
build: mocks/cloud
ports:
- "3001:3001"
environment:
- CLOUD_HOSTNAME=cloud
- CLOUD_PORT=3001
volumes:
certs: