-
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.
[Develop] Add a new internal storage option, EFS, keeping EBS as the …
…default (#2480) Add backup and restore recipes to move data in second stage images to the shared filesystem Create a new mount_internal_use_efs.rb resource to mount the internal shared filesystem Filter the efs filesystem arrays to mount internal shared fs in init and cx fses in config Refactor environment recipes as needed to adapt to having two separate modes for internal storage
- Loading branch information
1 parent
4a2ab34
commit cf39542
Showing
29 changed files
with
414 additions
and
121 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
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
41 changes: 41 additions & 0 deletions
41
cookbooks/aws-parallelcluster-environment/recipes/config/efs.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,41 @@ | ||
# 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. | ||
return if on_docker? | ||
efs_shared_dir_array = node['cluster']['efs_shared_dirs'].split(',') | ||
efs_fs_id_array = node['cluster']['efs_fs_ids'].split(',') | ||
efs_encryption_in_transit_array = node['cluster']['efs_encryption_in_transits'].split(',') | ||
efs_iam_authorization_array = node['cluster']['efs_iam_authorizations'].split(',') | ||
|
||
cx_shared_dir_array = [] | ||
cx_efs_fs_id_array = [] | ||
cx_efs_encryption_array = [] | ||
cx_efs_iam_array = [] | ||
|
||
# Identify the customer use filesystems and store their data in arrays for the EFS resource | ||
efs_shared_dir_array.each_with_index do |dir, index| | ||
next if node['cluster']['internal_shared_dirs'].include?(dir) | ||
cx_shared_dir_array.push(dir) | ||
cx_efs_fs_id_array.push(efs_fs_id_array[index]) | ||
cx_efs_encryption_array.push(efs_encryption_in_transit_array[index]) | ||
cx_efs_iam_array.push(efs_iam_authorization_array[index]) | ||
end | ||
|
||
# Mount EFS directories with the efs resource | ||
efs "mount efs" do | ||
shared_dir_array cx_shared_dir_array | ||
efs_fs_id_array cx_efs_fs_id_array | ||
efs_encryption_in_transit_array cx_efs_encryption_array | ||
efs_iam_authorization_array cx_efs_iam_array | ||
action :mount | ||
not_if { cx_shared_dir_array.empty? } | ||
end |
27 changes: 27 additions & 0 deletions
27
cookbooks/aws-parallelcluster-environment/recipes/config/export_home.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,27 @@ | ||
# 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. | ||
|
||
return if on_docker? | ||
|
||
case node['cluster']['node_type'] | ||
when 'HeadNode' | ||
volume "export /home" do | ||
shared_dir "/home" | ||
action :export | ||
end | ||
when 'ComputeFleet', 'LoginNode' | ||
Chef::Log.info("Export only from the HeadNode") | ||
else | ||
raise "node_type must be HeadNode, ComputeFleet, or LoginNode" | ||
end |
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
34 changes: 0 additions & 34 deletions
34
cookbooks/aws-parallelcluster-environment/recipes/config/fs_mount.rb
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
cookbooks/aws-parallelcluster-environment/recipes/config/mount_intel_dir.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,36 @@ | ||
# 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. | ||
|
||
return if on_docker? | ||
|
||
case node['cluster']['node_type'] | ||
when 'HeadNode' | ||
Chef::Log.info("Mount only on the ComputeFleet and LoginNodes") | ||
when 'ComputeFleet', 'LoginNode' | ||
# Mount /opt/intel over NFS only if it exists | ||
exported_intel_dir = format_directory('/opt/intel') | ||
volume "mount /opt/intel" do | ||
action :mount | ||
shared_dir '/opt/intel' | ||
device(lazy { "#{node['cluster']['head_node_private_ip']}:#{exported_intel_dir}" }) | ||
fstype 'nfs' | ||
options node['cluster']['nfs']['hard_mount_options'] | ||
retries 10 | ||
retry_delay 6 | ||
only_if { ::File.directory?("/opt/intel") } | ||
end | ||
|
||
else | ||
raise "node_type must be HeadNode or ComputeFleet" | ||
end |
File renamed without changes.
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
Oops, something went wrong.