diff --git a/.github/workflows/package-build-ofed.yml b/.github/workflows/package-build-ofed.yml index 2e15d8bba..eb3ad7eb8 100644 --- a/.github/workflows/package-build-ofed.yml +++ b/.github/workflows/package-build-ofed.yml @@ -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: | diff --git a/etc/kayobe/ansible/build-ofed-rocky.yml b/etc/kayobe/ansible/build-ofed-rocky.yml index 73c2cc5b2..7c9b1c6cb 100644 --- a/etc/kayobe/ansible/build-ofed-rocky.yml +++ b/etc/kayobe/ansible/build-ofed-rocky.yml @@ -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 diff --git a/etc/kayobe/ansible/push-ofed.yml b/etc/kayobe/ansible/push-ofed.yml index 8937195a7..54a22a20e 100644 --- a/etc/kayobe/ansible/push-ofed.yml +++ b/etc/kayobe/ansible/push-ofed.yml @@ -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: @@ -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 }}" @@ -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: | @@ -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: diff --git a/etc/kayobe/dnf.yml b/etc/kayobe/dnf.yml index f804ecc3d..e200d030c 100644 --- a/etc/kayobe/dnf.yml +++ b/etc/kayobe/dnf.yml @@ -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 @@ -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 @@ -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. diff --git a/etc/kayobe/ofed.yml b/etc/kayobe/ofed.yml index a60bf9aaf..ffac3fbbc 100644 --- a/etc/kayobe/ofed.yml +++ b/etc/kayobe/ofed.yml @@ -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 @@ -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"