Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/src/pcluster/cli/commands/dcv_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def get_supported_dcv_os(architecture):
"""Return a list of all the operating system supported by DCV."""
architectures_dict = {
"x86_64": SUPPORTED_OSES,
"arm64": ["ubuntu1804", "alinux2", "centos7", "rhel8"],
"arm64": ["alinux2", "centos7", "rhel8"],
}
return architectures_dict.get(architecture, [])
4 changes: 1 addition & 3 deletions cli/src/pcluster/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

SUPPORTED_SCHEDULERS = ["slurm", "awsbatch"]
SCHEDULERS_SUPPORTING_IMDS_SECURED = ["slurm"]
SUPPORTED_OSES = ["alinux2", "centos7", "ubuntu1804", "ubuntu2004", "ubuntu2204", "rhel8"]
SUPPORTED_OSES = ["alinux2", "centos7", "ubuntu2004", "ubuntu2204", "rhel8"]
SUPPORTED_OSES_FOR_SCHEDULER = {"slurm": SUPPORTED_OSES, "awsbatch": ["alinux2"]}
DELETE_POLICY = "Delete"
RETAIN_POLICY = "Retain"
Expand All @@ -37,7 +37,6 @@
OS_MAPPING = {
"centos7": {"user": "centos"},
"alinux2": {"user": "ec2-user"},
"ubuntu1804": {"user": "ubuntu"},
"ubuntu2004": {"user": "ubuntu"},
"ubuntu2204": {"user": "ubuntu"},
"rhel8": {"user": "ec2-user"},
Expand All @@ -46,7 +45,6 @@
OS_TO_IMAGE_NAME_PART_MAP = {
"alinux2": "amzn2-hvm",
"centos7": "centos7-hvm",
"ubuntu1804": "ubuntu-1804-lts-hvm",
"ubuntu2004": "ubuntu-2004-lts-hvm",
"ubuntu2204": "ubuntu-2204-lts-hvm",
"rhel8": "rhel8-hvm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ phases:
[ -n "${CfnParamCincInstaller}" ] && CINC_URL="${CfnParamCincInstaller}"
echo "${!CINC_URL}"

# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.18.04 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7
# 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
- name: OperatingSystemRelease
action: ExecuteBash
inputs:
Expand Down Expand Up @@ -86,8 +86,6 @@ phases:
OS='alinux2'
elif [ `echo "${!RELEASE}" | grep '^centos\.7'` ]; then
OS='centos7'
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.18'` ]; then
OS='ubuntu1804'
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.20'` ]; then
OS='ubuntu2004'
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.22'` ]; then
Expand Down Expand Up @@ -153,10 +151,10 @@ phases:
exit {{ FailExitCode }}
fi

# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu1804, Ubuntu2004, Ubuntu2204, Centos7 and RHEL8
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7 and RHEL8
ARCH=$(uname -m)
if [[ `echo ${!ARCH}` == 'aarch64' ]]; then
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.18\.04|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8)'` ]; then
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8)'` ]; then
echo "This component does not support '${!RELEASE}' on ARM64 CPUs. Failing build."
exit {{ FailExitCode }}
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ phases:
OS='alinux2'
elif [ $(echo "${RELEASE}" | grep '^centos\.7') ]; then
OS='centos7'
elif [ $(echo "${RELEASE}" | grep '^ubuntu\.18') ]; then
OS='ubuntu1804'
elif [ $(echo "${RELEASE}" | grep '^ubuntu\.20') ]; then
OS='ubuntu2004'
elif [ $(echo "${RELEASE}" | grep '^ubuntu\.22') ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ phases:
OS='alinux2'
elif [ `echo "${RELEASE}" | grep '^centos\.7'` ]; then
OS='centos7'
elif [ `echo "${RELEASE}" | grep '^ubuntu\.18'` ]; then
OS='ubuntu1804'
elif [ `echo "${RELEASE}" | grep '^ubuntu\.20'` ]; then
OS='ubuntu2004'
elif [ `echo "${RELEASE}" | grep '^ubuntu\.22'` ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ phases:
OS='alinux2'
elif [ `echo "${RELEASE}" | grep '^centos\.7'` ]; then
OS='centos7'
elif [ `echo "${RELEASE}" | grep '^ubuntu\.18'` ]; then
OS='ubuntu1804'
elif [ `echo "${RELEASE}" | grep '^ubuntu\.20'` ]; then
OS='ubuntu2004'
elif [ `echo "${RELEASE}" | grep '^ubuntu\.22'` ]; then
Expand Down Expand Up @@ -126,7 +124,7 @@ phases:
set -v
ARCHITECTURE='{{ validate.OperatingSystemArchitecture.outputs.stdout }}'
OS='{{ validate.OperatingSystemName.outputs.stdout }}'
if [ ${ARCHITECTURE} == 'arm64' ] && [[ ${OS} =~ ^(ubuntu(18|20|22)04|alinux2|rhel8)$ ]] || [ ${ARCHITECTURE} == 'x86_64' ]; then
if [ ${ARCHITECTURE} == 'arm64' ] && [[ ${OS} =~ ^(ubuntu(20|22)04|alinux2|rhel8)$ ]] || [ ${ARCHITECTURE} == 'x86_64' ]; then
echo "true"
else
echo "false"
Expand Down Expand Up @@ -326,8 +324,6 @@ phases:
echo "Checking for Lustre client..."
if [ ${OS} == centos7 ]; then
rpm -qa | grep lustre-client
elif [ ${OS} == ubuntu1804 ]; then
dpkg -l | grep lustre
fi
fi
[[ $? -ne 0 ]] && echo "Check for Lustre client failed" && exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ constants:
phases:
- name: build
steps:
# Check input base AMI OS and get OS information, the output should be like centos.7 | amzn.2 | ubuntu.18.04 | ubuntu.20.04 | ubuntu.22.04 | rhel.8.7
# 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
- name: OperatingSystemRelease
action: ExecuteBash
inputs:
Expand Down Expand Up @@ -39,8 +39,6 @@ phases:
OS='alinux2'
elif [ `echo "${!RELEASE}" | grep '^centos\.7'` ]; then
OS='centos7'
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.18'` ]; then
OS='ubuntu1804'
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.20'` ]; then
OS='ubuntu2004'
elif [ `echo "${!RELEASE}" | grep '^ubuntu\.22'` ]; then
Expand Down Expand Up @@ -84,10 +82,10 @@ phases:
exit {{ FailExitCode }}
fi

# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu1804, Ubuntu2004, Ubuntu2204, Centos7 and RHEL 8
# This component only supports aarch64 CPUs on Amazon Linux 2, Ubuntu2004, Ubuntu2204, Centos7 and RHEL 8
ARCH=$(uname -m)
if [[ `echo ${!ARCH}` == 'aarch64' ]]; then
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.18\.04|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8)'` ]; then
if [ `echo "${!RELEASE}" | grep -Ev '^(amzn\.2|centos\.7|ubuntu\.20\.04|ubuntu\.22\.04|rhel\.8)'` ]; then
echo "This component does not support '${!RELEASE}' on ARM64 CPUs. Failing build."
exit {{ FailExitCode }}
fi
Expand Down
2 changes: 1 addition & 1 deletion cli/src/pcluster/templates/cw_dashboard_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def _add_cw_log(self):
),
self._new_cw_log_widget(
title="syslog",
conditions=[Condition(["ubuntu1804", "ubuntu2004", "ubuntu2204"], base_os)],
conditions=[Condition(["ubuntu2004", "ubuntu2204"], base_os)],
filters=[self._new_filter(pattern=f"{head_private_ip}.*syslog")],
),
self._new_cw_log_widget(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def _run_input_test(
):
if with_input:
input_composer = ComposeInput(aws_region_name="us-east-1", key="key2", scheduler="slurm")
input_composer.add_first_flow(op_sys="ubuntu1804", head_node_instance=head_node_instance)
input_composer.add_first_flow(op_sys="ubuntu2004", head_node_instance=head_node_instance)
input_composer.add_compute_instance(compute_instance, "18")
input_composer.add_no_automation_no_empty_vpc(
vpc_id="vpc-34567891", head_node_id="subnet-34567891", compute_id="subnet-45678912"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
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).
Allowed values for VPC ID:
# id name number_of_subnets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
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).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
Allowed values for VPC ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
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).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
Allowed values for VPC ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
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).
Enabling EFA requires compute instances to be placed within a Placement Group. Please specify an existing Placement Group name or leave it blank for ParallelCluster to create one.
ERROR: non-existent-test-pg is not an acceptable value for Placement Group name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for Availability Zone:
1. eu-west-1a
2. eu-west-1b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
There are no VPC for the given region. Starting automatic creation of VPC and subnets...
Allowed values for Availability Zone:
1. eu-west-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
There are no VPC for the given region. Starting automatic creation of VPC and subnets...
Allowed values for Availability Zone:
1. eu-west-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ Allowed values for Scheduler:
Allowed values for Operating System:
1. alinux2
2. centos7
3. ubuntu1804
4. ubuntu2004
5. ubuntu2204
6. rhel8
3. ubuntu2004
4. ubuntu2204
5. rhel8
Allowed values for VPC ID:
# id name number_of_subnets
--- ------------ --------------------------------- -------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
("Scheduler", ["awsbatch"], "slurm", None),
("Operating System", None, "alinux2", None),
("Operating System", [], "alinux2", None),
("Operating System", ["centos7", "ubuntu1804"], "alinux2", None),
("Operating System", ["centos7", "ubuntu2004"], "alinux2", None),
# Ensure first item is selected from first nested list/tuple
("fake-parameter", [{"id": "a", "key2": "b"}, {"id": "c", "key3": "d"}], "a", None),
("fake-parameter", ({"id": "a", "key2": "b"}, {"id": "c", "key3": "d"}), "a", None),
Expand Down
6 changes: 3 additions & 3 deletions cli/tests/pcluster/cli/test_describe_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ def test_execute(self, mocker):
"imageConfiguration": {
"url": "s3://parallelcluster-0000000000000000-v1-do-not-delete/parallelcluster/3.0.0/config.yaml"
},
"imageId": "aws-parallelcluster-3-0-0-ubuntu-1804-lts-hvm-arm64-202101010000",
"imageId": "aws-parallelcluster-3-0-0-ubuntu-2004-lts-hvm-arm64-202101010000",
"creationTime": "2021-01-01T00:00:00.000Z",
"imageBuildStatus": "BUILD_COMPLETE",
"region": "eu-west-2",
"ec2AmiInfo": {
"amiName": "aws-parallelcluster-3.0.0-ubuntu-1804-lts-hvm-x86_64-202101010000 2021-01-01T00-00-00.000Z",
"amiName": "aws-parallelcluster-3.0.0-ubuntu-2004-lts-hvm-x86_64-202101010000 2021-01-01T00-00-00.000Z",
"amiId": "ami-FEED0DEAD0BEEF000",
"description": "AWS ParallelCluster AMI for ubuntu1804",
"description": "AWS ParallelCluster AMI for ubuntu2004",
"state": "AVAILABLE",
"tags": [
{"key": "parallelcluster:lustre_version", "value": "5.4.0.1051.33"},
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/pcluster/example_configs/awsbatch.full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Imds:
ImdsSupport: v2.0
Region: us-east-1
Image:
Os: alinux2 # alinux2 | centos7 | ubuntu1804 | ubuntu2004
Os: alinux2 # alinux2 | centos7 | ubuntu2004
CustomAmi: ami-12345678
HeadNode:
InstanceType: t2.micro
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/pcluster/schemas/test_cluster_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_cluster_schema_awsbatch(mocker, test_datadir, config_file_name):
"os, custom_ami, failure_message",
[
(None, None, "Missing data for required field"),
("ubuntu1804", "ami-12345678", None),
("ubuntu2004", "ami-12345678", None),
("centos7", None, None),
],
)
Expand Down
Loading