AWS

Objective

This document provides instructions on how to install Volterra Node or Cluster (multi-node) on Amazon Elastic Compute Cloud (EC2) using custom Amazon Machine Image (AMI).


Prerequisites

The following prerequisites apply:

Note: By proceeding with the installation, download and/or access and use, as applicable, of the Volterra software, and/or Volterra platform, you acknowledge that you have read, understand, and agree to be bound by this agreement.


Quick Deployment Option

The quickest way to install Volterra Node(s) is by using the Quickstart tool that comes packaged with a setup script and a container with Volterra Terraform deployment scripts.

Installing the node using the quickstart also performs site token creation and automatic approval of registration.

Note: Automatic registration for worker nodes is not supported.

Quickstart tool requires input variables supplied through a file. The following snippet shows sample contents of the variables file.

{
    "access_key": "<aws access key>",
    "secret_key": "<aws secret key>",

    "machine_public_key": "<ssh-public-key>",
    "machine_image": "<AMI-ID>",

    "deployment": "<ce_cluster_name>",
    "cluster_latitude": "<latitude>",
    "cluster_longitude": "<longitude>",
    "region": "<aws region>",
    "api_p12_file": "<path/to/api/p12/file>",
    "api_url": "<volterra_tenant_url ex: https://customer1.console.ves.volterra.io/api"

}

To obtain AWS keys and secret, follow instructions from AWS Documentation.

See the AMI Images for AWS Machine Images (AMI) per region.

Note: The api_p12_file represents the path to API credentials file. In case you do not have API credentials, generate them using the IAM->API Credentials option in the VoltConsole.

Step 1: Download the Quickstart tool.
docker run --rm -v $(pwd):/opt/bin:rw docker.io/volterraio/volt-terraform:latest cp /deploy-terraform.sh /opt/bin
Step 2: Set the environment variable for API credentials password.
export VES_P12_PASSWORD=<api_cred_password>

Note: The API credentials password is the one you set during the generation of API credentials file.

Step 3: Deploy the node(s).

Deploy using the apply option of the Quickstart tool. Enter the ce-multi-aws template for multi-node deployments and ce-single-aws templates for single-node deployments.

./deploy-terraform.sh apply -p aws -i <absolute_path_to_vars_file> -tn ce-single-aws --tf-version 0.12 --force

Example command to desploy a single node:

./deploy-terraform.sh apply -p aws -i /var/tmp/aws.tfvars -tn ce-single-aws --tf-version 0.12 --force

Note: In case of two-interface node installation, use the ce-single-2nic-aws or ce-multi-2nic-aws template for single-node or multi-node site respectively.


Detailed Deployment Steps

You can customize the default terraform deployment steps used by the Volterra Quickstart tool. Perform the following steps for customizing your deployment.

Step 1: Run the terraform CLI container.
docker run --entrypoint tail --name terraform-cli -d -it \
-w /terraform/templates \
-v ${HOME}/.ssh:/root/.ssh \
volterraio/volt-terraform:latest \
-f /dev/null
Step 2: Enter the terraform container.
docker exec -it terraform-cli sh
Step 3: Configure AWS API access and secret key.

Use the command below:

Note: For more information, please refer to AWS documentation.

aws configure
Step 4: Create terraform variables.

Create a variables file or copy one from the samples provided. For single-node deployment, change to the ce-single-aws directory. For multi-node deployment, change to the ce-multi-awsdirectory.

cd <ce-single-aws | ce-multi-aws>
cp sample-production.tfvars.json aws.tfvars.json

Note: In case of two-interface node installation, change to the ce-single-2nic-aws or ce-multi-2nic-aws directory for single-node or multi-node site respectively.

Step 5: Edit aws.tfvars.json and update the required changes to the variables.

Edit the terraform variables.

{
    "access_key": "<AWS_ACCESS_KEY>",
    "secret_key": "<AWS_SECRET_ACCESS_KEY>",
    "region": "<REGION>",

    "machine_public_key": "<SSH_PUBLIC_KEY>",
    "machine_image": "<AWS_AMI_IMAGE_ID>",

    "deployment": "<VOLTERRA_SITE_NAME>",
    "cluster_token": "<VOLTERRA_SITE_TOKEN>"
}

Set the environment variable for API credentials password.

export VES_P12_PASSWORD=<api_cred_password>

Note: See the AMI Images for AWS Machine Images (AMI) per region.

Step 6: Deploy the nodes by executing the terraform commands.
terraform init
terraform apply -var-file=aws.tfvars.json

Note: The terraform init command brings up the AWS cloud resources. When the terraform apply command is executed, it prompts for user input to proceed. Enter yes to begin deploying the node(s).

Step 7: Return to the Create Site document to accept the registration.

Perform the registration using the instructions provided at Registration.

Note: You can log on to the Volterra CLI on your node through SSH with username centos and your private key.


Destroy

Destroying the node requires you to first decomission and delete the node from the VoltConsole using the Remove Site instructions.

Step 1: Login to terraform-cli container.
docker exec -it terraform-cli sh
Step 2: Destroy the deployments.

Destroy by executing the destroy option from within the directories of your deployment.

cd templates/<ce-single-aws | ce-multi-aws>
terraform destroy -force -var-file=aws.tfvars.json

Example command to destroy the node using the quickstart tool:

./deploy-terraform.sh destroy -p aws -i /var/tmp/aws.tfvars -tn ce-single-aws --tf-version 0.12 --force
Step 3: Optionally, remove Votlerra terraform container.
exit
docker rm -f terraform-cli

Volterra Concepts


How-to’s