-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcompose.full.yaml
246 lines (246 loc) · 8 KB
/
compose.full.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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
---
x-build-js: &build-js
platform: linux/x86_64
image: ghcr.io/superblocksteam/worker.js:${SB_AGENT_WORKER_JS_VERSION:-v0.712.0}
x-build-py: &build-py
platform: linux/x86_64
image: ghcr.io/superblocksteam/worker.py:${SB_AGENT_WORKER_PY_VERSION:-v0.361.0-slim}
x-build-go: &build-go
image: ghcr.io/superblocksteam/worker.go:${SB_AGENT_WORKER_GO_VERSION:-v0.144.0}
x-deploy: &deploy
deploy:
replicas: 1
x-environment: &environment
SUPERBLOCKS_AGENT_KEY: dev-agent-key
SUPERBLOCKS_AGENT_REDIS_TOKEN: koala
SUPERBLOCKS_AGENT_REDIS_KVSTORE_TOKEN: koala
SUPERBLOCKS_AGENT_TLS_INSECURE: 'true'
SUPERBLOCKS_AGENT_REDIS_HOST: redis
SUPERBLOCKS_AGENT_REDIS_KVSTORE_HOST: redis
SUPERBLOCKS_AGENT_REDIS_KVSTORE_MAX_SIZE_BYTES: 10000000
SUPERBLOCKS_TUNNEL_PRIVATE_KEY_RSA: dev-private-rsa
SUPERBLOCKS_TUNNEL_PRIVATE_KEY_ED25519: dev-private-ed25519
SUPERBLOCKS_WORKER_EXECUTION_POOL_SIZE: 8
x-environment-golang: &environment-golang
SUPERBLOCKS_WORKER_GO_SUPERBLOCKS_KEY: dev-agent-key
SUPERBLOCKS_WORKER_GO_STORE_REDIS_PASSWORD: koala
SUPERBLOCKS_WORKER_GO_STORE_REDIS_HOST: redis
SUPERBLOCKS_WORKER_GO_STORE_REDIS_TLS: 'false'
SUPERBLOCKS_WORKER_GO_TRANSPORT_REDIS_PASSWORD: koala
SUPERBLOCKS_WORKER_GO_TRANSPORT_REDIS_HOST: redis
SUPERBLOCKS_WORKER_GO_TRANSPORT_REDIS_TLS: 'false'
x-environment-lang: &environment-lang
SUPERBLOCKS_AGENT_PROCESS_ASYNC: 'false'
SUPERBLOCKS_AGENT_PLUGIN_EVENTS: execute
services:
redis:
image: ghcr.io/superblocksteam/redis:6
ports:
- 6379:6379
command: --requirepass koala
pull_policy: always
postgres:
image: ghcr.io/superblocksteam/postgres:16.1
ports:
- 15432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
volumes:
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
- postgres-data:/var/lib/postgresql/data
kafka:
image: docker.redpanda.com/redpandadata/redpanda:latest
command:
- redpanda
- start
- --overprovisioned
- --smp 1
- --memory 1G
- --reserve-memory 0M
- --node-id 0
- --check=false
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
- --advertise-kafka-addr internal://kafka:9092,external://localhost:19092
ports:
- 18081:8081
- 18082:8082
- 19092:19092
- 9644:9644
kafka-setup:
image: docker.redpanda.com/redpandadata/redpanda:latest
depends_on:
- kafka
restart: no
# TODO(dlamotte): may be able to avoid the timeout/while/sleep loop
# by using compose health checks. I tried initially, but didn't work on
# the first try.
entrypoint: [bash, -c, 'if ! timeout 30 bash -c ''while ! rpk -X brokers=kafka:9092 topic list; do sleep 1; done''; then exit 1; fi; rpk -X brokers=kafka:9092 topic create metadata.cloud && rpk -X brokers=kafka:9092 topic create intake.metadata.dymamo && rpk -X brokers=kafka:9092 topic create intake.metadata.vector && rpk -X brokers=kafka:9092 topic create events']
localstack:
image: localstack/localstack:latest
environment:
- SERVICES=kinesis,s3
ports:
- 4566:4566
# auto runs this setup script when ready
# https://stackoverflow.com/questions/53563942/running-shell-script-against-localstack-in-docker-container
volumes:
- ./scripts/plugins/integration/kinesis/init-kinesis.sh:/etc/localstack/init/ready.d/init-kinesis.sh
- ./scripts/plugins/integration/s3/init-s3.sh:/etc/localstack/init/ready.d/init-s3.sh
mongodb:
image: mongo:latest
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=example
intake:
image: ghcr.io/superblocksteam/intake:v0.88.0
ports:
- 3030:3030
- 10300:10300
environment:
SUPERBLOCKS_INTAKE_KAFKA_BOOTSTRAP: kafka:9092
SUPERBLOCKS_INTAKE_DB_URL: postgres://postgres:password@postgres:5432/postgres?sslmode=disable
SUPERBLOCKS_INTAKE_HTTP_BIND: 0.0.0.0
depends_on: [kafka, kafka-setup, postgres]
mock:
build:
context: ./mocks
environment:
# this URL is returned to orchestrator and orchestrator uses it to talk
# to the oauth server. ensure that whatever is here is can be resolved
# from wherever orchestrator is running
MOCK_OAUTH_SERVER_URL: http://${CI_ONLY_MOCK_OAUTH_SERVER-127.0.0.1}:5678
ports:
- 3100:3100
- 3110:3110
auxillary:
!!merge <<: *build-js
environment:
!!merge <<: *environment
SUPERBLOCKS_AGENT_PROCESS_ASYNC: 'true'
SUPERBLOCKS_AGENT_PLUGIN_EVENTS: '!execute'
SUPERBLOCKS_AGENT_BUCKET: BA
SUPERBLOCKS_AGENT_REDIS_GROUP: one
FLEET: all
depends_on: [redis]
javascript.test.execute:
!!merge <<: *build-js
deploy:
replicas: 1
environment:
!!merge <<: [*environment, *environment-lang]
SUPERBLOCKS_AGENT_BUCKET: test
SUPERBLOCKS_AGENT_REDIS_GROUP: two
FLEET: javascript
depends_on: [redis]
non-lang.ba.execute:
!!merge <<: [*build-js, *deploy]
environment:
!!merge <<: *environment
SUPERBLOCKS_AGENT_PROCESS_ASYNC: 'true'
SUPERBLOCKS_AGENT_PLUGIN_EVENTS: execute
SUPERBLOCKS_AGENT_BUCKET: BA
SUPERBLOCKS_AGENT_REDIS_GROUP: three
FLEET: non-lang
depends_on: [redis]
# deploy javascript with 2 replicas for pool
# tests
javascript.b1.execute:
!!merge <<: *build-js
deploy:
replicas: 2
environment:
!!merge <<: *environment
SUPERBLOCKS_AGENT_BUCKET: B1
SUPERBLOCKS_AGENT_REDIS_GROUP: four
FLEET: javascript
depends_on: [redis]
javascript.b2.execute:
!!merge <<: *build-js
deploy:
replicas: 2
environment:
!!merge <<: *environment
SUPERBLOCKS_AGENT_BUCKET: B2
SUPERBLOCKS_AGENT_REDIS_GROUP: five
FLEET: javascript
depends_on: [redis]
javascript.ba.execute:
!!merge <<: *build-js
deploy:
replicas: 2
environment:
!!merge <<: [*environment, *environment-lang]
SUPERBLOCKS_AGENT_BUCKET: BA
SUPERBLOCKS_AGENT_REDIS_GROUP: eight
FLEET: javascript
depends_on: [redis]
javascript.be.execute:
!!merge <<: [*build-js, *deploy]
environment:
!!merge <<: [*environment, *environment-lang]
SUPERBLOCKS_AGENT_BUCKET: BE
SUPERBLOCKS_AGENT_REDIS_GROUP: nine
FLEET: javascript
depends_on: [redis]
non-lang.be.execute:
!!merge <<: [*build-js, *deploy]
environment:
!!merge <<: *environment
SUPERBLOCKS_AGENT_PROCESS_ASYNC: 'true'
SUPERBLOCKS_AGENT_PLUGIN_EVENTS: execute
SUPERBLOCKS_AGENT_BUCKET: BE
SUPERBLOCKS_AGENT_REDIS_GROUP: ten
FLEET: non-lang
depends_on: [redis]
non-lang.ba.test:
!!merge <<: [*build-js, *deploy]
environment:
!!merge <<: *environment
SUPERBLOCKS_AGENT_PROCESS_ASYNC: 'true'
SUPERBLOCKS_AGENT_PLUGIN_EVENTS: test
SUPERBLOCKS_AGENT_BUCKET: BA
SUPERBLOCKS_AGENT_REDIS_GROUP: eleven
FLEET: non-lang
depends_on: [redis]
python.ba.execute:
!!merge <<: *build-py
environment:
!!merge <<: [*environment, *environment-lang]
SUPERBLOCKS_AGENT_BUCKET: BA
SUPERBLOCKS_AGENT_REDIS_GROUP: sixteen
FLEET: python
depends_on: [redis]
python.be.execute:
!!merge <<: *build-py
environment:
!!merge <<: [*environment, *environment-lang]
SUPERBLOCKS_AGENT_BUCKET: BE
SUPERBLOCKS_AGENT_REDIS_GROUP: seventeen
FLEET: python
depends_on: [redis]
golang.ba.all:
!!merge <<: *build-go
environment:
!!merge <<: *environment-golang
SUPERBLOCKS_WORKER_GO_WORKER_BUCKET: BA
depends_on: [redis]
golang.be.all:
!!merge <<: *build-go
environment:
!!merge <<: *environment-golang
SUPERBLOCKS_WORKER_GO_WORKER_BUCKET: BE
depends_on: [redis]
mock_oauth_server:
image: ghcr.io/navikt/mock-oauth2-server:2.1.0
environment:
SERVER_PORT: 5678
ports:
- 5678:5678
echo:
image: ghcr.io/superblocksteam/docker.io/ealen/echo-server:0.9.2
volumes:
postgres-data: