Repository navigation
Adds Rocky Linux with DOCA OFED example #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Based on https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/rocky-container/containerfiles/9 | ||
|
|
||
| FROM quay.io/rockylinux/rockylinux:9.6 | ||
|
|
||
| # Workaround for containerized kernel tools | ||
| RUN echo "9.6" > /etc/dnf/vars/releasefullver && \ | ||
| # Can't update packages in DIB once OFED is installed as it provides some "older" packages | ||
| RUN dnf update -y \ | ||
| ; dnf -y install chkconfig | ||
|
|
||
| RUN dnf group install -y 'Minimal Install' --allowerasing && \ | ||
| dnf install -y findutils util-linux sudo python3 NetworkManager \ | ||
| NetworkManager-config-server curl libcurl --allowerasing | ||
|
|
||
| RUN systemctl unmask console-getty.service dev-hugepages.mount \ | ||
| getty.target sys-fs-fuse-connections.mount systemd-logind.service \ | ||
| systemd-remount-fs.service | ||
|
|
||
| # /etc/machine-id needs to be populated for /bin/kernel-install to | ||
| # correctly copy kernels into /boot. We will clear this out in the | ||
| # final image. | ||
| RUN systemd-machine-id-setup | ||
|
|
||
| # Install base build dependencies required by DOCA OFED | ||
| RUN dnf config-manager --set-enabled appstream crb | ||
|
|
||
| # Install DOCA OFED 3.5.0 and use doca-kernel-support | ||
| # Set DOCA version | ||
| ENV DOCA_VERSION=3.5.0 | ||
|
|
||
| # Create repository file (multiline, because parser issues) | ||
| RUN cat > /etc/yum.repos.d/doca.repo << EOT | ||
| [doca] | ||
| name=DOCA Online Repo | ||
| baseurl=https://linux.mellanox.com/public/repo/doca/${DOCA_VERSION}/rhel9/x86_64/ | ||
| enabled=1 | ||
| gpgcheck=0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| EOT | ||
|
|
||
| # Install packages (query kernel version for doca-kernel-support using rpm, as uname -r returns builder kernel version) | ||
| RUN dnf makecache && \ | ||
| dnf install -y doca-ofed doca-extra && \ | ||
| LATEST_KERNEL=$(rpm -qa kernel-core --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -V | tail -n 1) && \ | ||
| /opt/mellanox/doca/tools/doca-kernel-support -k "${LATEST_KERNEL}" && \ | ||
| GENERATED_RPM=$(find /tmp -name 'doca-kernel-repo-*.rpm' | head -n 1) && \ | ||
| echo "Installing kernel repo from: ${GENERATED_RPM}" && \ | ||
| rpm -i "${GENERATED_RPM}" && \ | ||
| dnf makecache && \ | ||
| dnf install -y doca-ofed-userspace && \ | ||
| dnf install -y --disablerepo=doca doca-kernel-* && \ | ||
| dnf clean all | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ openstack_images: | |
| - "{{ openstack_image_cirros_0_6_0 }}" | ||
| - "{{ openstack_image_rocky9 }}" | ||
| - "{{ openstack_image_ubuntu_jammy }}" | ||
| - "{{ openstack_image_rocky_96_doca_ofed_350 }}" | ||
|
|
||
| # Common GRUB settings for VM images | ||
| openstack_grub_env_common: | ||
|
|
@@ -129,3 +130,209 @@ openstack_image_ubuntu_jammy: | |
| env: | ||
| DIB_RELEASE: "jammy" | ||
| DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive" | ||
|
|
||
| # Rocky Linux 9.6 with DOCA OFED 3.5.0 enabled. | ||
| openstack_image_rocky_96_doca_ofed_350: | ||
| name: "Rocky-9.6-DOCA-OFED-3.5.0" | ||
| type: "qcow2" | ||
| elements: | ||
| - "rocky-container" | ||
| - "cloud-init" | ||
| - "cloud-init-datasources" | ||
| - "block-device-efi" | ||
| - "vm" | ||
| - "openssh-server" | ||
| - "dracut-regenerate" | ||
| visibility: "public" | ||
| packages: | ||
| - "git" | ||
| - "tmux" | ||
| - "vim-enhanced" | ||
| - "lshw" | ||
| - "pciutils" | ||
| - "infiniband-diags" | ||
| - "ethtool" | ||
| - "less" | ||
| - "logrotate" | ||
| - "net-tools" | ||
| - "nvme-cli" | ||
| - "python3" | ||
| - "smartmontools" | ||
| - "NetworkManager-config-server" | ||
| - "linux-firmware" | ||
| - "cloud-utils-growpart" | ||
| env: | ||
| DIB_AVOID_PACKAGES_UPDATE: 1 | ||
| DIB_BLOCK_DEVICE_CONFIG: "{{ stackhpc_dib_block_device_config_uefi_lvm }}" | ||
| DIB_DRACUT_ENABLED_MODULES_DEFAULT_CONFIG: "{{ stackhpc_dib_dracut_enabled_modules_default_config }}" | ||
| DIB_BOOTLOADER_DEFAULT_CMDLINE: "nofb nomodeset gfxpayload=text net.ifnames=1 rd.auto" | ||
| DIB_GRUB_TIMEOUT: "5" | ||
| DIB_GRUB_TIMEOUT_STYLE: "menu" | ||
| DIB_CONTAINERFILE_DOCKERFILE: "{{ playbook_dir }}/../containerfiles/rocky-9.6-doca-ofed-3.5.0" | ||
| DIB_CONTAINERFILE_NETWORK_DRIVER: host | ||
| DIB_CONTAINERFILE_RUNTIME: docker | ||
| YUM: dnf | ||
| DIB_CLOUD_INIT_DATASOURCES: "OpenStack, ConfigDrive" | ||
| DIB_RELEASE: "9.6" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think various tests in DIB expect |
||
| # Workaround for stack user home ownership bug | ||
| DIB_IMAGE_CACHE: "/tmp/yum" | ||
| DIB_SUDOERS_FILENAME: "no-fqdn" | ||
| # Avoid DNS queries during sudo commands, since we might not always have working DNS. | ||
| DIB_SUDOERS_CONFIG: | | ||
| Defaults !fqdn | ||
|
|
||
| # StackHPC overcloud DIB image block device configuration. | ||
| # This image layout conforms to the CIS partition benchmarks. | ||
| # This configuration builds a UEFI-compatible image with 3 partitions. | ||
| # * p0: EFI ESP bootloader | ||
| # * p1: EFI BSP | ||
| # * p2: LVM PV (rootpv) | ||
| # The rootpv PV is in the rootvg VG, and has the following LVs: | ||
| # * lv_root -> / | ||
| # * lv_tmp -> /tmp | ||
| # * lv_var -> /var | ||
| # * lv_var_tmp -> /var/tmp | ||
| # * lv_log -> /var/log | ||
| # * lv_audit -> /var/log/audit | ||
| # * lv_home -> /home | ||
|
|
||
| stackhpc_dib_block_device_config_uefi_lvm: | | ||
| - local_loop: | ||
| name: image0 | ||
| size: 20GiB | ||
| - partitioning: | ||
| base: image0 | ||
| label: gpt | ||
| partitions: | ||
| - name: ESP | ||
| type: 'EF00' | ||
| size: 500MiB | ||
| mkfs: | ||
| type: vfat | ||
| mount: | ||
| mount_point: /boot/efi | ||
| fstab: | ||
| options: "defaults" | ||
| fsck-passno: 2 | ||
| - name: BSP | ||
| type: 'EF02' | ||
| size: 8MiB | ||
| - name: root | ||
| type: '8E00' | ||
| flags: [ boot ] | ||
| size: 100% | ||
| - lvm: | ||
| name: lvm | ||
| base: [ root ] | ||
| pvs: | ||
| - name: rootpv | ||
| base: root | ||
| options: [ "--force" ] | ||
| vgs: | ||
| - name: rootvg | ||
| base: [ "rootpv" ] | ||
| options: [ "--force" ] | ||
| lvs: | ||
| - name: lv_root | ||
| base: rootvg | ||
| size: 5G | ||
| - name: lv_tmp | ||
| base: rootvg | ||
| size: 1G | ||
| - name: lv_var | ||
| base: rootvg | ||
| size: 1G | ||
| - name: lv_var_tmp | ||
| base: rootvg | ||
| size: 1G | ||
| - name: lv_log | ||
| base: rootvg | ||
| size: 1G | ||
| - name: lv_audit | ||
| base: rootvg | ||
| size: 128M | ||
| - name: lv_home | ||
| base: rootvg | ||
| size: 128M | ||
| - mkfs: | ||
| name: fs_root | ||
| base: lv_root | ||
| type: ext4 | ||
| label: "rootfs" | ||
| mount: | ||
| mount_point: / | ||
| fstab: | ||
| options: "defaults" | ||
| fsck-passno: 1 | ||
| - mkfs: | ||
| name: fs_tmp | ||
| base: lv_tmp | ||
| type: ext4 | ||
| label: "tmpfs" | ||
| mount: | ||
| mount_point: /tmp | ||
| fstab: | ||
| options: "rw,noexec,nosuid,nodev" | ||
| fsck-passno: 2 | ||
| - mkfs: | ||
| name: fs_var | ||
| base: lv_var | ||
| type: ext4 | ||
| label: "varfs" | ||
| mount: | ||
| mount_point: /var | ||
| fstab: | ||
| options: "defaults" | ||
| fsck-passno: 2 | ||
| - mkfs: | ||
| name: fs_var_tmp | ||
| base: lv_var_tmp | ||
| type: ext4 | ||
| label: "vartmpfs" | ||
| mount: | ||
| mount_point: /var/tmp | ||
| fstab: | ||
| options: "rw,noexec,nosuid,nodev" | ||
| fsck-passno: 2 | ||
| - mkfs: | ||
| name: fs_log | ||
| base: lv_log | ||
| type: ext4 | ||
| label: "logfs" | ||
| mount: | ||
| mount_point: /var/log | ||
| fstab: | ||
| options: "defaults" | ||
| fsck-passno: 2 | ||
| - mkfs: | ||
| name: fs_audit | ||
| base: lv_audit | ||
| type: ext4 | ||
| label: "auditfs" | ||
| mount: | ||
| mount_point: /var/log/audit | ||
| fstab: | ||
| options: "defaults" | ||
| fsck-passno: 2 | ||
| - mkfs: | ||
| name: fs_home | ||
| base: lv_home | ||
| type: ext4 | ||
| label: "homefs" | ||
| mount: | ||
| mount_point: /home | ||
| fstab: | ||
| options: "rw,nodev" | ||
| fsck-passno: 2 | ||
|
|
||
| # StackHPC overcloud DIB image Dracut module configuration. | ||
| stackhpc_dib_dracut_enabled_modules_default_config: | | ||
| - name: crypt | ||
| packages: | ||
| - cryptsetup | ||
| - name: lvm | ||
| packages: | ||
| - lvm2 | ||
| - name: mdraid | ||
| packages: | ||
| - mdraid | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: stackhpc/openstack-config
Length of output: 3458
Chain the update with
&&and remove the strayRUNon line 8.Line 8 starts a new
RUNinside the previous command's continuation. The shell runsRUNas a missing command, sodnf update -ynever executes. The;then makes thechkconfiginstall set the exit status, so a failed update would also succeed once the chain is fixed. Use&&so an update failure fails the build.Suggested fix