Deploying AWS Cloud ICS using Terraform Template

This section describes how to install terraform template, and deploy ICS on aws 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 at usr/local/bin.

2.Install AWS CLI.

3.Configure AWS Access key and AWS Secret key under .bashrc directory.

Example: AWS_ACCESS_KEY="XXXXXXXX"; export AWS_ACCESS_KEY

AWS_SECRET_KEY="YYYYYYYY"; export AWS_SECRET_KEY

4.Download the following directories and files in it:

Directory

Files

base_setup

base_setup.tf

variables.tf

ics_2_nics

ics_2_nics.tf

variables.tf

ics_3_nics

ics_3_nics.tf

variables.tf

ics_2_nics_with_2_nodes

ics_2_nics_with_2_nodes.tf

variables.tf

ics_3_nics_with_2_nodes

ics_3_nics_with_2_nodes.tf

variables.tf

Configuring Base Setup

1.Customize and set the variables in variables.tf file based on the requirement.

Example: Region, AMI-id, VPC name, subnet IP address details, instance name etc.

2.Create a directory base_setup.

3.Copy the files variables.tf and base_setup.tf into the base_setup directory.

4.Change the key based on your requirement.

5.Change the files permission with +x .

linux# chmod +x *.*

6.Run the following commands creating base setup.:

linux# terraform init

linux# terraform apply

7.When prompted for admin input for deployment, type "yes".

The Base setup will create VPC, Subnets, Security Groups, Internet Gateway and Route Table.

Deploying ICS with 2 NICs

1.Customize and set the variables in variables.tf file based on the requirement.

2.Change directory to ics_2_nics.

3.Copy the files variables.tf and ics_2_nics.tf into the ics-2nic directory.

4.Run the following commands:

linux# terraform init

linux# terraform apply

This terraform will deploy 2 NIC ICS.

Deploying ICS with 3 NICs

1.Customize and set the variables in variables.tf file based on the requirement.

2.Change directory to ics_3_nics.

3.Copy the files variables.tf and ics_3_nics.tf into the ics-3nic directory.

4.Run the following commands:

linux# terraform init

linux# terraform apply

This terraform will deploy 3 NIC ICS.