Skip to content

Commit 66beab2

Browse files
authored
Merge branch 'main' into add_create_cifs_share
2 parents e49930a + 709500e commit 66beab2

File tree

130 files changed

+934
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+934
-141
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
/Management-Utilities/fsxn-rotate-secret/ @kcantrel
1818
/Management-Utilities/warm_performance_tier/ @kcantrel
1919
/Management-Utilities/Workload-Factory-API-Samples/ @kcantrel
20-
/Monitoring/CloudWatch-FSx/ @LirazRom10
21-
/Monitoring/LUN-monitoring/ @LirazRom10
20+
/Monitoring/CloudWatch-FSx/ @kcantrel
21+
/Monitoring/LUN-monitoring/ @kcantrel
2222
/Monitoring/auto-add-cw-alarms/ @kcantrel
2323
/Monitoring/monitor-ontap-services/ @kcantrel
2424
/Monitoring/ingest_nas_audit_logs_into_cloudwatch/ @kcantrel

.github/workflows/terraform-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ name: "Documentation: terraform-docs"
77
on:
88
pull_request:
99
paths:
10-
- 'Terraform/**'
10+
- 'Infrastructure_as_Code/Terraform/**'
1111
push:
1212
paths:
13-
- 'Terraform/**'
13+
- 'Infrastructure_as_Code/Terraform/**'
1414
branches:
1515
- main
1616

@@ -20,8 +20,8 @@ jobs:
2020
strategy:
2121
matrix:
2222
directory:
23-
- 'Terraform/deploy-fsx-ontap/module'
24-
- 'Terraform/deploy-fsx-ontap/standalone-module'
23+
- 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module'
24+
- 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module'
2525
steps:
2626
- name: Checkout pull request
2727
uses: actions/checkout@v3.5.0

.github/workflows/terraform.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ name: "Code Quality: Terraform"
77
on:
88
pull_request:
99
paths:
10-
- 'Terraform/**'
10+
- 'Infrastructure_as_Code/Terraform/**'
1111
push:
1212
paths:
13-
- 'Terraform/**'
13+
- 'Infrastructure_as_Code/Terraform/**'
1414
branches:
1515
- main
1616

@@ -21,8 +21,8 @@ jobs:
2121
strategy:
2222
matrix:
2323
directory:
24-
- 'Terraform/deploy-fsx-ontap/module'
25-
- 'Terraform/deploy-fsx-ontap/standalone-module'
24+
- 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/module'
25+
- 'Infrastructure_as_Code/Terraform/deploy-fsx-ontap/standalone-module'
2626
defaults:
2727
run:
2828
working-directory: ${{ matrix.directory }}
@@ -47,4 +47,4 @@ jobs:
4747
# run: terraform fmt -diff -check -no-color -recursive
4848

4949
- name: Validate Terraform configuration
50-
run: terraform validate
50+
run: terraform validate

Ansible/snapmirror_report/generate_report.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Ansible/snapmirror_report/process_region.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Export NetApp FSxN to a CloudFormation Template
2+
3+
## Overview
4+
This folder provides a script that will create a CloudFormation template based on the current configuration of an existing FSx for ONTAP file system.
5+
6+
## Prerequisites
7+
- An FSxN file system you want to create a CloudFormation template for.
8+
- An AWS account with permissions to "describe" the FSxN file system and its virtual storage machines, and volumes.
9+
- The AWS CLI installed and configured on your local machine. You can find instructions on how to do that [here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).
10+
11+
## Running the script
12+
13+
The script takes the following parameters:
14+
- `-f fs-id`: The ID of the FSxN file system you want to create the CloudFormation template for. This is a required parameter.
15+
- `-n name`: Is an optional name to be appended to all the volumes, svms and NetBIOS names. This is so you can test the CloudFormation template while the original machine is still running.
16+
17+
The script will output the CloudFormation template in JSON format. You can redirect this output to a file if you want to save it.
18+
19+
Note that since you can't retrieve credentials from the FSxN configuration the script will create
20+
parameters that will allow you to provide an AWS Secrets Manager secret that should contain the credentials.
21+
There will be one parameter for the password of the 'fsxadmin' account. That secret will just need one 'key'
22+
named "password" with the desired fsxadmin password. There will also be a parameter for each SVMs that has an
23+
Active Directory configured for it so you can provide a secret that should have a 'username' and 'password' key
24+
that will be used to join the SVM to the domain.
25+
26+
An example run:
27+
```
28+
$ python export_fsxn_cf.py -f fs-0123456789abcdef0 -n test > fsxn_template.json
29+
Warning: Volume rvnw_vol_autogrow does not have a junction path yet it is required for a Cloudformation template so setting it to /rvnw_vol_autogrow
30+
Warning: Volume unixdata does not have a junction path yet it is required for a Cloudformation template so setting it to /unixdata
31+
Warning: Volume effictest2 is a DP volume and cannot have the StorageEfficiencyEnabled property, removing it from the CloudFormation template.
32+
Warning: Volume effictest2 is a DP volume and cannot have the SnapshotPolicy property, removing it from the CloudFormation template.
33+
Warning: Volume effictest2 is a DP volume and cannot have the SecurityStyle property, removing it from the CloudFormation template.
34+
Warning: Could not find root volume for SVM fsa. Setting the security style to UNIX
35+
```
36+
37+
## Notes
38+
- For multi availability zone deployments, the script will do the following in regards to the Endpoint IP Address Range:
39+
- If the file system is in the 198.19.0.0/16 address range (the AWS default), the script will not provide an address range forcing AWS to just allocate a new address range from the 198.19.0.0/16 CIDR block.
40+
- If it isn't in the 198.19.0.0/16 address range then it will create a parameter so you can specify a new address range for testing purposes, with a default set to the current address range.
41+
- Since AWS requires you to provide a junction path when creating a volume, if the script finds a volume without a junction path it will set it to `/volume_name`. A warning message will be outputted if this happens to alert you.
42+
- Since AWS doesn't allow you to specify these parameters when creating a DP type volume, their current settings will be removed from the CloudFormation template:
43+
- SecurityStyle
44+
- SnapshotPolicy
45+
- StorageEfficiencyEnabled
46+
- If, for some reason, the script can't find the attributes of the root volume of a SVM (unlikely but there are reasons how this can happen), it will set the security style of the SVM to 'NTFS' if the SVM has a Active Directory configuration, otherwise it will set it to a 'UNIX' security style. A warning message will be outputted if this happens to alert you.
47+
- Since AWS only allows an Active Directory Distinguished Name (DN) to start with "OU=", if the script finds a DN that doesn't start with "OU=" it will ignore it and will output a warning message to alert you. However the DN is set to "CN=Computers", which is the default DN that ONTAP will use when joining a domain to AD, it will not output an warning message with the assumption that by not providing a DN it will be set to "CN=Computers".
48+
- While some testing was performed, hence the `-n` option, not for all possible FSxN configurations were tested. If you run into any issues with the script, or have suggestions for improvements, please open an [issue](https://github.com/NetApp/FSx-ONTAP-samples-scripts/issues) on GitHub.
49+
50+
## Author Information
51+
52+
This repository is maintained by the contributors listed on [GitHub](https://github.com/NetApp/FSx-ONTAP-samples-scripts/graphs/contributors).
53+
54+
## License
55+
56+
Licensed under the Apache License, Version 2.0 (the "License").
57+
58+
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).
59+
60+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an _"AS IS"_ basis, without WARRANTIES or conditions of any kind, either express or implied.
61+
62+
See the License for the specific language governing permissions and limitations under the License.
63+
64+
© 2025 NetApp, Inc. All Rights Reserved.

0 commit comments

Comments
 (0)