Skip to content

This repo contains terraform code to deploy a simple network landing zone for Nutanix Cloud Cluster (NC2) on AWS

Notifications You must be signed in to change notification settings

squasta/Simple-Landing-Zone-for-NC2-on-AWS

Repository files navigation

Simple-Landing-Zone-for-NC2-on-AWS

This repo contains terraform code to deploy a simple network landing zone for Nutanix Cloud Cluster (NC2) on AWS

Prerequisites

You can also clone this repo in your AWS Cloud Shell and install terraform in your cloud shell.

For additional information about creating manually your AWS for Nutanix Cloud Cluster : https://portal.nutanix.com/page/documents/details?targetId=Nutanix-Clusters-AWS:aws-aws-create-resources-manual-c.html

Landing Zone architecture(s)

If you want to use Native AWS VPC integration, this is the basic landing zone. If you want to use Nutanix Flow Networking integration available in AOS 6.8 or more, check FlowNetworking Branch in this repo

IP ranges here are for example, you can define yours.

This landing zone also include the option to have a dedicated subnet and a virtual machine to use as a jumbox. All AWS resources related to Jumbox are in jumbox.tf file.

Step by step operations

Clone this repo.

Edit configuration.tfvars to define your AWS resources names or tags, your AWS region, AMI for Jumpbox Virtual Machine...

To get these information, you can use the AWS CLI on your workstation or in AWS Cloud Shell

You can list your AWS regions available using the following command :

aws ec2 describe-regions --output table

The following command gives the region actually used by the CLI regardless of whether environment variables are or are not set:

aws configure get region

Check that the region and EC2 metal instance(s) you choose are supported for Nutanix Cloud Cluster : https://portal.nutanix.com/page/documents/details?targetId=Nutanix-Clusters-AWS:aws-clusters-aws-xi-supported-regions-metals.html

If you don't need a Jumpbox VM and its associated resources, you can delete jumbox.tf file.

To get AMI ID for the Windows Server Jumbox in the choosen region :

aws ec2 describe-images --region eu-central-1 --owners amazon --filters "Name=name,Values=Windows_Server-2022-English-Full-Base-*" "Name=state,Values=available" --query "Images | sort_by(@, &CreationDate) | [-1].ImageId" --output text

If you want to define your own IP ranges for AWS VPC and subnets, check variables.tf to be sure of valid CIDR value per resource. Avoid IP ranges overlapping with your on-premises IP ranges if you plan to have interconnection through Site to Site VPN or DirectConnect

Before deploying check on which AWS Account you are connected :

aws sts get-caller-identity
  1. Terraform Init phase
terraform init
  1. Terraform Plan phase
terraform plan --var-file=configuration.tfvars
  1. Terraform deployment phase (add TF_LOG=info at the beginning of the following command line if you want to see what's happen during deployment)
terraform apply --var-file=configuration.tfvars
  1. Wait until the end of deployment (It should take around 2 minutes)

  2. Go to Nutanix Cloud Cluster (NC2) Portal https://cloud.nutanix.com and start your Nutanix Cluster deployment wizard.

In Step 1 (General) choose the same AWS region and Availability Zone that you used in your terraform deployment

In Step 4 (Network) choose the VPC and Management Subnets created with terraform

  1. After the deployment of the cluster is successfull, you can add connectivity with on-premises or other AWS VPC or services by peering a Transit VPC . If you enabled a bastion and a Jumpbox VM, you can login to the Jumbox VM and connect Prism Element or Prism Central through a web browser.

  2. Use the solution and configure Nutanix features like categories, VM, replication...

  3. When you want to destroy the Nutanix Cluster, use the NC2 Portal (https://cloud.nutanix.com) to terminate it.

  4. After Nutanix cluster terminaison, you can destroy the landing zone using the following command :

terraform destroy --var-file=configuration.tfvars

Check you AWS Console after deployment to see cloud resources created

Network components

S3 buckets for Cluster Protect [Optional - in comment in code]

How much does it cost to test this landing zone ?

It's very cheap to test and customize this simple landing zone.

You can use infracost (available on https://www.infracost.io/) to check the estimate price for 1 month. Here is an exemple for Frankfurt (eu-central-1) AWS Region

❗ Important : this landing zone cost estimation does not include the cost of AWS EC2 Metal instance(s) used as node(s) in the Nutanix Cluster and network traffic. Please have a look of metal instances prices here : https://aws.amazon.com/ec2/pricing/on-demand/. Pricing is per instance-hour consumed for each instance, from the time an instance is launched until it is terminated or stopped. Each partial instance-hour consumed will be billed per-second for Linux, Windows, Windows with SQL Enterprise, Windows with SQL Standard, and Windows with SQL Web Instances, and as a full hour for all other instance types.

Future improvements on my roadmap

  • Add a variable to define AWS Availability Zone
  • Add a Linux VM for Jumbox
  • Add a way to enable/disabled Windows and/or Linux Jumbox
  • Add additional tags to every AWS resources

About

This repo contains terraform code to deploy a simple network landing zone for Nutanix Cloud Cluster (NC2) on AWS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages