diff --git a/.github/workflows/dokken-system-tests.yml b/.github/workflows/dokken-system-tests.yml index 7264d4579..c915811db 100644 --- a/.github/workflows/dokken-system-tests.yml +++ b/.github/workflows/dokken-system-tests.yml @@ -31,7 +31,6 @@ jobs: os: - alinux2 - alinux-2023 - - centos7 - ubuntu2004 - ubuntu2204 - rhel8 diff --git a/cookbooks/aws-parallelcluster-environment/resources/cloudwatch/cloudwatch_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/cloudwatch/cloudwatch_centos7.rb deleted file mode 100644 index 9d4abf959..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/cloudwatch/cloudwatch_centos7.rb +++ /dev/null @@ -1,28 +0,0 @@ - -# frozen_string_literal: true - -# -# Copyright:: 2023 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 :cloudwatch, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_cloudwatch_common' -use 'partial/_cloudwatch_install_package_rhel' - -action_class do - def platform_url_component - # No CW Agent for CentOS ARM, using RHEL package - arm_instance? ? 'redhat' : node['platform'] - end -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/ec2_udev_rules/ec2_udev_rules_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/ec2_udev_rules/ec2_udev_rules_centos7.rb deleted file mode 100644 index e0c4c9a3e..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/ec2_udev_rules/ec2_udev_rules_centos7.rb +++ /dev/null @@ -1,28 +0,0 @@ - -# frozen_string_literal: true - -# -# Copyright:: 2023 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 :ec2_udev_rules, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -unified_mode true -use 'partial/_common_udev_configuration' - -default_action :setup - -action :setup do - action_create_common_udev_files - action_start_ec2blk -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/efa/efa_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/efa/efa_centos7.rb deleted file mode 100644 index 9a87993fb..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/efa/efa_centos7.rb +++ /dev/null @@ -1,36 +0,0 @@ - -# frozen_string_literal: true - -# -# Copyright:: 2023 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 :efa, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end -unified_mode true -default_action :setup - -use 'partial/_common' - -action_class do - def efa_supported? - !arm_instance? - end - - def conflicting_packages - %w(openmpi-devel openmpi) - end - - def prerequisites - %w(environment-modules) - end -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/efs/efs_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/efs/efs_centos7.rb deleted file mode 100644 index 2a723276c..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/efs/efs_centos7.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :efs, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_get_package_version_rpm' -use 'partial/_common' -use 'partial/_redhat_based' -use 'partial/_install_from_tar' -use 'partial/_mount_umount' - -def prerequisites - 'rpm-build' -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/ephemeral_drives/ephemeral_drives_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/ephemeral_drives/ephemeral_drives_centos7.rb deleted file mode 100644 index bc6132984..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/ephemeral_drives/ephemeral_drives_centos7.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :ephemeral_drives, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_ephemeral_drives_common.rb' - -action_class do - def network_target - 'network.target' - end -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/lustre/lustre_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/lustre/lustre_centos7.rb deleted file mode 100644 index 9a6940a76..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/lustre/lustre_centos7.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true - -# -# -# Copyright:: 2013-2021 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. -# Default resource implementation -provides :lustre, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end -unified_mode true - -use 'partial/_install_lustre_centos_redhat' -use 'partial/_mount_unmount' - -lustre_version_hash = { - '7.6' => "2.10.8", - '7.5' => "2.10.5", -} - -client_url_hash = { - '7.6' => "https://downloads.whamcloud.com/public/lustre/lustre-2.10.8/el7/client/RPMS/x86_64/lustre-client-2.10.8-1.el7.x86_64.rpm", - '7.5' => "https://downloads.whamcloud.com/public/lustre/lustre-2.10.5/el7.5.1804/client/RPMS/x86_64/lustre-client-2.10.5-1.el7.x86_64.rpm", -} - -kmod_url_hash = { - '7.6' => "https://downloads.whamcloud.com/public/lustre/lustre-2.10.8/el7/client/RPMS/x86_64/kmod-lustre-client-2.10.8-1.el7.x86_64.rpm", - '7.5' => "https://downloads.whamcloud.com/public/lustre/lustre-2.10.5/el7.5.1804/client/RPMS/x86_64/kmod-lustre-client-2.10.5-1.el7.x86_64.rpm", -} - -default_action :setup - -action :setup do - version = node['platform_version'] - if %w(7.5 7.6).include?(version) - lustre_kmod_rpm = "#{node['cluster']['sources_dir']}/kmod-lustre-client-#{lustre_version_hash[version]}.x86_64.rpm" - lustre_client_rpm = "#{node['cluster']['sources_dir']}/lustre-client-#{lustre_version_hash[version]}.x86_64.rpm" - - # Get Lustre Kernel Module RPM - remote_file lustre_kmod_rpm do - source kmod_url_hash[version] - mode '0644' - retries 3 - retry_delay 5 - action :create_if_missing - end - - # Get Lustre Client RPM - remote_file lustre_client_rpm do - source client_url_hash[version] - mode '0644' - retries 3 - retry_delay 5 - action :create_if_missing - end - - # Install lustre mount drivers - package 'lustre_kmod' do - source lustre_kmod_rpm - end - - # Install lustre mount drivers - package 'lustre_client' do - source lustre_client_rpm - end - - kernel_module 'lnet' - - elsif version.to_f >= 7.7 - action_install_lustre - else - log "Unsupported version of Centos, #{version}, supported versions are >= 7.5" do - level :warn - end - end -end - -def base_url_prefix(is_arm) - is_arm ? 'centos' : 'el' -end - -# -# Retrieve RHEL OS minor version from running kernel version -# The OS minor version is retrieved from the patch version of the running kernel -# following the mapping reported here https://access.redhat.com/articles/3078#RHEL7 -# Method works for CentOS7 minor version >=7 -# -def find_centos_minor_version - os_minor_version = '' - kernel_patch_version = find_kernel_patch_version - - os_minor_version = '7' if kernel_patch_version >= '1062' - os_minor_version = '8' if kernel_patch_version >= '1127' - os_minor_version = '9' if kernel_patch_version >= '1160' - - os_minor_version -end - -def find_kernel_patch_version - # kernel release is in the form 3.10.0-1127.8.2.el7.x86_64 - kernel_patch_version = node['cluster']['kernel_release'].match(/^\d+\.\d+\.\d+-(\d+)\..*$/) - raise "Unable to retrieve the kernel patch version from #{node['cluster']['kernel_release']}." unless kernel_patch_version - kernel_patch_version[1] -end - -action_class do - def base_url - "https://fsx-lustre-client-repo.s3.amazonaws.com/#{base_url_prefix(arm_instance?)}/7.#{find_centos_minor_version}/#{node['kernel']['machine']}/" - end - - def public_key - "https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc" - end -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/network_service/network_service_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/network_service/network_service_centos7.rb deleted file mode 100644 index 55a82b8d4..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/network_service/network_service_centos7.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# -# Copyright:: 2023 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 :network_service, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_network_service' -use 'partial/_network_service_redhat_based' - -def network_service_name - 'network' -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/nfs/nfs_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/nfs/nfs_centos7.rb deleted file mode 100644 index aca6b4cdb..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/nfs/nfs_centos7.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# -# Copyright:: 2023 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 :nfs, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end -unified_mode true - -use 'partial/_install_nfs4_and_disable' -use 'partial/_configure' - -default_action :setup - -action :setup do - action_install_nfs4 - action_disable_start_at_boot -end - -action_class do - def override_server_template - edit_resource(:template, node['nfs']['config']['server_template']) do - source 'nfs/default-nfs-kernel-server.conf.erb' - cookbook 'aws-parallelcluster-environment' - end - end -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/spack/spack_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/spack/spack_centos7.rb deleted file mode 100644 index 296c93f01..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/spack/spack_centos7.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :spack, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_spack_common.rb' - -def dependencies - %w(autoconf automake bison byacc cscope ctags diffstat doxygen elfutils flex gcc gcc-c++ gcc-gfortran git - indent intltool libtool patch patchutils rcs rpm-build rpm-sign subversion swig system-rpm-config systemtap - curl findutils hostname iproute redhat-lsb-core python3 python3-setuptools unzip python-boto3) -end - -def libfabric_path - '/opt/amazon/efa/lib64/pkgconfig/libfabric.pc' -end - -action :setup do - action_install_spack -end diff --git a/cookbooks/aws-parallelcluster-environment/resources/system_authentication/system_authentication_centos7.rb b/cookbooks/aws-parallelcluster-environment/resources/system_authentication/system_authentication_centos7.rb deleted file mode 100644 index e30a82f4a..000000000 --- a/cookbooks/aws-parallelcluster-environment/resources/system_authentication/system_authentication_centos7.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :system_authentication, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_system_authentication_common' -use 'partial/_system_authentication_alinux_centos' - -action_class do - def required_packages - %w(sssd sssd-tools sssd-ldap authconfig) - end -end diff --git a/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efa_spec.rb b/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efa_spec.rb index 794752f1e..9afd8e6b3 100644 --- a/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efa_spec.rb +++ b/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efa_spec.rb @@ -167,20 +167,6 @@ def self.configure(chef_run) is_expected.to run_bash('install efa').with_code(%r{./efa_installer.sh -y -k}) end end - - context 'when centos on arm' do - cached(:chef_run) do - runner = ChefSpec::Runner.new( - platform: "centos", version: '7', step_into: ['efa'] - ) - allow_any_instance_of(Object).to receive(:arm_instance?).and_return(true) - ConvergeEfa.setup(runner) - end - - it "doesn't install EFA kmod" do - is_expected.to run_bash('install efa').with_code(%r{./efa_installer.sh -y -k}) - end - end end describe 'efa:configure' do diff --git a/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efs_spec.rb b/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efs_spec.rb index 1fc4c19ce..37be95296 100644 --- a/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efs_spec.rb +++ b/cookbooks/aws-parallelcluster-environment/spec/unit/resources/efs_spec.rb @@ -156,7 +156,6 @@ def mock_already_installed(package, expected_version, installed) end for_oses([ - %w(centos 7), %w(redhat 8), %w(rocky 8), %w(redhat 9), @@ -179,7 +178,6 @@ def mock_already_installed(package, expected_version, installed) end cached(:required_packages) do { - "centos" => 'rpm-build', "redhat" => %w(rpm-build make), "rocky" => %w(rpm-build make), } diff --git a/cookbooks/aws-parallelcluster-environment/spec/unit/resources/lustre_setup_spec.rb b/cookbooks/aws-parallelcluster-environment/spec/unit/resources/lustre_setup_spec.rb index cffa7e906..deae23af5 100644 --- a/cookbooks/aws-parallelcluster-environment/spec/unit/resources/lustre_setup_spec.rb +++ b/cookbooks/aws-parallelcluster-environment/spec/unit/resources/lustre_setup_spec.rb @@ -34,134 +34,6 @@ def self.nothing(chef_run) end end - context "on centos 7.4 or lower" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.4" - end - Lustre.setup(runner) - end - - it 'can not install lustre' do - is_expected.to write_log("Unsupported version of Centos, 7.4, supported versions are >= 7.5") - .with(level: :warn) - end - end - - context "on centos 7.5" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.5" - node.override['cluster']['sources_dir'] = "srcdir" - end - Lustre.setup(runner) - end - - it 'installs kmod-lustre-client from downloaded rpm' do - is_expected.to create_if_missing_remote_file("srcdir/kmod-lustre-client-2.10.5.x86_64.rpm") - .with(source: "https://downloads.whamcloud.com/public/lustre/lustre-2.10.5/el7.5.1804/client/RPMS/x86_64/kmod-lustre-client-2.10.5-1.el7.x86_64.rpm") - .with(mode: '0644') - .with(retries: 3) - .with(retry_delay: 5) - - is_expected.to install_package('lustre_kmod') - .with(source: "srcdir/kmod-lustre-client-2.10.5.x86_64.rpm") - end - - it 'installs lustre-client from downloaded rpm' do - is_expected.to create_if_missing_remote_file("srcdir/lustre-client-2.10.5.x86_64.rpm") - .with(source: "https://downloads.whamcloud.com/public/lustre/lustre-2.10.5/el7.5.1804/client/RPMS/x86_64/lustre-client-2.10.5-1.el7.x86_64.rpm") - .with(mode: '0644') - .with(retries: 3) - .with(retry_delay: 5) - - is_expected.to install_package('lustre_client') - .with(source: "srcdir/lustre-client-2.10.5.x86_64.rpm") - end - - it 'installs kernel module lnet' do - is_expected.to install_kernel_module("lnet") - end - end - - context "on centos 7.6" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.6" - node.override['cluster']['sources_dir'] = "srcdir" - end - Lustre.setup(runner) - end - - it 'installs kmod-lustre-client from downloaded rpm' do - is_expected.to create_if_missing_remote_file("srcdir/kmod-lustre-client-2.10.8.x86_64.rpm") - .with(source: "https://downloads.whamcloud.com/public/lustre/lustre-2.10.8/el7/client/RPMS/x86_64/kmod-lustre-client-2.10.8-1.el7.x86_64.rpm") - .with(mode: '0644') - .with(retries: 3) - .with(retry_delay: 5) - - is_expected.to install_package('lustre_kmod') - .with(source: "srcdir/kmod-lustre-client-2.10.8.x86_64.rpm") - end - - it 'installs lustre-client from downloaded rpm' do - is_expected.to create_if_missing_remote_file("srcdir/lustre-client-2.10.8.x86_64.rpm") - .with(source: "https://downloads.whamcloud.com/public/lustre/lustre-2.10.8/el7/client/RPMS/x86_64/lustre-client-2.10.8-1.el7.x86_64.rpm") - .with(mode: '0644') - .with(retries: 3) - .with(retry_delay: 5) - - is_expected.to install_package('lustre_client') - .with(source: "srcdir/lustre-client-2.10.8.x86_64.rpm") - end - - it 'installs kernel module lnet' do - is_expected.to install_kernel_module("lnet") - end - end - - context "on centos 7.7 or higher" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.7" - end - Lustre.setup(runner) - end - - stubs_for_resource('lustre') do |res| - allow(res).to receive(:find_centos_minor_version).and_return('minor') - end - - it 'installs lustre packages from repository and installs kernel module lnet' do - is_expected.to create_yum_repository("aws-fsx") - .with(baseurl: 'https://fsx-lustre-client-repo.s3.amazonaws.com/el/7.minor/x86_64/') - .with(gpgkey: 'https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc') - .with(retries: 3) - .with(retry_delay: 5) - - is_expected.to run_execute('yum-config-manager_skip_if_unavail') - .with(command: "yum-config-manager --setopt=\*.skip_if_unavailable=1 --save") - - is_expected.to install_package(%w(kmod-lustre-client lustre-client dracut)) - .with(retries: 3) - .with(retry_delay: 5) - - is_expected.to install_kernel_module("lnet") - end - end - [%w(redhat RHEL), ["rocky", "Rocky Linux"]].each do |platform, platform_string| context "on #{platform} lower than 8.2" do cached(:chef_run) do @@ -271,136 +143,3 @@ def self.nothing(chef_run) end end end - -describe 'lustre:find_kernel_patch_version' do - [%w(3.10.0-1127.8.2.el7.x86_64 1127), %w(4.18.0-477.13.1.el8_7.x86_64 477)].each do |kernel_version, expected_patch_version| - context "parsing #{kernel_version}" do - cached(:chef_run) do - runner = runner(platform: 'centos', version: '7', step_into: ['lustre']) do |node| - node.override['cluster']['kernel_release'] = kernel_version - end - Lustre.nothing(runner) - end - # Mechanism to retrieve resource and then unit test find_kernel_patch_version function - cached(:resource) { chef_run.find_resource('lustre', 'nothing') } - - it "should retrieve #{expected_patch_version} patch version" do - expect(resource.find_kernel_patch_version).to eq(expected_patch_version) - end - end - end -end - -describe 'lustre:find_centos_minor_version' do - context "centos version is not 7" do - cached(:chef_run) do - runner = runner(platform: 'centos', version: '7', step_into: ['lustre']) do |node| - node.automatic['platform_version'] = "8" - end - Lustre.setup(runner) - end - - it 'raises error' do - expect { chef_run }.to(raise_error do |error| - expect(error).to be_a(Exception) - # This can not happen because the resource is defined only for Centos7 - # expect(error.message).to include("CentOS version 8 not supported") - expect(error.message).to include("Cannot find a resource for lustre on centos version 8") - end) - end - end - - context('on centos 7') do - context "kernel release does not match expected format" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.7" - node.override['cluster']['kernel_release'] = 'unexpected.format' - end - Lustre.setup(runner) - end - - it 'raises error' do - expect { chef_run }.to(raise_error do |error| - expect(error).to be_a(Exception) - expect(error.message).to include("Unable to retrieve the kernel patch version from unexpected.format.") - end) - end - end - - context "kernel release below 3.10.0-1062" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.7" - node.override['cluster']['kernel_release'] = '3.10.0-1061.8.2.el7.x86_64' - end - Lustre.setup(runner) - end - - it 'uses empty minor version' do - is_expected.to create_yum_repository("aws-fsx") - .with(baseurl: 'https://fsx-lustre-client-repo.s3.amazonaws.com/el/7./x86_64/') - end - end - - context "kernel release 3.10.0-1062 to 3.10.0-1126" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.7" - node.override['cluster']['kernel_release'] = '3.10.0-1062.8.2.el7.x86_64' - end - Lustre.setup(runner) - end - - it 'uses minor version 7' do - is_expected.to create_yum_repository("aws-fsx") - .with(baseurl: 'https://fsx-lustre-client-repo.s3.amazonaws.com/el/7.7/x86_64/') - end - end - - context "kernel release 3.10.0-1127 to 3.10.0-1167" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.7" - node.override['cluster']['kernel_release'] = '3.10.0-1127.8.2.el7.x86_64' - end - Lustre.setup(runner) - end - - it 'uses minor version 7' do - is_expected.to create_yum_repository("aws-fsx") - .with(baseurl: 'https://fsx-lustre-client-repo.s3.amazonaws.com/el/7.8/x86_64/') - end - end - - context "kernel from 3.10.0-1168 on" do - cached(:chef_run) do - runner = runner( - platform: 'centos', version: '7', - step_into: ['lustre'] - ) do |node| - node.automatic['platform_version'] = "7.7" - node.override['cluster']['kernel_release'] = '3.10.0-1168.8.2.el7.x86_64' - end - Lustre.setup(runner) - end - - it 'uses minor version 7' do - is_expected.to create_yum_repository("aws-fsx") - .with(baseurl: 'https://fsx-lustre-client-repo.s3.amazonaws.com/el/7.9/x86_64/') - end - end - end -end 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 1b6c26999..a2d4febc8 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|centos[7-8]|rhel8|rocky8|rhel9|rocky9)$ ]]; then + if ! [[ "${os}" =~ ^(alinux2|alinux2023|ubuntu2004|ubuntu2204|rhel8|rocky8|rhel9|rocky9)$ ]]; then _fail "OS not supported." fi diff --git a/cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_centos7.rb deleted file mode 100644 index bc575b65e..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/arm_pl/arm_pl_centos7.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :arm_pl, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_arm_pl_common.rb' - -action :arm_pl_prerequisite do - # Needed by arm_pl - # binutils v2.30 is required for Centos7 architecture detection - # these must be installed in this order - package 'centos-release-scl-rh' - package 'devtoolset-8-binutils' -end - -action_class do - def armpl_platform - 'RHEL-7' - end - - def gcc_major_minor_version - '9.3' - end -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/build_tools/build_tools_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/build_tools/build_tools_centos7.rb deleted file mode 100644 index f64fb0f9b..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/build_tools/build_tools_centos7.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :build_tools, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_build_tools_yum.rb' - -action_class do - def packages - %w(gcc gcc-c++) - end -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/c_states/c_states_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/c_states/c_states_centos7.rb deleted file mode 100644 index 07e1864d9..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/c_states/c_states_centos7.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :c_states, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_c_states_common' -use 'partial/_c_states_redhat_based' diff --git a/cookbooks/aws-parallelcluster-platform/resources/chrony/chrony_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/chrony/chrony_centos7.rb deleted file mode 100644 index aed6510d2..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/chrony/chrony_centos7.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :chrony, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_chrony_common.rb' - -action_class do - def chrony_conf_path - '/etc/chrony.conf' - end - - def chrony_service - 'chronyd' - end -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_centos7.rb deleted file mode 100644 index 379895caa..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/dcv/dcv_centos7.rb +++ /dev/null @@ -1,21 +0,0 @@ - -# frozen_string_literal: true - -# -# Copyright:: 2023 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: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_dcv_common' -use 'partial/_rhel_common' diff --git a/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_rhel_common.rb b/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_rhel_common.rb index 81a0a1b24..771a656e6 100644 --- a/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_rhel_common.rb +++ b/cookbooks/aws-parallelcluster-platform/resources/dcv/partial/_rhel_common.rb @@ -17,7 +17,7 @@ def dcv_sha256sum if arm_instance? case el_string when "el7" - # ALINUX2 and Centos7 + # ALINUX2 'f921c50a1f98fc945ac0f740f4181a52fb66b4b70bf13c1b2321823a9ec7e95a' when "el8" # RHEL and Rocky8 @@ -31,7 +31,7 @@ def dcv_sha256sum else case el_string when "el7" - # ALINUX2 and Centos7 + # ALINUX2 '31230edd66242038a95986c9207fc0f800986a94ee43bfc901e43521f4eb72a6' when "el8" # RHEL and Rocky8 diff --git a/cookbooks/aws-parallelcluster-platform/resources/fabric_manager/fabric_manager_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/fabric_manager/fabric_manager_centos7.rb deleted file mode 100644 index e66bea4c2..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/fabric_manager/fabric_manager_centos7.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :fabric_manager, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_fabric_manager_common.rb' -use 'partial/_fabric_manager_install_rhel.rb' - -def fabric_manager_package - 'nvidia-fabric-manager' -end - -def fabric_manager_version - _nvidia_driver_version -end - -def platform - 'rhel7' -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/gdrcopy/gdrcopy_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/gdrcopy/gdrcopy_centos7.rb deleted file mode 100644 index f63684622..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/gdrcopy/gdrcopy_centos7.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :gdrcopy, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_gdrcopy_common.rb' -use 'partial/_gdrcopy_common_rhel.rb' - -def gdrcopy_version - '2.3.1' -end - -def gdrcopy_checksum - '59b3cc97a4fc6008a5407506d9e67ecc4144cfad61c261217fabcb671cd30ca8' -end - -# The installation code must be overridden in Centos7 -# because it has GDRCopy pinned to v2.3.1. -def installation_code - <<~COMMAND - CUDA=/usr/local/cuda ./build-rpm-packages.sh - rpm -q gdrcopy-kmod-#{gdrcopy_version_extended}dkms || rpm -Uvh gdrcopy-kmod-#{gdrcopy_version_extended}dkms.noarch.#{gdrcopy_platform}.rpm - rpm -q gdrcopy-#{gdrcopy_version_extended}.#{gdrcopy_arch} || rpm -Uvh gdrcopy-#{gdrcopy_version_extended}.#{gdrcopy_arch}.#{gdrcopy_platform}.rpm - rpm -q gdrcopy-devel-#{gdrcopy_version_extended}.noarch || rpm -Uvh gdrcopy-devel-#{gdrcopy_version_extended}.noarch.#{gdrcopy_platform}.rpm - COMMAND -end - -def gdrcopy_enabled? - !arm_instance? && nvidia_enabled? -end - -def gdrcopy_platform - 'el7' -end - -def gdrcopy_arch - arm_instance? ? 'arm64' : 'x86_64' -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_centos7.rb deleted file mode 100644 index 05172b5ed..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/install_packages/install_packages_centos7.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :install_packages, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_install_packages_common.rb' -use 'partial/_install_packages_rhel_amazon.rb' - -def default_packages - # environment-modules required by EFA, Intel MPI and ARM PL - # iptables needed for IMDS setup - packages = %w(vim ksh tcsh zsh openssl-devel ncurses-devel pam-devel net-tools openmotif-devel - libXmu-devel hwloc-devel libdb-devel tcl-devel automake autoconf pyparted libtool - httpd boost-devel redhat-lsb mlocate R atlas-devel - blas-devel libffi-devel dkms libedit-devel jq - libical-devel sendmail libxml2-devel libglvnd-devel - python python-pip libssh2-devel libgcrypt-devel libevent-devel glibc-static bind-utils - iproute NetworkManager-config-routing-rules python3 python3-pip iptables libcurl-devel yum-plugin-versionlock - coreutils moreutils curl environment-modules bzip2) - - # TODO: check if it is still relevant. Evaluate if it is worth to remove the package. - if node['kernel']['machine'] == 'aarch64' - # Do not install bind-utils on centos7+arm due to issue with package checksum - packages -= %w(bind-utils) - end - - packages -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/intel_hpc/intel_hpc_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/intel_hpc/intel_hpc_centos7.rb deleted file mode 100644 index 1d2b466f9..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/intel_hpc/intel_hpc_centos7.rb +++ /dev/null @@ -1,278 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :intel_hpc, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -unified_mode true -default_action :setup - -property :sources_dir, String -property :dependencies, default: %w(compat-libstdc++-33 nscd nss-pam-ldapd openssl098e - at avahi-libs cups-client cups-libs dejavu-fonts-common dejavu-sans-fonts ed - fontconfig fontpackages-filesystem freetype gettext gettext-libs hwdata libcroco - libICE libgomp libSM libX11 libX11-common libXau - libXcursor libXdamage libXext libXfixes libXft libXi libXinerama libXmu libXp - libXrandr libXrender libXt libXtst libXxf86vm libdrm libglvnd libglvnd-glx - libjpeg-turbo libpciaccess libpipeline libpng libpng12 libunistring libxcb - libxshmfence m4 mailx man-db mesa-libGL - mesa-libGLU mesa-libglapi patch pax perl perl-Carp perl-Data-Dumper perl-Encode - perl-Exporter perl-File-Path perl-File-Temp perl-Filter perl-Getopt-Long perl-HTTP-Tiny - perl-PathTools perl-Pod-Escapes perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage - perl-Scalar-List-Utils perl-Socket perl-Storable perl-Text-ParseWords perl-Time-HiRes - perl-Time-Local perl-constant perl-libs perl-macros perl-parent perl-podlators - perl-threads perl-threads-shared postfix psmisc redhat-lsb-core redhat-lsb-submod-security - spax tcl tcsh time) - -action :setup do - return unless intel_hpc_supported? - - node.default['cluster']['intelhpc']['dependencies'] = new_resource.dependencies - node_attributes 'Save properties for InSpec tests' - - new_resource.sources_dir = new_resource.sources_dir || node['cluster']['sources_dir'] - - directory new_resource.sources_dir do - recursive true - end - - bash 'download dependencies Intel HPC platform' do - code <<-INTEL - yum install --downloadonly #{new_resource.dependencies.join(' ')} --downloaddir=#{new_resource.sources_dir} - yum makecache -y - INTEL - end -end - -property :region, String -property :aws_domain, String -property :node_type, String -property :packages, default: %w(intel-hpc-platform-core-intel-runtime-advisory intel-hpc-platform-compat-hpc-advisory - intel-hpc-platform-core intel-hpc-platform-core-advisory intel-hpc-platform-hpc-cluster - intel-hpc-platform-compat-hpc intel-hpc-platform-core-intel-runtime) -property :version, default: '2018.0-7' - -property :psxe_noarch_packages, default: %w(intel-tbb-common-runtime intel-mkl-common-runtime intel-psxe-common-runtime - intel-ipp-common-runtime intel-ifort-common-runtime intel-icc-common-runtime - intel-daal-common-runtime intel-comp-common-runtime) -property :psxe_version, default: '2020.4-17' -property :psxe_archful_packages_i486, default: %w(intel-tbb-runtime intel-tbb-libs-runtime intel-comp-runtime - intel-daal-runtime intel-icc-runtime intel-ifort-runtime - intel-ipp-runtime intel-mkl-runtime intel-openmp-runtime) -property :psxe_archful_packages_x86_64, default: %w(intel-mpi-runtime) -property :intelpython_version, default: { - '2' => '2019.4-088', - '3' => '2020.2-902', -} - -action :configure do - return unless intel_hpc_supported? && node['cluster']['enable_intel_hpc_platform'] == 'true' - - node.default['cluster']['psxe']['version'] = new_resource.psxe_version - node.default['cluster']['psxe']['noarch_packages'] = new_resource.psxe_noarch_packages - node.default['cluster']['intelhpc']['dependencies'] = new_resource.dependencies - node.default['cluster']['intelhpc']['packages'] = new_resource.packages - node.default['cluster']['intelhpc']['version'] = new_resource.version - node.default['cluster']['psxe']['archful_packages']['i486'] = new_resource.psxe_archful_packages_i486 - node.default['cluster']['psxe']['archful_packages']['x86_64'] = new_resource.psxe_archful_packages_i486 + new_resource.psxe_archful_packages_x86_64 - node.default['cluster']["intelpython2"]['version'] = new_resource.intelpython_version['2'] - node.default['cluster']["intelpython3"]['version'] = new_resource.intelpython_version['3'] - node_attributes 'Save properties for InSpec tests' - - return if arm_instance? || node['cluster']['enable_intel_hpc_platform'].to_s != 'true' - - new_resource.region = new_resource.region || node['cluster']['region'] - new_resource.aws_domain = new_resource.aws_domain || aws_domain - new_resource.sources_dir = new_resource.sources_dir || node['cluster']['sources_dir'] - new_resource.node_type = new_resource.node_type || node['cluster']['node_type'] - - # Install non-intel dependencies first - bash "install non-intel dependencies" do - cwd new_resource.sources_dir - code <<-INTEL - set -e - yum localinstall --cacheonly -y `ls #{new_resource.dependencies.map { |name| "#{name}*.rpm" }.join(' ')}` - INTEL - end - - intel_hpc_spec_rpms_dir = '/opt/intel/rpms' - s3_base_url = "https://#{new_resource.region}-aws-parallelcluster.s3.#{new_resource.region}.#{new_resource.aws_domain}" - intel_hpc_packages_dir_s3_url = "#{s3_base_url}/archives/IntelHPC/el7" - - case new_resource.node_type - when 'HeadNode' - - # Intel HPC Platform - directory intel_hpc_spec_rpms_dir do - recursive true - end - new_resource.packages.each do |package_name| - # Download intel-hpc-platform rpms to shared /opt/intel/rpms to avoid repetitive download from all nodes - # Packages must be downloaded individually because S3 doesn't permit wget'ing entire directories, nor does - # it permit recursive copies of 'directories' (even those containing only public artifacts). - # It's installed on every node (as opposed to just the head node) because the resulting RPMs install - # software to /etc which is not exported to the computes as /opt/intel is. - package_basename = "#{package_name}-#{new_resource.version}.el7.x86_64.rpm" - - remote_file "#{intel_hpc_spec_rpms_dir}/#{package_basename}" do - source "#{intel_hpc_packages_dir_s3_url}/hpc_platform_spec/#{package_basename}" - mode '0744' - retries 3 - retry_delay 5 - action :create_if_missing - end - end - - # Install Intel Parallel Studio XE Runtime, see - # https://software.intel.com/content/www/us/en/develop/articles/installing-intel-parallel-studio-xe-runtime-2020-using-yum-repository.html - intel_psxe_rpms_dir = "#{new_resource.sources_dir}/intel/psxe" - directory intel_psxe_rpms_dir do - recursive true - end - - # Download non-architecture-specific packages. - new_resource.psxe_noarch_packages.each do |psxe_noarch_package| - package_basename = "#{psxe_noarch_package}-#{new_resource.psxe_version}.noarch.rpm" - remote_file "#{intel_psxe_rpms_dir}/#{package_basename}" do - source "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}" - mode '0744' - retries 3 - retry_delay 5 - action :create_if_missing - end - end - - archful_packages = { - 'i486' => new_resource.psxe_archful_packages_i486, - 'x86_64' => new_resource.psxe_archful_packages_i486 + new_resource.psxe_archful_packages_x86_64, - } - # Download PSXE runtime packages and dependencies for 32- and 64-bit Intel compatible processors - %w(i486 x86_64).each do |intel_architecture| - # Download main package - package_basename = "intel-psxe-runtime-#{new_resource.psxe_version}.#{intel_architecture}.rpm" - remote_file "#{intel_psxe_rpms_dir}/#{package_basename}" do - source "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}" - mode '0744' - retries 3 - retry_delay 5 - action :create_if_missing - end - # Download dependencies - archful_packages[intel_architecture].each do |psxe_archful_package| - num_bits_for_arch = if intel_architecture == 'i486' - '32' - else - '64' - end - package_basename = "#{psxe_archful_package}-#{num_bits_for_arch}bit-#{new_resource.psxe_version}.#{intel_architecture}.rpm" - remote_file "#{intel_psxe_rpms_dir}/#{package_basename}" do - source "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}" - mode '0744' - retries 3 - retry_delay 5 - action :create_if_missing - end - end - end - - # Install all downloaded PSXE packages - bash "install PSXE packages" do - cwd new_resource.sources_dir - code <<-INTEL - set -e - yum localinstall --cacheonly -y #{intel_psxe_rpms_dir}/* - INTEL - end - - # Intel optimized versions of python - %w(2 3).each do |python_version| - package_version = new_resource.intelpython_version[python_version] - package_basename = "intelpython#{python_version}-#{package_version}.x86_64.rpm" - dest_path = "#{new_resource.sources_dir}/#{package_basename}" - remote_file dest_path do - source "#{intel_hpc_packages_dir_s3_url}/intelpython#{python_version}/#{package_basename}" - mode '0744' - retries 3 - retry_delay 5 - action :create_if_missing - end - bash "install intelpython#{python_version}" do - cwd new_resource.sources_dir - code <<-INTEL - set -e - yum localinstall --cacheonly -y #{dest_path} - INTEL - not_if { ::File.exist?("/opt/intel/intelpython#{python_version}") } - end - end - end - - # Installs intel-hpc-platform rpms - # Install from /opt/intel/rpms, with --cacheonly option - # If --cacheonly is not specified, cached packages in /opt/intel/rpms might be removed if keepcache=False - # This rpm installs a file /etc/intel-hpc-platform-release that contains the INTEL_HPC_PLATFORM_VERSION - bash "install intel hpc platform" do - cwd new_resource.sources_dir - code <<-INTEL - set -e - yum localinstall --cacheonly -y #{intel_hpc_spec_rpms_dir}/* - INTEL - creates '/etc/intel-hpc-platform-release' - end - - # create intelpython module directory - directory "#{modulefile_dir}/intelpython" do - recursive true - end - - cookbook_file 'intelpython2_modulefile' do - source 'intel/intelpython2_modulefile' - cookbook 'aws-parallelcluster-platform' - path "#{modulefile_dir}/intelpython/2" - user 'root' - group 'root' - mode '0755' - end - - cookbook_file 'intelpython3_modulefile' do - source 'intel/intelpython3_modulefile' - cookbook 'aws-parallelcluster-platform' - path "#{modulefile_dir}/intelpython/3" - user 'root' - group 'root' - mode '0755' - end - - # Intel optimized math kernel library - create_modulefile "#{modulefile_dir}/intelmkl" do - source_path "/opt/intel/psxe_runtime/linux/mkl/bin/mklvars.sh" - modulefile new_resource.psxe_version - cookbook 'aws-parallelcluster-platform' - end - - # Intel psxe - create_modulefile "#{modulefile_dir}/intelpsxe" do - source_path "/opt/intel/psxe_runtime/linux/bin/psxevars.sh" - modulefile new_resource.psxe_version - end -end - -def modulefile_dir - '/usr/share/Modules/modulefiles' -end - -def intel_hpc_supported? - !arm_instance? -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/modules/modules_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/modules/modules_centos7.rb deleted file mode 100644 index f947835fb..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/modules/modules_centos7.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :modules, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_modules_common.rb' -use 'partial/_modules_yum.rb' - -action_class do - def packages - %w(environment-modules) - end -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/nvidia_dcgm/nvidia_dcgm_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/nvidia_dcgm/nvidia_dcgm_centos7.rb deleted file mode 100644 index 217099930..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/nvidia_dcgm/nvidia_dcgm_centos7.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :nvidia_dcgm, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_nvidia_dcgm_common.rb' -use 'partial/_nvidia_dcgm_rhel.rb' - -def _nvidia_dcgm_enabled - !arm_instance? && _nvidia_enabled -end - -def platform - 'rhel7' -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_centos7.rb deleted file mode 100644 index a7fc54201..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/nvidia_driver/nvidia_driver_centos7.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :nvidia_driver, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_nvidia_driver_common.rb' - -def nvidia_driver_enabled? - !arm_instance? && nvidia_enabled? -end - -# Pinning the Nvidia Driver version for centos7 due to incompatibility with Gdrcopy 2.3.1 -def _nvidia_driver_version - '535.129.03' -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/nvidia_repo/nvidia_repo_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/nvidia_repo/nvidia_repo_centos7.rb deleted file mode 100644 index cdb36d644..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/nvidia_repo/nvidia_repo_centos7.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :nvidia_repo, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_nvidia_repo_common.rb' - -def platform - 'rhel7' -end - -def repository_key - 'D42D0685.pub' -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/stunnel/stunnel_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/stunnel/stunnel_centos7.rb deleted file mode 100644 index f8508ff00..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/stunnel/stunnel_centos7.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# -# Copyright:: 2023 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 :stunnel, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_common' -use 'partial/_setup' - -action_class do - def dependencies - %w(openssl-devel tcp_wrappers-devel) - end -end diff --git a/cookbooks/aws-parallelcluster-platform/resources/sudo_access/sudo_access_centos7.rb b/cookbooks/aws-parallelcluster-platform/resources/sudo_access/sudo_access_centos7.rb deleted file mode 100644 index 0b13ca4c0..000000000 --- a/cookbooks/aws-parallelcluster-platform/resources/sudo_access/sudo_access_centos7.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :sudo_access, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_sudo_access_common.rb' diff --git a/cookbooks/aws-parallelcluster-platform/spec/unit/resources/intel_hpc_spec.rb b/cookbooks/aws-parallelcluster-platform/spec/unit/resources/intel_hpc_spec.rb deleted file mode 100644 index c468d9aa0..000000000 --- a/cookbooks/aws-parallelcluster-platform/spec/unit/resources/intel_hpc_spec.rb +++ /dev/null @@ -1,305 +0,0 @@ -require 'spec_helper' - -class ConvergeIntelHpc - def self.setup(chef_run, deps:) - chef_run.converge_dsl('aws-parallelcluster-platform') do - intel_hpc 'setup' do - dependencies deps - action :setup - end - end - end - - def self.configure(chef_run, deps:) - chef_run.converge_dsl('aws-parallelcluster-platform') do - intel_hpc 'configure' do - dependencies deps - action :configure - end - end - end -end - -describe 'intel_hpc:setup' do - cached(:sources_dir) { 'sources_test_dir' } - cached(:dependencies) { %w(dep1 dep2) } - - cached(:chef_run) do - runner = runner(platform: 'centos', version: '7', step_into: ['intel_hpc']) do |node| - node.override['cluster']['sources_dir'] = sources_dir - node.override['cluster']['region'] = aws_region - end - ConvergeIntelHpc.setup(runner, deps: dependencies) - end - cached(:node) { chef_run.node } - - it 'sets up intel_hpc' do - is_expected.to setup_intel_hpc('setup') - end - - it 'saves properties for InSpec tests' do - expect(node['cluster']['intelhpc']['dependencies']).to eq(dependencies) - is_expected.to write_node_attributes 'Save properties for InSpec tests' - end - - it 'creates sources directory' do - is_expected.to create_directory(sources_dir).with_recursive(true) - end - - it 'downloads dependencies' do - expected_command = /yum install --downloadonly #{dependencies.join(' ')} --downloaddir=#{sources_dir}/ - is_expected.to run_bash('download dependencies Intel HPC platform') - expect(chef_run.bash('download dependencies Intel HPC platform').code).to match(expected_command) - end -end - -describe 'intel_hpc:configure' do - cached(:aws_region) { 'test_region' } - cached(:sources_dir) { 'sources_test_dir' } - cached(:modulefile_dir) { '/usr/share/Modules/modulefiles' } - cached(:intel_hpc_spec_rpms_dir) { '/opt/intel/rpms' } - cached(:psxe_version) { '2020.4-17' } - cached(:dependencies) { %w(dep1 dep2) } - - cached(:chef_run) do - runner = runner(platform: 'centos', version: '7', step_into: ['intel_hpc']) do |node| - node.override['cluster']['sources_dir'] = sources_dir - node.override['cluster']['region'] = aws_region - node.override['cluster']['enable_intel_hpc_platform'] = 'true' - end - allow_any_instance_of(Object).to receive(:arm_instance?).and_return(false) - ConvergeIntelHpc.configure(runner, deps: dependencies) - end - cached(:node) { chef_run.node } - - it 'configures intel_hpc' do - is_expected.to configure_intel_hpc('configure') - end - - it 'saves properties for InSpec tests' do - is_expected.to write_node_attributes 'Save properties for InSpec tests' - end - - it 'installs non-intel dependencies first' do - is_expected.to run_bash('install non-intel dependencies').with_cwd(sources_dir) - expect(chef_run.bash('install non-intel dependencies').code) - .to match(/yum localinstall --cacheonly -y `ls #{dependencies.map { |d| "#{d}\\*.rpm" }.join(' ')}`/) - end - - it 'installs intel hpc platform' do - is_expected.to run_bash('install intel hpc platform') - .with_cwd(sources_dir) - .with_creates('/etc/intel-hpc-platform-release') - expect(chef_run.bash('install intel hpc platform').code) - .to match(/yum localinstall --cacheonly -y #{intel_hpc_spec_rpms_dir}/) - end - - it 'creates intelpython module directory' do - is_expected.to create_directory("#{modulefile_dir}/intelpython") - end - - it 'creates intelpython2_modulefile' do - is_expected.to create_cookbook_file('intelpython2_modulefile').with( - source: 'intel/intelpython2_modulefile', - path: "#{modulefile_dir}/intelpython/2", - user: 'root', - group: 'root', - mode: '0755' - ) - end - - it 'creates intelpython3_modulefile' do - is_expected.to create_cookbook_file('intelpython3_modulefile').with( - source: 'intel/intelpython3_modulefile', - path: "#{modulefile_dir}/intelpython/3", - user: 'root', - group: 'root', - mode: '0755' - ) - end - - it 'creates modulefile intelmkl for Intel optimized math kernel library' do - is_expected.to run_create_modulefile("#{modulefile_dir}/intelmkl").with( - source_path: "/opt/intel/psxe_runtime/linux/mkl/bin/mklvars.sh", - modulefile: psxe_version - ) - end - - it 'creates modulefile intelpsxe' do - is_expected.to run_create_modulefile("#{modulefile_dir}/intelpsxe").with( - source_path: "/opt/intel/psxe_runtime/linux/bin/psxevars.sh", - modulefile: psxe_version - ) - end -end - -describe 'intel_hpc:configure on HeadNode' do - cached(:aws_region) { 'test_region' } - cached(:aws_domain) { 'test_domain' } - cached(:sources_dir) { 'sources_test_dir' } - cached(:modulefile_dir) { '/usr/share/Modules/modulefiles' } - cached(:intel_hpc_spec_rpms_dir) { '/opt/intel/rpms' } - cached(:psxe_version) { '2020.4-17' } - cached(:intel_psxe_rpms_dir) { "#{sources_dir}/intel/psxe" } - cached(:packages) do - %w(intel-hpc-platform-core-intel-runtime-advisory intel-hpc-platform-compat-hpc-advisory - intel-hpc-platform-core intel-hpc-platform-core-advisory intel-hpc-platform-hpc-cluster - intel-hpc-platform-compat-hpc intel-hpc-platform-core-intel-runtime) - end - - cached(:psxe_noarch_packages) do - %w(intel-tbb-common-runtime intel-mkl-common-runtime intel-psxe-common-runtime - intel-ipp-common-runtime intel-ifort-common-runtime intel-icc-common-runtime - intel-daal-common-runtime intel-comp-common-runtime) - end - - cached(:psxe_i486_dependencies) do - %w(intel-tbb-runtime intel-tbb-libs-runtime intel-comp-runtime - intel-daal-runtime intel-icc-runtime intel-ifort-runtime - intel-ipp-runtime intel-mkl-runtime intel-openmp-runtime) - end - - cached(:platform_name) { 'el7' } - cached(:version) { '2018.0-7' } - cached(:s3_base_url) { "https://#{aws_region}-aws-parallelcluster.s3.#{aws_region}.#{aws_domain}" } - cached(:intel_hpc_packages_dir_s3_url) { "#{s3_base_url}/archives/IntelHPC/#{platform_name}" } - cached(:dependencies) { %w(dep1 dep2) } - - cached(:chef_run) do - runner = runner(platform: 'centos', version: '7', step_into: ['intel_hpc']) do |node| - node.override['cluster']['sources_dir'] = sources_dir - node.override['cluster']['region'] = aws_region - node.override['cluster']['enable_intel_hpc_platform'] = 'true' - node.override['cluster']['node_type'] = 'HeadNode' - end - allow_any_instance_of(Object).to receive(:aws_domain).and_return(aws_domain) - allow_any_instance_of(Object).to receive(:arm_instance?).and_return(false) - ConvergeIntelHpc.configure(runner, deps: dependencies) - end - - it 'configures intel_hpc' do - is_expected.to configure_intel_hpc('configure') - end - - it 'creates intel rpms dir' do - is_expected.to create_directory(intel_hpc_spec_rpms_dir).with_recursive(true) - end - - it "downloads packages from s3" do - packages.each do |package_name| - package_basename = "#{package_name}-#{version}.#{platform_name}.x86_64.rpm" - is_expected.to create_if_missing_remote_file("#{intel_hpc_spec_rpms_dir}/#{package_basename}").with( - source: "#{intel_hpc_packages_dir_s3_url}/hpc_platform_spec/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - end - end - - it 'creates intel psxe rpms dir' do - is_expected.to create_directory("#{sources_dir}/intel/psxe").with_recursive(true) - end - - it "download psxe noarch packages" do - psxe_noarch_packages.each do |psxe_noarch_package| - package_basename = "#{psxe_noarch_package}-#{psxe_version}.noarch.rpm" - is_expected.to create_if_missing_remote_file("#{intel_psxe_rpms_dir}/#{package_basename}").with( - source: "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - end - end - - it 'downloads PSXE main runtime package for 32-bit Intel compatible processors' do - intel_architecture = 'i486' - package_basename = "intel-psxe-runtime-#{psxe_version}.#{intel_architecture}.rpm" - is_expected.to create_if_missing_remote_file("#{intel_psxe_rpms_dir}/#{package_basename}").with( - source: "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - end - - it 'downloads PSXE main runtime package for 64-bit Intel compatible processors' do - intel_architecture = 'x86_64' - package_basename = "intel-psxe-runtime-#{psxe_version}.#{intel_architecture}.rpm" - is_expected.to create_if_missing_remote_file("#{intel_psxe_rpms_dir}/#{package_basename}").with( - source: "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - end - - it 'downloads PSXE dependencies for 32-bit Intel compatible processors' do - intel_architecture = 'i486' - num_bits_for_arch = '32' - psxe_i486_dependencies.each do |psxe_archful_package| - package_basename = "#{psxe_archful_package}-#{num_bits_for_arch}bit-#{psxe_version}.#{intel_architecture}.rpm" - is_expected.to create_if_missing_remote_file("#{intel_psxe_rpms_dir}/#{package_basename}").with( - source: "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - end - end - - it 'downloads PSXE dependencies for 64-bit Intel compatible processors' do - intel_architecture = 'x86_64' - num_bits_for_arch = '64' - (psxe_i486_dependencies + %w(intel-mpi-runtime)).each do |psxe_archful_package| - package_basename = "#{psxe_archful_package}-#{num_bits_for_arch}bit-#{psxe_version}.#{intel_architecture}.rpm" - is_expected.to create_if_missing_remote_file("#{intel_psxe_rpms_dir}/#{package_basename}").with( - source: "#{intel_hpc_packages_dir_s3_url}/psxe/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - end - end - - it 'installs all downloaded PSXE packages' do - is_expected.to run_bash('install PSXE packages').with_cwd(sources_dir) - expect(chef_run.bash('install PSXE packages').code) - .to match(%r{yum localinstall --cacheonly -y #{intel_psxe_rpms_dir}/\*}) - end - - it 'installs intel-optimized version of python 2' do - python_version = '2' - package_version = '2019.4-088' - package_basename = "intelpython#{python_version}-#{package_version}.x86_64.rpm" - dest_path = "#{sources_dir}/#{package_basename}" - is_expected.to create_if_missing_remote_file(dest_path).with( - source: "#{intel_hpc_packages_dir_s3_url}/intelpython#{python_version}/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - - is_expected.to run_bash("install intelpython#{python_version}").with_cwd(sources_dir) - expect(chef_run.bash("install intelpython#{python_version}").code) - .to match(/yum localinstall --cacheonly -y #{dest_path}/) - end - - it 'installs intel-optimized version of python 3' do - python_version = '3' - package_version = '2020.2-902' - package_basename = "intelpython#{python_version}-#{package_version}.x86_64.rpm" - dest_path = "#{sources_dir}/#{package_basename}" - is_expected.to create_if_missing_remote_file(dest_path).with( - source: "#{intel_hpc_packages_dir_s3_url}/intelpython#{python_version}/#{package_basename}", - mode: '0744', - retries: 3, - retry_delay: 5 - ) - - is_expected.to run_bash("install intelpython#{python_version}").with_cwd(sources_dir) - expect(chef_run.bash("install intelpython#{python_version}").code) - .to match(/yum localinstall --cacheonly -y #{dest_path}/) - end -end diff --git a/cookbooks/aws-parallelcluster-shared/attributes/users_centos7.rb b/cookbooks/aws-parallelcluster-shared/attributes/users_centos7.rb deleted file mode 100644 index 1577b1650..000000000 --- a/cookbooks/aws-parallelcluster-shared/attributes/users_centos7.rb +++ /dev/null @@ -1,5 +0,0 @@ -return unless platform?('centos') && node['platform_version'].to_i == 7 - -default['cluster']['cluster_user'] = 'centos' -default['cluster']['cluster_user_home'] = "/home/#{node['cluster']['cluster_user']}" -default['cluster']['cluster_user_local_home'] = "/local#{node['cluster']['cluster_user_home']}" diff --git a/cookbooks/aws-parallelcluster-shared/resources/os_type/os_type_centos7.rb b/cookbooks/aws-parallelcluster-shared/resources/os_type/os_type_centos7.rb deleted file mode 100644 index 0a2d16c62..000000000 --- a/cookbooks/aws-parallelcluster-shared/resources/os_type/os_type_centos7.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :os_type, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end -use 'partial/_os_type_common.rb' - -def current_os - "centos#{node['platform_version'].to_i}" -end diff --git a/cookbooks/aws-parallelcluster-shared/resources/package_repos/package_repos_centos7.rb b/cookbooks/aws-parallelcluster-shared/resources/package_repos/package_repos_centos7.rb deleted file mode 100644 index b8fd4ea10..000000000 --- a/cookbooks/aws-parallelcluster-shared/resources/package_repos/package_repos_centos7.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :package_repos, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end -unified_mode true - -use 'partial/_package_repos_rpm.rb' - -default_action :setup - -action :setup do - include_recipe 'yum' - include_recipe "yum-epel" - - # the epel recipe doesn't work on aarch64, needs epel-release package - package 'epel-release' if node['kernel']['machine'] == 'aarch64' - - # For centos 7 add skip_if_unavail - execute 'yum-config-manager_skip_if_unavail' do - command "yum-config-manager --setopt=\*.skip_if_unavailable=1 --save" - end -end - -action :update do - # Do nothing -end diff --git a/cookbooks/aws-parallelcluster-shared/spec/spec_helper.rb b/cookbooks/aws-parallelcluster-shared/spec/spec_helper.rb index dcbc81fc1..849b19009 100644 --- a/cookbooks/aws-parallelcluster-shared/spec/spec_helper.rb +++ b/cookbooks/aws-parallelcluster-shared/spec/spec_helper.rb @@ -37,9 +37,6 @@ def for_oses(os_list) def for_all_oses [ %w(amazon 2), - # The only Centos7 version supported by ChefSpec - # See the complete list here: https://github.com/chefspec/fauxhai/blob/main/PLATFORMS.md - %w(centos 7.8.2003), %w(ubuntu 20.04), %w(ubuntu 22.04), %w(redhat 8), diff --git a/cookbooks/aws-parallelcluster-slurm/resources/dns_domain/dns_domain_centos7.rb b/cookbooks/aws-parallelcluster-slurm/resources/dns_domain/dns_domain_centos7.rb deleted file mode 100644 index 9b22f8658..000000000 --- a/cookbooks/aws-parallelcluster-slurm/resources/dns_domain/dns_domain_centos7.rb +++ /dev/null @@ -1,16 +0,0 @@ -# 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 :dns_domain, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_dns_domain_common' -use 'partial/_dns_domain_redhat' diff --git a/cookbooks/aws-parallelcluster-slurm/resources/jwt_dependencies/jwt_dependencies_centos7.rb b/cookbooks/aws-parallelcluster-slurm/resources/jwt_dependencies/jwt_dependencies_centos7.rb deleted file mode 100644 index 4e61ecb43..000000000 --- a/cookbooks/aws-parallelcluster-slurm/resources/jwt_dependencies/jwt_dependencies_centos7.rb +++ /dev/null @@ -1,15 +0,0 @@ -# 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 :jwt_dependencies, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_jwt_dependencies_common' diff --git a/cookbooks/aws-parallelcluster-slurm/resources/munge/munge_centos7.rb b/cookbooks/aws-parallelcluster-slurm/resources/munge/munge_centos7.rb deleted file mode 100644 index 90a4e48ca..000000000 --- a/cookbooks/aws-parallelcluster-slurm/resources/munge/munge_centos7.rb +++ /dev/null @@ -1,20 +0,0 @@ -# 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 :munge, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_munge_actions' -use 'partial/_munge_rhel' - -def munge_libdir - '/usr/lib64' -end diff --git a/cookbooks/aws-parallelcluster-slurm/resources/mysql_client/mysql_client_centos7.rb b/cookbooks/aws-parallelcluster-slurm/resources/mysql_client/mysql_client_centos7.rb deleted file mode 100644 index 79b63a55d..000000000 --- a/cookbooks/aws-parallelcluster-slurm/resources/mysql_client/mysql_client_centos7.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -# Copyright:: 2023 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 :mysql_client, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_common' -use 'partial/_setup_rhel_based' diff --git a/cookbooks/aws-parallelcluster-slurm/resources/slurm_dependencies/slurm_dependencies_centos7.rb b/cookbooks/aws-parallelcluster-slurm/resources/slurm_dependencies/slurm_dependencies_centos7.rb deleted file mode 100644 index 06e08c66c..000000000 --- a/cookbooks/aws-parallelcluster-slurm/resources/slurm_dependencies/slurm_dependencies_centos7.rb +++ /dev/null @@ -1,19 +0,0 @@ -# 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 :slurm_dependencies, platform: 'centos' do |node| - node['platform_version'].to_i == 7 -end - -use 'partial/_slurm_dependencies_common' - -def dependencies - %w(json-c-devel http-parser-devel perl-Switch lua-devel) -end diff --git a/kitchen.docker.yml b/kitchen.docker.yml index 62f36520a..977235d51 100644 --- a/kitchen.docker.yml +++ b/kitchen.docker.yml @@ -44,14 +44,6 @@ platforms: attributes: cluster: base_os: alinux2023 - - name: centos7 - driver: - image: <% if ENV['KITCHEN_CENTOS7_IMAGE'] %> <%= ENV['KITCHEN_CENTOS7_IMAGE'] %> <% else %> dokken/centos-7 <% end %> - attributes: - cluster: - base_os: centos7 - # Since the kernel version of the docker images is not in the expected pattern, set a fake kernel value to permit to install Lustre on docker. - kernel_release: '3.10.0-1160.76.1.el7.fake-value' - name: ubuntu2004 driver: image: <% if ENV['KITCHEN_UBUNTU2004_IMAGE'] %> <%= ENV['KITCHEN_UBUNTU2004_IMAGE'] %> <% else %> dokken/ubuntu-20.04 <% end %> diff --git a/kitchen.ec2.yml b/kitchen.ec2.yml index f925f2047..361cddec8 100644 --- a/kitchen.ec2.yml +++ b/kitchen.ec2.yml @@ -237,32 +237,6 @@ platforms: attributes: cluster: base_os: rocky9 - - name: centos7 - driver_plugin: ec2 - driver: - <% if ENV['KITCHEN_CENTOS7_AMI'] %> - # Use the CentOS 7 AMI most similar to the base AMI used to build the ParallelCluster image - image_id: <%= ENV['KITCHEN_CENTOS7_AMI'] %> - <% else %> - image_search: - name: <% if ENV['KITCHEN_PHASE']=='install' %>CentOS Linux 7 *- 2211<% else %><%= pcluster_prefix %>-centos7-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: gp2 - 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: centos - attributes: - cluster: - base_os: centos7 - name: ubuntu2004 driver_plugin: ec2 driver: diff --git a/test/data/cluster-config.yml b/test/data/cluster-config.yml index 3d1af348c..811ef9f69 100644 --- a/test/data/cluster-config.yml +++ b/test/data/cluster-config.yml @@ -82,7 +82,7 @@ HeadNode: Iam: null Image: CustomAmi: null - Os: centos7 + Os: alinux2023 Imds: ImdsSupport: v2.0 Monitoring: