Skip to content

Commit c373103

Browse files
committed
Add support for Rocky linux 8
Added new os in: * Image Builder components * constants used by pcluster commands * CloudWatch dashboard builder * list of OS supported by DCV * pcluster configure and other unit tests * system-analyzer.sh * pc_support json file * changelog ### References Using `Rocky-8-EC2-Base-8.*` as base AMI from official Rocky Linux account: https://rockylinux.org/cloud-images/ Signed-off-by: Enrico Usai <[email protected]>
1 parent 8fc0fcd commit c373103

File tree

30 files changed

+67
-30
lines changed

30 files changed

+67
-30
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CHANGELOG
3131
------
3232

3333
**ENHANCEMENTS**
34+
- Add support for Rocky Linux 8.
3435
- Allow configuration of static and dynamic node priorities in Slurm compute resources via the ParallelCluster configuration YAML file.
3536
- Add support for Ubuntu 22.
3637
- Allow memory-based scheduling when multiple instance types are specified for a Slurm Compute Resource.

cli/src/pcluster/cli/commands/dcv_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ def get_supported_dcv_os(architecture):
1616
"""Return a list of all the operating system supported by DCV."""
1717
architectures_dict = {
1818
"x86_64": SUPPORTED_OSES,
19-
"arm64": ["alinux2", "centos7", "rhel8"],
19+
"arm64": ["alinux2", "centos7", "rhel8", "rocky8"],
2020
}
2121
return architectures_dict.get(architecture, [])

cli/src/pcluster/constants.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
SUPPORTED_SCHEDULERS = ["slurm", "awsbatch"]
2525
SCHEDULERS_SUPPORTING_IMDS_SECURED = ["slurm"]
26-
SUPPORTED_OSES = ["alinux2", "centos7", "ubuntu2004", "ubuntu2204", "rhel8"]
26+
SUPPORTED_OSES = ["alinux2", "centos7", "ubuntu2004", "ubuntu2204", "rhel8", "rocky8"]
2727
SUPPORTED_OSES_FOR_SCHEDULER = {"slurm": SUPPORTED_OSES, "awsbatch": ["alinux2"]}
2828
DELETE_POLICY = "Delete"
2929
RETAIN_POLICY = "Retain"
@@ -40,6 +40,7 @@
4040
"ubuntu2004": {"user": "ubuntu"},
4141
"ubuntu2204": {"user": "ubuntu"},
4242
"rhel8": {"user": "ec2-user"},
43+
"rocky8": {"user": "rocky"},
4344
}
4445

4546
OS_TO_IMAGE_NAME_PART_MAP = {
@@ -48,6 +49,7 @@
4849
"ubuntu2004": "ubuntu-2004-lts-hvm",
4950
"ubuntu2204": "ubuntu-2204-lts-hvm",
5051
"rhel8": "rhel8-hvm",
52+
"rocky8": "rocky8-hvm",
5153
}
5254

5355
IMAGE_NAME_PART_TO_OS_MAP = {value: key for key, value in OS_TO_IMAGE_NAME_PART_MAP.items()}

cli/src/pcluster/resources/imagebuilder/parallelcluster.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ phases:
5757
[ -n "${CfnParamCincInstaller}" ] && CINC_URL="${CfnParamCincInstaller}"
5858
echo "${!CINC_URL}"
5959
60-
# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7
60+
# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7 | rocky.8.8
6161
- name: OperatingSystemRelease
6262
action: ExecuteBash
6363
inputs:
@@ -92,6 +92,8 @@ phases:
9292
OS='ubuntu2204'
9393
elif [ `echo "${!RELEASE}" | grep '^rhel\.8'` ]; then
9494
OS='rhel8'
95+
elif [ `echo "${!RELEASE}" | grep '^rocky\.8'` ]; then
96+
OS='rocky8'
9597
else
9698
echo "Operating System '${!RELEASE}' is not supported. Failing build."
9799
exit {{ FailExitCode }}
@@ -108,7 +110,7 @@ phases:
108110
set -v
109111
OS='{{ build.OperatingSystemName.outputs.stdout }}'
110112
111-
if [ `echo "${!OS}" | grep -E '^(alinux|centos|rhel)'` ]; then
113+
if [ `echo "${!OS}" | grep -E '^(alinux|centos|rhel|rocky)'` ]; then
112114
PLATFORM='RHEL'
113115
elif [ `echo "${!OS}" | grep -E '^ubuntu'` ]; then
114116
PLATFORM='DEBIAN'
@@ -146,15 +148,15 @@ phases:
146148
set -v
147149
if [ ${CfnParamUpdateOsAndReboot} == false ]; then
148150
RELEASE='{{ build.OperatingSystemRelease.outputs.stdout }}'
149-
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn|centos|ubuntu|rhel)'` ]; then
151+
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn|centos|ubuntu|rhel|rocky)'` ]; then
150152
echo "This component does not support '${!RELEASE}'. Failing build."
151153
exit {{ FailExitCode }}
152154
fi
153155
154-
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7 and RHEL8
156+
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7, RHEL8 and Rocky8
155157
ARCH=$(uname -m)
156158
if [[ `echo ${!ARCH}` == 'aarch64' ]]; then
157-
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8)'` ]; then
159+
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8|rocky\.8)'` ]; then
158160
echo "This component does not support '${!RELEASE}' on ARM64 CPUs. Failing build."
159161
exit {{ FailExitCode }}
160162
fi

cli/src/pcluster/resources/imagebuilder/parallelcluster_tag.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ phases:
5555
OS='ubuntu2204'
5656
elif [ $(echo "${RELEASE}" | grep '^rhel\.8') ]; then
5757
OS='rhel8'
58+
elif [ $(echo "${RELEASE}" | grep '^rocky\.8') ]; then
59+
OS='rocky8'
5860
fi
5961
6062
echo ${OS}
@@ -70,7 +72,7 @@ phases:
7072
which aws
7173
if [[ $? -ne 0 ]]; then
7274
echo "Installing unzip"
73-
if [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^(centos7|alinux|rhel) ]]; then
75+
if [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^(centos7|alinux|rhel|rocky) ]]; then
7476
yum -y install unzip
7577
elif [[ "{{ test.OperatingSystemName.outputs.stdout }}" =~ ^ubuntu ]]; then
7678
apt-get -y install unzip

cli/src/pcluster/resources/imagebuilder/parallelcluster_test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ phases:
4444
OS='ubuntu2204'
4545
elif [ `echo "${RELEASE}" | grep '^rhel\.8'` ]; then
4646
OS='rhel8'
47+
elif [ `echo "${RELEASE}" | grep '^rocky\.8'` ]; then
48+
OS='rocky8'
4749
else
4850
echo "Operating System '${RELEASE}' is not supported. Failing build." && exit 1
4951
fi

cli/src/pcluster/resources/imagebuilder/parallelcluster_validate.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ phases:
4444
OS='ubuntu2204'
4545
elif [ `echo "${RELEASE}" | grep '^rhel\.8'` ]; then
4646
OS='rhel8'
47+
elif [ `echo "${RELEASE}" | grep '^rocky\.8'` ]; then
48+
OS='rocky8'
4749
else
4850
echo "Operating System '${RELEASE}' is not supported. Failing build." && exit 1
4951
fi
@@ -79,7 +81,7 @@ phases:
7981
set -v
8082
OS='{{ validate.OperatingSystemName.outputs.stdout }}'
8183
82-
if [ `echo "${OS}" | grep -E '^(alinux|centos|rhel)'` ]; then
84+
if [ `echo "${OS}" | grep -E '^(alinux|centos|rhel|rocky)'` ]; then
8385
PLATFORM='RHEL'
8486
elif [ `echo "${OS}" | grep -E '^ubuntu'` ]; then
8587
PLATFORM='DEBIAN'
@@ -124,7 +126,7 @@ phases:
124126
set -v
125127
ARCHITECTURE='{{ validate.OperatingSystemArchitecture.outputs.stdout }}'
126128
OS='{{ validate.OperatingSystemName.outputs.stdout }}'
127-
if [ ${ARCHITECTURE} == 'arm64' ] && [[ ${OS} =~ ^(ubuntu(20|22)04|alinux2|rhel8)$ ]] || [ ${ARCHITECTURE} == 'x86_64' ]; then
129+
if [ ${ARCHITECTURE} == 'arm64' ] && [[ ${OS} =~ ^(ubuntu(20|22)04|alinux2|rhel8|rocky8)$ ]] || [ ${ARCHITECTURE} == 'x86_64' ]; then
128130
echo "true"
129131
else
130132
echo "false"

cli/src/pcluster/resources/imagebuilder/update_and_reboot.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ constants:
1010
phases:
1111
- name: build
1212
steps:
13-
# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7
13+
# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7 | rocky.8.8
1414
- name: OperatingSystemRelease
1515
action: ExecuteBash
1616
inputs:
@@ -45,6 +45,8 @@ phases:
4545
OS='ubuntu2204'
4646
elif [ `echo "${!RELEASE}" | grep '^rhel\.8'` ]; then
4747
OS='rhel8'
48+
elif [ `echo "${!RELEASE}" | grep '^rocky\.8'` ]; then
49+
OS='rocky8'
4850
else
4951
echo "Operating System '${!RELEASE}' is not supported. Failing build."
5052
exit {{ FailExitCode }}
@@ -61,7 +63,7 @@ phases:
6163
set -v
6264
OS='{{ build.OperatingSystemName.outputs.stdout }}'
6365
64-
if [ `echo "${!OS}" | grep -E '^(alinux|centos|rhel)'` ]; then
66+
if [ `echo "${!OS}" | grep -E '^(alinux|centos|rhel|rocky)'` ]; then
6567
PLATFORM='RHEL'
6668
elif [ `echo "${!OS}" | grep -E '^ubuntu'` ]; then
6769
PLATFORM='DEBIAN'
@@ -77,15 +79,15 @@ phases:
7779
- |
7880
set -v
7981
RELEASE='{{ build.OperatingSystemRelease.outputs.stdout }}'
80-
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn|centos|ubuntu|rhel)'` ]; then
82+
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn|centos|ubuntu|rhel|rocky)'` ]; then
8183
echo "This component does not support '${!RELEASE}'. Failing build."
8284
exit {{ FailExitCode }}
8385
fi
8486
85-
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7 and RHEL 8
87+
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7, RHEL8 and Rocky8
8688
ARCH=$(uname -m)
8789
if [[ `echo ${!ARCH}` == 'aarch64' ]]; then
88-
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8)'` ]; then
90+
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8|rocky\.8)'` ]; then
8991
echo "This component does not support '${!RELEASE}' on ARM64 CPUs. Failing build."
9092
exit {{ FailExitCode }}
9193
fi
@@ -130,9 +132,7 @@ phases:
130132
if [[ ${!PLATFORM} == RHEL ]]; then
131133
yum -y update
132134
133-
if [[ ${!OS} != "rhel8" ]]; then
134-
package-cleanup -y --oldkernels --count=1
135-
else
135+
if [[ ${!OS} == "rhel8" ]] || [[ ${!OS} == "rocky8" ]] ; then
136136
# package-cleanup has changed in RHEL8 and it works differently
137137
# RHEL8 keeps at least 2 kernel for fallback reason https://access.redhat.com/solutions/1227
138138
# The kernel cleanup should be performed manually
@@ -146,6 +146,8 @@ phases:
146146
echo "Removing kernel-$VERSION kernel-core-$VERSION kernel-modules-$VERSION"
147147
rpm -e kernel-$VERSION kernel-core-$VERSION kernel-modules-$VERSION;
148148
done
149+
else
150+
package-cleanup -y --oldkernels --count=1
149151
fi
150152
yum -y install kernel-devel
151153
elif [[ ${!PLATFORM} == DEBIAN ]]; then

cli/src/pcluster/templates/cw_dashboard_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def _add_cw_log(self):
705705
[
706706
self._new_cw_log_widget(
707707
title="system-messages",
708-
conditions=[Condition(["alinux2", "centos7", "rhel8"], base_os)],
708+
conditions=[Condition(["alinux2", "centos7", "rhel8", "rocky8"], base_os)],
709709
filters=[self._new_filter(pattern=f"{head_private_ip}.*system-messages")],
710710
),
711711
self._new_cw_log_widget(

cli/tests/pcluster/cli/configure/test_pcluster_configure/test_disabled_efa_no_placement_group/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Allowed values for Operating System:
3535
3. ubuntu2004
3636
4. ubuntu2204
3737
5. rhel8
38+
6. rocky8
3839
The EC2 instance selected supports enhanced networking capabilities using Elastic Fabric Adapter (EFA). EFA enables you to run applications requiring high levels of inter-node communications at scale on AWS at no additional charge (https://docs.aws.amazon.com/parallelcluster/latest/ug/efa-v3.html).
3940
Allowed values for VPC ID:
4041
# id name number_of_subnets

0 commit comments

Comments
 (0)