Deploying Alibaba Cloud PCS using Terraform Template

This section describes how to install terraform template, deploy PCS with 2 NICs and 3 NICs.

Installing Terraform Template

1.Go to the Terraform website and install Terraform on a Linux VM of your choice.

2.Download the following directories and files in it:

Directory

Files

base_setup

base_setup.tf

variables.tf

pcs_2_nics

pcs_2_nics.tf

user_data.txt

variables.tf

pcs_3_nics

pcs_3_nics.tf

user_data.txt

variables.tf

Configuring Base Setup

1.Customize and set the variables in variables.tf file.

2.Copy user_data.txt and variables.tf file to each of the directories (base_setup, pcs_2_nics, pcs_3_nics).

Alternatively, create a softlink to these files.

3.Change directory to base_setup directory, and run the following commands:

linux# terraform init

linux# terraform apply

Deploying PCS with 2 NICs

1.Change directory to pcs_2_nics.

2.Customize the user_data.txt file. This file contains the PCS initial configuration data.

3.Run the following commands:

linux# terraform init

linux# terraform apply

Deploying PCS with 3 NICs

1.Change directory to pcs_3_nics.

2.Customize the user_data.txt file. This file contains the PCS initial configuration data.

3.Run the following commands:

linux# terraform init

linux# terraform apply