Bluefield: add customization example for DOCA 3.2.1#370
Bluefield: add customization example for DOCA 3.2.1#370alexsander-souza merged 3 commits intocanonical:mainfrom
Conversation
- This commit adds a customization example to create Noble images for Bluefield DPUs including DOCA 3.2.1 - The README is updated to mention how to use this script - Increased QEMU disk_size is required to successfully build an image with the proposed customization script
There was a problem hiding this comment.
Pull request overview
Adds a new BlueField customization example for DOCA 3.2.1 (Ubuntu 24.04/Noble), updates docs to reflect Jammy vs Noble requirements by DOCA version, and increases Packer disk size to reduce build failures.
Changes:
- Increase base cloud image build disk size from 6G to 8G.
- Add a new DOCA 3.2.1 (Noble) BlueField customization script.
- Update the existing DOCA 2.9.3 example to install
mlxbf-bootimages-signedvia a direct.debdownload and refresh README examples.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| ubuntu/ubuntu-cloudimg.pkr.hcl | Increase disk size to reduce “disk full” errors during image customization. |
| ubuntu/scripts/examples/bluefield-doca-3-2-1.sh | New Noble/DOCA 3.2.1 customization example script (kernel + DOCA + system config). |
| ubuntu/scripts/examples/bluefield-doca-2-9-3.sh | Update DOCA 2.9.3 script to fetch/install bootimages from a signed .deb. |
| ubuntu/README.md | Document Jammy vs Noble usage and add the new DOCA 3.2.1 example command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rm /etc/udev/rules.d/92-oob_net.rules | ||
| # OVS bridges creation will be managed by MAAS and cloud-init | ||
| sed -i 's/CREATE_OVS_BRIDGES="yes"/CREATE_OVS_BRIDGES="no"/' /etc/mellanox/mlnx-ovs.conf | ||
| # hw-offload is not applied when CREATE_OVS_BRIDGES="no", so enforce it here |
There was a problem hiding this comment.
ovs-vsctl is invoked but there is no explicit package installation in this script that guarantees the binary is present. If it’s missing, the command will fail and the intended hw-offload=true setting won’t be applied. Either ensure the relevant OVS package is installed before this point, or guard the command with an explicit presence check/fallback handling.
| # hw-offload is not applied when CREATE_OVS_BRIDGES="no", so enforce it here | |
| # hw-offload is not applied when CREATE_OVS_BRIDGES="no", so enforce it here | |
| if ! command -v ovs-vsctl >/dev/null 2>&1; then | |
| apt-get update | |
| apt-get install -y openvswitch-switch | |
| fi |
There was a problem hiding this comment.
add openvswitch-switch to the existing list of packages to be installed
There was a problem hiding this comment.
This is not required because we are actually installing a fork of it from NVIDIA that includes acceleration for their NICs: doca-openvswitch-switch is installed as a dependency for the doca-runtime metapackage.
alexsander-souza
left a comment
There was a problem hiding this comment.
+1 from me. the suggestions from copilot are reasonable, so let me know if you intend to implement them
cb57f60 to
9124b5e
Compare
|
I applied the suggested improvements (except for the |
|
Images built and tested without errors for both example scripts |
Starting with the release of DOCA 3.2.0, NVIDIA Bluefield images are based on Noble instead of Jammy. This MR adds a new example targeting the latest DOCA 3.2.1 LTS, to highlight the differences introduced compared to previous releases.
The
disk_sizespecified in ubuntu/ubuntu-cloudimg.pkr.hcl is increased from 6G to 8G to avoid disk full errors during the creation of the customized image.The existing example for DOCA 2.9.3 is also fixed to address the removal of
mlxbf-bootimagespackages from the NVIDIA repository.