basic/basic_cluster

A basic but complete AWS cluster infrastructure to use with our DirectX sample.

This module can be used to deploy an SDK cluster by creating these main resources: - VPC, subnets - EC2 servers ( with SGroups)

Providers

  • aws (~> 3.35.0)

  • tls (~> 3.1.0)

Requirements

  • terraform >= 0.13

  • aws ~> 3.35.0

  • tls ~> 3.1.0

Inputs

bastionid (string)

Id of this bastion instance

cluster (string)

Name of your cluster

trusted_cidr (string)

CIDR to be trusted. This should at least contain the external CIDR (<ip>/32) for the local machine. Otherwise, the provision and access to Consul/Nomad will fail.

admin_password (string)

The administrator password for the Windows machine. The Windows machine is only accessible from the other server instances and from other machines that share the same external IP as yours 2.

Default: 1genvid6

ami_version (string)

Version prefix of the AMIs (both wingame and server) to use (ex: 1.20.0 will match both 1.20.0 and 1.20.0.0 versions).

In order to use an AMI with a version suffix, the whole version with the suffix must be specified (ex: 1.28.0.1.mysuffix).

Default: 1.42.0

azs (list(string))

A list of availability zones to use in the region. An empty list selects all available zones. Note: Changing the order of zones will result in the cluster being rebuilt. Appending to the list will not affect existing resources.

custom_tags (map(string))

Map of user defined tags to add to all cloud resources. 1 4

datacenter (string)

Consul/Nomad datacenter

Default: default

game_ami_owners (list(string))

The list of owners that can own the game AMI. Default to self.

New in version 1.30.0.

Default: [‘self’]

game_ami_prefix (string)

A common prefix for the game AMI. This is the prefix we use in the Save the AMI section. You can change it if you want to experiment with your own AMI. 5

Default: default

instance_encoding_count (number)

Number of internal workers to spawn

Default: 1

instance_encoding_type (string)

Type of EC2 instance to use for encoding servers

Default: c5.2xlarge

instance_game_count (number)

Number of game instances to spawn

Default: 1

instance_game_type (string)

Type of EC2 instance to use for game servers

Default: g5.xlarge

instance_internal_count (number)

Number of internal workers to spawn

Default: 2

instance_internal_type (string)

Type of EC2 instance to use for internal servers

Default: t3.small

instance_public_count (number)

Number of public workers to spawn

Default: 1

instance_public_type (string)

Type of EC2 instance to use for public servers

Default: t3.small

instance_server_count (number)

The number of supervisor servers. Must be an odd number. It is usually 3 for production deployment.

Default: 1

instance_server_type (string)

Type of EC2 instance to use for admin servers

Default: t3.small

region (string)

AWS deployment region

Default: us-east-1

server_ami_owners (list(string))

The list of owners that a valid AMI can have. Default to the Genvid public account.

New in version 1.30.0.

Default: [‘149754531711’]

server_ami_prefix (string)

A common prefix for the server AMI. You can change it if you want to experiment with your own AMI. 5

Default: genvidtech

subnet_cidr_block_size (number)

Set the size of the subnet CIDR blocks. Subnets are spanned across availability zones, and the total size of all the subnets must fit within the VPC’s CIDR block (10.0.0.0/16). This means that larger blocks could span fewer availability zones. Ex: Size 17 could span 1 availability zone. Size 28 would be able to span 2048 availability zones. Max size: 17, Min size: 28

Default: 28

toolbox_location (string)

Genvid Toolbox Wheel file.

Only required if you need to update the one from the AMI. An empty value indicates to not install the toolbox.

trusted_cidrs (list(string))

A list of CIDR to be trusted.

trusted_security_groups (list(string))

A list of security groups to be trusted.

use_drive_encryption (bool)

If you want to have encrypted EBS, select true. If you do not want to have encypted EBS, or you are upgrading the SDK version from 1.24 or below to 1.25 or higher, select false. 3

Warning

Your drives will be recreated if you toggle this feature with existing drives. Prior to 1.25, the drives were not encrypted. Starting with version 1.25 the encryption is enabled by default.

Default: True

Outputs

azs_available

List of availability zones that were detected as available to use.

azs_selected

List of availability zones that were selected to use.

cluster

Name of your cluster

consul_nodes

The Consul nodes

encoding_worker_private_ips

The private IP addresses of the Encoding instance(s)

encoding_worker_public_ips

The public IP addresses of the Encoding instance(s)

game_instance_profile_name

The instance profile name used by the Game instance(s)

game_private_ips

The private IP addresses of the Game instance(s)

game_public_ips

The public IP addresses of the Game instance(s)

internal_worker_private_ips

The private IP addresses of the Internal instance(s)

internal_worker_public_ips

The public IP addresses of the Internal instance(s)

private_key_pem

The private key that can be used to connect to the instances with SSH or RDP

public_key

The public key for connecting to the instances used by AWS for authentication

public_subnets

The list of public subnets

public_worker_private_ips

The private IP addresses of the Public instance(s)

public_worker_public_ips

The public IP addresses of the Public instance(s)

region

The Region

server_instance_profile_name

The instance profile name used by the Server, Encoding, Internal, and Public instances

server_private_ips

The private IP addresses of the Server instance(s)

server_public_ips

The public IP addresses of the Server instance(s)

subnet_selected

A list of public subnets created in the vpc

vpc_id_selected

The ID of the selected VPC

1

In addition to custom tags, Genvid reserves the right to add its own tags on resources. If they are not documented, they are intended to be used by Genvid without any guarantee of backward compatibility.

2

Future versions of the Cluster will use a bastion host instead for increased security.

3

New in version 1.25.0.

4

New in version 1.26.0.

5(1,2)

New in version 1.27.0.