File: docker-compose.yml

package info (click to toggle)
labgrid 25.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,796 kB
  • sloc: python: 21,352; sh: 846; makefile: 35
file content (49 lines) | stat: -rw-r--r-- 1,768 bytes parent folder | download
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
services:
  coordinator:
    image: "${IMAGE_PREFIX:-docker.io/labgrid/}coordinator"
    volumes:
      - "./coordinator:/home/root/coordinator"
    tty: true
    network_mode: "host"
    command: bash -c "cp /home/root/coordinator/places_example.yaml /opt/coordinator/places.yaml &&
      /usr/local/bin/labgrid-coordinator"
  client:
    image: "${IMAGE_PREFIX:-docker.io/labgrid/}client"
    volumes:
      - "./client/simple-test:/simple-test"
      - "./client/.ssh:/root/.ssh"
    tty: true
    stdin_open: true
    network_mode: "host"
    tmpfs: "/tmp"
    # Wait until coordinator is up
    # Use labgrid-client r to ensure the exporter has populated the resource list in the coordinator
    # Use sleep to fix the problem that sometimes the coordinator is not ready even though the service is up
    command: timeout 60 bash -c "set -e &&
      cd /simple-test &&
      until echo > /dev/tcp/localhost/20408; do sleep 1; done &&
      sleep 5 &&
      while [ -z $$(/usr/local/bin/labgrid-client r) ]; do echo 'Wait one sec on coordinator' && sleep 1; done &&
      /usr/local/bin/labgrid-client -p example-place lock &&
      /usr/local/bin/pytest --lg-env remote.yaml -s -vv &&
      /usr/local/bin/labgrid-client -p example-place unlock"
    depends_on:
      - coordinator
      - exporter
      - dut
  exporter:
    image: "${IMAGE_PREFIX:-docker.io/labgrid/}exporter"
    volumes:
      - "./exporter-conf:/opt/conf"
      - "/run/udev:/run/udev:ro"
    depends_on:
      - coordinator
    tty: true
    network_mode: "host"
    stdin_open: true
    command: bash -c "set -e &&
      until echo > /dev/tcp/localhost/20408; do sleep 1; done && labgrid-exporter /opt/conf/exporter.yaml"
  dut:
    build:
      context: "./dut"
    network_mode: "host"