Skip to content

Commit

Permalink
packer-rocm: niccli build fixes (#64)
Browse files Browse the repository at this point in the history
* packer-rocm/niccli: +build deps for certain permutations, handle no-amdgpu/rocm
  • Loading branch information
joshlay2amd authored Nov 8, 2024
1 parent 9a552d3 commit dea1dce
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 39 deletions.
4 changes: 2 additions & 2 deletions packer-rocm/playbooks/roles/amdgpu_install/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ amdgpu_install_pkg_patts: # indexed by 'ansible_distribution' fact
# Packages to install after 'amdgpu-install' but before the usecases
amdgpu_install_pre:
common:
- automake # only 'suggested' by 'build-essential' metapkg, not mentioned by 'Development Tools' group
- autoconf # "
- cmake
- curl
- dkms
Expand All @@ -25,8 +27,6 @@ amdgpu_install_pre:
- wget
- zip
Debian:
- autoconf
- automake
- libstdc++-12-dev
- "linux-headers-{{ ansible_kernel }}"
- "linux-modules-extra-{{ ansible_kernel }}"
Expand Down
41 changes: 4 additions & 37 deletions packer-rocm/playbooks/roles/niccli/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,12 @@
# - 'Broadcom NetXtreme-E Linux Installer'
# - 'NetXtreme-E Linux Driver'
#
# NOTE/warning: URL patterns are not consistent enough for templating to make much sense; provide/set the full URL at once. See above for discovery process.
niccli_url: 'https://docs.broadcom.com/docs-and-downloads/ethernet-network-adapters/NXE/Thor2/GCA1/bcm5760x_230.2.52.0a.zip'
# NOTE/Warning: Patterns in URLs have not been consistent enough for templating to make [much] sense. Directories change along with releases.
niccli_url: 'https://docs.broadcom.com/docs-and-downloads/ethernet-network-adapters/NXE/Thor2/GCA2/bcm5760x_231.2.63.0a.zip'

# 'niccli_sum' deliberately is *not* defaulted with the URL. if users want to change the URL... this should not require the checksum be corrected/emptied
# this should act as opt-in validation, not a requirement
# 'niccli_sum' deliberately is *not* defaulted with the URL.
# if users want to change the link... they should not be required to correct or empty the checksum. this should act as opt-in validation, not a requirement.

# install the CLI and driver by default, may opt out
niccli_driver: true
niccli_wanted: true

niccli_requirements: # mapped by 'ansible_os_family' fact
common:
- dkms
- pciutils
- unzip
Debian:
- build-essential
- ibverbs-providers
- ibverbs-utils
- libaio-dev
- libibverbs1
- libibverbs-dev
- libstdc++-12-dev
- libelf-dev
- libibumad-dev
- librdmacm-dev
- linux-headers-generic
- "linux-headers-{{ ansible_kernel }}"
- "linux-modules-extra-{{ ansible_kernel }}"
- rdmacm-utils
RedHat:
- '@Development Tools' # group notation (@...) requires quoting
- kernel-headers
- kernel-devel-matched
- kernel-modules-extra
- libstdc++-devel
- libaio-devel
- libibumad
- libibverbs
- libibverbs-utils
- elfutils-libelf-devel
- librdmacm-utils
41 changes: 41 additions & 0 deletions packer-rocm/playbooks/roles/niccli/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,44 @@ niccli_pkg_anyarch:
niccli_pkg_ext:
Debian: '.deb'
RedHat: '.rpm'

# distribution packages to install before those for 'niccli'; mapped by 'ansible_os_family' fact
niccli_requirements:
common:
- automake # only 'suggested' by 'build-essential' metapkg, not mentioned by 'Development Tools' group
- autoconf # "
- cmake
- dkms
- infiniband-diags
- pciutils
- rdma-core
- strace
- unzip
Debian:
- build-essential
- ibverbs-providers
- ibverbs-utils
- libaio-dev
- libibverbs1
- libibverbs-dev
- libstdc++-12-dev
- libelf-dev
- libibumad-dev
- librdmacm-dev
- linux-headers-generic
- "linux-headers-{{ ansible_kernel }}"
- "linux-modules-extra-{{ ansible_kernel }}"
- pkg-config
- rdmacm-utils
RedHat:
- '@Development Tools' # group notation (@...) requires quoting
- kernel-headers
- kernel-devel-matched
- kernel-modules-extra
- libstdc++-devel
- libaio-devel
- libibumad
- libibverbs
- libibverbs-utils
- elfutils-libelf-devel
- librdmacm-utils

0 comments on commit dea1dce

Please sign in to comment.