Skip to main content
Pure Technical Services

Deploy using Terraform | Pure CBS on AWS

Currently viewing public documentation. Please login to access the full scope of documentation.

Introduction

This document lists the steps required to deploy a Cloud Block Store instance in AWS. 

Prerequisites

Prerequisites from the Cloud Block Store Deployment & Configuration Guide

Before deploying Cloud Block Store via Terraform, the prerequisites listed in the Cloud Block Store Deployment and Configuration Guide for AWS must be completed. The deployment may fail if all of the prerequisites are not met.

At a minimum, this includes the following high-level steps (please refer to the CBS Deployment and Configuration Guide for AWS for details on the following steps):

  • Creating a VPC with private and public subnets
  • Configuring VPC endpoints for S3 and DynamoDB
  • Creating security groups for iSCSI, management, and replication
  • Creating an IAM role with sufficient permissions
  • Creating an EC2 key pair
  • Obtaining a license key for CBS, and adding the AWS account ID to Pure1
     
Additional prerequisites

In addition to the prerequisites listed in the Cloud Block Store Deployment and Configuration Guide for AWS, the following prerequisites need to be completed on the system where Terraform will be used:

Terraform Installation

Download the appropriate Terraform package for your operating system and hardware architecture from the link below:

https://www.terraform.io/downloads.html

Install and configure Terraform (be sure to update the path), and verify that the installation is successful by issuing a command such as terraform -help or terraform --version.

AWS CLI Installation

Download and install the AWS CLI tool from the link below:

https://aws.amazon.com/cli/

Configure AWS CLI for your AWS account. Be sure to use the Access Key and Secret Key for an IAM role that has sufficient permissions to deploy Cloud Block Store (see the Cloud Block Store Deployment and Configuration Guide for AWS for details on creating the IAM policy and the IAM role).

Terraform provider for CBS

Here's the link to Pure's CBS provider in the HashiCorp registry:

https://registry.terraform.io/providers/PureStorage-OpenConnect/cbs/latest

The Terraform provider files for CBS are located at the following link in GitHub:

https://github.com/PureStorage-OpenC...ples/aws_array

Download the following files:


Provider.png

 

Steps to deploy Cloud Block Store using Terraform:

Create a new directory for Terraform, and copy the downloaded Terraform provider files for CBS into the new directory.

Edit the terraform.tfvars file and use the format below to fill in information about your AWS account (see the prerequisites section for details). Save the changes to the file:

TF_Vars1.png

Following is the template_url for Purity version 6.1. Please use the appropriate template_url for the Purity version you want to deploy:

https://s3.amazonaws.com/awsmp-fulfillment-cf-templates-prod/4ea2905b-7939-4ee0-a521-d5c2fcb41214.a344cba1-670c-43b9-816f-5ea5796b14ef.template

Run the terraform init command to initialize the working directory:

TF_Init.png

 

Run the terraform plan command to create the execution plan. This command is a convenient way to check the execution plan without starting the actual deployment: 

TF_Plan2.png


Run the terraform apply command to launch the Cloud Block Store array in AWS:

TF_Apply2.png

After reviewing the information, enter Yes at the prompt Do you want to perform these actions? to launch the CBS deployment process.

The CBS deployment process should commence immediately. The deployment process take around 10 to 15 minutes. During this time, Terraform will continue to display the status Still creating every few seconds:

TF_Apply_2.png

 

Within a few minutes of starting deployment, you should be able to view the EC2 instances for the CBS array in the Initializing state:

EC2_2.png

 

In approximately 10 to 15 minutes, the CBS array deployment process should complete, and Terraform should display a message stating that the creation process has completed:

Create_Complete.png

 

Use the terraform show command to view detailed information about the newly created CBS array. This includes the GUI Endpoint (management IP address) that is used to log into the CBS array:

TF_Done.png

 

Detailed information about the CBS array can also be viewed under the Outputs tab of the CloudFormation stack for the newly created CBS array:

CF_Output.png

 

When CBS deployment has finished, the EC2 dashboard should show that initialization has completed for all the EC2 instances that belong to the CBS array:

EC2_Done.png

 

Use the GUI/Management Endpoint IP address to log into the newly created CBS array:

TF_GUI.png

 

For detailed steps on how to manage CBS arrays, please refer to the Managing Cloud Block Store section of the Cloud Block Store Deployment and Configuration Guide for AWS.