aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-11-24 13:39:14 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-11-24 13:40:20 +0000
commit21679c19cc2c6b74c3fc4a53a0d6a22474646046 (patch)
treeaa229de0d011b6f612e669f7a1a5b2a4c8ec18e1 /fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2
parent0efc3083ed2bacaf3445a50fae1679a5ae88d7d9 (diff)
feat(ansible): Add volume mappings for docker containersoper-231127
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: I438c681d2b82725634db33db4deb611493400fae
Diffstat (limited to 'fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2')
-rw-r--r--fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j260
1 files changed, 8 insertions, 52 deletions
diff --git a/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2 b/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2
index 20ac905c5a..2cee85e169 100644
--- a/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2
+++ b/fdio.infra.ansible/roles/docker_images/templates/docker-compose-tg.yaml.j2
@@ -13,33 +13,11 @@ services:
restart: "always"
shm_size: "4G"
volumes:
+{% for volume in docker_volumes %}
- type: "bind"
- source: "/usr/bin/ofed_info"
- target: "/usr/bin/ofed_info"
- - type: "bind"
- source: "/dev/hugepages"
- target: "/dev/hugepages"
- - type: "bind"
- source: "/dev/vfio"
- target: "/dev/vfio"
- - type: "bind"
- source: "/etc/sudoers"
- target: "/etc/sudoers"
- - type: "bind"
- source: "/opt/"
- target: "/opt/"
- - type: "bind"
- source: "/usr/bin/iperf3"
- target: "/usr/bin/iperf3"
- - type: "bind"
- source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0"
- target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0"
- - type: "bind"
- source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0"
- target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0"
- - type: "bind"
- source: "/usr/lib/firmware/"
- target: "/usr/lib/firmware/"
+ source: "{{ volume.source }}"
+ target: "{{ volume.target }}"
+{% endfor %}
tg-1:
build:
context: "base/"
@@ -53,30 +31,8 @@ services:
restart: "always"
shm_size: "4G"
volumes:
+{% for volume in docker_volumes %}
- type: "bind"
- source: "/usr/bin/ofed_info"
- target: "/usr/bin/ofed_info"
- - type: "bind"
- source: "/dev/hugepages"
- target: "/dev/hugepages"
- - type: "bind"
- source: "/dev/vfio"
- target: "/dev/vfio"
- - type: "bind"
- source: "/etc/sudoers"
- target: "/etc/sudoers"
- - type: "bind"
- source: "/opt/"
- target: "/opt/"
- - type: "bind"
- source: "/usr/bin/iperf3"
- target: "/usr/bin/iperf3"
- - type: "bind"
- source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0"
- target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0"
- - type: "bind"
- source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0"
- target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0"
- - type: "bind"
- source: "/usr/lib/firmware/"
- target: "/usr/lib/firmware/"
+ source: "{{ volume.source }}"
+ target: "{{ volume.target }}"
+{% endfor %} \ No newline at end of file