Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 94 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,102 @@
# FSx-ONTAP-samples-scripts
# Amazon FSx for NetApp ONTAP — Samples & Scripts

FSx for NetApp ONTAP is an AWS service providing a comprehensive set of advanced storage features purposely
built to maximize cost performance, resilience, and accessibility in business-critical workloads.
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![Lint](https://github.com/NetApp/FSx-ONTAP-samples-scripts/actions/workflows/actionlint.yml/badge.svg)](https://github.com/NetApp/FSx-ONTAP-samples-scripts/actions/workflows/actionlint.yml)
[![Code Quality: Terraform](https://github.com/NetApp/FSx-ONTAP-samples-scripts/actions/workflows/terraform.yml/badge.svg)](https://github.com/NetApp/FSx-ONTAP-samples-scripts/actions/workflows/terraform.yml)
[![GitHub stars](https://img.shields.io/github/stars/NetApp/FSx-ONTAP-samples-scripts)](https://github.com/NetApp/FSx-ONTAP-samples-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/NetApp/FSx-ONTAP-samples-scripts)](https://github.com/NetApp/FSx-ONTAP-samples-scripts/network/members)
[![GitHub contributors](https://img.shields.io/github/contributors/NetApp/FSx-ONTAP-samples-scripts)](https://github.com/NetApp/FSx-ONTAP-samples-scripts/graphs/contributors)

## Overview
Production-ready code samples, automation scripts, and Infrastructure as Code (IaC) templates for
**[Amazon FSx for NetApp ONTAP](https://aws.amazon.com/fsx/netapp-ontap/)**. Use these samples alongside the
automation, management, and monitoring that **[NetApp Workload Factory](https://console.workloads.netapp.com)** provides.

This GitHub repository contains comprehensive code samples and automation scripts for FSx for Netapp ONTAP operations,
promoting the use of Infrastructure as Code (IAC) tools and encouraging developers to extend the product's
functionalities through code. The samples here go alongside the automation, management and monitoring that
[Workload Factory](https://console.workloads.netapp.com) provides.
---

We welcome contributions from the community! Please read our [contribution guidelines](CONTRIBUTING.md) before getting started.
## Quick Navigation

| Track | Focus | Samples |
|:------|:------|:-------:|
| [Infrastructure as Code](/Infrastructure_as_Code) | Terraform, CloudFormation & Ansible templates for provisioning and configuring FSx ONTAP resources | 11 |
| [EKS](/EKS) | Samples of how to use FSxN with your EKS deployments leveraging Trident and Trident Protect | 4 |
| [Management Utilities](/Management-Utilities) | Day-2 operations - Auto manage SnapMirror relationships, Auto rotate FSxN credentials, sample scripts leveraging APIs, and more | 9 |

---

## Getting Started

1. **Browse** the catalog below or use the Quick Navigation table above to find a sample.
2. **Clone** this repository:
```bash
git clone https://github.com/NetApp/FSx-ONTAP-samples-scripts.git
```
3. **Navigate** into the sample directory and follow its `README.md` for prerequisites and usage.
4. **Contribute** — we welcome PRs! Read our [contribution guidelines](CONTRIBUTING.md) first.

Have a great idea? We'd love to hear it! Email us at [ng-fsxn-github-samples@netapp.com](mailto:ng-fsxn-github-samples@netapp.com).

---

## Samples Catalog

### Infrastructure as Code

Provision, configure, and replicate FSx ONTAP resources using industry-standard IaC tools.

* **[Ansible](/Infrastructure_as_Code/Ansible)**
* [FSx ONTAP inventory report](/Infrastructure_as_Code/Ansible/fsx_inventory_report) — Generate a complete inventory of your FSx ONTAP resources
* [SnapMirror report](/Infrastructure_as_Code/Ansible/snapmirror_report) — Report on SnapMirror relationship status
* [Volume Management](/Infrastructure_as_Code/Ansible/Volume_Management) — Create, modify, and delete volumes
* **[CloudFormation](/Infrastructure_as_Code/CloudFormation)**
* [Deploy FSx ONTAP](/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap) — One-click FSx ONTAP deployment stack
* [Export FSx ONTAP Configuration to CloudFormation](/Infrastructure_as_Code/CloudFormation/Export-FSxN-CloudFormation) — Reverse-engineer existing resources into templates
* [Custom Resources Samples](/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples) — Examples of using the NetApp's CloudFormation extensions for advanced provisioning
* **[Terraform](/Infrastructure_as_Code/Terraform)**
* [FSx ONTAP deployment](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap) — Comprehensive Terraform template (stand alone and module) to deploy an FSx for ONTAP
* [FSx ONTAP with VPN for File Share Access](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access) — Secure file share access over VPN
* [SQL Server on EC2 with FSx ONTAP](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver) — End-to-end SQL Server deployment with FSx ONTAP storage
* [FSx ONTAP Replication](/Infrastructure_as_Code/Terraform/fsxn-replicate) — SnapMirror replication via Terraform
* [Miscellaneous Terraform resources](/Infrastructure_as_Code/Terraform/Miscellaneous) — Additional Terraform examples and helpers

### EKS

Have a great idea? We'd love to hear it! Please email us at [ng-fsxn-github-samples@netapp.com](mailto:ng-fsxn-github-samples@netapp.com).

## Table of Contents

* [Infrastructure as Code](/Infrastructure_as_Code)
* [Ansible](/Infrastructure_as_Code/Ansible)
* [FSx ONTAP inventory report](/Infrastructure_as_Code/Ansible/fsx_inventory_report)
* [SnapMirror report](/Infrastructure_as_Code/Ansible/snapmirror_report)
* [Volume Management](/Infrastructure_as_Code/Ansible/Volume_Management)
* [CloudFormation](/Infrastructure_as_Code/CloudFormation)
* [Deploy-fsx-ontap](/Infrastructure_as_Code/CloudFormation/deploy-fsx-ontap)
* [Export FSx for ONTAP Configuration to CloudFormation](/Infrastructure_as_Code/CloudFormation/Export-FSxN-CloudFormation)
* [NetApp-FSxN-Custom-Resources-Samples](/Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples)
* [Terraform](/Infrastructure_as_Code/Terraform)
* [Deployment of FSx ONTAP with VPN for File Share Access](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-fileshare-access)
* [Deployment of SQL Server on EC2 with FSx ONTAP](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap-sqlserver)
* [FSx ONTAP deployment using Terraform](/Infrastructure_as_Code/Terraform/deploy-fsx-ontap)
* [FSx ONTAP Replication](/Infrastructure_as_Code/Terraform/fsxn-replicate)
* [Miscellaneous FSx ONTAP resources using Terraform](/Infrastructure_as_Code/Terraform/Miscellaneous)
* [EKS](/EKS)
* [Backup-EKS-Applications-with-Trident-Protect](/EKS/Backup-EKS-Applications-with-Trident-Protect)
* [EKS applications non-stdout logs collection into ELK](/EKS/EKS-logs-to-ELK)
* [FSx for NetApp ONTAP as persistent storage for EKS](/EKS/FSxN-as-PVC-for-EKS)
* [PV-Migrate-with-Trident-Protect](/EKS/PV-Migrate-with-Trident-Protect)
* [Management Utilities](/Management-Utilities)
* [Auto Create SnapMirror Relationships](/Management-Utilities/auto_create_sm_relationships)
* [Auto Set FSxN Auto Grow](/Management-Utilities/auto_set_fsxn_auto_grow)
* [AWS CLI management scripts for FSx ONTAP](/Management-Utilities/fsx-ontap-aws-cli-scripts)
* [FSx ONTAP iscsi volume creation automation for Windows](/Management-Utilities/iscsi-vol-create-and-mount)
* [Rotate AWS Secrets Manager Secret](/Management-Utilities/fsxn-rotate-secret)
* [Warm Performance Tier](/Management-Utilities/warm_performance_tier)
* [Workload Factory API Samples](/Management-Utilities/Workload-Factory-API-Samples)
* [Monitoring](/Monitoring)
* [Automatically Add CloudWatch Alarms for FSx Resources](/Monitoring/auto-add-cw-alarms)
* [CloudWatch Dashboard for FSx for ONTAP](/Monitoring/CloudWatch-FSx)
* [Export LUN metrics from an FSx ONTAP to Amazon CloudWatch](/Monitoring/LUN-monitoring)
* [Ingest NAS audit logs into CloudWatch](/Monitoring/ingest_nas_audit_logs_into_cloudwatch)
* [Monitor FSx for ONTAP with Harvest on EKS](/Monitoring/monitor_fsxn_with_harvest_on_eks)
* [Monitor ONTAP metrics from FSx ONTAP using python Lambda function](/Monitoring/monitor-ontap-services)
Run stateful Kubernetes workloads on Amazon EKS with FSx ONTAP persistent volumes.

* [Backup EKS Applications with Trident Protect](/EKS/Backup-EKS-Applications-with-Trident-Protect) — Backup and restore PVCs using Trident Protect
* [EKS non-stdout logs collection into ELK](/EKS/EKS-logs-to-ELK) — Shared FSx ONTAP storage for non-standard log collection
* [FSx for NetApp ONTAP as persistent storage for EKS](/EKS/FSxN-as-PVC-for-EKS) — End to end EKS environment with FSx for ONTAP as the persistent storage
* [PV Migrate with Trident Protect](/EKS/PV-Migrate-with-Trident-Protect) — Migrate persistent volumes between clusters

### Management Utilities

Day-2 operational tools for managing FSx ONTAP file systems at scale.

* [Auto Create SnapMirror Relationships](/Management-Utilities/auto_create_sm_relationships) — Automatically create SnapMirror relationships between file systems
* [Auto Set FSxN Auto Grow](/Management-Utilities/auto_set_fsxn_auto_grow) — Automatically enable volume auto-grow
* [AWS CLI Management Scripts](/Management-Utilities/fsx-ontap-aws-cli-scripts) — Collection of scripts for managing AWS FSx for ONTAP
* [EC2 User Data iSCSI Create & Mount](/Management-Utilities/ec2-user-data-iscsi-create-and-mount) — Launch EC2 instances with auto-provisioned iSCSI volumes
* [FSxN Report](/Management-Utilities/FSxN-Report) — Generate reports of all FSx ONTAP file systems, volumes, and SVMs
* [iSCSI Volume Creation for Windows](/Management-Utilities/iscsi-vol-create-and-mount) — Create iSCSI volumes and mount to Windows EC2 instances
* [Rotate AWS Secrets Manager Secret](/Management-Utilities/fsxn-rotate-secret) — Lambda function for FSx ONTAP admin password rotation
* [Warm Performance Tier](/Management-Utilities/warm_performance_tier) — Warm up the performance tier of an FSx ONTAP volume
* [Workload Factory API Samples](/Management-Utilities/Workload-Factory-API-Samples) — Bash scripts demonstrating Workload Factory API usage

---

## Related Resources

| Resource | Link |
|:---------|:-----|
| AWS FSx for NetApp ONTAP documentation | [docs.aws.amazon.com](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/what-is-fsx-ontap.html) |
| NetApp Workload Factory | [console.workloads.netapp.com](https://console.workloads.netapp.com) |
| FSx ONTAP Monitoring (dedicated repo) | [NetApp/FSx-ONTAP-monitoring](https://github.com/NetApp/FSx-ONTAP-monitoring) |
| Console | [console.netapp.com](https://console.netapp.com) |

---

## Contributing

We welcome contributions from the community! Please read our [contribution guidelines](CONTRIBUTING.md) before getting started.

## Author Information

Expand Down
Loading