-
Notifications
You must be signed in to change notification settings - Fork 312
/
docker-compose.e2e-basic.yml
583 lines (556 loc) · 18.2 KB
/
docker-compose.e2e-basic.yml
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
version: '3.0'
services:
echo:
image: mysteriumnetwork/assymmetric-udp-echo:latest
expose:
- 4589
morqa:
image: mysteriumnetwork/quality-oracle:latest
command: >
--bind-addr=:8085
--prometheus=http://prometheus:9090
--metrics-addr=:8080
depends_on:
- prometheus
expose:
- 8085
- 8080
prometheus:
image: prom/prometheus:v2.10.0
volumes:
- ./e2e/prometheus:/prometheus
command:
- '--config.file=/prometheus/config.yml'
- '--storage.tsdb.path=data/'
expose:
- 9090
ipify:
image: mysteriumnetwork/ipify:1.0.1
expose:
- 3000
broker-real:
image: nats:1.0.4
expose:
- 4222
broker:
image: mysteriumnetwork/nats-proxy:1.0.1
depends_on:
- broker-real
command:
- '-target=broker-real:4222'
expose:
- 4222
db:
image: postgres:13-alpine
container_name: discovery_db
ports:
- 5432:5432
environment:
- POSTGRES_USER=discovery
- POSTGRES_DB=discovery
- POSTGRES_PASSWORD=discovery
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
discovery-service:
image: mysteriumnetwork/discovery:2.18.3
expose:
- 8081
environment:
- PORT=8081
- DB_DSN=postgresql://discovery:discovery@db:5432/discovery
- QUALITY_ORACLE_URL=http://morqa:8085
- BROKER_URL=broker
- UNIVERSE_JWT_SECRET=suchsecret
- REDIS_ADDRESS=redis:6379
- BADGER_ADDRESS=http://badger:1234
- QUALITY_CACHE_TTL=20m
- LOCATION_ADDRESS="badurl"
depends_on:
- db
- redis
- http-mock
discovery:
image: nginx:latest
expose:
- 8080
volumes:
- ./e2e/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- discovery-service
- discovery-pricer
discovery-pricer:
image: mysteriumnetwork/discovery-pricer:2.18.3
expose:
- 8091
environment:
- PORT=8091
- DB_DSN=postgresql://discovery:discovery@db:5432/discovery
- QUALITY_ORACLE_URL=http://morqa:8085
- BROKER_URL=broker
- UNIVERSE_JWT_SECRET=suchsecret
- REDIS_ADDRESS=redis:6379
- BADGER_ADDRESS=http://badger:1234
- QUALITY_CACHE_TTL=20m
- LOCATION_ADDRESS="badurl"
- SENTINEL_URL="https://sentinel.mysterium.network"
depends_on:
- db
- redis
- http-mock
#private blockchain
ganache:
image: trufflesuite/ganache:v7.3.2
expose:
- 8545
command: >
--chain.chainId 5 --chain.networkId 5 --wallet.mnemonic "amused glory pen avocado toilet dragon entry kitchen cliff retreat canyon danger"
#private blockchain
ganache2:
image: trufflesuite/ganache:v7.3.2
expose:
- 8545
command: >
--chain.chainId 80001 --chain.networkId 80001 --wallet.mnemonic "amused glory pen avocado toilet dragon entry kitchen cliff retreat canyon danger"
trust:
image: mysteriumnetwork/trust-oracle:latest
command: >
-swaggerHost=trust
-fallbackTrustedIDs=0xc4cb9a91b8498776f6f8a0d5a2a23beec9b3cef3
http-mock:
image: mockserver/mockserver:mockserver-5.15.0
ports:
- 9999:1080
transactordatabase:
image: postgres:13-alpine
expose:
- 5432
environment:
- POSTGRES_USER=transactor
- POSTGRES_DB=transactor
- POSTGRES_PASSWORD=transactor
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
transactor-sidecar:
image: mysteriumnetwork/transactor-sidecar:3.0.10
depends_on:
- transactordatabase
- redis
- http-mock
command: >
/usr/bin/sidecar
-configPaths=/transactor/sidecar_config.yaml
volumes:
- ./e2e/transactor:/transactor
transactor:
image: mysteriumnetwork/transactor:3.0.10
environment:
PORT: 8888
expose:
- 8888
depends_on:
- ganache
- ganache2
- transactordatabase
- redis
- http-mock
- transactor-sidecar
command: >
-configPaths=/transactor/config.yaml
volumes:
- ./e2e/blockchain/keystore:/keystore
- ./e2e/transactor:/transactor
redis:
image: bitnami/redis:6.2.14
container_name: 'hermes_redis'
expose:
- 6379
environment:
- ALLOW_EMPTY_PASSWORD=yes
mongodb:
image: 'mongo:4.2.3'
container_name: 'hermes_mongo'
environment:
- MONGO_INITDB_ROOT_PASSWORD=root
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_DATABASE=admin
- MONGO_NON_ROOT_USERNAME=hermes
- MONGO_NON_ROOT_PASSWORD=hermes
- MONGO_REPLICA_SET_NAME=rs0
expose:
- 27017
- 27018
- 27019
volumes:
- ./e2e/mongo-init.e2e.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
command: ["mongod", "--replSet", "rs0"]
healthcheck:
test: 'test $$(echo "rs.initiate({_id: \"rs0\",version: 1,members: [{ _id: 0, host : \"mongodb:27017\" }]}).ok || rs.status().ok" | mongo -u root -p root --quiet) -eq 1'
interval: 5s
start_period: 5s
hermes:
image: mysteriumnetwork/hermes:2.3.17
environment:
PORT: 8889
LOG_LEVEL: trace
expose:
- 8889
depends_on:
- ganache
- redis
- mongodb
- ganache2
- transactor
- pilvytis-mock
command: >
-identityPassphrase ""
-Chain1Myst 0xaa9c4e723609cb913430143fbc86d3cbe7adca21
-Chain1RPCEndpoint http://ganache:8545
-transactorBaseUri "http://transactor:8888/api/v1/"
-Chain1ChainID 5
-Chain1chImplementation 0x599d43715df3070f83355d9d90ae62c159e62a75
-Chain1Registry 0x427c2bad22335710aec5e477f3e3adcd313a9bcb
-Chain1HermesAddress 0x241f6e1d0bb17f45767dc60a6bd3d21cdb543a0c
-Chain2Myst 0xaa9c4e723609cb913430143fbc86d3cbe7adca21
-Chain2RPCEndpoint ws://ganache2:8545
-Chain2ChainID 80001
-Chain2chImplementation 0x599d43715df3070f83355d9d90ae62c159e62a75
-Chain2Registry 0x427c2bad22335710aec5e477f3e3adcd313a9bcb
-Chain2HermesAddress 0x241f6e1d0bb17f45767dc60a6bd3d21cdb543a0c
-operator 0x354bd098b4ef8c9e70b7f21be2d455df559705d7
-keystoreDir /keystore
-bcDataRefreshInterval 1ns
-MongoUser hermes
-MongoPass hermes
-MongoReplSet rs0
-MongoHost "mongodb:27017"
-MongoDatabase hermes
-MongoReplSet ""
-redisAddress "redis:6379"
-bindAddr="0.0.0.0:8889"
-pilvytisBaseURL http://pilvytis-mock:8080
volumes:
- ./e2e/blockchain/keystore:/keystore
pilvytis-mock:
image: wiremock/wiremock:2.32.0
expose:
- 8080
volumes:
- ./e2e/pilvytis:/home/wiremock
hermes2:
image: mysteriumnetwork/hermes:3.3.15
environment:
LOG_LEVEL: trace
expose:
- 8889
depends_on:
- ganache
- ganache2
- redis
- transactor
command: >
-configPaths=/hermes/config.yaml
volumes:
- ./e2e/blockchain/keystore:/keystore
- ./e2e/hermes:/hermes
myst-provider:
build:
context: .
dockerfile: ./bin/docker/alpine-prebuilt/Dockerfile
depends_on:
- broker
- discovery
- ipify
- transactor
- hermes
- hermes2
- morqa
- trust
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
expose:
- 1194
- 4050
volumes:
- ./e2e/myst-provider/keystore:/var/lib/mysterium-node/keystore
command: >
--discovery.ping=1s
--discovery.fetch=1s
--chains.1.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.1.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.1.chainID=5
--chains.1.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.1.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.1.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.1.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.2.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.2.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.chainID=80001
--chain-id=80001
--ether.client.rpcl2=ws://ganache2:8545
--ether.client.rpcl1=http://ganache:8545
--ip-detector=http://ipify:3000/?format=json
--location.type=manual
--location.country=e2e-land
--firewall.protected.networks=""
--broker-address=broker
--tequilapi.address=0.0.0.0
--tequilapi.allowed-hostnames=.
--discovery.address=http://discovery:8080/api/v4
--transactor.address=http://transactor:8888/api/v1
--keystore.lightweight
--log-level=debug
--quality.address=http://morqa:8085/api/v3
--payments.provider.invoice-frequency=1s
--access-policy.address=http://trust:8080/api/v1/access-policies/
--access-policy.fetch=1s
--stun-servers=""
--local-service-discovery=true
--payments.hermes.settle.check-interval=1s
--payments.registry-transactor-poll.interval=1s
--observer.address=""
service
--agreed-terms-and-conditions
--identity=0xd1a23227bd5ad77f36ba62badcb78a410a1db6c5
--identity.passphrase=localprovider
--openvpn.port=3000
--active-services=openvpn,noop,wireguard
myst-consumer-noop:
build:
context: .
dockerfile: ./bin/docker/alpine-prebuilt/Dockerfile
volumes:
- ./e2e/myst-consumer/keystore/remember.json:/var/lib/mysterium-node/keystore/remember.json
- ./e2e/myst-consumer/keystore/UTC--2020-07-31T02-37-15.148642000Z--c4cb9a91b8498776f6f8a0d5a2a23beec9b3cef3:/var/lib/mysterium-node/keystore/UTC--2020-07-31T02-37-15.148642000Z--c4cb9a91b8498776f6f8a0d5a2a23beec9b3cef3
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
depends_on:
- broker
- discovery
- ipify
- transactor
- hermes
- myst-provider
- morqa
cap_add:
- NET_ADMIN
expose:
- 4050
command: >
--discovery.ping=1s
--discovery.fetch=1s
--discovery.type api --discovery.type broker
--chains.1.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.1.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.1.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.1.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.1.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--transactor.address=http://transactor:8888/api/v1
--chains.1.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.2.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.2.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.chainID=80001
--chain-id=80001
--ip-detector=http://ipify:3000/?format=json
--location.type=manual
--log-level=debug
--broker-address=broker
--tequilapi.address=0.0.0.0
--tequilapi.allowed-hostnames=.
--discovery.address=http://discovery:8080/api/v4
--ether.client.rpcl2=ws://ganache2:8545
--ether.client.rpcl1=http://ganache:8545
--keystore.lightweight
--firewall.killSwitch.always
--quality.address=http://morqa:8085/api/v3
--stun-servers=""
--local-service-discovery=true
--payments.registry-transactor-poll.interval=1s
--port-check-servers="echo:4589"
--observer.address=""
daemon
myst-consumer-hermes2:
build:
context: .
dockerfile: ./bin/docker/alpine-prebuilt/Dockerfile
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
depends_on:
- broker
- discovery
- ipify
- transactor
- hermes2
- myst-provider
- morqa
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
command: >
--discovery.ping=1s
--discovery.fetch=1s
--chains.1.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.1.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.1.hermes=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.1.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3,0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--transactor.address=http://transactor:8888/api/v1
--chains.1.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.2.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.2.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.hermes=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3,0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.chainID=80001
--chain-id=80001
--ip-detector=http://ipify:3000/?format=json
--location.type=manual
--log-level=debug
--broker-address=broker
--tequilapi.address=0.0.0.0
--tequilapi.allowed-hostnames=.
--discovery.address=http://discovery:8080/api/v4
--ether.client.rpcl2=ws://ganache2:8545
--ether.client.rpcl1=http://ganache:8545
--keystore.lightweight
--firewall.killSwitch.always
--quality.address=http://morqa:8085/api/v3
--stun-servers=""
--local-service-discovery=true
--payments.registry-transactor-poll.interval=1s
--port-check-servers="echo:4589"
--observer.address=""
daemon
myst-consumer-openvpn:
build:
context: .
dockerfile: ./bin/docker/alpine-prebuilt/Dockerfile
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
depends_on:
- broker
- discovery
- ipify
- transactor
- hermes
- myst-provider
- morqa
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
command: >
--discovery.ping=1s
--discovery.fetch=1s
--chains.1.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.1.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.1.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.1.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.1.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--transactor.address=http://transactor:8888/api/v1
--chains.1.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.2.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.2.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.chainID=80001
--chain-id=80001
--ip-detector=http://ipify:3000/?format=json
--location.type=manual
--log-level=debug
--broker-address=broker
--tequilapi.address=0.0.0.0
--tequilapi.allowed-hostnames=.
--discovery.address=http://discovery:8080/api/v4
--ether.client.rpcl2=ws://ganache2:8545
--ether.client.rpcl1=http://ganache:8545
--keystore.lightweight
--firewall.killSwitch.always
--quality.address=http://morqa:8085/api/v3
--stun-servers=""
--local-service-discovery=true
--payments.registry-transactor-poll.interval=1s
--port-check-servers="echo:4589"
--observer.address=""
daemon
myst-consumer-wireguard:
build:
context: .
dockerfile: ./bin/docker/alpine-prebuilt/Dockerfile
depends_on:
- broker
- discovery
- ipify
- transactor
- hermes
- myst-provider
- morqa
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
command: >
--discovery.ping=1s
--discovery.fetch=1s
--chains.1.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.1.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.1.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--transactor.address=http://transactor:8888/api/v1
--chains.1.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.1.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.1.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.myst=0xaa9c4e723609cb913430143fbc86d3cbe7adca21
--chains.2.registry=0x427c2bad22335710aec5e477f3e3adcd313a9bcb
--chains.2.channelImplementation=0x599d43715df3070f83355d9d90ae62c159e62a75
--chains.2.hermes=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xd68defb97d0765741f8ecf179df2f9564e1466a3
--chains.2.knownHermeses=0xfd63dc49c7163d82d6f0a4c23ff13216d702ce50
--chains.2.chainID=80001
--chain-id=80001
--ip-detector=http://ipify:3000/?format=json
--location.type=manual
--log-level=debug
--broker-address=broker
--tequilapi.address=0.0.0.0
--tequilapi.allowed-hostnames=.
--discovery.address=http://discovery:8080/api/v4
--ether.client.rpcl2=ws://ganache2:8545
--ether.client.rpcl1=http://ganache:8545
--keystore.lightweight
--firewall.killSwitch.always
--quality.address=http://morqa:8085/api/v3
--stun-servers=""
--local-service-discovery=true
--payments.registry-transactor-poll.interval=1s
--port-check-servers="echo:4589"
--observer.address=""
daemon
#go runner to run go programs inside localnet (usefull for contract deployment or e2e test running)
go-runner:
build:
context: .
dockerfile: ./e2e/gorunner/Dockerfile.precompiled
cap_add:
- NET_ADMIN
volumes:
- ./e2e/blockchain/keystore:/node/keystore
working_dir: /node