diff options
author | pmikus <peter.mikus@protonmail.ch> | 2023-11-24 13:39:14 +0000 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2023-11-24 13:40:20 +0000 |
commit | 21679c19cc2c6b74c3fc4a53a0d6a22474646046 (patch) | |
tree | aa229de0d011b6f612e669f7a1a5b2a4c8ec18e1 /fdio.infra.ansible | |
parent | 0efc3083ed2bacaf3445a50fae1679a5ae88d7d9 (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')
6 files changed, 148 insertions, 118 deletions
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml index d95466a49f..c2320e9c7e 100644 --- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml +++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.52.yaml @@ -28,7 +28,6 @@ sysctl: inventory_ipmi_hostname: "10.30.50.52" cpu_microarchitecture: "sapphirerapids" -docker_sut: true mellanox_matrix: "dpdk23.07" intel_dsa_matrix: true @@ -37,4 +36,39 @@ intel_qat_matrix: true kernel_version_by_distro: ubuntu: jammy: - - "5.15.0-72"
\ No newline at end of file + - "5.15.0-72" + +docker_sut: true +docker_volumes: + - source: "/usr/bin/ofed_info" + target: "/usr/bin/ofed_info" + - source: "/dev/hugepages" + target: "/dev/hugepages" + - source: "/dev/vfio" + target: "/dev/vfio" + - source: "/etc/sudoers" + target: "/etc/sudoers" + - source: "/dev/null" + target: "/etc/sysctl.d/80-vpp.conf" + - source: "/opt/boot/" + target: "/opt/boot/" + - source: "/usr/bin/iperf3" + target: "/usr/bin/iperf3" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + - source: "/var/run/docker.sock" + target: "/var/run/docker.sock" + - source: "/usr/lib/firmware/" + target: "/usr/lib/firmware/" + - source: "/usr/local/bin/adf_ctl" + target: "/usr/local/bin/adf_ctl" + - source: "/etc/4xxx_dev0.conf" + target: "/etc/4xxx_dev0.conf" + - source: "/etc/4xxx_dev1.conf" + target: "/etc/4xxx_dev1.conf" + - source: "/etc/4xxx_dev2.conf" + target: "/etc/4xxx_dev2.conf" + - source: "/etc/4xxx_dev3.conf" + target: "/etc/4xxx_dev3.conf"
\ No newline at end of file diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml index a6ece0be3a..ce07968323 100644 --- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml +++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.53.yaml @@ -28,8 +28,38 @@ sysctl: inventory_ipmi_hostname: "10.30.50.53" cpu_microarchitecture: "sapphirerapids" -docker_tg: true mellanox_matrix: "dpdk23.07" intel_dsa_matrix: true -intel_qat_matrix: true
\ No newline at end of file +intel_qat_matrix: true + +docker_tg: true +docker_volumes: + - source: "/usr/bin/ofed_info" + target: "/usr/bin/ofed_info" + - source: "/dev/hugepages" + target: "/dev/hugepages" + - source: "/dev/vfio" + target: "/dev/vfio" + - source: "/etc/sudoers" + target: "/etc/sudoers" + - source: "/opt/" + target: "/opt/" + - source: "/usr/bin/iperf3" + target: "/usr/bin/iperf3" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + - source: "/usr/lib/firmware/" + target: "/usr/lib/firmware/" + - source: "/usr/local/bin/adf_ctl" + target: "/usr/local/bin/adf_ctl" + - source: "/etc/4xxx_dev0.conf" + target: "/etc/4xxx_dev0.conf" + - source: "/etc/4xxx_dev1.conf" + target: "/etc/4xxx_dev1.conf" + - source: "/etc/4xxx_dev2.conf" + target: "/etc/4xxx_dev2.conf" + - source: "/etc/4xxx_dev3.conf" + target: "/etc/4xxx_dev3.conf"
\ No newline at end of file diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml index ff4f1c7d6f..d0fa665c7b 100644 --- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml +++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.54.yaml @@ -28,8 +28,40 @@ sysctl: inventory_ipmi_hostname: "10.30.50.54" cpu_microarchitecture: "sapphirerapids" -docker_sut: true intel_800_matrix: "dpdk23.07" intel_dsa_matrix: true -intel_qat_matrix: true
\ No newline at end of file +intel_qat_matrix: true + +docker_sut: true +docker_volumes: + - source: "/dev/hugepages" + target: "/dev/hugepages" + - source: "/dev/vfio" + target: "/dev/vfio" + - source: "/etc/sudoers" + target: "/etc/sudoers" + - source: "/dev/null" + target: "/etc/sysctl.d/80-vpp.conf" + - source: "/opt/boot/" + target: "/opt/boot/" + - source: "/usr/bin/iperf3" + target: "/usr/bin/iperf3" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + - source: "/var/run/docker.sock" + target: "/var/run/docker.sock" + - source: "/usr/lib/firmware/" + target: "/usr/lib/firmware/" + - source: "/usr/local/bin/adf_ctl" + target: "/usr/local/bin/adf_ctl" + - source: "/etc/4xxx_dev0.conf" + target: "/etc/4xxx_dev0.conf" + - source: "/etc/4xxx_dev1.conf" + target: "/etc/4xxx_dev1.conf" + - source: "/etc/4xxx_dev2.conf" + target: "/etc/4xxx_dev2.conf" + - source: "/etc/4xxx_dev3.conf" + target: "/etc/4xxx_dev3.conf"
\ No newline at end of file diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml index c468b914fd..1b9f9a56d3 100644 --- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml +++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.55.yaml @@ -28,8 +28,36 @@ sysctl: inventory_ipmi_hostname: "10.30.50.55" cpu_microarchitecture: "sapphirerapids" -docker_tg: true intel_800_matrix: "dpdk22.07" intel_dsa_matrix: true -intel_qat_matrix: true
\ No newline at end of file +intel_qat_matrix: true + +docker_tg: true +docker_volumes: + - source: "/dev/hugepages" + target: "/dev/hugepages" + - source: "/dev/vfio" + target: "/dev/vfio" + - source: "/etc/sudoers" + target: "/etc/sudoers" + - source: "/opt/" + target: "/opt/" + - source: "/usr/bin/iperf3" + target: "/usr/bin/iperf3" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0" + - source: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + target: "/usr/lib/x86_64-linux-gnu/libiperf.so.0.0.0" + - source: "/usr/lib/firmware/" + target: "/usr/lib/firmware/" + - source: "/usr/local/bin/adf_ctl" + target: "/usr/local/bin/adf_ctl" + - source: "/etc/4xxx_dev0.conf" + target: "/etc/4xxx_dev0.conf" + - source: "/etc/4xxx_dev1.conf" + target: "/etc/4xxx_dev1.conf" + - source: "/etc/4xxx_dev2.conf" + target: "/etc/4xxx_dev2.conf" + - source: "/etc/4xxx_dev3.conf" + target: "/etc/4xxx_dev3.conf"
\ No newline at end of file diff --git a/fdio.infra.ansible/roles/docker_images/templates/docker-compose-sut.yaml.j2 b/fdio.infra.ansible/roles/docker_images/templates/docker-compose-sut.yaml.j2 index 79f0f71e58..b4713d8552 100644 --- a/fdio.infra.ansible/roles/docker_images/templates/docker-compose-sut.yaml.j2 +++ b/fdio.infra.ansible/roles/docker_images/templates/docker-compose-sut.yaml.j2 @@ -15,36 +15,11 @@ services: restart: "always" shm_size: "4G" volumes: +{% for volume in docker_volumes %} - 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: "/dev/null" - target: "/etc/sysctl.d/80-vpp.conf" - - type: "bind" - source: "/opt/boot/" - target: "/opt/boot/" - - 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: "/var/run/docker.sock" - target: "/var/run/docker.sock" - - type: "bind" - source: "/usr/lib/firmware/" - target: "/usr/lib/firmware/" + source: "{{ volume.source }}" + target: "{{ volume.target }}" +{% endfor %} numa-1: build: context: "base/" @@ -60,33 +35,8 @@ services: restart: "always" shm_size: "4G" volumes: +{% for volume in docker_volumes %} - 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: "/dev/null" - target: "/etc/sysctl.d/80-vpp.conf" - - type: "bind" - source: "/opt/boot/" - target: "/opt/boot/" - - 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: "/var/run/docker.sock" - target: "/var/run/docker.sock" - - type: "bind" - source: "/usr/lib/firmware/" - target: "/usr/lib/firmware/"
\ No newline at end of file + source: "{{ volume.source }}" + target: "{{ volume.target }}" +{% endfor %}
\ No newline at end of file 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 |