/
compose.yml
106 lines (98 loc) · 5.8 KB
/
compose.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
# Test description:
# This test checks the TCP and repeater functionality by creating 3 routers, 2 edges and 1 cloud.
# This test aims to simulate the scenario in which one DDS Router in the Cloud has a single network address exposed
# and accessible for incoming connections. Thus all DDS Routers deployed on the edge, or in other networks, will use
# this unique address as the connection address.
#
# Test architecture:
#
# ┌────────────────────────────────────────────────────────────────┐
# │ cloud_edge_net │
# │ │
# │ ┌──────────────────┐ │
# │ │ ddsrouter_cloud │ │
# │ │ (wan [repeater]) │ │
# │ └─▲──────────────▲─┘ │
# │ │ │ │
# │ ┌──────────────┘ └─────────┐ │
# ┌──────┼───────────┼──────────────────┐ ┌───────────┼────────────┼──────┐
# │ │ │ │ │ │ │ │
# │ │ ┌─────────▼────────┐ │ │ ┌───────▼──────────┐ │ │
# │ │ │ ddsrouter_edge_1 │ │ │ │ ddsrouter_edge_2 │ │ │
# │ │ │ (local + wan) │ │ │ │ (local + wan) │ │ │
# │ │ └───────┬────▲─────┘ │ │ └───────┬──────────┘ │ │
# │ │ │ │ │ │ │ │ │
# │ └─────────┼────┼───────────────┼────────┼───────────┼────────────┘ │
# │ │ │ │ │ │ │
# │ ┌─────────────▼┐ ┌┴───────────┐ │ │ ┌──────▼───────┐ │
# │ │ sub_edge_1 │ │ pub_edge_1 │ │ │ │ sub_edge_2 │ │
# │ │ (subscriber) │ │ (publisher)│ │ │ │ (subscriber) │ │
# │ └──────────────┘ └────────────┘ │ │ └──────────────┘ │
# │ │ │ │
# │ edge_1_net (domain 1) │ │ edge_2_net (domain 2) │
# └─────────────────────────────────────┘ └───────────────────────────────┘
services:
ddsrouter_cloud:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_cloud
networks:
- cloud_edge_net
volumes:
- ./ddsrouter_cloud.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 12
ddsrouter_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_edge_1
depends_on:
- ddsrouter_cloud
networks:
- cloud_edge_net
- edge_1_net
volumes:
- ./ddsrouter_edge_1.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 12
pub_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: pub_edge_1
depends_on:
- ddsrouter_edge_1
networks:
- edge_1_net
command: install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample publisher -i 100 -s 110 -d 1
sub_edge_1:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: sub_edge_1
depends_on:
- ddsrouter_edge_1
networks:
- edge_1_net
volumes:
- ../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 20 --timeout 12 --args "--domain 1 --samples 20"
ddsrouter_edge_2:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: ddsrouter_edge_2
depends_on:
- ddsrouter_cloud
networks:
- cloud_edge_net
- edge_2_net
volumes:
- ./ddsrouter_edge_2.yaml:/config.yaml
command: ddsrouter -c /config.yaml --timeout 12
sub_edge_2:
image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE}
container_name: sub_edge_2
depends_on:
- ddsrouter_edge_2
networks:
- edge_2_net
volumes:
- ../../scripts:/scripts
command: python3 /scripts/execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 20 --timeout 12 --args "--domain 2 --samples 20"
networks:
edge_1_net:
edge_2_net:
cloud_edge_net:
default:
driver: none