aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2022-05-10 10:57:43 +0200
committerPeter Mikus <pmikus@cisco.com>2022-05-10 10:09:11 +0000
commit9e5fff4c2f51f77f9bb44f09914e428a8e377597 (patch)
treedd7729a761572cb9925837aa547cc1be30982e92 /fdio.infra.ansible
parent89b26f0793d19434731e2d97f02939494369c739 (diff)
feat(infra): Mellanox compatibility Matrix
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Iec87340aed64dd72e5289bd13af27c177f92c466
Diffstat (limited to 'fdio.infra.ansible')
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.18.yaml1
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.19.yaml1
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.20.yaml1
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.21.yaml1
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.22.yaml1
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.23.yaml1
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.24.yaml1
-rw-r--r--fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.25.yaml1
-rw-r--r--fdio.infra.ansible/roles/intel/tasks/main.yaml4
-rw-r--r--fdio.infra.ansible/roles/mellanox/defaults/main.yaml11
-rw-r--r--fdio.infra.ansible/roles/mellanox/tasks/main.yaml57
-rw-r--r--fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml42
12 files changed, 78 insertions, 44 deletions
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.18.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.18.yaml
index 80d4733527..18ba2bfbfb 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.18.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.18.yaml
@@ -31,3 +31,4 @@ cpu_microarchitecture: "cascadelake"
intel_700_matrix: "dpdk22.03"
intel_800_matrix: "dpdk22.03"
+mellanox_cx5_matrix: "dpdk22.03"
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.19.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.19.yaml
index 5899df7d97..5ff676eb21 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.19.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.19.yaml
@@ -31,3 +31,4 @@ cpu_microarchitecture: "cascadelake"
intel_700_matrix: "dpdk21.02"
intel_800_matrix: "dpdk21.02"
+mellanox_cx5_matrix: "dpdk21.02"
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.20.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.20.yaml
index a7d6d4c02c..947242ed92 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.20.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.20.yaml
@@ -31,3 +31,4 @@ cpu_microarchitecture: "cascadelake"
intel_700_matrix: "dpdk22.03"
intel_800_matrix: "dpdk22.03"
+mellanox_cx5_matrix: "dpdk22.03"
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.21.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.21.yaml
index 907cc94be1..c4b626897e 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.21.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.21.yaml
@@ -31,3 +31,4 @@ cpu_microarchitecture: "cascadelake"
intel_700_matrix: "dpdk21.02"
intel_800_matrix: "dpdk21.02"
+mellanox_cx5_matrix: "dpdk21.02"
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.22.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.22.yaml
index a87d3a5834..5c51159813 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.22.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.22.yaml
@@ -31,3 +31,4 @@ cpu_microarchitecture: "cascadelake"
intel_700_matrix: "dpdk22.03"
intel_800_matrix: "dpdk22.03"
+mellanox_cx5_matrix: "dpdk22.03"
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.23.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.23.yaml
index 64ced29bf4..cfa84c784e 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.23.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.23.yaml
@@ -31,3 +31,4 @@ cpu_microarchitecture: "cascadelake"
intel_700_matrix: "dpdk21.02"
intel_800_matrix: "dpdk21.02"
+mellanox_cx5_matrix: "dpdk21.02"
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.24.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.24.yaml
index c976b1e6c0..c0046ec862 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.24.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.24.yaml
@@ -28,3 +28,4 @@ cpu_microarchitecture: "epyc"
intel_700_matrix: "dpdk22.03"
intel_800_matrix: "dpdk22.03"
+mellanox_cx5_matrix: "dpdk22.03"
diff --git a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.25.yaml b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.25.yaml
index 5424a7fa1b..639e37bb20 100644
--- a/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.25.yaml
+++ b/fdio.infra.ansible/inventories/lf_inventory/host_vars/10.32.8.25.yaml
@@ -28,3 +28,4 @@ cpu_microarchitecture: "epyc"
intel_700_matrix: "dpdk21.02"
intel_800_matrix: "dpdk21.02"
+mellanox_cx5_matrix: "dpdk21.02"
diff --git a/fdio.infra.ansible/roles/intel/tasks/main.yaml b/fdio.infra.ansible/roles/intel/tasks/main.yaml
index b70daf0315..c37a373db6 100644
--- a/fdio.infra.ansible/roles/intel/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/intel/tasks/main.yaml
@@ -1,5 +1,5 @@
---
-# file: roles/performance_tuning/tasks/main.yaml
+# file: roles/intel/tasks/main.yaml
- name: Inst - Update Package Cache (APT)
apt:
@@ -10,7 +10,7 @@
tags:
- intel-inst-drivers
-- name: Inst - Machine Prerequisites
+- name: Inst - Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
diff --git a/fdio.infra.ansible/roles/mellanox/defaults/main.yaml b/fdio.infra.ansible/roles/mellanox/defaults/main.yaml
index 0caaae1e1a..a12a613f74 100644
--- a/fdio.infra.ansible/roles/mellanox/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/mellanox/defaults/main.yaml
@@ -18,4 +18,13 @@ packages_by_arch:
x86_64:
- []
-mellanox_version: "5.2-1.0.4.0"
+mellanox_download_url: "http://content.mellanox.com/ofed"
+mellanox_extract_dir: "/opt"
+
+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"
diff --git a/fdio.infra.ansible/roles/mellanox/tasks/main.yaml b/fdio.infra.ansible/roles/mellanox/tasks/main.yaml
index 3cccdb7727..75964304ca 100644
--- a/fdio.infra.ansible/roles/mellanox/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/mellanox/tasks/main.yaml
@@ -8,60 +8,35 @@
when:
- ansible_distribution|lower == 'ubuntu'
tags:
- - mellanox-inst-prerequisites
+ - mellanox-inst-drivers
- name: Inst - Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
tags:
- - mellanox-inst-prerequisites
+ - mellanox-inst-drivers
-- name: Inst - Check Presence of Mellanox Hardware
+- name: Inst - Check Presence of Mellanox CX-5
shell: "lspci | grep Mellanox | awk '{print $1}'"
register: mellanox_pcis
failed_when: false
changed_when: false
tags:
- - mellanox-inst
+ - mellanox-inst-drivers
-- name: Inst - Get OFED
- get_url:
- url: "http://content.mellanox.com/ofed/MLNX_OFED-{{ mellanox_version }}/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
- dest: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
- mode: 0644
- when: mellanox_pcis.stdout_lines | length > 0
+- name: Inst - Get Mellanox CX-5 OFED driver versions
+ set_fact:
+ ofed: "{{ mellanox_cx5_compatibility_matrix[mellanox_cx5_matrix]['ofed'] }}"
+ when: >
+ mellanox_pcis is defined
tags:
- - mellanox-inst
+ - mellanox-inst-drivers
-- name: Inst - Extract OFED
- unarchive:
- remote_src: true
- src: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
- dest: "/opt/"
- creates: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
- register: mellanox_firmware_extracted
- when: mellanox_pcis.stdout_lines | length > 0
+- name: Inst - Driver Mellanox CX-5
+ import_tasks: ofed.yaml
+ when: >
+ mellanox_pcis.stdout_lines | length > 0 and
+ mellanox_cx5_matrix is defined
tags:
- - mellanox-inst
-
-- name: Inst - OFED
- command: "./mlnxofedinstall --with-mft --dpdk --force --upstream-libs"
- args:
- chdir: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
- when: mellanox_pcis.stdout_lines | length > 0 and mellanox_firmware_extracted
- tags:
- - mellanox-inst
-
-- name: Switch Infiniband to Ethernet
- command: "mlxconfig --yes --dev {{ item }} set LINK_TYPE_P1=2 LINK_TYPE_P2=2"
- with_items: "{{ mellanox_pcis.stdout_lines }}"
- tags:
- - mellanox-conf
-
-- name: FIX qemu-system removal
- package:
- name: "qemu-system"
- state: latest
- tags:
- - mellanox-inst
+ - mellanox-inst-drivers
diff --git a/fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml b/fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml
new file mode 100644
index 0000000000..ed7d483db9
--- /dev/null
+++ b/fdio.infra.ansible/roles/mellanox/tasks/ofed.yaml
@@ -0,0 +1,42 @@
+---
+# file: roles/intel/tasks/i40e.yaml
+
+- name: Inst - Get OFED
+ 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"
+ when: mellanox_pcis.stdout_lines | length > 0
+ tags:
+ - mellanox-inst-drivers
+
+- name: Inst - Extract OFED
+ 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 }}/"
+ creates: "{{ mellanox_extract_dir }}/MLNX_OFED_LINUX-{{ ofed }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
+ register: mellanox_firmware_extracted
+ tags:
+ - mellanox-inst-drivers
+
+- name: Inst - OFED
+ 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
+ tags:
+ - mellanox-inst-drivers
+
+- name: Inst - Switch Infiniband to Ethernet
+ 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:
+ name: "qemu-system"
+ state: latest
+ tags:
+ - mellanox-inst-drivers