-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'aws:develop' into wip/munge-key-shared
- Loading branch information
Showing
53 changed files
with
1,090 additions
and
14 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
Empty file.
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
53 changes: 53 additions & 0 deletions
53
.../aws-parallelcluster-environment/files/rocky/network_interfaces/configure_nw_interface.sh
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,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} |
26 changes: 26 additions & 0 deletions
26
cookbooks/aws-parallelcluster-environment/resources/cloudwatch/cloudwatch_rocky8.rb
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,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 |
Oops, something went wrong.