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" coordinator-statsd: image: "${IMAGE_PREFIX:-docker.io/labgrid/}coordinator-statsd" network_mode: "host" depends_on: - 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"