forked from aws/aws-parallelcluster-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for basic features on CentOS 8
* Enable PowerTools Repo so *-devel packages can be installed with DNF * Install Python3 as system python for CentOS 8 * Do not enforce kernel_devel version because kernel_devel package with same version as kernel release version cannot be found * Install iptables * Enable EPEL repo by default ## IntelMPI The `environment-modules` package installation automatically creates the `/usr/share/Modules/` folder, required by the intel_mpi recipe. References: * https://forums.centos.org/viewtopic.php?t=74035 ## NFS * Fix nfs logic in base_install by calling nfs::server4 recipe and providing correct idmap service name, nfs-idmapd * Workaround to only run nfs::server instead of nfs::server4 for CentOS 8 due to issue: sous-chefs/nfs#116 ## EBS * Modify logic to get EBS device to volume id mapping. Specifically ec2_dev_2_volid.py and parallelcluster-ebsnvme-id are modified for CentOS 8 to use nvme-cli to retrieve volume id for a device following this guide: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#identify-nvme-ebs-device * parallelcluster-ebsnvme-id needs to accept the options -v/-b/-u to output volume id and block device information when called from ec2_dev_2_volid.py and attachVolume.py * Modify centos8 specific parallelcluster-ebsnvme-id to output correct info based on option specified * Centos8 specific ec2_dev_2_volid.py no longer needed and removed, as new parallelcluster-ebsnvme-id script will accept -v option to output volume id ## DNS configuration * Configure DNS settings for CentOS 8. Note dhclient is not enabled by default, so need to provide modified NetworkManager config. Afterwards same logic as CentOS 7 can be used # Torque I'm using some compilation flags, like we're already doing for Ubuntu 18 and Amazon Linux 2. `c++03` is the 1998 ISO C++ standard plus the 2003 technical corrigendum and some additional defect reports. Note: The compilation succeeded even without the `c++03` flag. I'm adding it for coherency. Source: https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html `-fpermissive` downgrades some diagnostics about nonconformant code from errors to warnings. Source: https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/C_002b_002b-Dialect-Options.html#index-fpermissive-140 ## FSx * Use `package` in place of `yum_package` to support `dnf`. * Added `gdisk` package, required by `update initramfs` action, called by `kernel_module 'lnet'` resource. * Use `['platform_version'].to_f` to compare minor version of the OS in place of `['platform_version'].split('.')[1].to_i` to be compatible with multiple major OS values. * Explicitly added `x86_64` at the end of the `base_url` parameter, like we have for CentOS 7. * Improved check for CentOS 7.5. and 7.6. * Use `package` in place of `apt_package` to be aligned to other OSes. References: * Lustre installation guide: https://docs.aws.amazon.com/fsx/latest/LustreGuide/install-lustre-client.html * gdisk issue: https://www.spinics.net/lists/centos-devel/msg18766.html * package resource: https://docs.chef.io/resources/package/ ## EFA Mark CentOS 8 as unsupported OS for EFA. Supported AMIs are: Amazon Linux, Amazon Linux 2, RHEL 7.6, RHEL 7.7, RHEL 7.8, CentOS 7, Ubuntu 16.04, and Ubuntu 18.04. Source: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa-working-with.html Signed-off-by: Enrico Usai <[email protected]> Signed-off-by: Rex <[email protected]>
- Loading branch information
1 parent
75bd85b
commit 505c22d
Showing
14 changed files
with
245 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Configuration file for NetworkManager. | ||
# | ||
# See "man 5 NetworkManager.conf" for details. | ||
# | ||
# The directories /usr/lib/NetworkManager/conf.d/ and /run/NetworkManager/conf.d/ | ||
# can contain additional configuration snippets installed by packages. These files are | ||
# read before NetworkManager.conf and have thus lowest priority. | ||
# The directory /etc/NetworkManager/conf.d/ can contain additional configuration | ||
# snippets. Those snippets are merged last and overwrite the settings from this main | ||
# file. | ||
# | ||
# The files within one conf.d/ directory are read in asciibetical order. | ||
# | ||
# If /etc/NetworkManager/conf.d/ contains a file with the same name as | ||
# /usr/lib/NetworkManager/conf.d/, the latter file is shadowed and thus ignored. | ||
# Hence, to disable loading a file from /usr/lib/NetworkManager/conf.d/ you can | ||
# put an empty file to /etc with the same name. The same applies with respect | ||
# to the directory /run/NetworkManager/conf.d where files in /run shadow | ||
# /usr/lib and are themselves shadowed by files under /etc. | ||
# | ||
# If two files define the same key, the one that is read afterwards will overwrite | ||
# the previous one. | ||
|
||
[main] | ||
plugins = ifcfg-rh, | ||
dhcp = dhclient | ||
|
||
|
||
[logging] | ||
# When debugging NetworkManager, enabling debug logging is of great help. | ||
# | ||
# Logfiles contain no passwords and little sensitive information. But please | ||
# check before posting the file online. You can also personally hand over the | ||
# logfile to a NM developer to treat it confidential. Meet us on #nm on freenode. | ||
# Please post full logfiles except minimal modifications of private data. | ||
# | ||
# You can also change the log-level at runtime via | ||
# $ nmcli general logging level TRACE domains ALL | ||
# However, usually it's cleaner to enable debug logging | ||
# in the configuration and restart NetworkManager so that | ||
# debug logging is enabled from the start. | ||
# | ||
# You will find the logfiles in syslog, for example via | ||
# $ journalctl -u NetworkManager | ||
# | ||
# Note that debug logging of NetworkManager can be quite verbose. Some messages | ||
# might be rate-limited by the logging daemon (see RateLimitIntervalSec, RateLimitBurst | ||
# in man journald.conf). Please disable rate-limiting before collecting debug logs. | ||
# | ||
#level=TRACE | ||
#domains=ALL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Alias /ganglia /usr/share/ganglia | ||
|
||
<Directory "/usr/share/ganglia"> | ||
AllowOverride All | ||
Require all granted | ||
</Directory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2020 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" file accompanying this file. This file is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | ||
# OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the | ||
# License. | ||
|
||
# Usage: | ||
# Read EBS device information using nvme-cli and provide information about the volume. | ||
display_help() { | ||
echo "Usage: $0 [options] {device_name}" >&2 | ||
echo | ||
echo " -v, --volume Return volume-id" | ||
echo " -b, --block-dev Return block device mapping" | ||
echo " -u, --udev Output data in format suitable for udev rules, i.e. /dev/sdb -> sdb" | ||
echo " -h, --help Print usage info" | ||
echo | ||
} | ||
|
||
print_all=1 | ||
print_volume=0 | ||
print_block_device_mapping=0 | ||
print_udev_format=0 | ||
|
||
# Parse arguments | ||
for i in "$@" | ||
do | ||
case $i in | ||
-h|--help) | ||
display_help | ||
exit 0 | ||
;; | ||
-v|--volume) | ||
print_volume=1 | ||
print_all=0 | ||
shift | ||
;; | ||
-b|--block-dev) | ||
print_block_device_mapping=1 | ||
print_all=0 | ||
shift | ||
;; | ||
-u|--udev) | ||
print_udev_format=1 | ||
print_all=0 | ||
shift | ||
;; | ||
*) | ||
;; | ||
esac | ||
done | ||
|
||
# Check if device argument is provided | ||
if [[ "$#" -ne 1 ]]; then | ||
display_help | ||
exit 1 | ||
fi | ||
|
||
if [[ $print_all -eq 1 || $print_volume -eq 1 ]]; then | ||
# Sample volume info from nvme-cli: | ||
# sn : vol01234567890abcdef | ||
# See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#identify-nvme-ebs-device | ||
# Insert '-' after 'vol' so that output looks like vol-067f083a4f6xxxxx | ||
vol_id=$(sudo nvme id-ctrl -v ${1} | grep -oP "sn\s+:\s\K(.+)" | sed 's/^vol/&-/') | ||
echo "Volume ID: ${vol_id}" | ||
fi | ||
|
||
if [[ $print_all -eq 1 || $print_block_device_mapping -eq 1 || $print_udev_format -eq 1 ]]; then | ||
# Sample device name info from nvme-cli: | ||
# 0000: 2f 64 65 76 2f 73 64 6a 20 20 20 20 20 20 20 20 "/dev/sdf..." | ||
# See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#identify-nvme-ebs-device | ||
if [[ $print_udev_format -eq 1 ]]; then | ||
# Strip /dev/ prefix if -u option is specified | ||
device_name=$(sudo nvme id-ctrl -v ${1} | grep -oP '^0000:.+"\K([\/\w]+)(?=\.*"$)' | sed "s/^\/dev\///") | ||
else | ||
device_name=$(sudo nvme id-ctrl -v ${1} | grep -oP '^0000:.+"\K([\/\w]+)(?=\.*"$)') | ||
fi | ||
|
||
echo "${device_name}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.