feat(ansible): Refactor docker-image roles
[csit.git] / fdio.infra.ansible / roles / docker_images / templates / docker-compose-sut.yaml.j2
1 version: "3"
2 services:
3   numa-0:
4     build:
5       context: "base/"
6       dockerfile: "Dockerfile"
7     command: ["/usr/sbin/sshd","-D", "-p", "6001"]
8     expose:
9       - "6001"
10     hostname: "{{ ansible_hostname[:-1] }}1"
11     network_mode: "host"
12     privileged: true
13     restart: "always"
14     shm_size: "4G"
15     devices:
16       - "/dev/hugepages:/dev/hugepages"
17       - "/dev/vfio:/dev/vfio"
18     volumes:
19       - type: "bind"
20         source: "/etc/sudoers"
21         target: "/etc/sudoers"
22       - type: "bind"
23         source: "/dev/null"
24         target: "/etc/sysctl.d/80-vpp.conf"
25       - type: "bind"
26         source: "/opt/boot/"
27         target: "/opt/boot/"
28       - type: "bind"
29         source: "/var/run/docker.sock"
30         target: "/var/run/docker.sock"
31       - type: "bind"
32         source: "/usr/lib/firmware/"
33         target: "/usr/lib/firmware/"
34   numa-1:
35     build:
36       context: "base/"
37       dockerfile: "Dockerfile"
38     command: ["/usr/sbin/sshd","-D", "-p", "6002"]
39     expose:
40       - "6002"
41     hostname: "{{ ansible_hostname[:-1] }}2"
42     network_mode: "host"
43     privileged: true
44     restart: "always"
45     shm_size: "4G"
46     devices:
47       - "/dev/hugepages:/dev/hugepages"
48       - "/dev/vfio:/dev/vfio"
49     volumes:
50       - type: "bind"
51         source: "/etc/sudoers"
52         target: "/etc/sudoers"
53       - type: "bind"
54         source: "/dev/null"
55         target: "/etc/sysctl.d/80-vpp.conf"
56       - type: "bind"
57         source: "/opt/boot/"
58         target: "/opt/boot/"
59       - type: "bind"
60         source: "/var/run/docker.sock"
61         target: "/var/run/docker.sock"
62       - type: "bind"
63         source: "/usr/lib/firmware/"
64         target: "/usr/lib/firmware/"