Skip to content

Commit

Permalink
Update to DOCA 2.9 series
Browse files Browse the repository at this point in the history
  • Loading branch information
assumptionsandg committed Dec 12, 2024
1 parent e5d5e19 commit e0e90b2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 44 deletions.
1 change: 0 additions & 1 deletion .github/workflows/package-build-ofed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ jobs:
kayobe playbook run src/kayobe-config/etc/kayobe/ansible/build-ofed-rocky.yml
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
TERM: linux

- name: Run OFED upload playbook
run: |
Expand Down
29 changes: 2 additions & 27 deletions etc/kayobe/ansible/build-ofed-rocky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,10 @@
- cmake-filesystem
- libnl3-devel
- python3-devel
- doca-extra
state: latest
update_cache: true

- name: debug
debug:
msg: "https://developer.nvidia.com/downloads/networking/secure/doca-sdk/DOCA_{{ stackhpc_pulp_doca_version[:3] }}/doca-host-{{ stackhpc_pulp_doca_version }}-{{ stackhpc_pulp_doca_minor_version }}_{{ stackhpc_pulp_doca_ofed_version }}_rhel9{{ stackhpc_pulp_repo_rocky_9_minor_version }}.x86_64.rpm"

- name: Add DOCA host repository package
ansible.builtin.dnf:
name: https://developer.nvidia.com/downloads/networking/secure/doca-sdk/DOCA_{{ stackhpc_pulp_doca_version[:3] }}/doca-host-{{ stackhpc_pulp_doca_version }}-{{ stackhpc_pulp_doca_minor_version }}_{{ stackhpc_pulp_doca_ofed_version }}_rhel9{{ stackhpc_pulp_repo_rocky_9_minor_version }}.x86_64.rpm
disable_gpg_check: true

- name: Install DOCA extra packages
ansible.builtin.dnf:
name: doca-extra

- name: Create build directory
ansible.builtin.file:
path: /home/stack/ofed
state: directory
mode: 0777

- name: Set build directory
ansible.builtin.replace:
path: /opt/mellanox/doca/tools/doca-kernel-support
regexp: 'TMP_DIR=\$1'
replace: 'TMP_DIR=/home/stack/ofed'

- name: Build OFED kernel modules
ansible.builtin.shell:
cmd: |
TERM=linux /opt/mellanox/doca/tools/doca-kernel-support
cmd: /opt/mellanox/doca/tools/doca-kernel-support
25 changes: 18 additions & 7 deletions etc/kayobe/ansible/push-ofed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
hosts: ofed-builder
vars:
venv: "/opt/kayobe/venvs/kayobe"
doca_extract_path: "/home/stack/doca"
tasks:
- name: Install python dependencies
ansible.builtin.pip:
Expand All @@ -27,7 +28,22 @@
password = '{{ stackhpc_release_pulp_password }}'
no_log: true

- name: Create Pulp repository for OFED
- name: Find DOCA kernel repo package
ansible.builtin.shell:
cmd: 'find /tmp/DOCA.* -name doca-kernel-repo-*'
register: doca_kernel_repo
changed_when: false

- name: Unpackage kernel repo
ansible.builtin.shell:
cmd: "rpm2cpio {{ doca_kernel_repo.stdout }} | cpio -idmv -D {{ doca_extract_path }}"

- name: Find extracted kernel packages
ansible.builtin.shell:
cmd: 'find {{ doca_extract_path }}/usr/share/doca-host-*/Modules/$(uname -r)/*.rpm'
register: doca_kernel_packages

- name: Create Pulp repository for DOCA kernel modules
pulp.squeezer.rpm_repository:
pulp_url: "{{ stackhpc_release_pulp_url }}"
username: "{{ stackhpc_release_pulp_username }}"
Expand All @@ -36,11 +52,6 @@
state: present
retries: "{{ pulp_timeout_retries | default(3) }}"

- name: Lookup Pulp RPMs on builder
ansible.builtin.find:
paths: "/home/stack/ofed"
register: rpm_dir

- name: Upload OFED RPMs to Pulp
ansible.builtin.shell:
cmd: |
Expand All @@ -50,7 +61,7 @@
--repository '{{ stackhpc_pulp_repo_doca_ofed_rhel9.name }}' \
--file {{ item.path }} \
--no-publish \
with_items: "{{ rpm_dir.files }}"
with_items: "{{ doca_kernel_packages.stdout_lines }}"

- name: Create Pulp publication for OFED
pulp.squeezer.rpm_publication:
Expand Down
6 changes: 3 additions & 3 deletions etc/kayobe/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ stackhpc_dnf_repos: "{{ dnf_custom_repos_el9 | combine(dnf_custom_repos_rocky_9)
dnf_custom_repos_doca:
doca:
baseurl: "{{ stackhpc_repo_rhel9_doca_url }}"
description: "DOCA Online Repo {{ stackhpc_pulp_doca_version }}"
description: "DOCA Online Repo {{ stackhpc_pulp_doca_version }} - RHEL $releasever"
enabled: "{{ dnf_enable_doca | bool }}"
priority: -1
file: doca
Expand All @@ -62,7 +62,7 @@ dnf_custom_repos_doca:
password: "{{ stackhpc_repo_mirror_password | default(omit, true) }}"
doca-modules:
baseurl: "{{ stackhpc_repo_rhel9_doca_modules_url }}"
description: "OFED Kernel modules for DOCA {{ stackhpc_pulp_doca_ofed_version }} Rocky 9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}"
description: "OFED Kernel modules for DOCA {{ stackhpc_pulp_doca_version }} - RHEL $releasever"
enabled: "{{ dnf_enable_doca | bool and dnf_enable_doca_modules | bool }}"
priority: -2
file: doca-modules
Expand Down Expand Up @@ -181,7 +181,7 @@ dnf_docker_gpg_key_url: "https://download.docker.com/linux/centos/gpg"

# Whether to create a repo file for DOCA kernel modules. This affects RedHat-based
# systems only.
dnf_enable_doca_modules: "{{ dnf_install_doca | bool }}"
dnf_install_doca_modules: "{{ dnf_install_doca | bool }}"

# Whether to create a repo file for DOCA. This affects RedHat-based
# systems only.
Expand Down
8 changes: 2 additions & 6 deletions etc/kayobe/ofed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

###############################################################################
# DOCA host version
stackhpc_pulp_doca_version: 2.8.0
stackhpc_pulp_doca_minor_version: 204000

# DOCA OFED version
stackhpc_pulp_doca_ofed_version: 24.07
stackhpc_pulp_doca_version: 2.9.1

###############################################################################
# Pulp configuration for DOCA OFED
Expand All @@ -22,7 +18,7 @@ stackhpc_pulp_repo_rhel9_doca_modules_version: "{{ lookup('vars', 'stackhpc_pulp

# OFED kernel module repository for Rocky 9
stackhpc_pulp_repo_doca_ofed_rhel9:
name: OFED Kernel modules for DOCA {{ stackhpc_pulp_doca_version }} Rocky 9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}
name: OFED Kernel modules for DOCA {{ stackhpc_pulp_doca_version }} - RHEL 9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}
url: "{{ stackhpc_release_pulp_content_url }}/doca-modules/{{ stackhpc_pulp_doca_version }}/rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}/x86_64"
distribution_name: "doca-modules-"
base_path: "doca-modules/{{ stackhpc_pulp_doca_version }}/rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}/x86_64"
Expand Down

0 comments on commit e0e90b2

Please sign in to comment.