Skip to content

Commit

Permalink
Add support for CentOS 8 in base_install
Browse files Browse the repository at this point in the history
* Enable PowerTools Repo so *-devel packages can be installed with DNF
* Install Python3 as system python for CentOS 8
* Remove obsolete logic of running nfs::server recipe when Ubuntu, nfs::server4 already includes nfs::server recipe
* Workaround to only run nfs::server instead of nfs::server4 for CentOS 8 due to issue: sous-chefs/nfs#116
* Comment out other install recipes included in base_install that will be addressed by separate PRs

Signed-off-by: Rex <[email protected]>
  • Loading branch information
rexcsn committed Sep 30, 2020
1 parent 1c676b4 commit 50105bb
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 32 deletions.
9 changes: 8 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
default['cfncluster']['lustre']['kmod_url'] = 'https://downloads.whamcloud.com/public/lustre/lustre-2.10.6/el6/client/RPMS/x86_64/kmod-lustre-client-2.10.6-1.el6.x86_64.rpm'
default['cfncluster']['lustre']['client_url'] = 'https://downloads.whamcloud.com/public/lustre/lustre-2.10.6/el6/client/RPMS/x86_64/lustre-client-2.10.6-1.el6.x86_64.rpm'

if node['platform_version'].to_i >= 7
if node['platform_version'].to_i == 7
default['cfncluster']['base_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 lvm2 mpich-devel R atlas-devel
Expand All @@ -224,6 +224,13 @@
default['cfncluster']['lustre']['kmod_url'] = '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['cfncluster']['lustre']['client_url'] = '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'
end
elsif node['platform_version'].to_i == 8
default['cfncluster']['base_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 lvm2 mpich-devel R atlas-devel
blas-devel fftw-devel libffi-devel openssl-devel dkms mariadb-devel libedit-devel
libical-devel postgresql-devel postgresql-server sendmail libxml2-devel libglvnd-devel mdadm python3 python3-pip
libssh2-devel libgcrypt-devel libevent-devel glibc-static bind-utils]
end
default['cfncluster']['kernel_devel_pkg']['name'] = "kernel-lt-devel" if node['platform'] == 'centos' && node['platform_version'].to_i >= 6 && node['platform_version'].to_i < 7
default['cfncluster']['rhel']['extra_repo'] = 'rhui-REGION-rhel-server-releases-optional' if node['platform'] == 'redhat' && node['platform_version'].to_i >= 6 && node['platform_version'].to_i < 7
Expand Down
10 changes: 8 additions & 2 deletions recipes/_update_packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@
# not CentOS6
case node['platform_family']
when 'rhel', 'amazon'
execute 'yum-update' do
command "yum -y update && package-cleanup -y --oldkernels --count=1"
if node['platform_version'].to_i == 8
execute 'dnf-update' do
command "dnf -y update"
end
else
execute 'yum-update' do
command "yum -y update && package-cleanup -y --oldkernels --count=1"
end
end
when 'debian'
apt_update
Expand Down
2 changes: 1 addition & 1 deletion recipes/awsbatch_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
mkdir aws-parallelcluster-custom-cli
tar -xzf aws-parallelcluster.tgz --directory aws-parallelcluster-custom-cli
cd aws-parallelcluster-custom-cli/*aws-parallelcluster-*
pip install cli/
#{node['cfncluster']['cookbook_virtualenv_path']}/bin/pip install cli/
CLI
end
else
Expand Down
66 changes: 38 additions & 28 deletions recipes/base_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@
include_recipe "yum-epel"
end


unless node['platform_version'].to_i < 7
if node['platform_version'].to_i == 7
execute 'yum-config-manager_skip_if_unavail' do
command "yum-config-manager --setopt=\*.skip_if_unavailable=1 --save"
end
elsif node['platform_version'].to_i == 8
# Enable PowerTools Repo so *-devel packages can be installed with DNF
execute 'dnf enable powertools' do
command "dnf config-manager --set-enabled PowerTools"
end
end

if node['platform'] == 'redhat'
Expand Down Expand Up @@ -66,18 +70,18 @@
end
end

case node['platform_family']
when 'rhel', 'amazon'
yum_package node['cfncluster']['kernel_devel_pkg']['name'] do
version node['cfncluster']['kernel_devel_pkg']['version']
retries 3
retry_delay 5
end
when 'debian'
apt_package node['cfncluster']['kernel_generic_pkg'] do
retries 3
retry_delay 5
package "install kernel packages" do
case node['platform_family']
when 'rhel', 'amazon'
package_name node['cfncluster']['kernel_devel_pkg']['name']
if node['platform_version'].to_i < 8
version node['cfncluster']['kernel_devel_pkg']['version']
end
when 'debian'
package_name node['cfncluster']['kernel_generic_pkg']
end
retries 3
retry_delay 5
end

bash "install awscli" do
Expand All @@ -86,7 +90,7 @@
set -e
curl --retry 5 --retry-delay 5 "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
#{node['cfncluster']['cookbook_virtualenv_path']}/bin/python awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
CLI
not_if { ::File.exist?("/usr/local/bin/aws") }
end
Expand Down Expand Up @@ -116,11 +120,12 @@
mode '0644'
end

if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 16.04
# FIXME: https://github.com/atomic-penguin/cookbook-nfs/issues/93
if node['platform'] == 'centos' && node['platform_version'].to_i == 8
# FIXME: https://github.com/atomic-penguin/cookbook-nfs/issues/116
include_recipe "nfs::server"
else
include_recipe "nfs::server4"
end
include_recipe "nfs::server4"

# Put configure-pat.sh onto the host
cookbook_file 'configure-pat.sh' do
Expand Down Expand Up @@ -214,18 +219,23 @@
# Install Ganglia
include_recipe "aws-parallelcluster::ganglia_install"

# Install NVIDIA and CUDA
include_recipe "aws-parallelcluster::_nvidia_install"
# FIXME:
# # Install NVIDIA and CUDA
# include_recipe "aws-parallelcluster::_nvidia_install"

# Install FSx options
include_recipe "aws-parallelcluster::_lustre_install"
# FIXME:
# # Install FSx options
# include_recipe "aws-parallelcluster::_lustre_install"

# Install EFA & Intel MPI
include_recipe "aws-parallelcluster::efa_install"
include_recipe "aws-parallelcluster::intel_mpi"
# FIXME:
# # Install EFA & Intel MPI
# include_recipe "aws-parallelcluster::efa_install"
# include_recipe "aws-parallelcluster::intel_mpi"

# Install the AWS cloudwatch agent
include_recipe "aws-parallelcluster::cloudwatch_agent_install"
# FIXME:
# # Install the AWS cloudwatch agent
# include_recipe "aws-parallelcluster::cloudwatch_agent_install"

# Install Amazon Time Sync
include_recipe "aws-parallelcluster::chrony_install"
# FIXME:
# # Install Amazon Time Sync
# include_recipe "aws-parallelcluster::chrony_install"

0 comments on commit 50105bb

Please sign in to comment.