diff --git a/.github/workflows/dokken-system-tests.yml b/.github/workflows/dokken-system-tests.yml index c915811db5..97e51b8d10 100644 --- a/.github/workflows/dokken-system-tests.yml +++ b/.github/workflows/dokken-system-tests.yml @@ -33,6 +33,7 @@ jobs: - alinux-2023 - ubuntu2004 - ubuntu2204 + - ubuntu2404 - rhel8 - rocky8 - rhel9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c63fc262e..0e4a87bf47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the AWS ParallelCluste 3.13.0 ------ +**ENHANCEMENTS** +- Add support for Ubuntu24. **CHANGES** - On Ubuntu 22.04, install the Nvidia driver with the same compiler version used to compile the kernel. diff --git a/cookbooks/aws-parallelcluster-environment/test/controls/lustre_spec.rb b/cookbooks/aws-parallelcluster-environment/test/controls/lustre_spec.rb index 0d1f5b707d..ef15c538d5 100644 --- a/cookbooks/aws-parallelcluster-environment/test/controls/lustre_spec.rb +++ b/cookbooks/aws-parallelcluster-environment/test/controls/lustre_spec.rb @@ -27,7 +27,7 @@ end end - if os_properties.redhat? && inspec.os.release.to_f >= 8.2 && !os_properties.on_docker? + if os_properties.redhat? && inspec.os.release.to_f >= 8.2 && !os_properties.on_docker? && !os_properties.ubuntu2404? # TODO: restore installation and check on docker when Lustre is available for RH8.9 # See: https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html unless inspec.os.release.to_f == 8.7 && (node['cluster']['kernel_release'].include?("4.18.0-425.3.1.el8") || node['cluster']['kernel_release'].include?("4.18.0-425.13.1.el8_7")) @@ -55,7 +55,7 @@ end end - if os_properties.debian_family? + if os_properties.debian_family? && !os_properties.ubuntu2404? describe apt('https://fsx-lustre-client-repo.s3.amazonaws.com/ubuntu') do it { should exist } it { should be_enabled } @@ -89,7 +89,7 @@ control 'tag:install_lustre_lnet_kernel_module_enabled' do title "Verify that lnet kernel module is enabled" - only_if { !os_properties.on_docker? && !os_properties.alinux? } + only_if { !os_properties.on_docker? && !os_properties.alinux? && !os_properties.ubuntu2404? } describe kernel_module("lnet") do it { should be_loaded } it { should_not be_disabled } @@ -98,7 +98,7 @@ end control 'lustre_mounted' do - only_if { !os_properties.on_docker? } + only_if { !os_properties.on_docker? && !os_properties.ubuntu2404? } describe mount('/shared_dir') do it { should be_mounted } its('type') { should eq 'lustre' } @@ -106,7 +106,7 @@ end control 'lustre_unmounted' do - only_if { !os_properties.on_docker? } + only_if { !os_properties.on_docker? && !os_properties.ubuntu2404? } describe mount('/shared_dir') do it { should_not be_mounted } diff --git a/cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_connect.sh b/cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_connect.sh index 4c888dc6e3..19693695e4 100644 --- a/cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_connect.sh +++ b/cookbooks/aws-parallelcluster-platform/files/dcv/pcluster_dcv_connect.sh @@ -112,7 +112,7 @@ main() { os=$(< /etc/chef/dna.json jq -r .cluster.base_os) _log "Input parameters: user: ${user}, OS: ${os}, shared_folder_path: ${shared_folder_path}." - if ! [[ "${os}" =~ ^(alinux2|alinux2023|ubuntu2004|ubuntu2204|rhel8|rocky8|rhel9|rocky9)$ ]]; then + if ! [[ "${os}" =~ ^(alinux2|alinux2023|ubuntu2004|ubuntu2204|ubuntu2404|rhel8|rocky8|rhel9|rocky9)$ ]]; then _fail "OS not supported." fi diff --git a/cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_ubuntu22.rb b/cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_ubuntu22+.rb similarity index 95% rename from cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_ubuntu22.rb rename to cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_ubuntu22+.rb index 365343afc3..39afec4059 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_ubuntu22.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_ubuntu22+.rb @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and limitations under the License. provides :arm_pl, platform: 'ubuntu' do |node| - node['platform_version'].to_i == 22 + node['platform_version'].to_i >= 22 end use 'partial/_arm_pl_common.rb' diff --git a/cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_ubuntu24.rb b/cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_ubuntu24.rb new file mode 100644 index 0000000000..4f2aa95649 --- /dev/null +++ b/cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_ubuntu24.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# +# Copyright:: 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). +# You may not use this file except in compliance with the License. +# A copy of the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "LICENSE.txt" file accompanying this file. +# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. +# See the License for the specific language governing permissions and limitations under the License +provides :dcv, platform: 'ubuntu' do |node| + node['platform_version'].to_i == 24 +end + +use 'partial/_dcv_common' +use 'partial/_ubuntu_common' + +def dcv_sha256sum + if arm_instance? + '95e4a364a78de6febbdeb877febd998099f59fbb4c4226fe6dd27fa4b5afc809' + else + '2cebf01c1fb5389d349ba22fdd8a85dec179bbf24c86f252535e8da43fb4c705' + end +end diff --git a/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_ubuntu22.rb b/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_ubuntu22+.rb similarity index 93% rename from cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_ubuntu22.rb rename to cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_ubuntu22+.rb index c807dcb77d..a9914fe84a 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_ubuntu22.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_ubuntu22+.rb @@ -12,7 +12,9 @@ # This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. # See the License for the specific language governing permissions and limitations under the License. -provides :install_packages, platform: 'ubuntu', platform_version: '22.04' +provides :install_packages, platform: 'ubuntu' do |node| + node['platform_version'].to_i >= 22 +end unified_mode true default_action :setup diff --git a/cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_ubuntu22.rb b/cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_ubuntu22+.rb similarity index 96% rename from cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_ubuntu22.rb rename to cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_ubuntu22+.rb index b075c75f37..dd3b5d8872 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_ubuntu22.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_ubuntu22+.rb @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and limitations under the License. provides :nvidia_driver, platform: 'ubuntu' do |node| - node['platform_version'].to_i == 22 + node['platform_version'].to_i >= 22 end use 'partial/_nvidia_driver_common.rb' diff --git a/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb b/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb index 13d57ace19..719e5bea3f 100644 --- a/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb +++ b/cookbooks/aws-parallelcluster-shared/test/libraries/os_properties.rb @@ -72,6 +72,10 @@ def ubuntu2204? inspec.os.name == 'ubuntu' && inspec.os.release == '22.04' end + def ubuntu2404? + inspec.os.name == 'ubuntu' && inspec.os.release == '24.04' + end + def debian_family? inspec.os.family == 'debian' end diff --git a/kitchen.docker.yml b/kitchen.docker.yml index 977235d515..2e3580f1ec 100644 --- a/kitchen.docker.yml +++ b/kitchen.docker.yml @@ -60,6 +60,14 @@ platforms: base_os: ubuntu2204 # Since the kernel version of the docker images is not compatible (6.2.0-1016-azure), set a fake kernel value to permit to install Lustre on docker. kernel_release: '5.15.0-1028-aws' + - name: ubuntu2404 + driver: + image: <% if ENV['KITCHEN_UBUNTU2404_IMAGE'] %> <%= ENV['KITCHEN_UBUNTU2404_IMAGE'] %> <% else %> dokken/ubuntu-24.04 <% end %> + attributes: + cluster: + base_os: ubuntu2404 + # Since the kernel version of the docker images is not compatible (6.2.0-1016-azure), set a fake kernel value to permit to install Lustre on docker. + kernel_release: '5.15.0-1028-aws' - name: rhel8 driver: image: <% if ENV['KITCHEN_RHEL8_IMAGE'] %> <%= ENV['KITCHEN_RHEL8_IMAGE'] %> <% else %> registry.access.redhat.com/ubi8/ubi <% end %> diff --git a/kitchen.ec2.yml b/kitchen.ec2.yml index 4e9b4eebce..8f68924006 100644 --- a/kitchen.ec2.yml +++ b/kitchen.ec2.yml @@ -289,3 +289,29 @@ platforms: attributes: cluster: base_os: ubuntu2204 + - name: ubuntu2404 + driver_plugin: ec2 + driver: + <% if ENV['KITCHEN_UBUNTU2404_AMI'] %> + # Use the Ubuntu 22 AMI most similar to the base AMI used to build the ParallelCluster image + image_id: <%= ENV['KITCHEN_UBUNTU2404_AMI'] %> + <% else %> + image_search: + name: <% if ENV['KITCHEN_PHASE']=='install' %>ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-<% if ENV['KITCHEN_ARCHITECTURE'] == 'x86_64' %>amd64<% else %>arm64<% end %>-server-<% else %><%= pcluster_prefix %>-ubuntu-2404-lts-hvm-*<% end %> + architecture: <%= ENV['KITCHEN_ARCHITECTURE'] %> + <% end %> + block_device_mappings: + - device_name: /dev/sda1 + ebs: + volume_size: <% if (ENV['KITCHEN_VOLUME_SIZE'] || '') == '' %> 40 <% else %> <%= ENV['KITCHEN_VOLUME_SIZE'] %> <% end %> + volume_type: gp3 + delete_on_termination: true + <% %w(a b c d e f g h i j k l m n o p q r s t u v w x).each_with_index do | c, i | %> + - device_name: /dev/xvdb<%= c %> + virtual_name: ephemeral<%= i %> + <% end %> + transport: + username: ubuntu + attributes: + cluster: + base_os: ubuntu2404