Skip to content

Commit 87ecdf9

Browse files
committed
Made adjustment based on review.
1 parent c16ae79 commit 87ecdf9

File tree

7 files changed

+53
-13
lines changed

7 files changed

+53
-13
lines changed

CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ There are also a couple scripts that can be used to help enable the NetApp FSxN
1616
|deploy_link | This script will use CloudFormation to deploy a Workload Factory Link.|
1717
|createClone.py | This is a Python script that will create a clone of a volume using boto to deploy a CloudFormation stack that creates a clone.|
1818

19+
## Usage
20+
To run these scripts you'll need to download them, change the permissions to be executable, and then run them. For example:
21+
```bash
22+
chmod +x create_volume
23+
./create_volme -r us-west-2 -l arn:aws:lambda:ca-central-1:759999999999:function:wf-link -s arn:aws:secretsmanager:us-east-1:759999999999:secret:fsnSecret-yyaL32 -f fs-02a89999999999999 -v prod -n vol1 -t ../create_volume.yaml
24+
```
25+
26+
To see the required parameters for each script, you can run the script with the `-h` flag. For example:
27+
```bash
28+
./create_volume -h
29+
Usage: create_volume [-r region] -l link_ARN -s secret_ARN [-k secret_key] -f fsx_id -v svm_name -n volune_name [-z size_in_MB] [-a aggregate] -t template
30+
Notes:
31+
The default region is the region configured in the AWS CLI.
32+
The default secret key is 'credentials'.
33+
The default aggregate is "aggr1".
34+
The default size is 20MB.
35+
```
36+
1937
## Author Information
2038

2139
This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSx-ONTAP-samples-scripts/graphs/contributors).

CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_SM_relationship

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
################################################################################
1313
usage () {
1414
cat <<EOF
15-
Usage: $(basename $0) [--region region] --source-link-arn link_arn --source-secret-arn secret_arn [--source-secret-key password] --source-fsx fsx_id --source-svm svm_name --source-vol vol_name \\
16-
--dest-link-arn link_arn --dest-secret-arn secret_arn [--dest-sceret-key password] --dest-fsx fsx_id --dest-svm svm_name [--dest-vol vol_name_dp] \\
15+
Usage: $(basename $0) [--region region] --source-link-arn link_arn --source-secret-arn secret_arn [--source-secret-key key] --source-fsx fsx_id --source-svm svm_name --source-vol vol_name \\
16+
--dest-link-arn link_arn --dest-secret-arn secret_arn [--dest-sceret-key key] --dest-fsx fsx_id --dest-svm svm_name [--dest-vol vol_name_dp] \\
1717
--template templete_filename [--dest-aggr aggregate1]
1818
Notes:
1919
The default region is whatever the default region is in the AWS CLI configuration.
20-
The default secret key is 'password'.
20+
The default secret key is 'credentials'.
2121
The default destination volume name is the source volume name with '_dp' appended.
2222
The default aggregate is 'aggr1'.
2323
EOF
@@ -26,13 +26,13 @@ EOF
2626
# Instead of passing a bunch of parameters, set the values of the variables here.
2727
sourceLinkArn=""
2828
sourceSecretArn=""
29-
sourceSecretKey="password"
29+
sourceSecretKey="credentials"
3030
sourceFsxId=""
3131
sourceSvmName=""
3232
sourceVolumeName=""
3333
destinationLinkArn=""
3434
destinationSecretArn=""
35-
destinationSecretKey="password"
35+
destinationSecretKey="credentials"
3636
destinationFsxId=""
3737
destinationSvmName=""
3838
destinationAggregate="aggr1"

CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_clone

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ cat <<EOF
1212
Usage: $(basename $0) [-r region] -l link_arn -s secret_arn [-k secretKey] -f fsx_id -v svm_name -p parent_volume_name [-c clone_volume_name] -t templete_filename
1313
Notes:
1414
The default region is whatever the default region is for the AWS CLI.
15-
The default secretKey is 'password'.
15+
The default secretKey is 'credentials'.
1616
The clone_volume_name defaults to the parent_volume_name with '_clone' appended.
1717
EOF
1818
}
1919
#
2020
# Set the default values.
2121
linkArn=""
2222
secretArn=""
23-
secretKey="password"
23+
secretKey="credentials"
2424
fsxId=""
2525
svmName=""
2626
parentVolumeName=""

CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_export_policy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@
1111
################################################################################
1212
usage () {
1313
cat <<EOF
14-
Usage: $(basename $0) [-r region] -l link_ARN -s secret_ARN -k secret_key -f fsx_id -v svm_name -n policy_name [-p protocols] -c match_CIDR -t templete_filename
14+
Usage: $(basename $0) [-r region] -l link_ARN -s secret_ARN [-k secret_key] -f fsx_id -v svm_name -n policy_name [-p protocols] -c match_CIDR -t templete_filename
1515
Notes:
1616
The default region is whatever the default region is set in the AWS CLI.
1717
The default protocols is "any"
18+
The default secret_key is "credentials"
1819
EOF
1920
}
2021
#
2122
# Set the default values.
2223
linkArn=""
2324
secretArn=""
24-
secretKey="password"
25+
secretKey="credentials"
2526
fsxId=""
2627
svmName=""
2728
policyName=""

CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_snapshot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ cat <<EOF
1313
Usage: $(basename $0) [-r region] -l link_ARN -s secret_ARN [-k secret_key] -f fsx_id -v svm_name -n volume_name -p snapshot_name -t templete_filename
1414
Notes:
1515
The default region is the region configured in the AWS CLI.
16-
The default secret key is 'password'.
16+
The default secret key is 'credentials'.
1717
EOF
1818
}
1919
#
2020
# Set the default values.
2121
linkArn=""
2222
secretArn=""
23-
secretKey="password"
23+
secretKey="credentials"
2424
fsxId=""
2525
svmName=""
2626
volumeName=""

CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_volume

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cat <<EOF
1313
Usage: $(basename $0) [-r region] -l link_ARN -s secret_ARN [-k secret_key] -f fsx_id -v svm_name -n volune_name [-z size_in_MB] [-a aggregate] -t template
1414
Notes:
1515
The default region is the region configured in the AWS CLI.
16-
The default secret key is 'password'.
16+
The default secret key is 'credentials'.
1717
The default aggregate is "aggr1".
1818
The default size is 20MB.
1919
EOF
@@ -22,7 +22,7 @@ EOF
2222
# Set the default values.
2323
linkArn=""
2424
secretArn=""
25-
secretKey="password"
25+
secretKey="credentials"
2626
fsxId=""
2727
volumeName=""
2828
svmName=""

CloudFormation/deploy-fsx-ontap/template.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Metadata:
1313
- ThroughputCapacity
1414
- PrimarySubnet
1515
- SecurityGroupIds
16+
- BackupRetentionDays
17+
- DailyAutomaticBackupStartTime
18+
- WeeklyMaintenanceStartTime
1619
- Label:
1720
default: "Scale Out Only Parameters"
1821
Parameters:
@@ -59,6 +62,21 @@ Parameters:
5962
PrimarySubnet:
6063
Description: "The primary subnet."
6164
Type: "AWS::EC2::Subnet::Id"
65+
66+
BackupRetentionDays:
67+
Description: "The number of days to retain backups for. The default is 30. If set to 0, backups are disabled."
68+
Type: Number
69+
Default: 30
70+
71+
DailyAutomaticBackupStartTime:
72+
Description: "The preferred time, in UTC, to take daily automatic backups. The default is 00:00."
73+
Type: String
74+
Default: "00:00"
75+
76+
WeeklyMaintenanceStartTime:
77+
Description: "The preferred time, in UTC, to perform weekly maintenance. The format d:hh:mm where Monday = 1 and Sunday = 7. The default is 7:00:00."
78+
Type: String
79+
Default: "7:00:00"
6280
#
6381
# Unfortunately, has to be set to type String since it is an optional parameter.
6482
SecondarySubnet:
@@ -97,6 +115,9 @@ Resources:
97115
SubnetIds: [!Ref PrimarySubnet, !If [ MultiAZ, !Ref SecondarySubnet, !Ref "AWS::NoValue" ]]
98116
SecurityGroupIds: !Ref SecurityGroupIds
99117
OntapConfiguration:
118+
AutomaticBackupRetentionDays: !Ref BackupRetentionDays
119+
DailyAutomaticBackupStartTime: !Ref DailyAutomaticBackupStartTime
120+
WeeklyMaintenanceStartTime: !Ref WeeklyMaintenanceStartTime
100121
DeploymentType: !Ref DeploymentType
101122
ThroughputCapacityPerHAPair: !Ref ThroughputCapacity
102123
HAPairs: !If [ ScaleOut, !Ref HAPairs, 1 ]

0 commit comments

Comments
 (0)