-
Notifications
You must be signed in to change notification settings - Fork 109
[POC] Add support for Rocky Linux 8 #2324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
caf33da
Add Chef resource files for Rocky Linux
552e7e8
Fix CloudWatch agent setup for Rocky Linux
2f12309
Add missing template files for Rocky Linux
fea3eba
Add Rocky Linux to kitchen configuration files
c44b72e
Add Rocky Linux to GitHub actions
d15f528
Add Rocky Linux to pcluster_dcv_connect.sh script
84a4535
Enable PowerTools repository on Rocky Linux
d96ef5b
Remove coreutils package on docker Rocky Linux
d00e99a
Skip FSx kernel_module step on docker Rocky Linux
defafdb
Fix Inspec tests condition for Rocky Linux
29dc830
Add Rocky Linux 8 support in the README
6da2ce4
Add spack resource for rocky8
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving this PR as I will be making changes in the next PR