|
| 1 | +# Test description: |
| 2 | +# This test checks the TCP and repeater functionality by creating 3 routers, 2 edges and 1 cloud. |
| 3 | +# This test aims to simulate the scenario in which one DDS Router in the Cloud has a single network address exposed |
| 4 | +# and accessible for incoming connections. Thus all DDS Routers deployed on the edge, or in other networks, will use |
| 5 | +# this unique address as the connection address. |
| 6 | +# |
| 7 | +# Test architecture: |
| 8 | +# |
| 9 | +# ┌────────────────────────────────────────────────────────────────┐ |
| 10 | +# │ cloud_edge_net │ |
| 11 | +# │ │ |
| 12 | +# │ ┌──────────────────┐ │ |
| 13 | +# │ │ ddsrouter_cloud │ │ |
| 14 | +# │ │ (wan [repeater]) │ │ |
| 15 | +# │ └─▲──────────────▲─┘ │ |
| 16 | +# │ │ │ │ |
| 17 | +# │ ┌──────────────┘ └─────────┐ │ |
| 18 | +# ┌──────┼───────────┼──────────────────┐ ┌───────────┼────────────┼──────┐ |
| 19 | +# │ │ │ │ │ │ │ │ |
| 20 | +# │ │ ┌─────────▼────────┐ │ │ ┌───────▼──────────┐ │ │ |
| 21 | +# │ │ │ ddsrouter_edge_1 │ │ │ │ ddsrouter_edge_2 │ │ │ |
| 22 | +# │ │ │ (local + wan) │ │ │ │ (local + wan) │ │ │ |
| 23 | +# │ │ └───────┬────▲─────┘ │ │ └───────┬──────────┘ │ │ |
| 24 | +# │ │ │ │ │ │ │ │ │ |
| 25 | +# │ └─────────┼────┼───────────────┼────────┼───────────┼────────────┘ │ |
| 26 | +# │ │ │ │ │ │ │ |
| 27 | +# │ ┌─────────────▼┐ ┌┴───────────┐ │ │ ┌──────▼───────┐ │ |
| 28 | +# │ │ sub_edge_1 │ │ pub_edge_1 │ │ │ │ sub_edge_2 │ │ |
| 29 | +# │ │ (subscriber) │ │ (publisher)│ │ │ │ (subscriber) │ │ |
| 30 | +# │ └──────────────┘ └────────────┘ │ │ └──────────────┘ │ |
| 31 | +# │ │ │ │ |
| 32 | +# │ edge_1_net (domain 1) │ │ edge_2_net (domain 2) │ |
| 33 | +# └─────────────────────────────────────┘ └───────────────────────────────┘ |
| 34 | + |
| 35 | +services: |
| 36 | + |
| 37 | + ddsrouter_cloud: |
| 38 | + image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} |
| 39 | + container_name: ddsrouter_cloud |
| 40 | + networks: |
| 41 | + - cloud_edge_net |
| 42 | + volumes: |
| 43 | + - ./ddsrouter_cloud.yaml:/config.yaml |
| 44 | + command: ddsrouter -c /config.yaml --timeout 10 |
| 45 | + |
| 46 | + ddsrouter_edge_1: |
| 47 | + image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} |
| 48 | + container_name: ddsrouter_edge_1 |
| 49 | + depends_on: |
| 50 | + - ddsrouter_cloud |
| 51 | + networks: |
| 52 | + - cloud_edge_net |
| 53 | + - edge_1_net |
| 54 | + volumes: |
| 55 | + - ./ddsrouter_edge_1.yaml:/config.yaml |
| 56 | + command: ddsrouter -c /config.yaml --timeout 10 |
| 57 | + |
| 58 | + pub_edge_1: |
| 59 | + image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} |
| 60 | + container_name: pub_edge_1 |
| 61 | + depends_on: |
| 62 | + - ddsrouter_edge_1 |
| 63 | + networks: |
| 64 | + - edge_1_net |
| 65 | + command: install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample publisher -i 250 -s 30 -d 1 |
| 66 | + |
| 67 | + sub_edge_1: |
| 68 | + image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} |
| 69 | + container_name: sub_edge_1 |
| 70 | + depends_on: |
| 71 | + - ddsrouter_edge_1 |
| 72 | + networks: |
| 73 | + - edge_1_net |
| 74 | + volumes: |
| 75 | + - ../execute_and_validate_subscriber.py:/execute_and_validate_subscriber.py |
| 76 | + command: python3 /execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 10 --timeout 10 --domain 1 |
| 77 | + |
| 78 | + ddsrouter_edge_2: |
| 79 | + image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} |
| 80 | + container_name: ddsrouter_edge_2 |
| 81 | + depends_on: |
| 82 | + - ddsrouter_cloud |
| 83 | + networks: |
| 84 | + - cloud_edge_net |
| 85 | + - edge_2_net |
| 86 | + volumes: |
| 87 | + - ./ddsrouter_edge_2.yaml:/config.yaml |
| 88 | + command: ddsrouter -c /config.yaml --timeout 10 |
| 89 | + |
| 90 | + sub_edge_2: |
| 91 | + image: ${DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE} |
| 92 | + container_name: sub_edge_2 |
| 93 | + depends_on: |
| 94 | + - ddsrouter_edge_2 |
| 95 | + networks: |
| 96 | + - edge_2_net |
| 97 | + volumes: |
| 98 | + - ../execute_and_validate_subscriber.py:/execute_and_validate_subscriber.py |
| 99 | + command: python3 /execute_and_validate_subscriber.py --exe install/BasicConfigurationExample/examples/cpp/dds/BasicConfigurationExample/BasicConfigurationExample --samples 10 --timeout 10 --domain 2 |
| 100 | + |
| 101 | +networks: |
| 102 | + edge_1_net: |
| 103 | + edge_2_net: |
| 104 | + cloud_edge_net: |
| 105 | + default: |
| 106 | + driver: none |
0 commit comments