Skip to content

Commit

Permalink
Merge branch 'aws:develop' into wip/munge-key-shared
Browse files Browse the repository at this point in the history
  • Loading branch information
hehe7318 authored Sep 26, 2023
2 parents fd317a2 + b9e775f commit 4ebfe64
Show file tree
Hide file tree
Showing 53 changed files with 1,090 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dokken-system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- ubuntu2004
- ubuntu2204
- rhel8
- rocky8
fail-fast: false
steps:
- uses: actions/checkout@main
Expand Down
Empty file.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
------

**ENHANCEMENTS**
- Add support for Rocky Linux 8.
- Allow configuration of static and dynamic node priorities in compute resources via the ParallelCluster configuration YAML file.
- Forward SLURM_RESUME_FILE to ParallelCluster resume program.
- Allow to override aws-parallelcluster-node package at cluster creation and update time (only on the head node during update).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and limitations under the License.

control 'tag:config_awsbatch_cli_commands_available' do
only_if { node['cluster']['scheduler'] == 'awsbatch' && !os_properties.redhat8? }
only_if { node['cluster']['scheduler'] == 'awsbatch' && !os_properties.redhat8? && !os_properties.rocky8? }

# Test that batch commands can be accessed without absolute path
%w(awsbkill awsbqueues awsbsub awsbhosts awsbout awsbstat).each do |cli_commmand|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"platforms": [
"amazon",
"centos",
"redhat"
"redhat",
"rocky"
],
"node_roles": [
"ComputeFleet",
Expand Down Expand Up @@ -55,6 +56,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -74,6 +76,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -92,6 +95,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -111,6 +115,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -131,6 +136,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -151,6 +157,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -171,6 +178,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -189,6 +197,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -207,6 +216,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -225,6 +235,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -243,6 +254,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -261,6 +273,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -279,6 +292,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -297,6 +311,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -315,6 +330,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -333,6 +349,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -351,6 +368,7 @@
"amazon",
"centos",
"redhat",
"rocky",
"ubuntu"
],
"node_roles": [
Expand All @@ -369,6 +387,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -392,6 +411,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -418,6 +438,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -444,6 +465,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand Down Expand Up @@ -472,6 +494,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -496,6 +519,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -520,6 +544,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -544,6 +569,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -568,6 +594,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -592,6 +619,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -615,6 +643,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -633,6 +662,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand All @@ -651,6 +681,7 @@
"platforms": [
"centos",
"redhat",
"rocky",
"ubuntu",
"amazon"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"platforms": {
"type": "array",
"items": {"type": "string", "enum": ["amazon", "centos", "ubuntu", "redhat"]}
"items": {"type": "string", "enum": ["amazon", "centos", "ubuntu", "redhat", "rocky"]}
},
"node_roles": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ def parse_args():
parser = argparse.ArgumentParser(description="Create the cloudwatch agent config file")
parser.add_argument("--config", help="Path to JSON file describing logs that should be monitored", required=True)
parser.add_argument(
"--platform", help="OS family of this instance", choices=["amazon", "centos", "ubuntu", "redhat"], required=True
"--platform",
help="OS family of this instance",
choices=["amazon", "centos", "ubuntu", "redhat", "rocky"],
required=True,
)
parser.add_argument("--log-group", help="Name of the log group", required=True)
parser.add_argument(
"--node-role",
required=True,
choices=["HeadNode", "ComputeFleet", "LoginNode"],
help="Role this node plays in the cluster " "(i.e., is it a compute node or the head node?)",
help="Role this node plays in the cluster (i.e., is it a compute node or the head node?)",
)
parser.add_argument("--scheduler", required=True, choices=["slurm", "awsbatch"], help="Scheduler")
return parser.parse_args()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/sh
# Configure a specific Network Interface according to the OS
# The configuration involves 3 aspects:
# - Main configuration (IP address, protocol and gateway)
# - A specific routing table, so that all traffic coming to a network interface leaves the instance using the same
# interface
# - A routing rule to make the OS use the specific routing table for this network interface

# RedHat 8 official documentation:
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-policy-based-routing-to-define-alternative-routes_configuring-and-managing-networking

set -e

if
[ -z "${DEVICE_NAME}" ] || # name of the device
[ -z "${DEVICE_NUMBER}" ] || # number of the device
[ -z "${GW_IP_ADDRESS}" ] || # gateway ip address
[ -z "${DEVICE_IP_ADDRESS}" ] || # ip address to assign to the interface
[ -z "${CIDR_PREFIX_LENGTH}" ] # the prefix length of the device IP cidr block
then
echo 'One or more environment variables missing'
exit 1
fi

con_name="System ${DEVICE_NAME}"
route_table="100${DEVICE_NUMBER}"
priority="100${DEVICE_NUMBER}"
metric="100${DEVICE_NUMBER}"

# Rename connection
original_con_name=`nmcli -t -f GENERAL.CONNECTION device show ${DEVICE_NAME} | cut -f2 -d':'`
sudo nmcli connection modify "${original_con_name}" con-name "${con_name}" ifname ${DEVICE_NAME}

configured_ip=`nmcli -t -f IP4.ADDRESS device show ${DEVICE_NAME} | cut -f2 -d':'`
if [ -z "${configured_ip}" ]; then
# Setup connection method to "manual", configure ip address and gateway, only if not already configured.
sudo nmcli connection modify "${con_name}" ipv4.method manual ipv4.addresses ${DEVICE_IP_ADDRESS}/${CIDR_PREFIX_LENGTH} ipv4.gateway ${GW_IP_ADDRESS}
fi

# Setup routes
# This command uses the ipv4.routes parameter to add a static route to the routing table with ID ${route_table}.
# This static route for 0.0.0.0/0 uses the IP of the gateway as next hop.
sudo nmcli connection modify "${con_name}" ipv4.routes "0.0.0.0/0 ${GW_IP_ADDRESS} ${metric} table=${route_table}"

# Setup routing rules
# The command uses the ipv4.routing-rules parameter to add a routing rule with priority ${priority} that routes
# traffic from ${DEVICE_IP_ADDRESS} to table ${route_table}. Low values have a high priority.
# The syntax in the ipv4.routing-rules parameter is the same as in an "ip rule add" command,
# except that ipv4.routing-rules always requires specifying a priority.
sudo nmcli connection modify "${con_name}" ipv4.routing-rules "priority ${priority} from ${DEVICE_IP_ADDRESS} table ${route_table}"

# Reapply previous connection modification.
sudo nmcli device reapply ${DEVICE_NAME}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

# Copyright:: 2023 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.txt" file accompanying this file.
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
# See the License for the specific language governing permissions and limitations under the License.

provides :cloudwatch, platform: 'rocky' do |node|
node['platform_version'].to_i == 8
end

use 'partial/_cloudwatch_common'
use 'partial/_cloudwatch_install_package_rhel'

action_class do
def platform_url_component
"redhat"
end
end
Loading

0 comments on commit 4ebfe64

Please sign in to comment.