inventory_ipmi_hostname: "10.30.50.52"
cpu_microarchitecture: "sapphirerapids"
+docker_sut: true
mellanox_matrix: "dpdk22.07"
intel_dsa_matrix: true
\ No newline at end of file
default_hugepagesz: "2M hugepagesz=1G hugepages=32 hugepagesz=2M hugepages=32768"
hpet: "disable"
intel_idle.max_cstate: "1"
- intel_iommu: "on"
+ intel_iommu: "on,sm_on"
intel_pstate: "disable"
iommu: "pt"
isolcpus: "1-31,33-63,65-95,97-127"
inventory_ipmi_hostname: "10.30.50.53"
cpu_microarchitecture: "sapphirerapids"
+docker_tg: true
mellanox_matrix: "dpdk22.07"
+intel_dsa_matrix: true
inventory_ipmi_hostname: "10.30.50.54"
cpu_microarchitecture: "sapphirerapids"
+docker_sut: true
intel_800_matrix: "dpdk22.07"
intel_dsa_matrix: true
default_hugepagesz: "2M hugepagesz=1G hugepages=32 hugepagesz=2M hugepages=32768"
hpet: "disable"
intel_idle.max_cstate: "1"
- intel_iommu: "on"
+ intel_iommu: "on,sm_on"
intel_pstate: "disable"
iommu: "pt"
isolcpus: "1-31,33-63,65-95,97-127"
inventory_ipmi_hostname: "10.30.50.55"
cpu_microarchitecture: "sapphirerapids"
+docker_tg: true
intel_800_matrix: "dpdk22.07"
+intel_dsa_matrix: true
inventory_ipmi_hostname: "10.30.50.56"
cpu_microarchitecture: "sapphirerapids"
+docker_sut: true
-intel_700_matrix: "dpdk22.07"
intel_800_matrix: "dpdk22.07"
mellanox_matrix: "dpdk22.07"
intel_dsa_matrix: true
\ No newline at end of file
default_hugepagesz: "2M hugepagesz=1G hugepages=32 hugepagesz=2M hugepages=32768"
hpet: "disable"
intel_idle.max_cstate: "1"
- intel_iommu: "on"
+ intel_iommu: "on,sm_on"
intel_pstate: "disable"
iommu: "pt"
isolcpus: "1-31,33-63,65-95,97-127"
inventory_ipmi_hostname: "10.30.50.57"
cpu_microarchitecture: "sapphirerapids"
+docker_tg: true
-intel_700_matrix: "dpdk22.07"
intel_800_matrix: "dpdk22.07"
mellanox_matrix: "dpdk22.07"
+intel_dsa_matrix: true
inventory_ipmi_hostname: "10.30.50.58"
cpu_microarchitecture: "sapphirerapids"
+docker_sut: true
-intel_700_matrix: "dpdk22.07"
intel_800_matrix: "dpdk22.07"
mellanox_matrix: "dpdk22.07"
intel_dsa_matrix: true
default_hugepagesz: "2M hugepagesz=1G hugepages=32 hugepagesz=2M hugepages=32768"
hpet: "disable"
intel_idle.max_cstate: "1"
- intel_iommu: "on"
+ intel_iommu: "on,sm_on"
intel_pstate: "disable"
iommu: "pt"
isolcpus: "1-31,33-63,65-95,97-127"
inventory_ipmi_hostname: "10.30.50.59"
cpu_microarchitecture: "sapphirerapids"
+docker_tg: true
-intel_700_matrix: "dpdk22.07"
intel_800_matrix: "dpdk22.07"
mellanox_matrix: "dpdk22.07"
+intel_dsa_matrix: true
+++ /dev/null
----
-# file: roles/csit_sut_image/tasks/main.yaml
-
-- name: Create a directory if it does not exist
- ansible.builtin.file:
- path: "/opt/csit-sut/"
- state: "directory"
- mode: 0755
- tags:
- - csit-sut-image
-
-- name: Copy Build Items
- ansible.builtin.copy:
- src: "{{ item }}"
- dest: "/opt/csit-sut/"
- owner: "root"
- group: "root"
- mode: 0755
- with_items:
- - Dockerfile
- - supervisord.conf
- tags:
- - csit-sut-image
-
-- name: Build CSIT SUT Docker Image
- ansible.builtin.shell: "docker build -t csit_sut-ubuntu2204:local ."
- args:
- chdir: "/opt/csit-sut"
- async: 3000
- poll: 0
- register: docker_built
- tags:
- - csit-sut-image
-
-- name: Check if CSIT SUT Docker Image is Built
- async_status:
- jid: "{{ docker_built.ansible_job_id }}"
- register: docker_built
- until: docker_built.finished
- delay: 10
- retries: 300
- tags:
- - csit-sut-image
\ No newline at end of file
-# Copyright (c) 2022 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
FROM ubuntu:22.04
-LABEL Description="CSIT vpp-device ubuntu 22.04 SUT image"
-LABEL Version="master"
# Setup the environment
ENV DEBIAN_FRONTEND=noninteractive
apt-transport-https \
bridge-utils \
ca-certificates \
+ cgroup-tools \
cloud-init \
cmake \
curl \
libpcap-dev \
libpixman-1-dev \
libssl-dev \
- locales \
net-tools \
openssh-server \
pciutils \
# Create directory structure
RUN mkdir -p /tmp/dumps \
&& mkdir -p /var/cache/vpp/python \
- && mkdir -p /var/run/sshd
+ && mkdir -p /var/run/sshd \
+ && mkdir -p /var/log/vpp
# CSIT PIP pre-cache
RUN pip3 install \
snowballstemmer==2.2.0 \
urllib3==1.26.10
-# SSH settings
-RUN echo 'root:Csit1234' | chpasswd \
- && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
- && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \
- && echo "export VISIBLE=now" >> /etc/profile
-
-EXPOSE 2222
-
-COPY supervisord.conf /etc/supervisor/supervisord.conf
+RUN useradd -rm -d /home/testuser -s /bin/bash -g root -G sudo -u 1000 testuser \
+ && echo 'testuser:Csit1234' | chpasswd
-CMD ["sh", "-c", "rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api; /usr/bin/supervisord -c /etc/supervisor/supervisord.conf; /usr/sbin/sshd -D -p 2222"]
\ No newline at end of file
+RUN service ssh start
\ No newline at end of file
--- /dev/null
+[Unit]
+Description=CSIT Initialize Docker SUT
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=True
+ExecStart=docker compose -f /opt/csit-docker-images/docker-compose-sut.yaml up --detach
+ExecStop=docker compose -f /opt/csit-docker-images/docker-compose-sut.yaml down
+
+[Install]
+WantedBy=default.target
--- /dev/null
+[Unit]
+Description=CSIT Initialize Docker TG
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=True
+ExecStart=docker compose -f /opt/csit-docker-images/docker-compose-tg.yaml up --detach
+ExecStop=docker compose -f /opt/csit-docker-images/docker-compose-tg.yaml down
+
+[Install]
+WantedBy=default.target
#!/usr/bin/env bash
-# Copyright (c) 2021 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# CSIT SRIOV VF initialization and isolation.
-
set -euo pipefail
case "${1:-start}" in
docker network create --driver bridge csit-nw-tg${cnt} || true
# If the IMAGE is not already loaded then docker run will pull the
# IMAGE, and all image dependencies, before it starts the container.
- dcr_image="csit_sut-ubuntu2204:local"
+ dcr_image="base-ubuntu2204:local"
# Run the container in the background and print the new container
# ID.
dcr_stc_params="--detach=true "
--- /dev/null
+FROM base-ubuntu2204:local
+
+COPY supervisord.conf /etc/supervisor/supervisord.conf
+
+CMD ["sh", "-c", "rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api; /usr/bin/supervisord -c /etc/supervisor/supervisord.conf; /usr/sbin/sshd -D -p 2222"]
\ No newline at end of file
--- /dev/null
+---
+# file: handlers/main.yaml
+
+- name: "Start csit-initialize-docker-sut.service"
+ ansible.builtin.systemd:
+ enabled: true
+ state: "started"
+ name: "csit-initialize-docker-sut.service"
+ tags:
+ - docker-sut
+
+- name: "Start csit-initialize-docker-tg.service"
+ ansible.builtin.systemd:
+ enabled: true
+ state: "started"
+ name: "csit-initialize-docker-tg.service"
+ tags:
+ - docker-tg
\ No newline at end of file
--- /dev/null
+---
+# file: tasks/base.yaml
+
+- name: "Create a Directory For Docker Images"
+ ansible.builtin.file:
+ path: "/opt/csit-docker-images/"
+ state: "directory"
+ mode: 0755
+ tags:
+ - docker-base
+
+- name: "Copy Build Items"
+ ansible.builtin.copy:
+ src: "{{ item }}"
+ dest: "/opt/csit-docker-images/{{ item }}"
+ owner: "root"
+ group: "root"
+ mode: 0755
+ with_items:
+ - "base/"
+ - "csit-sut/"
+ tags:
+ - docker-base
+
+- name: "Build CSIT Base Docker Image"
+ ansible.builtin.shell: "docker build -t base-ubuntu2204:local ."
+ args:
+ chdir: "/opt/csit-docker-images/base"
+ async: 3000
+ poll: 0
+ register: "docker_built"
+ tags:
+ - docker-base
+
+- name: "Check if CSIT Base Docker Image is Built"
+ async_status:
+ jid: "{{ docker_built.ansible_job_id }}"
+ register: "docker_built"
+ until: "docker_built.finished"
+ delay: 10
+ retries: 300
+ tags:
+ - docker-base
+
+- name: "Build CSIT OLD Docker Image"
+ ansible.builtin.shell: "docker build -t csit_sut-ubuntu2204:local ."
+ args:
+ chdir: "/opt/csit-docker-images/csit-sut"
+ async: 3000
+ poll: 0
+ register: "docker_built"
+ tags:
+ - docker-base
+
+- name: "Check if CSIT OLD Docker Image is Built"
+ async_status:
+ jid: "{{ docker_built.ansible_job_id }}"
+ register: "docker_built"
+ until: "docker_built.finished"
+ delay: 10
+ retries: 300
+ tags:
+ - docker-base
\ No newline at end of file
--- /dev/null
+---
+# file: tasks/main.yaml
+
+- name: "Build Base Docker Images"
+ import_tasks: "base.yaml"
+ tags:
+ - docker-base
+
+- name: "Docker Orchestration for TG"
+ import_tasks: "tg.yaml"
+ when: >
+ docker_tg is defined
+ tags:
+ - docker-tg
+
+- name: "Docker Orchestration for SUT"
+ import_tasks: "sut.yaml"
+ when: >
+ docker_sut is defined
+ tags:
+ - docker-sut
\ No newline at end of file
--- /dev/null
+---
+# file: tasks/sut.yaml
+
+- name: "Template Compose File"
+ ansible.builtin.template:
+ src: "{{ item }}.j2"
+ dest: "/opt/csit-docker-images/{{ item }}"
+ owner: "root"
+ group: "root"
+ mode: 0755
+ with_items:
+ - "docker-compose-sut.yaml"
+ tags:
+ - docker-sut
+
+- name: "Copy csit-initialize-docker-sut.service"
+ ansible.builtin.copy:
+ src: "files/csit-initialize-docker-sut.service"
+ dest: "/etc/systemd/system/"
+ owner: "root"
+ group: "root"
+ mode: 0644
+ notify:
+ - "Start csit-initialize-docker-sut.service"
+ tags:
+ - docker-sut
+
+- meta: flush_handlers
\ No newline at end of file
--- /dev/null
+---
+# file: tasks/tg.yaml
+
+- name: "Template Compose File"
+ ansible.builtin.template:
+ src: "{{ item }}.j2"
+ dest: "/opt/csit-docker-images/{{ item }}"
+ owner: "root"
+ group: "root"
+ mode: 0755
+ with_items:
+ - "docker-compose-tg.yaml"
+ tags:
+ - docker-tg
+
+- name: "Start csit-initialize-docker-tg.service"
+ ansible.builtin.copy:
+ src: "files/csit-initialize-docker-tg.service"
+ dest: "/etc/systemd/system/"
+ owner: "root"
+ group: "root"
+ mode: 0644
+ notify:
+ - "Start csit-initialize-docker-tg.service"
+ tags:
+ - docker-tg
+
+- meta: flush_handlers
\ No newline at end of file
--- /dev/null
+version: "3"
+services:
+ numa-0:
+ build:
+ context: "base/"
+ dockerfile: "Dockerfile"
+ command: ["/usr/sbin/sshd","-D", "-p", "6001"]
+ expose:
+ - "6001"
+ hostname: "{{ ansible_hostname[:-1] }}1"
+ network_mode: "host"
+ privileged: true
+ restart: "always"
+ shm_size: "4G"
+ devices:
+ - "/dev/hugepages:/dev/hugepages"
+ - "/dev/vfio:/dev/vfio"
+ volumes:
+ - 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: "/var/run/docker.sock"
+ target: "/var/run/docker.sock"
+ - type: "bind"
+ source: "/usr/lib/firmware/"
+ target: "/usr/lib/firmware/"
+ numa-1:
+ build:
+ context: "base/"
+ dockerfile: "Dockerfile"
+ command: ["/usr/sbin/sshd","-D", "-p", "6002"]
+ expose:
+ - "6002"
+ hostname: "{{ ansible_hostname[:-1] }}2"
+ network_mode: "host"
+ privileged: true
+ restart: "always"
+ shm_size: "4G"
+ devices:
+ - "/dev/hugepages:/dev/hugepages"
+ - "/dev/vfio:/dev/vfio"
+ volumes:
+ - 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: "/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
--- /dev/null
+version: "3"
+services:
+ tg-0:
+ build:
+ context: "base/"
+ dockerfile: "Dockerfile"
+ command: ["/usr/sbin/sshd","-D", "-p", "6001"]
+ expose:
+ - "6001"
+ hostname: "{{ ansible_hostname }}"
+ networks:
+ tg-nw-0:
+ privileged: true
+ ports:
+ - "6001:6001"
+ restart: "always"
+ shm_size: "4G"
+ devices:
+ - "/dev/hugepages:/dev/hugepages"
+ - "/dev/vfio:/dev/vfio"
+ volumes:
+ - type: "bind"
+ source: "/etc/sudoers"
+ target: "/etc/sudoers"
+ - type: "bind"
+ source: "/opt/"
+ target: "/opt/"
+ - type: "bind"
+ source: "/usr/lib/firmware/"
+ target: "/usr/lib/firmware/"
+ tg-1:
+ build:
+ context: "base/"
+ dockerfile: "Dockerfile"
+ command: ["/usr/sbin/sshd","-D", "-p", "6002"]
+ expose:
+ - "6002"
+ hostname: "{{ ansible_hostname }}"
+ networks:
+ tg-nw-1:
+ privileged: true
+ ports:
+ - "6002:6002"
+ restart: "always"
+ shm_size: "4G"
+ devices:
+ - "/dev/hugepages:/dev/hugepages"
+ - "/dev/vfio:/dev/vfio"
+ volumes:
+ - type: "bind"
+ source: "/etc/sudoers"
+ target: "/etc/sudoers"
+ - type: "bind"
+ source: "/opt/"
+ target: "/opt/"
+ - type: "bind"
+ source: "/usr/lib/firmware/"
+ target: "/usr/lib/firmware/"
+networks:
+ tg-nw-0:
+ tg-nw-1:
\ No newline at end of file
+++ /dev/null
-[Unit]
-Description=CSIT Initialize Docker TG
-After=network.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=True
-ExecStart=/usr/local/bin/csit-initialize-docker-tg.sh start 2
-ExecStop=/usr/local/bin/csit-initialize-docker-tg.sh stop
-
-[Install]
-WantedBy=default.target
+++ /dev/null
----
-# file: roles/tg/handlers/main.yaml
-
-- name: Start csit-initialize-docker-tg.service
- ansible.builtin.systemd:
- enabled: true
- state: "started"
- name: "csit-initialize-docker-tg.service"
- tags:
- - docker-tg
+++ /dev/null
----
-# file: roles/tg/tasks/main.yaml
-
-- name: Conf - csit-initialize-docker-tg.sh
- ansible.builtin.copy:
- src: "files/csit-initialize-docker-tg.sh"
- dest: "/usr/local/bin/csit-initialize-docker-tg.sh"
- owner: "root"
- group: "root"
- mode: 0744
- when:
- - docker_tg is defined
- tags:
- - tg-conf-docker
-
-- name: Conf - Start csit-initialize-docker-tg.service
- ansible.builtin.copy:
- src: "files/csit-initialize-docker-tg.service"
- dest: "/etc/systemd/system/"
- owner: "root"
- group: "root"
- mode: 0644
- notify:
- - "Start csit-initialize-docker-tg.service"
- when:
- - docker_tg is defined
- tags:
- - tg-conf-docker
-
-- meta: flush_handlers
tags: intel
- role: docker
tags: docker
+ - role: docker_images
+ tags: docker_images
- role: vpp
tags: vpp
- role: dpdk
tags: dpdk
- role: kernel_vm
tags: kernel_vm
- - role: csit_sut_image
- tags: csit_sut_image
- role: performance_tuning
tags: performance_tuning
- role: cleanup
tags: intel
- role: docker
tags: docker
+ - role: docker_images
+ tags: docker_images
- role: iperf
tags: iperf
- role: trex
tags: trex
- role: ab
tags: ab
- - role: tg
- tags: tg
- - role: csit_sut_image
- tags: csit_sut_image
- role: performance_tuning
tags: performance_tuning
- role: cleanup
tags: dpdk
- role: docker
tags: docker
- - role: tg
- tags: tg
- role: iperf
tags: iperf
- role: aws
tags: python_env
- role: docker
tags: docker
- - role: tg
- tags: tg
- role: iperf
tags: iperf
- role: trex
tags: intel
- role: docker
tags: docker
+ - role: docker_images
+ tags: docker_images
- role: nomad
tags: nomad
- role: consul
tags: vpp_device
- role: kernel_vm
tags: kernel_vm
- - role: csit_sut_image
- tags: csit_sut_image
- role: cleanup
tags: cleanup