Skip to content

Commit a726156

Browse files
Support DOCA OFED
1 parent 4fda579 commit a726156

File tree

3 files changed

+32
-27
lines changed

3 files changed

+32
-27
lines changed

etc/kayobe/ansible/build-ofed.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
become: true
44
hosts: ofed-builder
55
gather_facts: false
6-
vars:
7-
stackhpc_mlnx_ofed_file_string: MLNX_OFED_LINUX-{{ stackhpc_pulp_mlnx_ofed_version }}-rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}-x86_64
86
tasks:
97
- name: Extend the home logical volume
108
community.general.lvol:
119
vg: rootvg
1210
lv: lv_home
1311
size: +5G
1412

13+
- name: Extend the temporary logical volume
14+
community.general.lvol:
15+
vg: rootvg
16+
lv: lv_var_tmp
17+
size: +5G
18+
1519
- name: Install package dependencies
1620
ansible.builtin.dnf:
1721
name:
@@ -38,38 +42,39 @@
3842
ansible.builtin.shell:
3943
cmd: |
4044
grubby --set-default /boot/$(rpm -qa kernel-devel | sed 's/kernel-devel/vmlinuz/g')
41-
echo 'GRUB_DEFAULT=2' >> /etc/default/grub
4245
grub2-mkconfig -o /boot/grub2/grub.cfg
4346
47+
- name: Disable noexec in temporary file system
48+
ansible.builtin.replace:
49+
path: /etc/fstab
50+
regexp: '^(exclude=.*)noexec,\*\s*'
51+
replace: '\1'
52+
4453
- name: Reboot builder to apply kernel update
4554
ansible.builtin.reboot:
4655
reboot_timeout: 600
4756

57+
- name: Add DOCA host repository
58+
ansible.builtin.dnf:
59+
name: https://developer.nvidia.com/downloads/networking/secure/doca-sdk/DOCA_2.8/doca-host-2.8.0-204000_{{ stackhpc_pulp_doca_ofed_version }}_rhel9{{ stackhpc_pulp_repo_rocky_9_minor_version }}.x86_64.rpm
60+
61+
- name: Install DOCA extra packages
62+
ansible.builtin.dnf:
63+
name: doca-extra
64+
4865
- name: Create build directory
4966
ansible.builtin.file:
5067
path: /home/cloud-user/ofed
5168
state: directory
5269
mode: 0777
5370

54-
- name: Download MellanoxOFED archive
55-
ansible.builtin.get_url:
56-
url: https://content.mellanox.com/ofed/MLNX_OFED-{{ stackhpc_pulp_mlnx_ofed_version }}/{{ stackhpc_mlnx_ofed_file_string }}.tgz
57-
dest: /home/cloud-user/ofed/ofed-archive.tgz
58-
59-
- name: Extract MellanoxOFED archive
60-
ansible.builtin.unarchive:
61-
src: /home/cloud-user/ofed/ofed-archive.tgz
62-
dest: /home/cloud-user/ofed
71+
- name: Set build directory
72+
ansible.builtin.lineinfile:
73+
path: /opt/mellanox/doca/tools/doca-kernel-support
74+
search_string: 'TMP_DIR=$1'
75+
line: ' TMP_DIR=/home/cloud-user/ofed'
6376

6477
- name: Ensure the current kernel is supported
6578
ansible.builtin.shell:
6679
cmd: |
67-
/home/cloud-user/ofed/{{ stackhpc_mlnx_ofed_file_string }}/mlnx_add_kernel_support.sh \
68-
--mlnx_ofed /home/cloud-user/ofed/{{ stackhpc_mlnx_ofed_file_string }} \
69-
--tmpdir /home/cloud-user/ofed/ofed-build \
70-
--make-tgz -y \
71-
72-
- name: Extract the new archive
73-
ansible.builtin.unarchive:
74-
src: /home/cloud-user/ofed/ofed-build/{{ stackhpc_mlnx_ofed_file_string }}-ext.tgz
75-
dest: /home/cloud-user/ofed/
80+
/opt/mellanox/doca/tools/doca-kernel-support

etc/kayobe/ansible/push-ofed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: Push OFED packages
33
hosts: ofed-builder
44
vars:
5-
stackhpc_mlnx_ofed_file_string: MLNX_OFED_LINUX-{{ stackhpc_pulp_mlnx_ofed_version }}-rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}-x86_64
5+
stackhpc_mlnx_ofed_file_string: MLNX_OFED_LINUX-{{ stackhpc_pulp_doca_ofed_version }}-rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}-x86_64
66
tasks:
77
- name: Install python dependencies
88
ansible.builtin.pip:

etc/kayobe/pulp.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ stackhpc_pulp_distribution_rpm_production: >-
416416
# Mellanox OFED
417417

418418
# Mellanox OFED version
419-
stackhpc_pulp_mlnx_ofed_version: 24.04-0.7.0.0
419+
stackhpc_pulp_doca_ofed_version: 24.07
420420

421421
# Mellanox OFED repositories
422422
stackhpc_pulp_repo_mlnx_ofed_rhel9:
423-
name: Mellanox Technologies mlnx_ofed {{ stackhpc_pulp_mlnx_ofed_version }} Rocky 9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}
424-
url: "{{ stackhpc_release_pulp_content_url }}/mlnx_ofed/{{ stackhpc_pulp_mlnx_ofed_version }}/rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}/x86_64"
425-
distribution_name: "mlnx-ofed-{{ stackhpc_pulp_mlnx_ofed_version }}-rocky-9-{{ stackhpc_pulp_repo_rocky_9_minor_version }}-"
426-
base_path: "mlnx_ofed/{{ stackhpc_pulp_mlnx_ofed_version }}/rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}/x86_64/"
423+
name: Mellanox Technologies mlnx_ofed {{ stackhpc_pulp_doca_ofed_version }} Rocky 9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}
424+
url: "{{ stackhpc_release_pulp_content_url }}/doca_ofed/{{ stackhpc_pulp_doca_ofed_version }}/rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}/x86_64"
425+
distribution_name: "mlnx-ofed-{{ stackhpc_pulp_doca_ofed_version }}-rocky-9-{{ stackhpc_pulp_repo_rocky_9_minor_version }}-"
426+
base_path: "mlnx_ofed/{{ stackhpc_pulp_doca_ofed_version }}/rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}/x86_64/"
427427

428428
###############################################################################
429429
# Containers

0 commit comments

Comments
 (0)