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 ## Fix nfs logic for CentOS 8 * 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 Signed-off-by: Rex <[email protected]>
- Loading branch information
1 parent
bd1834d
commit 8504431
Showing
10 changed files
with
201 additions
and
18 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