-
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] Migrate internal storage to EFS from NFS exports
Add backup and restore recipes to move data in second stage images to shared filesystems Create a new mount_internal_use_fs.rb recipe to mount the internal shared filesystems Filter the efs filesystem arrays to mount internal shared fses in init and cx fses in config Refactor environment recipes to be clearer in functional description and remove unnecessary recipes
- Loading branch information
1 parent
2d1aecf
commit 29a478c
Showing
24 changed files
with
271 additions
and
254 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 |
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.
48 changes: 0 additions & 48 deletions
48
cookbooks/aws-parallelcluster-environment/recipes/config/mount_shared.rb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.