diff options
Diffstat (limited to 'fdio.infra.ansible/roles')
3 files changed, 44 insertions, 8 deletions
diff --git a/fdio.infra.ansible/roles/docker_images/tasks/main.yaml b/fdio.infra.ansible/roles/docker_images/tasks/main.yaml index e6171a2b01..382c70b80a 100644 --- a/fdio.infra.ansible/roles/docker_images/tasks/main.yaml +++ b/fdio.infra.ansible/roles/docker_images/tasks/main.yaml @@ -1,12 +1,12 @@ --- # file: tasks/main.yaml -#- name: "Build Base Docker Images" -# import_tasks: "base.yaml" -# when: > -# inventory_hostname in groups["sut"] -# tags: -# - docker-base +- name: "Build Base Docker Images" + import_tasks: "base.yaml" + when: > + inventory_hostname in groups["sut"] + tags: + - docker-base - name: "Docker Orchestration for TG" import_tasks: "tg.yaml" 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 810374527c..10532fcfde 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 @@ -16,6 +16,15 @@ services: restart: "always" shm_size: "4G" 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" {% for volume in docker_volumes %} - type: "bind" source: "{{ volume.source }}" @@ -38,6 +47,15 @@ services: restart: "always" shm_size: "4G" 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" {% for volume in docker_volumes %} - type: "bind" source: "{{ volume.source }}" 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 c4d53c90c2..9b03c65409 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 @@ -17,8 +17,17 @@ services: privileged: true restart: "always" shm_size: "4G" -{% if docker_volumes is defined and docker_volumes|length > 0 %} 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" +{% if docker_volumes is defined and docker_volumes|length > 0 %} {% for volume in docker_volumes %} - type: "bind" source: "{{ volume.source }}" @@ -43,8 +52,17 @@ services: privileged: true restart: "always" shm_size: "4G" -{% if docker_volumes is defined and docker_volumes|length > 0 %} 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" +{% if docker_volumes is defined and docker_volumes|length > 0 %} {% for volume in docker_volumes %} - type: "bind" source: "{{ volume.source }}" |