GridGain Developers Hub

Using Terraform to Deploy GridGain in AWS

You can provision GridGain cluster using Terraform.

Overview

To help you launch GridGain in AWS we provide:

Usage Example

Terraform module is designed to create sufficient infrastructure to run GridGain cluster using the AMI. It will provision VPC and networking, S3 and KMS for encrypted snapshots and cluster nodes themselves as EC2 instances. You can check deployment diagrams below or examples in Terraform module repository.

The following steps describe how you can use Terraform module to deploy a private GridGain cluster:

  • Make sure you have Terraform installed and configured to use your AWS credentials;

  • Get the GridGain AMI ID;

  • Clone Terraform module repository from GitHub;

  • Open the examples/without_ssl subfolder;

  • Set AMI ID and your SSH public key (for accessing the instance) in the main.tf file;

  • Run the terraform init command. It will download the AWS provider and prepare your environment;

  • Run the terraform apply command. It will present you the plan of changes. Upon your approval, Terraform will create infrastructure in AWS;

When you no longer need the cluster, run the terraform destroy command.

You can see the complete list of variables available for the module on Terraform Registry page.

Private Cluster Deployment Diagram

Below is the example of the deployment that will be created if the public_access_enable variable is set to false:

terraform1

Public Cluster Deployment Diagram

Below is the example of the deployment that will be created if the public_access_enable variable is set to true:

terraform2