From 0b947247146f27936e986c262fc9f1d641b5ac4f Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Wed, 17 Aug 2022 13:57:23 +0000 Subject: feat(ansible): Ubuntu Jammy VI. Signed-off-by: Peter Mikus Change-Id: I7dda690f2dc2e42bf6c67d3faa3327a03de3a9fa --- fdio.infra.ansible/roles/ab/tasks/main.yaml | 4 +- .../roles/calibration/defaults/main.yaml | 14 +--- .../roles/calibration/tasks/main.yaml | 18 ++-- .../roles/calibration/tasks/x86_64.yaml | 10 +-- .../roles/cleanup/tasks/clean_images.yaml | 4 +- .../roles/cleanup/tasks/kill_containers.yaml | 10 +-- .../roles/cleanup/tasks/kill_process.yaml | 6 +- .../roles/cleanup/tasks/remove_package.yaml | 4 +- fdio.infra.ansible/roles/cleanup/tasks/sut.yaml | 8 +- .../roles/cleanup/tasks/vpp_device.yaml | 2 +- fdio.infra.ansible/roles/common/defaults/main.yaml | 25 ------ fdio.infra.ansible/roles/common/handlers/main.yaml | 2 +- fdio.infra.ansible/roles/common/tasks/main.yaml | 14 ++-- .../roles/csit_sut_image/tasks/main.yaml | 6 +- fdio.infra.ansible/roles/docker/tasks/focal.yaml | 30 ------- fdio.infra.ansible/roles/intel/defaults/main.yaml | 26 +++--- fdio.infra.ansible/roles/intel/tasks/i40e.yaml | 8 +- fdio.infra.ansible/roles/intel/tasks/iavf.yaml | 6 +- fdio.infra.ansible/roles/intel/tasks/ice.yaml | 36 ++++---- fdio.infra.ansible/roles/intel/tasks/main.yaml | 12 +-- fdio.infra.ansible/roles/iperf/tasks/main.yaml | 14 ++-- fdio.infra.ansible/roles/kernel/defaults/main.yaml | 14 +--- fdio.infra.ansible/roles/kernel/handlers/main.yaml | 2 +- .../roles/kernel/tasks/ubuntu_focal.yaml | 62 -------------- .../roles/kernel/tasks/ubuntu_jammy.yaml | 18 ++-- fdio.infra.ansible/roles/kernel_vm/tasks/main.yaml | 22 ++--- .../roles/kubernetes/defaults/main.yaml | 15 ---- .../roles/kubernetes/tasks/main.yaml | 14 ---- .../roles/kubernetes/tasks/ubuntu_jammy.yaml | 37 --------- .../roles/mellanox/defaults/main.yaml | 6 +- fdio.infra.ansible/roles/mellanox/tasks/main.yaml | 2 +- fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml | 12 +-- .../roles/performance_tuning/handlers/main.yaml | 4 +- .../roles/performance_tuning/tasks/main.yaml | 39 ++++----- .../roles/python_env/defaults/main.yaml | 11 +-- .../roles/python_env/tasks/main.yaml | 96 +++++++++++----------- fdio.infra.ansible/roles/tg/handlers/main.yaml | 2 +- fdio.infra.ansible/roles/tg/tasks/main.yaml | 4 +- fdio.infra.ansible/roles/topology/tasks/main.yaml | 6 +- fdio.infra.ansible/roles/trex/defaults/main.yaml | 15 +--- .../roles/trex/tasks/deploy_block.yaml | 32 ++++++-- fdio.infra.ansible/roles/trex/tasks/main.yaml | 4 +- fdio.infra.ansible/roles/vpp/defaults/main.yaml | 14 +--- fdio.infra.ansible/roles/vpp/tasks/main.yaml | 6 +- 44 files changed, 238 insertions(+), 458 deletions(-) delete mode 100644 fdio.infra.ansible/roles/docker/tasks/focal.yaml delete mode 100644 fdio.infra.ansible/roles/kernel/tasks/ubuntu_focal.yaml delete mode 100644 fdio.infra.ansible/roles/kubernetes/defaults/main.yaml delete mode 100644 fdio.infra.ansible/roles/kubernetes/tasks/main.yaml delete mode 100644 fdio.infra.ansible/roles/kubernetes/tasks/ubuntu_jammy.yaml (limited to 'fdio.infra.ansible/roles') diff --git a/fdio.infra.ansible/roles/ab/tasks/main.yaml b/fdio.infra.ansible/roles/ab/tasks/main.yaml index c69ed25a75..2a70fd1d1d 100644 --- a/fdio.infra.ansible/roles/ab/tasks/main.yaml +++ b/fdio.infra.ansible/roles/ab/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/ab/tasks/main.yaml - name: Inst - Update Package Cache (APT) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,7 +11,7 @@ - ab-inst-prerequisites - name: Inst - Apache ab tools - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: present tags: diff --git a/fdio.infra.ansible/roles/calibration/defaults/main.yaml b/fdio.infra.ansible/roles/calibration/defaults/main.yaml index bb904622e4..60cbc8b25f 100644 --- a/fdio.infra.ansible/roles/calibration/defaults/main.yaml +++ b/fdio.infra.ansible/roles/calibration/defaults/main.yaml @@ -9,9 +9,6 @@ packages_base: packages_by_distro: ubuntu: - focal: - - "build-essential" - - "dmidecode" jammy: - "build-essential" - "dmidecode" @@ -27,20 +24,13 @@ kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lowe kernel_version_by_distro_by_arch: ubuntu: - focal: - x86_64: - - "5.4.0-65-generic" - - "5.3.0-1020-azure" - - "5.4.0-1035-aws" - aarch64: - - "5.4.0-65-generic" jammy: x86_64: - - "5.15.0-0-generic" # Placeholder + - "5.15.0-46-generic" # Placeholder - "5.3.0-1020-azure" # Placeholder - "5.15.0-1000-aws" # Placeholder aarch64: - - "5.15.0-0-generic" # Placeholder + - "5.15.0-46-generic" # Placeholder pma_directory: "/tmp/pma_tools" jitter_core: 7 diff --git a/fdio.infra.ansible/roles/calibration/tasks/main.yaml b/fdio.infra.ansible/roles/calibration/tasks/main.yaml index 62470b4d7f..5807d7e2a4 100644 --- a/fdio.infra.ansible/roles/calibration/tasks/main.yaml +++ b/fdio.infra.ansible/roles/calibration/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/calibration/tasks/main.yaml - name: Inst - Update Package Cache (APT) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,21 +11,21 @@ - calibration-inst-prerequisites - name: Inst - Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: - calibration-inst-prerequisites - name: Check CPU Power States - shell: "lscpu" + ansible.builtin.shell: "lscpu" register: current_lscpu changed_when: false tags: - check-cpu-frequency - name: Check CPU Power States - assert: + ansible.builtin.assert: that: - "'CPU min MHz' not in current_lscpu.stdout or 'Intel(R) Xeon(R)' not in ansible_processor" fail_msg: "CPU configuration!" @@ -34,7 +34,7 @@ - check-cpu-frequency - name: Check Kernel Parameters - assert: + ansible.builtin.assert: that: - item in ansible_cmdline fail_msg: "Kernel parameters!" @@ -46,7 +46,7 @@ - check-kernel-params - name: Check Kernel Version - assert: + ansible.builtin.assert: that: - ansible_kernel not in kernel_version_by_distro_by_arch fail_msg: "Kernel version!" @@ -55,14 +55,14 @@ - check-kernel-version - name: Spectre Meltdown Checker Status - stat: + ansible.builtin.stat: path: "/opt/spectre-meltdown-checker.sh" register: spectre_meltdown_status tags: - check-spectre-meltdown - name: Get Spectre Meltdown Checker - get_url: + ansible.builtin.get_url: url: "https://meltdown.ovh" dest: "/opt/spectre-meltdown-checker.sh" mode: "744" @@ -72,7 +72,7 @@ - check-spectre-meltdown - name: Run Spectre Meltdown Checker - shell: "/opt/spectre-meltdown-checker.sh --no-color --sysfs-only || true" + ansible.builtin.shell: "/opt/spectre-meltdown-checker.sh --no-color --sysfs-only || true" ignore_errors: true register: spectre_meltdown_sync tags: diff --git a/fdio.infra.ansible/roles/calibration/tasks/x86_64.yaml b/fdio.infra.ansible/roles/calibration/tasks/x86_64.yaml index cb98c00c51..2d28f92ae3 100644 --- a/fdio.infra.ansible/roles/calibration/tasks/x86_64.yaml +++ b/fdio.infra.ansible/roles/calibration/tasks/x86_64.yaml @@ -2,19 +2,19 @@ # file: roles/calibration/tasks/x86_64.yaml - name: Calibration - Clone PMA Tool - git: + ansible.builtin.git: repo: "https://gerrit.fd.io/r/pma_tools" dest: "{{ pma_directory }}" tags: - check-jitter-tool - name: Calibration - Compile PMA Tool - raw: "cd {{ pma_directory }}/jitter && make" + ansible.builtin.raw: "cd {{ pma_directory }}/jitter && make" tags: - check-jitter-tool - name: Calibration - Run Jitter Tool - shell: "{{ pma_directory }}/jitter/jitter -c {{ jitter_core }} -i {{ jitter_iterations }} -f" + ansible.builtin.shell: "{{ pma_directory }}/jitter/jitter -c {{ jitter_core }} -i {{ jitter_iterations }} -f" become: true async: 60 poll: 0 @@ -24,12 +24,12 @@ - check-jitter-tool - name: Check sync status - async_status: + ansible.builtin.async_status: jid: "{{ jitter_async.ansible_job_id }}" register: "jitter_poll_results" until: jitter_poll_results.finished retries: 30 -- debug: var=jitter_poll_results.stdout_lines +- ansible.builtin.debug: var=jitter_poll_results.stdout_lines tags: - check-jitter-tool diff --git a/fdio.infra.ansible/roles/cleanup/tasks/clean_images.yaml b/fdio.infra.ansible/roles/cleanup/tasks/clean_images.yaml index 7558ee0fd7..f3778712bf 100644 --- a/fdio.infra.ansible/roles/cleanup/tasks/clean_images.yaml +++ b/fdio.infra.ansible/roles/cleanup/tasks/clean_images.yaml @@ -4,7 +4,7 @@ - name: Clean Docker Images block: - name: Clean Images - Prefetch Docker Images - cron: + ansible.builtin.cron: name: "Prefetch docker image {{ item }}" minute: "10" hour: "7" @@ -15,7 +15,7 @@ - prefetch-docker-images - name: Clean Images - Remove Dangling Docker Images - cron: + ansible.builtin.cron: name: "Remove dangling docker images" minute: "10" hour: "5" diff --git a/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml b/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml index 750572feb9..2c01b95a15 100644 --- a/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml +++ b/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml @@ -4,35 +4,35 @@ - name: Kill Docker Containers block: - name: Kill Container - Get Running Docker Containers - shell: "docker ps -aq" + ansible.builtin.shell: "docker ps -aq" register: running_containers changed_when: false tags: - kill-containers - name: Kill Container - Remove All Docker Containers - shell: "docker rm --force {{ item }}" + ansible.builtin.shell: "docker rm --force {{ item }}" with_items: "{{ running_containers.stdout_lines }}" tags: - kill-containers rescue: - name: Restart Docker Daemon - systemd: + ansible.builtin.systemd: name: "docker" state: "restarted" - name: Kill LXC Containers block: - name: Kill Container - Get Running LXC Containers - shell: "lxc-ls" + ansible.builtin.shell: "lxc-ls" register: running_containers changed_when: false tags: - kill-containers - name: Kill Container - Remove All LXC Containers - shell: "lxc-destroy --force -n {{ item }}" + ansible.builtin.shell: "lxc-destroy --force -n {{ item }}" with_items: "{{ running_containers.stdout_lines }}" tags: - kill-containers diff --git a/fdio.infra.ansible/roles/cleanup/tasks/kill_process.yaml b/fdio.infra.ansible/roles/cleanup/tasks/kill_process.yaml index d6c6ed5118..bad5ef5e7c 100644 --- a/fdio.infra.ansible/roles/cleanup/tasks/kill_process.yaml +++ b/fdio.infra.ansible/roles/cleanup/tasks/kill_process.yaml @@ -4,7 +4,7 @@ - name: Kill Process - {{ process }} block: - name: Get PID Of {{ process }} - shell: "ps -ef | grep -v grep | grep -w {{ process }} | awk '{print $2}'" + ansible.builtin.shell: "ps -ef | grep -v grep | grep -w {{ process }} | awk '{print $2}'" when: - process is defined and process != "" register: running_processes @@ -12,7 +12,7 @@ - kill-process - name: Safe Kill {{ process }} - shell: "kill {{ item }}" + ansible.builtin.shell: "kill {{ item }}" with_items: "{{ running_processes.stdout_lines }}" tags: - kill-process @@ -27,7 +27,7 @@ - kill-process - name: Kill Process - Force Kill {{ process }} - shell: "kill -9 {{ item }}" + ansible.builtin.shell: "kill -9 {{ item }}" with_items: "{{ killed_processes.results | select('failed') | map(attribute='item') | list }}" tags: - kill-process diff --git a/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml b/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml index 484868e595..27a6785440 100644 --- a/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml +++ b/fdio.infra.ansible/roles/cleanup/tasks/remove_package.yaml @@ -2,14 +2,14 @@ # file: roles/cleanup/tasks/remove_package.yaml - name: Remove Package - Fix Corrupted APT - shell: "dpkg --configure -a" + ansible.builtin.shell: "dpkg --configure -a" when: - ansible_distribution == 'Ubuntu' tags: - remove-package - name: Remove Package - {{ package }} - apt: + ansible.builtin.apt: name: "{{ package }}" force: true purge: true diff --git a/fdio.infra.ansible/roles/cleanup/tasks/sut.yaml b/fdio.infra.ansible/roles/cleanup/tasks/sut.yaml index 396e442b4e..5524277f52 100644 --- a/fdio.infra.ansible/roles/cleanup/tasks/sut.yaml +++ b/fdio.infra.ansible/roles/cleanup/tasks/sut.yaml @@ -46,7 +46,7 @@ - kill-process - name: Find File Or Dir - Core Zip File - find: + ansible.builtin.find: paths: "/tmp/" patterns: "*tar.lzo.lrz.xz*" register: files_to_delete @@ -54,7 +54,7 @@ - remove-file-dir - name: Remove File Or Dir - Core Zip File - file: + ansible.builtin.file: path: "{{ item.path }}" state: absent with_items: "{{ files_to_delete.files }}" @@ -62,7 +62,7 @@ - remove-file-dir - name: Find File Or Dir - Core Dump File - find: + ansible.builtin.find: paths: "/tmp/" patterns: "*core*" register: files_to_delete @@ -70,7 +70,7 @@ - remove-file-dir - name: Remove File Or Dir - Core Dump File - file: + ansible.builtin.file: path: "{{ item.path }}" state: absent with_items: "{{ files_to_delete.files }}" diff --git a/fdio.infra.ansible/roles/cleanup/tasks/vpp_device.yaml b/fdio.infra.ansible/roles/cleanup/tasks/vpp_device.yaml index 23d001fe6f..f617c4dff5 100644 --- a/fdio.infra.ansible/roles/cleanup/tasks/vpp_device.yaml +++ b/fdio.infra.ansible/roles/cleanup/tasks/vpp_device.yaml @@ -4,7 +4,7 @@ - name: Host Cleanup block: - name: Reset vpp_device Binary - copy: + ansible.builtin.copy: src: "files/reset_vppdevice.sh" dest: "/usr/local/bin" owner: "root" diff --git a/fdio.infra.ansible/roles/common/defaults/main.yaml b/fdio.infra.ansible/roles/common/defaults/main.yaml index 77a9c83740..9ded8fcba9 100644 --- a/fdio.infra.ansible/roles/common/defaults/main.yaml +++ b/fdio.infra.ansible/roles/common/defaults/main.yaml @@ -19,35 +19,10 @@ packages_base: packages_by_distro: ubuntu: - focal: - - "bpfcc-tools" - - "build-essential" - - "libbpfcc" - - "libbpfcc-dev" - - "libclang1-9" - - "libllvm9" - - "libpcap-dev" - - "net-tools" - - "python3-all" - - "python3-apt" - - "python3-bpfcc" - - "python3-cffi" - - "python3-cffi-backend" - - "python3-dev" - - "python3-pip" - - "python3-pyelftools" - - "python3-setuptools" jammy: - "build-essential" - "libpcap-dev" - "net-tools" - - "python-all" - - "python-apt" - - "python-cffi" - - "python-cffi-backend" - - "python-dev" - - "python-pip" - - "python-setuptools" - "python3-all" - "python3-apt" - "python3-cffi" diff --git a/fdio.infra.ansible/roles/common/handlers/main.yaml b/fdio.infra.ansible/roles/common/handlers/main.yaml index bb317e8067..0a4944b4ca 100644 --- a/fdio.infra.ansible/roles/common/handlers/main.yaml +++ b/fdio.infra.ansible/roles/common/handlers/main.yaml @@ -2,7 +2,7 @@ # file: roles/common/handlers/main.yaml - name: Reboot Server - reboot: + ansible.builtin.reboot: reboot_timeout: 3600 tags: - reboot-server diff --git a/fdio.infra.ansible/roles/common/tasks/main.yaml b/fdio.infra.ansible/roles/common/tasks/main.yaml index 7418709c99..7f122d23aa 100644 --- a/fdio.infra.ansible/roles/common/tasks/main.yaml +++ b/fdio.infra.ansible/roles/common/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/common/tasks/main.yaml - name: Conf - Add permanent proxy settings - lineinfile: + ansible.builtin.lineinfile: path: "/etc/environment" state: "present" line: "{{ item.key }}={{ item.value }}" @@ -12,7 +12,7 @@ - common-conf-proxy - name: Inst - Update package cache (apt) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -21,21 +21,21 @@ - common-inst-prerequisites - name: Inst - Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" - state: latest + state: "latest" tags: - common-inst-prerequisites - name: Inst - Meson (DPDK) - pip: + ansible.builtin.pip: name: - "meson==0.49.2" tags: - common-inst-meson - name: Conf - sudoers admin - lineinfile: + ansible.builtin.lineinfile: path: "/etc/sudoers" state: "present" regexp: "^%admin ALL=" @@ -45,7 +45,7 @@ - common-conf-sudoers - name: Conf - sudoers nopasswd - lineinfile: + ansible.builtin.lineinfile: path: "/etc/sudoers" state: "present" regexp: "^%sudo" diff --git a/fdio.infra.ansible/roles/csit_sut_image/tasks/main.yaml b/fdio.infra.ansible/roles/csit_sut_image/tasks/main.yaml index 9dddbe435b..ea69c64b3b 100644 --- a/fdio.infra.ansible/roles/csit_sut_image/tasks/main.yaml +++ b/fdio.infra.ansible/roles/csit_sut_image/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/csit_sut_image/tasks/main.yaml - name: Create a directory if it does not exist - file: + ansible.builtin.file: path: "/opt/csit-sut/" state: "directory" mode: 0755 @@ -10,7 +10,7 @@ - csit-sut-image - name: Copy Build Items - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "/opt/csit-sut/" owner: "root" @@ -23,7 +23,7 @@ - csit-sut-image - name: Build CSIT SUT Docker Image - shell: "docker build -t csit_sut-ubuntu2004:local ." + ansible.builtin.shell: "docker build -t csit_sut-ubuntu2004:local ." args: chdir: "/opt/csit-sut" tags: diff --git a/fdio.infra.ansible/roles/docker/tasks/focal.yaml b/fdio.infra.ansible/roles/docker/tasks/focal.yaml deleted file mode 100644 index 27fee6285c..0000000000 --- a/fdio.infra.ansible/roles/docker/tasks/focal.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -# file: roles/docker/tasks/ubuntu_focal.yaml - -- name: Inst - Dependencies - ansible.builtin.apt: - name: - - "apt-transport-https" - - "ca-certificates" - - "gpg-agent" - - "software-properties-common" - state: "present" - cache_valid_time: 3600 - install_recommends: false - tags: - - docker-inst-dependencies - -- name: Conf - Add APT Key - ansible.builtin.apt_key: - url: "{{ docker_apt_gpg_key }}" - state: "{{ docker_apt_gpg_key_state }}" - tags: - - docker-conf-apt - -- name: Conf - Install APT Repository - ansible.builtin.apt_repository: - repo: "{{ docker_apt_repository }}" - state: "{{ docker_apt_repository_state }}" - update_cache: true - tags: - - docker-conf-apt diff --git a/fdio.infra.ansible/roles/intel/defaults/main.yaml b/fdio.infra.ansible/roles/intel/defaults/main.yaml index 7f35be3d89..d4d8c4c514 100644 --- a/fdio.infra.ansible/roles/intel/defaults/main.yaml +++ b/fdio.infra.ansible/roles/intel/defaults/main.yaml @@ -26,10 +26,10 @@ intel_700_compatibility_matrix: i40e: "2.14.13" iavf: "4.1.1" nvm: "8.00" - dpdk22.03: - # https://doc.dpdk.org/guides/rel_notes/release_22_03.html - i40e: "2.17.15" - iavf: "4.3.19" + dpdk22.07: + # https://doc.dpdk.org/guides/rel_notes/release_22_07.html + i40e: "2.19.3" + iavf: "4.5.3" nvm: "8.30" intel_800_compatibility_matrix: @@ -39,25 +39,25 @@ intel_800_compatibility_matrix: ddp: "1.3.28.0" iavf: "4.1.1" nvm: "2.40" - dpdk22.03: - # https://doc.dpdk.org/guides/rel_notes/release_22_03.html - ice: "1.8.3" - ddp: "1.3.35.0" - iavf: "4.3.19" + dpdk22.07: + # https://doc.dpdk.org/guides/rel_notes/release_22_07.html + ice: "1.9.7" + ddp: "1.3.37.0" + iavf: "4.5.3" nvm: "3.20" intel_i40e_url: "2.14.13": "i40e%20stable/2.14.13/i40e-2.14.13.tar.gz/download" - "2.17.15": "i40e%20stable/2.17.15/i40e-2.17.15.tar.gz/download" + "2.19.3": "i40e%20stable/2.19.3/i40e-2.19.3.tar.gz/download" intel_ice_url: "1.4.11": "ice%20stable/1.4.11/ice-1.4.11.tar.gz/download" - "1.8.3": "ice%20stable/1.8.3/ice-1.8.3.tar.gz/download" + "1.9.7": "ice%20stable/1.9.7/ice-1.9.7.tar.gz/download" intel_iavf_url: "4.1.1": "iavf%20stable/4.1.1/iavf-4.1.1.tar.gz/download" - "4.3.19": "iavf%20stable/4.3.19/iavf-4.3.19.tar.gz/download" + "4.5.3": "iavf%20stable/4.5.3/iavf-4.5.3.tar.gz/download" intel_ddp_url: "1.3.28.0": "30467/eng/800%20series%20comms%20binary%20package%201.3.28.0.zip" - "1.3.35.0": "727568/ice_comms-1.3.35.0.zip" + "1.3.37.0": "738733/800%20Series%20DDP%20Comms%20Package%201.3.37.0.zip" diff --git a/fdio.infra.ansible/roles/intel/tasks/i40e.yaml b/fdio.infra.ansible/roles/intel/tasks/i40e.yaml index 2299a3b1b8..01b3d763d8 100644 --- a/fdio.infra.ansible/roles/intel/tasks/i40e.yaml +++ b/fdio.infra.ansible/roles/intel/tasks/i40e.yaml @@ -2,7 +2,7 @@ # file: roles/intel/tasks/i40e.yaml - name: Inst - Get i40e Network Adapter Driver - uri: + ansible.builtin.uri: url: "{{ intel_sourceforge_download_url }}/{{ intel_i40e_url[i40e] }}" follow_redirects: "all" force: true @@ -13,7 +13,7 @@ - intel-inst - name: Inst - Extract i40e Network Adapter Driver - unarchive: + ansible.builtin.unarchive: remote_src: true src: "{{ intel_extract_dir }}/i40e-{{ i40e }}.tar.gz" dest: "{{ intel_extract_dir }}/" @@ -23,13 +23,13 @@ - intel-inst - name: Inst - i40e Network Adapter Driver - command: "{{ item }}" + ansible.builtin.command: "{{ item }}" args: chdir: "{{ intel_extract_dir }}/i40e-{{ i40e }}/src" become: true with_items: - "make install" - - "modprobe -r i40e" + #- "modprobe -r i40e" - "modprobe i40e" when: - intel_driver_extracted diff --git a/fdio.infra.ansible/roles/intel/tasks/iavf.yaml b/fdio.infra.ansible/roles/intel/tasks/iavf.yaml index 44040cfd7e..226b79bdab 100644 --- a/fdio.infra.ansible/roles/intel/tasks/iavf.yaml +++ b/fdio.infra.ansible/roles/intel/tasks/iavf.yaml @@ -2,7 +2,7 @@ # file: roles/intel/tasks/iavf.yaml - name: Inst - Get iavf Network Adapter Driver - uri: + ansible.builtin.uri: url: "{{ intel_sourceforge_download_url }}/{{ intel_iavf_url[iavf] }}" follow_redirects: "all" force: true @@ -13,7 +13,7 @@ - intel-inst - name: Inst - Extract iavf Network Adapter Driver - unarchive: + ansible.builtin.unarchive: remote_src: true src: "{{ intel_extract_dir }}/iavf-{{ iavf }}.tar.gz" dest: "{{ intel_extract_dir }}/" @@ -23,7 +23,7 @@ - intel-inst - name: Inst - iavf Network Adapter Driver - command: "{{ item }}" + ansible.builtin.command: "{{ item }}" args: chdir: "{{ intel_extract_dir }}/iavf-{{ iavf }}/src" become: true diff --git a/fdio.infra.ansible/roles/intel/tasks/ice.yaml b/fdio.infra.ansible/roles/intel/tasks/ice.yaml index 2386c8390c..1c1c199f69 100644 --- a/fdio.infra.ansible/roles/intel/tasks/ice.yaml +++ b/fdio.infra.ansible/roles/intel/tasks/ice.yaml @@ -2,7 +2,7 @@ # file: roles/intel/tasks/ice.yaml - name: Inst - Get ice Network Adapter Driver - uri: + ansible.builtin.uri: url: "{{ intel_sourceforge_download_url }}/{{ intel_ice_url[ice] }}" follow_redirects: "all" force: true @@ -13,7 +13,7 @@ - intel-inst - name: Inst - Extract ice Network Adapter Driver - unarchive: + ansible.builtin.unarchive: remote_src: true src: "{{ intel_extract_dir }}/ice-{{ ice }}.tar.gz" dest: "{{ intel_extract_dir }}/" @@ -23,13 +23,13 @@ - intel-inst - name: Inst - ice Network Adapter Driver - command: "{{ item }}" + ansible.builtin.command: "{{ item }}" args: chdir: "{{ intel_extract_dir }}/ice-{{ ice }}/src" become: true with_items: - "make install" - - "modprobe -r ice" + #- "modprobe -r ice" - "modprobe ice" when: - intel_driver_extracted @@ -37,7 +37,7 @@ - intel-inst - name: Inst - Get Dynamic Device Personalization (DDP) Package - get_url: + ansible.builtin.get_url: url: "{{ intel_download_url }}/{{ intel_ddp_url[ddp] }}" dest: "{{ intel_extract_dir }}/800-Series-Comms-Binary-Package-{{ ddp }}.zip" mode: 0644 @@ -45,7 +45,7 @@ - intel-inst - name: Inst - Extract Dynamic Device Personalization (DDP) Package - unarchive: + ansible.builtin.unarchive: remote_src: true src: "{{ intel_extract_dir }}/800-Series-Comms-Binary-Package-{{ ddp }}.zip" dest: "{{ intel_extract_dir }}/" @@ -54,17 +54,17 @@ tags: - intel-inst -#- name: Inst - Extract Dynamic Device Personalization (DDP) Package -# unarchive: -# remote_src: true -# src: "{{ intel_extract_dir }}/ice_comms-{{ ddp }}.zip" -# dest: "{{ intel_extract_dir }}/" -# register: intel_driver_extracted -# tags: -# - intel-inst -# +- name: Inst - Extract Dynamic Device Personalization (DDP) Package + ansible.builtin.unarchive: + remote_src: true + src: "{{ intel_extract_dir }}/ice_comms-{{ ddp }}.zip" + dest: "{{ intel_extract_dir }}/" + register: intel_driver_extracted + tags: + - intel-inst + - name: Inst - Copy Dynamic Device Personalization (DDP) Package - copy: + ansible.builtin.copy: src: "{{ intel_extract_dir }}/ice_comms-{{ ddp }}.pkg" dest: "/lib/firmware/updates/intel/ice/ddp/ice-{{ ddp }}.pkg" remote_src: true @@ -73,7 +73,7 @@ - intel-inst - name: Inst - Link Dynamic Device Personalization (DDP) Package - file: + ansible.builtin.file: src: "ice-{{ ddp }}.pkg" dest: "/lib/firmware/updates/intel/ice/ddp/ice.pkg" state: link @@ -81,7 +81,7 @@ - intel-inst - name: Inst - Extract Dynamic Device Personalization (DDP) Package (cleanup) - file: + ansible.builtin.file: path: "{{ item }}" state: absent with_items: diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml index 62d8d90499..864811b218 100644 --- a/fdio.infra.ansible/roles/intel/tasks/main.yaml +++ b/fdio.infra.ansible/roles/intel/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/intel/tasks/main.yaml - name: Inst - Update Package Cache (APT) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,14 +11,14 @@ - intel-inst-drivers - name: Inst - Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: - intel-inst-drivers - name: Inst - Check Presence of Intel Ethernet 700 Series - shell: "lspci -d 8086:1583; lspci -d 8086:1585; lspci -d 8086:1572; lspci -d 8086:158a; lspci -d 8086:158b" + ansible.builtin.shell: "lspci -d 8086:1583; lspci -d 8086:1585; lspci -d 8086:1572; lspci -d 8086:158a; lspci -d 8086:158b" register: intel_700_pcis failed_when: false changed_when: false @@ -26,7 +26,7 @@ - intel-inst-drivers - name: Inst - Check Presence of Intel Ethernet 800 Series - shell: "lspci -d 8086:1592; lspci -d 8086:1891" + ansible.builtin.shell: "lspci -d 8086:1592; lspci -d 8086:1891" register: intel_800_pcis failed_when: false changed_when: false @@ -34,7 +34,7 @@ - intel-inst-drivers - name: Inst - Get Intel Ethernet 700 Series driver versions - set_fact: + ansible.builtin.set_fact: i40e: "{{ intel_700_compatibility_matrix[intel_700_matrix]['i40e'] }}" iavf: "{{ intel_700_compatibility_matrix[intel_700_matrix]['iavf'] }}" nvm: "{{ intel_700_compatibility_matrix[intel_700_matrix]['nvm'] }}" @@ -44,7 +44,7 @@ - intel-inst-drivers - name: Inst - Get Intel Ethernet 800 Series driver versions - set_fact: + ansible.builtin.set_fact: ice: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ice'] }}" ddp: "{{ intel_800_compatibility_matrix[intel_800_matrix]['ddp'] }}" iavf: "{{ intel_800_compatibility_matrix[intel_800_matrix]['iavf'] }}" diff --git a/fdio.infra.ansible/roles/iperf/tasks/main.yaml b/fdio.infra.ansible/roles/iperf/tasks/main.yaml index a2b7709cef..6184ba25f1 100644 --- a/fdio.infra.ansible/roles/iperf/tasks/main.yaml +++ b/fdio.infra.ansible/roles/iperf/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/iperf/tasks/main.yaml - name: Inst - Update Package Cache (APT) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,14 +11,14 @@ - iperf-inst-prerequisites - name: Inst - Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: - iperf-inst-prerequisites - name: Get Release Archive - get_url: + ansible.builtin.get_url: url: "https://downloads.es.net/pub/iperf/iperf-{{ item }}.tar.gz" dest: "{{ iperf_target_dir }}/iperf-{{ item }}.tar.gz" validate_certs: false @@ -28,7 +28,7 @@ - iperf-inst - name: Extract Release Archive - unarchive: + ansible.builtin.unarchive: remote_src: true src: "{{ iperf_target_dir }}/iperf-{{ item }}.tar.gz" dest: "{{ iperf_target_dir }}/" @@ -38,7 +38,7 @@ - iperf-inst - name: Compile Release I - command: "./configure" + ansible.builtin.command: "./configure" args: chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/" loop: "{{ iperf_version }}" @@ -46,7 +46,7 @@ - iperf-inst - name: Compile Release II - command: "make" + ansible.builtin.command: "make" args: chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/" loop: "{{ iperf_version }}" @@ -54,7 +54,7 @@ - iperf-inst - name: Compile Release III - command: "make install" + ansible.builtin.command: "make install" args: chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/" loop: "{{ iperf_version }}" diff --git a/fdio.infra.ansible/roles/kernel/defaults/main.yaml b/fdio.infra.ansible/roles/kernel/defaults/main.yaml index 60fa91e970..ef628c93f5 100644 --- a/fdio.infra.ansible/roles/kernel/defaults/main.yaml +++ b/fdio.infra.ansible/roles/kernel/defaults/main.yaml @@ -6,21 +6,13 @@ kernel_version: "{{ kernel_version_by_distro[ansible_distribution|lower][ansible kernel_version_by_distro: ubuntu: - focal: - - "5.4.0-65" jammy: - - "4.15.0-72" + - "5.15.0-46" kernel_packages: "{{ kernel_packages_by_distro[ansible_distribution|lower][ansible_distribution_release] | flatten(levels=1) }}" kernel_packages_by_distro: ubuntu: - focal: - - "linux-image" - - "linux-headers" - - "linux-modules" - - "linux-modules-extra" - - "linux-tools" jammy: - "linux-image" - "linux-headers" @@ -33,10 +25,6 @@ absent_packages: "{{ absent_packages_by_distro[ansible_distribution|lower][ansib absent_packages_by_distro: ubuntu: - focal: - - "amd64-microcode" - - "intel-microcode" - - "iucode-tool" jammy: - "amd64-microcode" - "intel-microcode" diff --git a/fdio.infra.ansible/roles/kernel/handlers/main.yaml b/fdio.infra.ansible/roles/kernel/handlers/main.yaml index 8e1239ab31..d0be276a5b 100644 --- a/fdio.infra.ansible/roles/kernel/handlers/main.yaml +++ b/fdio.infra.ansible/roles/kernel/handlers/main.yaml @@ -2,7 +2,7 @@ # file roles/kernel/handlers/main.yaml - name: Reboot Server - reboot: + ansible.builtin.reboot: reboot_timeout: 3600 tags: - reboot-server diff --git a/fdio.infra.ansible/roles/kernel/tasks/ubuntu_focal.yaml b/fdio.infra.ansible/roles/kernel/tasks/ubuntu_focal.yaml deleted file mode 100644 index 3e2686d565..0000000000 --- a/fdio.infra.ansible/roles/kernel/tasks/ubuntu_focal.yaml +++ /dev/null @@ -1,62 +0,0 @@ ---- -# file: roles/kernel/tasks/ubuntu_focal.yaml - -- name: Get Available Kernel Versions - command: "apt-cache showpkg linux-headers-*" - changed_when: false - register: apt_kernel_list - tags: - - kernel-inst - -- name: Get installed packages with APT - command: "dpkg -l" - changed_when: false - register: apt_packages_list - tags: - - kernel-inst - -- name: Set target APT kernel version - set_fact: - _kernel: "{{ apt_kernel_list | deb_kernel( - kernel_version, ansible_kernel) }}" - tags: - - kernel-inst - -- name: Disable APT auto upgrade - lineinfile: - path: "/etc/apt/apt.conf.d/20auto-upgrades" - state: "present" - regexp: "APT::Periodic::Unattended-Upgrade \"[0-9]\";" - line: "APT::Periodic::Unattended-Upgrade \"0\";" - create: true - mode: 0644 - tags: - - kernel-inst - -- name: Ensure Packages Versions - apt: - name: "{{ apt_kernel_list | deb_kernel_pkg( - kernel_version, ansible_kernel, ansible_distribution, - ansible_architecture, item) }}" - loop: "{{ kernel_packages }}" - tags: - - kernel-inst - -- name: Ensure Any Other Kernel Packages Are Removed - apt: - name: "{{ apt_packages_list | deb_installed_kernel( - apt_kernel_list, kernel_version, ansible_kernel) }}" - state: absent - purge: true - notify: - - "Reboot Server" - tags: - - kernel-inst - -- name: Ensure Any Microcode Is Absent - apt: - name: "{{ absent_packages }}" - state: absent - purge: true - tags: - - kernel-inst diff --git a/fdio.infra.ansible/roles/kernel/tasks/ubuntu_jammy.yaml b/fdio.infra.ansible/roles/kernel/tasks/ubuntu_jammy.yaml index 15ce221e66..af987d4e5a 100644 --- a/fdio.infra.ansible/roles/kernel/tasks/ubuntu_jammy.yaml +++ b/fdio.infra.ansible/roles/kernel/tasks/ubuntu_jammy.yaml @@ -2,28 +2,28 @@ # file: roles/kernel/tasks/ubuntu_jammy.yaml - name: Get Available Kernel Versions - command: "apt-cache showpkg linux-headers-*" + ansible.builtin.command: "apt-cache showpkg linux-headers-*" changed_when: false register: apt_kernel_list tags: - kernel-inst - name: Get installed packages with APT - command: "dpkg -l" + ansible.builtin.command: "dpkg -l" changed_when: false register: apt_packages_list tags: - kernel-inst - name: Set target APT kernel version - set_fact: + ansible.builtin.set_fact: _kernel: "{{ apt_kernel_list | deb_kernel( kernel_version, ansible_kernel) }}" tags: - kernel-inst - name: Disable APT auto upgrade - lineinfile: + ansible.builtin.lineinfile: path: "/etc/apt/apt.conf.d/20auto-upgrades" state: "present" regexp: "APT::Periodic::Unattended-Upgrade \"[0-9]\";" @@ -34,7 +34,7 @@ - kernel-inst - name: Ensure Packages Versions - apt: + ansible.builtin.apt: name: "{{ apt_kernel_list | deb_kernel_pkg( kernel_version, ansible_kernel, ansible_distribution, ansible_architecture, item) }}" @@ -43,10 +43,10 @@ - kernel-inst - name: Ensure Any Other Kernel Packages Are Removed - apt: + ansible.builtin.apt: name: "{{ apt_packages_list | deb_installed_kernel( apt_kernel_list, kernel_version, ansible_kernel) }}" - state: absent + state: "absent" purge: true notify: - "Reboot Server" @@ -54,9 +54,9 @@ - kernel-inst - name: Ensure Any Microcode Is Absent - apt: + ansible.builtin.apt: name: "{{ absent_packages }}" - state: absent + state: "absent" purge: true tags: - kernel-inst diff --git a/fdio.infra.ansible/roles/kernel_vm/tasks/main.yaml b/fdio.infra.ansible/roles/kernel_vm/tasks/main.yaml index 78bb822f80..cd8eb15c57 100644 --- a/fdio.infra.ansible/roles/kernel_vm/tasks/main.yaml +++ b/fdio.infra.ansible/roles/kernel_vm/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/kernel_vm/tasks/main.yaml - name: Inst - Backup remote initramfs modules - copy: + ansible.builtin.copy: src: "/etc/initramfs-tools/modules" dest: "/tmp/initramfs_modules.bkp" remote_src: true @@ -12,7 +12,7 @@ - kernel-inst-image - name: Inst - Backup remote initramfs resume config - copy: + ansible.builtin.copy: src: "/etc/initramfs-tools/conf.d/resume" dest: "/tmp/initramfs-resume.bkp" remote_src: true @@ -22,33 +22,33 @@ - kernel-inst-image - name: Inst - Update remote initramfs modules - copy: + ansible.builtin.copy: src: "../files/initramfs_modules" dest: "/etc/initramfs-tools/modules" tags: - kernel-inst-image - name: Inst - Update remote initramfs resume config - copy: + ansible.builtin.copy: src: "../files/initramfs_resume" dest: "/etc/initramfs-tools/conf.d/resume" tags: - kernel-inst-image - name: Inst - Create target kernel dir - file: + ansible.builtin.file: path: "/opt/boot" state: "directory" tags: - kernel-inst-image - name: Inst - Build initrd image - shell: "update-initramfs -k {{ ansible_kernel }} -c -b /opt/boot" + ansible.builtin.shell: "update-initramfs -k {{ ansible_kernel }} -c -b /opt/boot" tags: - kernel-inst-image - name: Inst - Copy corresponding kernel img - copy: + ansible.builtin.copy: src: "/boot/vmlinuz-{{ ansible_kernel }}" dest: "/opt/boot/vmlinuz-{{ ansible_kernel }}" remote_src: true @@ -56,7 +56,7 @@ - kernel-inst-image - name: Inst - Restore remote initramfs modules - copy: + ansible.builtin.copy: src: "/tmp/initramfs_modules.bkp" dest: "/etc/initramfs-tools/modules" remote_src: true @@ -66,7 +66,7 @@ - kernel-inst-image - name: Inst - Remove remote backup initramfs modules - file: + ansible.builtin.file: path: "/tmp/initramfs_modules.bkp" state: "absent" when: __initramfs_modules_backuped @@ -74,7 +74,7 @@ - kernel-inst-image - name: Inst - Restore remote initramfs resume config - copy: + ansible.builtin.copy: src: "/tmp/initramfs-resume.bkp" dest: "/etc/initramfs-tools/conf.d/resume" remote_src: true @@ -84,7 +84,7 @@ - kernel-inst-image - name: Inst - Remove remote backup initramfs resume config - file: + ansible.builtin.file: path: "/tmp/initramfs-resume.bkp" state: "absent" when: __initramfs_resume_backuped diff --git a/fdio.infra.ansible/roles/kubernetes/defaults/main.yaml b/fdio.infra.ansible/roles/kubernetes/defaults/main.yaml deleted file mode 100644 index 1a2f773950..0000000000 --- a/fdio.infra.ansible/roles/kubernetes/defaults/main.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# file: roles/kubernetes/defaults/main.yaml - -# Version options. -kubernetes_version: "1.11.0-00" -kubernetes_apt_package_state: present - -# Service options. -kubernetes_service_state: started -kubernetes_service_enabled: true -kubernetes_restart_handler_state: restarted - -# APT options. -kubernetes_apt_repository: "deb http://apt.kubernetes.io/ kubernetes-xenial main" -kubernetes_apt_repository_state: present diff --git a/fdio.infra.ansible/roles/kubernetes/tasks/main.yaml b/fdio.infra.ansible/roles/kubernetes/tasks/main.yaml deleted file mode 100644 index 160ffb8c06..0000000000 --- a/fdio.infra.ansible/roles/kubernetes/tasks/main.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# file: roles/kubernetes/tasks/main.yaml - -- name: Kubernetes - Install distribution - release - machine prerequisites - include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' - tags: install-kubernetes - -- name: Kubernetes - Apply kubelet parameter - lineinfile: - path: '/etc/default/kubelet' - state: 'present' - regexp: '^KUBELET_EXTRA_ARGS=*' - line: 'KUBELET_EXTRA_ARGS=--feature-gates HugePages=false' - tags: install-kubernetes diff --git a/fdio.infra.ansible/roles/kubernetes/tasks/ubuntu_jammy.yaml b/fdio.infra.ansible/roles/kubernetes/tasks/ubuntu_jammy.yaml deleted file mode 100644 index 5e155257ce..0000000000 --- a/fdio.infra.ansible/roles/kubernetes/tasks/ubuntu_jammy.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# file: roles/kubernetes/tasks/ubuntu_jammy.yaml - -- name: Kubernetes repository - Dependencies - apt: - name: - - 'apt-transport-https' - - 'ca-certificates' - - 'software-properties-common' - state: 'present' - cache_valid_time: 3600 - install_recommends: false - tags: install-kubernetes - -- name: Kubernetes repository - Add an Apt signing key - apt_key: - url: 'https://packages.cloud.google.com/apt/doc/apt-key.gpg' - state: 'present' - tags: install-kubernetes - -- name: Kubernetes repository - Install APT repository - apt_repository: - repo: '{{ kubernetes_apt_repository }}' - state: '{{ kubernetes_apt_repository_state }}' - update_cache: true - tags: install-kubernetes - -- name: Kubernetes - Install - apt: - name: - - 'kubernetes-cni=0.6.0-00' - - 'kubeadm={{ kubernetes_version }}' - - 'kubectl={{ kubernetes_version }}' - - 'kubelet={{ kubernetes_version }}' - state: '{{ kubernetes_apt_package_state }}' - force: true - tags: install-kubernetes diff --git a/fdio.infra.ansible/roles/mellanox/defaults/main.yaml b/fdio.infra.ansible/roles/mellanox/defaults/main.yaml index a12a613f74..b071f030ae 100644 --- a/fdio.infra.ansible/roles/mellanox/defaults/main.yaml +++ b/fdio.infra.ansible/roles/mellanox/defaults/main.yaml @@ -25,6 +25,6 @@ mellanox_cx5_compatibility_matrix: dpdk21.02: # https://doc.dpdk.org/guides/rel_notes/release_21_02.html ofed: "5.3-1.0.5.0" - dpdk22.03: - # https://doc.dpdk.org/guides/rel_notes/release_22_03.html - ofed: "5.5-1.0.3.2" + dpdk22.07: + # https://doc.dpdk.org/guides/rel_notes/release_22_07.html + ofed: "5.6-1.0.3.3" diff --git a/fdio.infra.ansible/roles/mellanox/tasks/main.yaml b/fdio.infra.ansible/roles/mellanox/tasks/main.yaml index 81fefc8ae3..7f47981378 100644 --- a/fdio.infra.ansible/roles/mellanox/tasks/main.yaml +++ b/fdio.infra.ansible/roles/mellanox/tasks/main.yaml @@ -13,7 +13,7 @@ - name: Inst - Prerequisites package: name: "{{ packages | flatten(levels=1) }}" - state: latest + state: "latest" tags: - mellanox-inst-drivers diff --git a/fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml b/fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml index 2ad40b0afb..732397d269 100644 --- a/fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml +++ b/fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml @@ -2,7 +2,7 @@ # file: roles/mellanox/tasks/ofed.yaml - name: Inst - Get OFED - get_url: + ansible.builtin.get_url: url: "{{ mellanox_download_url }}/MLNX_OFED-{{ ofed }}/MLNX_OFED_LINUX-{{ ofed }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz" dest: "{{ mellanox_extract_dir }}/MLNX_OFED_LINUX-{{ ofed }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz" mode: "0644" @@ -11,7 +11,7 @@ - mellanox-inst-drivers - name: Inst - Extract OFED - unarchive: + ansible.builtin.unarchive: remote_src: true src: "{{ mellanox_extract_dir }}/MLNX_OFED_LINUX-{{ ofed }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz" dest: "{{ mellanox_extract_dir }}/" @@ -21,7 +21,7 @@ - mellanox-inst-drivers - name: Inst - OFED - command: "./mlnxofedinstall --with-mft --dpdk --force --upstream-libs --without-fw-update" + ansible.builtin.command: "./mlnxofedinstall --with-mft --dpdk --force --upstream-libs --without-fw-update" args: chdir: "{{ mellanox_extract_dir }}/MLNX_OFED_LINUX-{{ ofed }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}" when: mellanox_firmware_extracted @@ -29,14 +29,14 @@ - mellanox-inst-drivers - name: Inst - Switch Infiniband to Ethernet - command: "mlxconfig --yes --dev {{ item }} set LINK_TYPE_P1=2 LINK_TYPE_P2=2" + ansible.builtin.command: "mlxconfig --yes --dev {{ item }} set LINK_TYPE_P1=2 LINK_TYPE_P2=2" with_items: "{{ mellanox_pcis.stdout_lines }}" tags: - mellanox-inst-drivers - name: FIX qemu-system removal - package: + ansible.builtin.package: name: "qemu-system" - state: latest + state: "latest" tags: - mellanox-inst-drivers diff --git a/fdio.infra.ansible/roles/performance_tuning/handlers/main.yaml b/fdio.infra.ansible/roles/performance_tuning/handlers/main.yaml index fa2876b7ac..d2f8f5cb95 100644 --- a/fdio.infra.ansible/roles/performance_tuning/handlers/main.yaml +++ b/fdio.infra.ansible/roles/performance_tuning/handlers/main.yaml @@ -2,12 +2,12 @@ # file roles/performance_tuning/handlers/main.yaml - name: Update GRUB - command: update-grub + ansible.builtin.command: update-grub tags: - update-grub - name: Reboot server - reboot: + ansible.builtin.reboot: reboot_timeout: 3600 tags: - reboot-server diff --git a/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml b/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml index e3e22d03ac..256cd27eaf 100644 --- a/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml +++ b/fdio.infra.ansible/roles/performance_tuning/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/performance_tuning/tasks/main.yaml - name: Inst - Update Package Cache (APT) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,7 +11,7 @@ - perf-inst-prerequisites - name: Inst - Machine Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: @@ -36,7 +36,7 @@ # programs, particularly malloc debuggers, may consume lots of them, # e.g., up to one or two maps per allocation. # must be greater than or equal to (2 * vm.nr_hugepages). - sysctl: + ansible.builtin.sysctl: name: "vm.max_map_count" value: "{{ sysctl.vm.nr_hugepages * 4 }}" state: "present" @@ -48,7 +48,7 @@ - name: Conf - Adjust hugetlb_shm_group # hugetlb_shm_group contains group id that is allowed to create sysv # shared memory segment using hugetlb page. - sysctl: + ansible.builtin.sysctl: name: "vm.hugetlb_shm_group" value: "1000" state: "present" @@ -63,7 +63,7 @@ # decrease the amount of swap. a value of 0 instructs the kernel not to # initiate swap until the amount of free and file-backed pages is less # than the high water mark in a zone. - sysctl: + ansible.builtin.sysctl: name: "vm.swappiness" value: "0" state: "present" @@ -78,7 +78,7 @@ # if the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax) # is greater than the calculated totalhugepagesize then set this parameter # to current shmmax value. - sysctl: + ansible.builtin.sysctl: name: "kernel.shmmax" value: "{{ sysctl.vm.nr_hugepages * 2 * 1024 * 1024 }}" state: "present" @@ -98,7 +98,7 @@ # typically this value would only be touched in the nohz_full case # to re-enable cores that by default were not running the watchdog, # if a kernel lockup was suspected on those cores. - sysctl: + ansible.builtin.sysctl: name: "kernel.watchdog_cpumask" value: "{{ sysctl.kernel.watchdog_cpumask }}" state: "present" @@ -114,7 +114,7 @@ # 0 - turn the process address space randomization off. this is the # default for architectures that do not support this feature anyways, # and kernels that are booted with the "norandmaps" parameter. - sysctl: + ansible.builtin.sysctl: name: "kernel.randomize_va_space" value: "0" state: "present" @@ -124,7 +124,7 @@ - perf-conf-sysctl - name: Conf - Cpufrequtils - copy: + ansible.builtin.copy: src: "files/cpufrequtils" dest: "/etc/default/cpufrequtils" owner: "root" @@ -134,7 +134,7 @@ - perf-conf-cpufrequtils - name: Conf - Irqbalance - template: + ansible.builtin.template: src: "files/irqbalance" dest: "/etc/default/irqbalance" owner: "root" @@ -143,15 +143,8 @@ tags: - perf-conf-irqbalance -- name: Conf - Set Ondemand Service To Disable - service: - name: "ondemand" - enabled: "no" - tags: - - perf-conf-ondemand - - name: Conf - Kernel Parameters - lineinfile: + ansible.builtin.lineinfile: path: "/etc/default/grub" state: "present" regexp: "^GRUB_CMDLINE_LINUX=" @@ -164,7 +157,7 @@ - meta: flush_handlers - name: Conf - Load Kernel Modules By Default - lineinfile: + ansible.builtin.lineinfile: path: "/etc/modules" state: "present" line: "{{ item }}" @@ -176,7 +169,7 @@ - perf-conf-load-kernel-modules - name: Conf - Create a directory for 1G HugeTLBs hugepages - file: + ansible.builtin.file: path: "/dev/hugepages1G" state: "directory" mode: 0755 @@ -184,7 +177,7 @@ - perf-conf-hugepages-1g - name: Conf - Mount 1G HugeTLBs hugepages - mount: + ansible.builtin.mount: path: "/dev/hugepages1G" src: "hugetlbfs" opts: "pagesize=1G" @@ -195,7 +188,7 @@ - perf-conf-hugepages-1g - name: Create a directory if it does not exist - file: + ansible.builtin.file: path: "/dev/hugepages2M" state: "directory" mode: 0755 @@ -203,7 +196,7 @@ - perf-conf-hugepages-2m - name: Conf - Create a directory for 2M HugeTLBs hugepages - mount: + ansible.builtin.mount: path: "/dev/hugepages2M" src: "hugetlbfs" opts: "pagesize=2M" diff --git a/fdio.infra.ansible/roles/python_env/defaults/main.yaml b/fdio.infra.ansible/roles/python_env/defaults/main.yaml index 89e85d64fc..294cf3ec32 100644 --- a/fdio.infra.ansible/roles/python_env/defaults/main.yaml +++ b/fdio.infra.ansible/roles/python_env/defaults/main.yaml @@ -1,5 +1,5 @@ --- -# file: roles/common/defaults/main.yaml +# file: roles/python_env/defaults/main.yaml packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}" @@ -8,15 +8,6 @@ packages_base: packages_by_distro: ubuntu: - focal: - - "python3-all" - - "python3-apt" - - "python3-cffi" - - "python3-cffi-backend" - - "python3-dev" - - "python3-pip" - - "python3-pyelftools" - - "python3-setuptools" jammy: - "python3-all" - "python3-apt" diff --git a/fdio.infra.ansible/roles/python_env/tasks/main.yaml b/fdio.infra.ansible/roles/python_env/tasks/main.yaml index 4e4cfb447c..96b49cda9b 100644 --- a/fdio.infra.ansible/roles/python_env/tasks/main.yaml +++ b/fdio.infra.ansible/roles/python_env/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/python_env/tasks/main.yaml - name: Inst - Update package cache (apt) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,75 +11,79 @@ - common-inst-prerequisites - name: Inst - Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: - common-inst-prerequisites - name: Inst - CSIT PIP requirements - pip: + ansible.builtin.pip: name: - - "ecdsa==0.13.3" - - "paramiko==2.6.0" + - "ecdsa==0.18.0" + - "paramiko==2.9.3" - "pycrypto==2.6.1" - - "pypcap==1.2.3" - - "PyYAML==5.1.1" + - "PyYAML==5.4.1" - "requests==2.25.1" - - "robotframework==3.1.2" - - "scapy==2.4.3" - - "scp==0.13.2" - - "ansible==2.10.7" - - "dill==0.3.3" - - "numpy==1.17.3" + - "robotframework==5.0.1" + - "scapy==2.4.5" + - "scp==0.14.4" + - "ansible==5.10.0" + - "ansible-core==2.12.7" + - "dill==0.3.5.1" + - "numpy==1.22.4" + - "scipy==1.8.1" + - "boto3==1.17.78" + - "botocore==1.20.78" - "hdrhistogram==0.6.1" + - "pandas==1.4.2" - "plotly==4.1.1" - "PTable==0.9.2" - "Sphinx==3.5.4" - "sphinx-rtd-theme==0.5.2" + - "sphinxcontrib-applehelp==1.0.2" + - "sphinxcontrib-devhelp==1.0.2" + - "sphinxcontrib-htmlhelp==2.0.0" + - "sphinxcontrib-jsmath==1.0.1" - "sphinxcontrib-programoutput==0.17" + - "sphinxcontrib-qthelp==1.0.3" - "sphinxcontrib-robotdoc==0.11.0" + - "sphinxcontrib-serializinghtml==1.1.5" + - "ply==3.11" + - "jsonschema==4.1.0" + - "rfc3339-validator==0.1.4" + - "rfc3987==1.3.8" - "alabaster==0.7.12" - - "Babel==2.9.0" - - "bcrypt==3.1.7" - - "certifi==2020.12.5" - - "cffi==1.13.2" + - "attrs==21.4.0" + - "Babel==2.10.3" + - "bcrypt==3.2.2" + - "certifi==2022.6.15" + - "cffi==1.15.1" - "chardet==4.0.0" - - "cryptography==2.8" + - "cryptography==36.0.2" - "docutils==0.16" - "future==0.18.2" - "idna==2.10" - - "imagesize==1.2.0" - - "Jinja2==2.11.3" - - "MarkupSafe==1.1.1" - - "packaging==20.9" - - "pbr==5.5.1" - - "ply==3.11" - - "pycparser==2.19" - - "Pygments==2.8.1" - - "PyNaCl==1.3.0" - - "pyparsing==2.4.7" + - "imagesize==1.4.1" + - "Jinja2==3.0.3" + - "jmespath==0.10.0" + - "MarkupSafe==2.1.1" + - "packaging==21.3" + - "pbr==5.9.0" + - "pycparser==2.21" + - "Pygments==2.12.0" + - "PyNaCl==1.5.0" + - "pyparsing==3.0.9" + - "pyrsistent==0.18.1" - "python-dateutil==2.8.2" - - "pytz==2021.1" + - "pytz==2022.1" + - "resolvelib==0.5.4" - "retrying==1.3.3" - - "six==1.15.0" - - "snowballstemmer==2.1.0" - - "sphinxcontrib-applehelp==1.0.2" - - "sphinxcontrib-devhelp==1.0.2" - - "sphinxcontrib-htmlhelp==1.0.3" - - "sphinxcontrib-jsmath==1.0.1" - - "sphinxcontrib-qthelp==1.0.3" - - "sphinxcontrib-serializinghtml==1.1.4" - - "urllib3==1.25.6" + - "s3transfer==0.4.2" + - "six==1.16.0" + - "snowballstemmer==2.2.0" + - "urllib3==1.26.10" environment: ANSIBLE_SKIP_CONFLICT_CHECK: 1 tags: - common-inst-pip - -- name: Inst - CSIT PIP requirements - Pandas and SciPy workaround - pip: - name: - - "pandas==0.25.3" - - "scipy==1.5.4" - tags: - - common-inst-pip diff --git a/fdio.infra.ansible/roles/tg/handlers/main.yaml b/fdio.infra.ansible/roles/tg/handlers/main.yaml index b2c32a7078..7edd60dc5b 100644 --- a/fdio.infra.ansible/roles/tg/handlers/main.yaml +++ b/fdio.infra.ansible/roles/tg/handlers/main.yaml @@ -2,7 +2,7 @@ # file: roles/tg/handlers/main.yaml - name: Start csit-initialize-docker-tg.service - systemd: + ansible.builtin.systemd: enabled: true state: "started" name: "csit-initialize-docker-tg.service" diff --git a/fdio.infra.ansible/roles/tg/tasks/main.yaml b/fdio.infra.ansible/roles/tg/tasks/main.yaml index 70ed384826..1893fb4a93 100644 --- a/fdio.infra.ansible/roles/tg/tasks/main.yaml +++ b/fdio.infra.ansible/roles/tg/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/tg/tasks/main.yaml - name: Conf - csit-initialize-docker-tg.sh - copy: + ansible.builtin.copy: src: "files/csit-initialize-docker-tg.sh" dest: "/usr/local/bin/csit-initialize-docker-tg.sh" owner: "root" @@ -14,7 +14,7 @@ - tg-conf-docker - name: Conf - Start csit-initialize-docker-tg.service - copy: + ansible.builtin.copy: src: "files/csit-initialize-docker-tg.service" dest: "/etc/systemd/system/" owner: "root" diff --git a/fdio.infra.ansible/roles/topology/tasks/main.yaml b/fdio.infra.ansible/roles/topology/tasks/main.yaml index 4f94060cad..e5b4bb14a4 100644 --- a/fdio.infra.ansible/roles/topology/tasks/main.yaml +++ b/fdio.infra.ansible/roles/topology/tasks/main.yaml @@ -2,21 +2,21 @@ # file: roles/topology/tasks/main.yaml - name: Create Topology File - template: + ansible.builtin.template: src: "templates/topology-{{ cloud_topology }}.j2" dest: "../topologies/available/{{ cloud_topology }}-{{ testbed_name }}.yaml" tags: - create-topology-file - name: Create Inventory Folder - file: + ansible.builtin.file: path: "./inventories/cloud_inventory/" state: directory tags: - create-inventory-folder-cloud - name: Create Hosts File - template: + ansible.builtin.template: src: "templates/hosts.j2" dest: "./inventories/cloud_inventory/hosts" tags: diff --git a/fdio.infra.ansible/roles/trex/defaults/main.yaml b/fdio.infra.ansible/roles/trex/defaults/main.yaml index 180d635def..c09f5e5f85 100644 --- a/fdio.infra.ansible/roles/trex/defaults/main.yaml +++ b/fdio.infra.ansible/roles/trex/defaults/main.yaml @@ -8,19 +8,10 @@ packages_base: packages_by_distro: ubuntu: - focal: - - "build-essential" - - "libmnl-dev" - - "libnuma-dev" - - "libpcap-dev" - - "librdmacm-dev" - - "librdmacm1" - - "libssl-dev" - - "pciutils" - - "python3-pip" - - "zlib1g-dev" jammy: - "build-essential" + - "gcc-9" + - "g++-9" - "libmnl-dev" - "libnuma-dev" - "libpcap-dev" @@ -40,6 +31,4 @@ packages_by_arch: trex_target_dir: "/opt" trex_url: "https://github.com/cisco-system-traffic-generator/trex-core/archive/" trex_version: - # master // ubuntu 20.04 - - "2.88" - "2.97" diff --git a/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml b/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml index 9aeb1be023..946206ad55 100644 --- a/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml +++ b/fdio.infra.ansible/roles/trex/tasks/deploy_block.yaml @@ -2,7 +2,7 @@ # file: roles/trex/tasks/deploy_block.yaml - name: Get Release {{ item }} - get_url: + ansible.builtin.get_url: url: "{{ trex_url }}/v{{ item }}.tar.gz" dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz" validate_certs: false @@ -10,12 +10,12 @@ register: trex_downloaded - name: Create Directory {{ item }} - file: + ansible.builtin.file: path: "{{ trex_target_dir }}/trex-core-{{ item }}" state: "directory" - name: Extract Release {{ item }} - unarchive: + ansible.builtin.unarchive: remote_src: true src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz" dest: "{{ trex_target_dir }}/" @@ -23,33 +23,49 @@ register: trex_extracted - name: Patch Azure - patch: + ansible.builtin.patch: src: "files/t-rex.patch" basedir: "{{ trex_target_dir }}/trex-core-{{ item }}" strip: 1 when: - azure is defined and item == "2.73" +- name: Switch to gcc-9 + ansible.builtin.command: "update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9" + when: trex_extracted.changed + +- name: Switch to g++-9 + ansible.builtin.command: "update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9" + when: trex_extracted.changed + - name: Compile Release {{ item }} Part I - command: "./b configure" + ansible.builtin.command: "./b configure" args: chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/" when: trex_extracted.changed - name: Compile Release {{ item }} Part II - command: "./b build" + ansible.builtin.command: "./b build" args: chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/" when: trex_extracted.changed +- name: Switch to gcc-11 + ansible.builtin.command: "update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11" + when: trex_extracted.changed + +- name: Switch to g++-11 + ansible.builtin.command: "update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11" + when: trex_extracted.changed + - name: Compile Release {{ item }} Part III - command: "make -j 16" + ansible.builtin.command: "make -j 16" args: chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src" when: trex_extracted.changed - name: Compile Release {{ item }} Part IV - command: "make install" + ansible.builtin.command: "make install" args: chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src" when: trex_extracted.changed diff --git a/fdio.infra.ansible/roles/trex/tasks/main.yaml b/fdio.infra.ansible/roles/trex/tasks/main.yaml index 8f659b697c..0196b0817b 100644 --- a/fdio.infra.ansible/roles/trex/tasks/main.yaml +++ b/fdio.infra.ansible/roles/trex/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/trex/tasks/main.yaml - name: Inst - Update Package Cache (APT) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,7 +11,7 @@ - trex-inst-prerequisites - name: Inst - Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: diff --git a/fdio.infra.ansible/roles/vpp/defaults/main.yaml b/fdio.infra.ansible/roles/vpp/defaults/main.yaml index 55051b8c8f..00c56859d0 100644 --- a/fdio.infra.ansible/roles/vpp/defaults/main.yaml +++ b/fdio.infra.ansible/roles/vpp/defaults/main.yaml @@ -12,20 +12,12 @@ packages_base: packages_by_distro: ubuntu: - focal: - - "build-essential" - - "libglib2.0-dev" - - "libmbedcrypto3" - - "libmbedtls12" - - "libmbedx509-0" - - "libnuma-dev" - - "libpixman-1-dev" jammy: - "build-essential" - "libglib2.0-dev" - - "libmbedcrypto1" - - "libmbedtls10" - - "libmbedx509-0" + - "libmbedcrypto7" + - "libmbedtls14" + - "libmbedx509-1" - "libnuma-dev" - "libpixman-1-dev" diff --git a/fdio.infra.ansible/roles/vpp/tasks/main.yaml b/fdio.infra.ansible/roles/vpp/tasks/main.yaml index 320584c432..cea06b764d 100644 --- a/fdio.infra.ansible/roles/vpp/tasks/main.yaml +++ b/fdio.infra.ansible/roles/vpp/tasks/main.yaml @@ -2,7 +2,7 @@ # file: roles/vpp/tasks/main.yaml - name: Inst - Update Package Cache (APT) - apt: + ansible.builtin.apt: update_cache: true cache_valid_time: 3600 when: @@ -11,14 +11,14 @@ - vpp-inst-prerequisites - name: Inst - Prerequisites - package: + ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: latest tags: - vpp-inst-prerequisites - name: Conf - sysctl - file: + ansible.builtin.file: src: "/dev/null" dest: "/etc/sysctl.d/80-vpp.conf" state: "link" -- cgit 1.2.3-korg