Cloud Volumes ONTAP for AWS - Burst to cloud
This article supports the NetApp Cloud Volumes ONTAP for AWS Automation Solution, which is available to NetApp customers from the NetApp Console automation hub.
The Cloud Volumes ONTAP for AWS Automation Solution automates the containerized deployment of Cloud Volumes ONTAP for AWS using Terraform, enabling you to deploy Cloud Volumes ONTAP for AWS rapidly, without any manual intervention.
-
You must download the Cloud Volumes ONTAP AWS - Burst to cloud automation solution through the Console web UI. The solution is packaged as
cvo_aws_flexcache.zip. -
You must install a Linux VM on the same network as Cloud Volumes ONTAP.
-
After you install the Linux VM, you must follow the steps in this solution to install the required dependencies.
Step 1: Install Docker and Docker Compose
Install Docker
The following steps use Ubuntu 20.04 Debian Linux distribution software as an example. The commands you run depend on the Linux distribution software that you are using. Refer to the specific Linux distribution software documentation for your configuration.
-
Install Docker by running the following
sudocommands:sudo apt-get update sudo apt-get install apt-transport-https cacertificates curl gnupg-agent software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable” sudo apt-get update sudo apt-get install dockerce docker-ce-cli containerd.io -
Verify the installation:
docker –version -
Verify that a group named "docker" has been created on your Linux system. If necessary, create the group:
sudo groupadd docker -
Add the user that needs to access Docker to the group:
sudo usermod -aG docker $(whoami) -
Your changes are applied after you log out and log back in to the terminal. Alternatively, you can apply the changes immediately:
newgrp docker
Install Docker Compose
-
Install Docker Compose by running the following
sudocommands:sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose -
Verify the installation:
docker-compose –version
Step 2: Prepare the Docker image
-
Copy the
cvo_aws_flexcache.zipfolder to the Linux VM that you want to use to deploy Cloud Volumes ONTAP:scp -i ~/<private-key>.pem -r cvo_aws_flexcache.zip <awsuser>@<IP_ADDRESS_OF_VM>:<LOCATION_TO_BE_COPIED>-
private-key.pemis your private key file for login without a password. -
awsuseris the VM username. -
IP_ADDRESS_OF_VMis the VM IP address. -
LOCATION_TO_BE_COPIEDis the location where the folder will be copied.
-
-
Extract the
cvo_aws_flexcache.zipfolder. You can extract the folder in the current directory or in a custom location.To extract the folder in the current directory, run:
unzip cvo_aws_flexcache.zipTo extract the folder in a custom location, run:
unzip cvo_aws_flexcache.zip -d ~/<your_folder_name> -
After you extract the content, navigate to the
CVO_Aws_Deploymentfolder and run the following command to view the files:ls -laYou should see a list of files, similar to the following example:
total 32 drwxr-xr-x 8 user1 staff 256 Mar 23 12:26 . drwxr-xr-x 6 user1 staff 192 Mar 22 08:04 .. -rw-r--r-- 1 user1 staff 324 Apr 12 21:37 .env -rw-r--r-- 1 user1 staff 1449 Mar 23 13:19 Dockerfile drwxr-xr-x 15 user1 staff 480 Mar 23 13:19 cvo_Aws_source_code drwxr-xr-x 4 user1 staff 128 Apr 27 13:43 cvo_Aws_variables -rw-r--r-- 1 user1 staff 996 Mar 24 04:06 docker-compose-deploy.yml -rw-r--r-- 1 user1 staff 1041 Mar 24 04:06 docker-compose-destroy.yml -
Locate the
cvo_aws_flexcache_ubuntu_image.tarfile. This contains the Docker image required to deploy Cloud Volumes ONTAP for AWS. -
Untar the file:
docker load -i cvo_aws_flexcache_ubuntu_image.tar -
Wait a few minutes for the Docker image to load, and then validate that the Docker image loaded successfully:
docker imagesYou should see a Docker image named
cvo_aws_flexcache_ubuntu_imagewith thelatesttag, as shown in the following example:REPOSITORY TAG IMAGE ID CREATED SIZE cvo_aws_flexcache_ubuntu_image latest 18db15a4d59c 2 weeks ago 1.14GB
You can change the Docker image name if required. If you change the Docker image name, make sure to update the Docker image name in the docker-compose-deployanddocker-compose-destroyfiles.
Step 3: Create environment variable files
At this stage, you must create two environment variable files. One file is for authentication of AWS Resource Manager APIs using the AWS access and secret keys. The second file is for setting environment variables to enable the Console Terraform modules to locate and authenticate AWS APIs.
-
Create the
awsauth.envfile in the following location:path/to/env-file/awsauth.env-
Add the following content to the
awsauth.envfile:access_key=<>
secret_key=<>The format must be exactly as shown above.
-
-
Add the absolute file path to the
.envfile.Enter the absolute path for the
awsauth.envenvironment file that corresponds to theAWS_CREDSenvironment variable.AWS_CREDS=path/to/env-file/awsauth.env -
Navigate to the
cvo_aws_variablefolder and update the access and secret key in the credentials file.Add the following content to the file:
aws_access_key_id=<>
aws_secret_access_key=<>The format must be exactly as shown above.
Step 4: Sign up for NetApp Intelligent Services
Sign up for NetApp Intelligent Services through your cloud provider to pay hourly (PAYGO) or through an annual contract. NetApp Intelligent Services include NetApp Backup and Recovery, Cloud Volumes ONTAP, NetApp Cloud Tiering, NetApp Ransomware Resilience and NetApp Disaster Recovery. NetApp Data Classification is included with your subscription at no additional cost.
-
From the Amazon Web Services (AWS) portal, navigate to SaaS and select Subscribe to NetApp Intelligent Services.
You can either use the same resource group as Cloud Volumes ONTAP or a different resource group.
-
Configure the NetApp Console portal to import the SaaS subscription to the Console.
You can configure this directly from the AWS portal.
You are redirected to the Console portal to confirm the configuration.
-
Confirm the configuration in the Console portal by selecting Save.
Step 5: Create an external volume
You should create an external volume to keep the Terraform state files, and other important files persistent. You must make sure that the files are available for Terraform to run the workflow and deployments.
-
Create an external volume outside of Docker Compose:
docker volume create <volume_name>Example:
docker volume create cvo_aws_volume_dst
-
Use one of the following options:
-
Add an external volume path to the
.envenvironment file.You must follow the exact format shown below.
Format:
PERSISTENT_VOL=path/to/external/volume:/cvo_awsExample:
PERSISTENT_VOL=cvo_aws_volume_dst:/cvo_aws -
Add NFS shares as an external volume.
Make sure that the Docker container can communicate with the NFS shares and that the correct permissions, such as read/write, are configured.
-
Add the NFS shares path as the path to the external volume in the Docker Compose file, as shown below:
Format:PERSISTENT_VOL=path/to/nfs/volume:/cvo_awsExample:
PERSISTENT_VOL=nfs/mnt/document:/cvo_aws
-
-
-
Navigate to the
cvo_aws_variablesfolder.You should see the following variable file in the folder:
-
terraform.tfvars -
variables.tf
-
-
Change the values inside the
terraform.tfvarsfile according to your requirements.You must read the specific supporting documentation when modifying any of the variable values in the
terraform.tfvarsfile. The values can vary depending on region, availability zones, and other factors supported by Cloud Volumes ONTAP for AWS. This includes licenses, disk size, and VM size for single nodes and high availability (HA) pairs.All supporting variables for the Console agent and Cloud Volumes ONTAP Terraform modules are already defined in the
variables.tffile. You must refer to the variable names in thevariables.tffile before adding to theterraform.tfvarsfile. -
Depending on your requirements, you can enable or disable FlexCache and FlexClone by setting the following options to
trueorfalse.The following examples enable FlexCache and FlexClone:
-
is_flexcache_required = true -
is_flexclone_required = true
-
Step 6: Deploy Cloud Volumes ONTAP for AWS
Use the following steps to deploy Cloud Volumes ONTAP for AWS.
-
From the root folder, run the following command to trigger deployment:
docker-compose -f docker-compose-deploy.yml up -dTwo containers are triggered, the first container deploys Cloud Volumes ONTAP and the second container sends telemetry data to AutoSupport.
The second container waits until the first container completes all of the steps successfully.
-
Monitor progress of the deployment process using the log files:
docker-compose -f docker-compose-deploy.yml logs -fThis command provides output in real time and captures the data in the following log files:
deployment.logtelemetry_asup.logYou can change the name of these log files by editing the
.envfile using the following environment variables:DEPLOYMENT_LOGSTELEMETRY_ASUP_LOGSThe following examples show how to change the log file names:
DEPLOYMENT_LOGS=<your_deployment_log_filename>.logTELEMETRY_ASUP_LOGS=<your_telemetry_asup_log_filename>.log
You can use the following steps to remove the temporary environment and clean up items that were created during the deployment process.
-
If you deployed FlexCache, set the following option in the
terraform.tfvarsvariable file, this cleans up FlexCache volumes and removes the temporary environment that was created earlier.flexcache_operation = "destroy"The possible options are deployanddestroy. -
If you deployed FlexClone, set the following option in the
terraform.tfvarsvariable file, this cleans up FlexClone volumes and removes the temporary environment that was created earlier.flexclone_operation = "destroy"The possible options are deployanddestroy.