Skip to content

Spirent-Terraform-Modules/terraform-aws-aion

Repository files navigation

AWS Spirent AION Platform Terraform

Image of Spirent AION

Description

Spirent AION is a cloud platform for Spirent products and license management. This Terraform module deploys the Spirent AION AMI on AWS using your spirentaion.com account.

After terraform apply finishes you will be able to point your browser at the instance_public_ips addresses to use the platform or perform additional configuration.

Set enable_provisioner=false to run the configuration wizard manually in a web browser. Otherwise, when enable_provisioner=true login to https://<your_public_ip> using the values of admin_email and admin_password.

See product configuration for automated and manual configuration details.

Prerequisites

  • AWS user credentials (environment variables AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY)
  • Accept Spirent AION AMI product subscription on AWS Marketplace
  • Create an EC2 key pair on AWS for SSH access and private key file

Terraform examples

Terraform examples are located in the examples folder.

Basic usage

module "aion" {
  source = "git::https://github.com/Spirent-Terraform-Modules/terraform-aws-aion"

  vpc_id         = "vpc-123456789"
  subnet_id      = "subnet-123456789"

  ingress_cidr_blocks = ["0.0.0.0/0"]

  key_name         = "bootstrap_key"
  private_key_file = "./bootstrap_private_key_file"

  aion_url       = "https://spirent.spirentaion.com"
  aion_user      = "user1@spirent.com"
  aion_password  = "aion-password"
  admin_password = "admin-password"
}

Requirements

Name Version
terraform >= 0.13.0
aws >= 2.65

Providers

Name Version
aws >= 2.65
null n/a
random n/a
template n/a
tls n/a

Modules

No Modules.

Resources

Name
aws_ami
aws_eip_association
aws_instance
aws_network_interface
aws_security_group
null_resource
random_id
template_file
tls_public_key

Inputs

Name Description Type Default Required
admin_email Cluster admin user email. Use this to login to instance web page. Default is obtained from AION user information. string "" no
admin_first_name Cluster admin user first name. Default is obtained from AION user information. string "" no
admin_last_name Cluster admin user last name. Default is obtained from AION user information. string "" no
admin_password Cluster admin user password. Use this to login to to the instance web page. string n/a yes
aion_password AION user password for aion_url string n/a yes
aion_url AION URL. An example URL would be https://example.spirentaion.com. string n/a yes
aion_user AION user registered on aion_url string n/a yes
ami The AION AMI. When not specified latest AMI will be used. string "" no
cluster_names Instance cluster names. List length must equal instance_count. list(string) [] no
deploy_location Location name for deployed product instances. string "location1" no
deploy_products List of products to deploy. See Product List below for details. list(map(string)) [] no
dest_dir Destination directory on the instance where provisioning files will be copied string "~" no
eips List of management plane elastic IP IDs. Leave empty if subnet auto assigns IPs. list(string) [] no
enable_provisioner Enable provisioning. When enabled instances will be initialized with the specified variables. bool true no
entitlements Install hosted entitlements from organization's AION platform. See Entitlement List below for details. list(map(string)) [] no
http_enabled Allow HTTP access as well as HTTPS. Normally this is not recommended. bool false no
ingress_cidr_blocks List of management interface ingress IPv4/IPv6 CIDR ranges. Set to empty list when using security_group_ids. list(string) n/a yes
instance_count Number of instances to create number 1 no
instance_name_prefix Name assigned to the AION platform instance. An instance number will be appended to the name. string "aion-" no
instance_type AWS instance type string "m5.large" no
key_name AWS SSH key name to assign to each instance string n/a yes
local_admin_password Cluster local admin password for instance SSH access. Will use admin_password if not specified. string "" no
metrics_opt_out Opt-out of Spirent metrics data collection bool false no
node_names Instance cluster node names. List length must equal instance_count. list(string) [] no
node_storage_provider Cluster node storage provider string "local" no
node_storage_remote_uri Cluster node storage URI. Leave blank for default when provider is local string "" no
private_key_file AWS key private file string n/a yes
root_block_device Customize details about the root block device of the instance. See Block Devices below for details. list(map(string)) [] no
security_group_ids List of management plane security group IDs. Leave empty to create a default security group using ingress_cidr_blocks. list(string) [] no
subnet_id Management public AWS subnet ID string n/a yes
vpc_id AWS VPC ID string n/a yes

Outputs

Name Description
instance_ids List of instance IDs
instance_private_ips List of private IP addresses assigned to the instances, if applicable
instance_public_ips List of public IP addresses assigned to the instances, if applicable

Block Devices

Root Block Device

The root_block_device mapping supports the following:

Name Description Type Default Required
delete_on_termination Whether the volume should be destroyed on instance termination. string true no
encrypted Whether to enable volume encryption. Must be configured to perform drift detection. bool false no
iops Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3. number n/a no
kms_key_id Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection. string n/a no
tags A map of tags to assign to the device. map(string) {} no
throughput Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3. number n/a no
volume_size Size of the volume in gibibytes (GiB). number n/a no
volume_type Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. string gp2 no

Product Configuration

Product configuration specifies product deployment and license entitlements for the platform.

Automated

Use Terraform variables for automated configuration.

Entitlement List

The entitlement list specifies which license entitlements are hosted to the new AION platform. An empty list will not add entitlements. Use the following options to define each entitlement:

Name Description Type Default Required
product Product name string n/a yes
license License name string n/a yes
number Entitlement number. When specified number must match otherwise any will match. number n/a no

Product List

The product list specifies which products will be deployed. An empty list will not deploy any products. Use the following options to define each product deployment:

Name Description Type Default Required
name Product name string n/a yes
version Product version string n/a yes

Manual

Use the web browser to perform additional manual configuration after the intance is deployed.

Add License Entitlements

  1. From Settings navigate to License Manager, Entitlements
  2. Click Install Entitlements
  3. Use one of the following methods to add entitlements (#1 is prefered)
    1. Login to <your_org>.spirentaion.com and select entitlements to host in the new instance
      Note: Hosted entitlements should be released before destroying the instance. As a convenience terraform destroy will unhost remaining entitlements. However, if instance state is manually manipulated you may need to contact Spirent support to release entitlements for you.
    2. Install a license entitlement file obtained from Spirent support

Add Products

  1. From Settings navigate to Settings, Add New Products
  2. Click Install New Products
  3. Select products and versions and click Install