Skip to content

Commit bc03a79

Browse files
authored
Merge pull request #211 from NetApp/add_trident_protect
Add trident protect
2 parents 0d08894 + 267a26a commit bc03a79

22 files changed

+860
-25
lines changed

EKS/Backup-EKS-Applications-with-Trident-Protect/README.md

Lines changed: 355 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: snapshot.storage.k8s.io/v1
2+
kind: VolumeSnapshotClass
3+
metadata:
4+
name: ebs-csi-snapclass
5+
driver: ebs.csi.aws.com
6+
deletionPolicy: Delete
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: protect.trident.netapp.io/v1
2+
kind: Application
3+
metadata:
4+
name: <APP NAME>
5+
namespace: <APP NAMESPACE>
6+
spec:
7+
includedNamespaces:
8+
- namespace: <APP NAMESPACE>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: protect.trident.netapp.io/v1
2+
kind: Backup
3+
metadata:
4+
namespace: <APP NAMESPACE>
5+
name: <APP BACKUP NAME>
6+
spec:
7+
applicationRef: <APP NAME>
8+
appVaultRef: <APP VAULT NAME>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: protect.trident.netapp.io/v1
2+
kind: BackupRestore
3+
metadata:
4+
name: <APP RESTORE NAME>
5+
namespace: <DESTINATION NAMESPACE>
6+
spec:
7+
appArchivePath: <APP ARCHIVE PATH>
8+
appVaultRef: <APP VAULT NAME>
9+
namespaceMapping:
10+
- source: <SOURCE NAMESPACE>
11+
destination: <DESTINATION NAMESPACE>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: protect.trident.netapp.io/v1
2+
kind: BackupInplaceRestore
3+
metadata:
4+
name: <APP BACKUP RESTORE NAME>
5+
namespace: <APP NAMESPACE>
6+
spec:
7+
appArchivePath: <APP ARCHIVE PATH>
8+
appVaultRef: <APP VAULT NAME>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: protect.trident.netapp.io/v1
2+
kind: AppVault
3+
metadata:
4+
name: <APP VAULT NAME>
5+
namespace: trident-protect
6+
spec:
7+
providerType: AWS
8+
providerConfig:
9+
s3:
10+
bucketName: <APP VAULT BUCKET NAME>
11+
endpoint: <S3 ENDPOINT>
12+
providerCredentials:
13+
accessKeyID:
14+
valueFromSecret:
15+
key: accessKeyID
16+
name: s3
17+
secretAccessKey:
18+
valueFromSecret:
19+
key: secretAccessKey
20+
name: s3
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: snapshot.storage.k8s.io/v1
2+
kind: VolumeSnapshotClass
3+
metadata:
4+
name: trident-csi-snapclass
5+
annotations:
6+
snapshot.storage.kubernetes.io/is-default-class: "true"
7+
driver: csi.trident.netapp.io
8+
deletionPolicy: Delete

EKS/FSxN-as-PVC-for-EKS/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* [Installation Overview](#Installation-Overview)
66
* [Detailed Instructions](#Detailed-instructions)
77
* [Clone the "NetApp/FSx-ONTAP-samples-scripts" repo from GitHub](#Clone-the-NetAppFSx-ONTAP-samples-scripts-repo-from-GitHub)
8-
* [Make any desired changes to the variables.tf file](#Make-any-desired-changes-to-the-variablestf-file)
8+
* [Make any desired changes to the configuration variables](#Make-any-desired-changes-to-the-configuration-variables)
99
* [Initialize the Terraform environment](#Initialize-the-Terraform-environment)
1010
* [Deploy the resources](#Deploy-the-resources)
1111
* [SSH to the jump server to complete the setup](#SSH-to-the-jump-server-to-complete-the-setup)
@@ -78,21 +78,19 @@ terraform files are located:
7878
git clone https://github.com/NetApp/FSx-ONTAP-samples-scripts.git
7979
cd FSx-ONTAP-samples-scripts/EKS/FSxN-as-PVC-for-EKS/terraform
8080
```
81-
### Make any desired changes to the variables.tf file.
82-
Variables that can be changed include:
81+
### Make any desired changes to the configuration variables
82+
To configure the deployment first copy the `terraform.tfvars.template` file to `terraform.tfvars`. Then, modify it to suit your needs. Here are the variables you can set:
8383
- aws_region - The AWS region where you want to deploy the resources.
8484
- aws_secrets_region - The region where the fsx password secret will be created.
8585
- fsx_name - The name you want applied to the FSx for NetApp ONTAP File System. Must not already exist.
86-
- secret_name_prefix - The base name of the AWS SecretsManager secrets that will be created that will hold the FSxN adminstrator, and SVM, passwords.
86+
- secret_name_prefix - The base name of the AWS SecretsManager secrets that will be created that will hold the FSxN administrator, and SVM, passwords.
8787
A random string will be appended to this name to ensure uniqueness.
88-
- fsx_storage_capacity - The storage capacity of the FSx for NetApp ONTAP File System.
89-
Read the "description" of the variable to see the valid range.
90-
- fsx_throughput_capacity - The throughput capacity of the FSx for NetApp ONTAP File System.
91-
Read the "description" of the variable to see valid values.
88+
- fsx_storage_capacity - The storage capacity of the FSx for NetApp ONTAP File System. Read the "description" of the variable in the `variables.tf` file to see the valid range.
89+
- fsx_throughput_capacity - The throughput capacity of the FSx for NetApp ONTAP File System. Read the "description" of the variable in the `varaibles.tf` file to see valid values.
9290
- key_pair_name - The name of the EC2 key pair to use to access the jump server.
9391
- secure_ips - The IP address ranges to allow SSH access to the jump server. The default is wide open.
9492

95-
:warning: **NOTE:** You must change the key_pair_name variable, otherwise the deployment will not complete succesfully.
93+
:warning: **NOTE:** You must change the key_pair_name variable, otherwise the deployment will not complete successfully.
9694
### Initialize the Terraform environment
9795
Run the following command to initialize the terraform environment.
9896
```bash

EKS/FSxN-as-PVC-for-EKS/terraform/ec2.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ resource "aws_instance" "eks_jump_server" {
2626
user_data = <<EOF
2727
#!/bin/bash
2828
#
29+
ARCH=amd64
30+
#
2931
# Get the system up to date:
3032
apt update
3133
apt upgrade -y
@@ -41,12 +43,18 @@ unzip -q awscliv2.zip
4143
rm -rf awscliv2.zip aws
4244
#
4345
# Install kubectl:
44-
curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
46+
curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$ARCH/kubectl"
4547
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
4648
#
4749
# Install helm:
4850
snap install helm --classic
4951
#
52+
# Install eksctl:
53+
PLATFORM=$(uname -s)_$ARCH
54+
curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"
55+
tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz
56+
sudo mv /tmp/eksctl /usr/local/bin
57+
#
5058
# Install the eks samples repo into the ubuntu home directory:
5159
cd /home/ubuntu
5260
git clone https://github.com/NetApp/FSx-ONTAP-samples-scripts.git

0 commit comments

Comments
 (0)