Clusters

A cluster is a group of machines running in the cloud

Creating a cluster

To create a cluster, the genvid-bastion must be running. The following command starts the minimal services required.

genvid-bastion setup

The next step is to open genvid-ui web site to manage the Clusters

genvid-bastion monitor

Go to the Genvid-UI page and click on Change config and choose a bastion name.

Choosing a unique name for the bastion

Go to the clusters page and click on create and choose a unique cluster id.

Create a cluster

Terraform Configuration

Click on the Infrastructure link of your cluster and edit the settings of your cluster. Terraform is used to build the cluster insfrastructure, so the settings values are used to configure the cluster infrastructure.

  • region is the AWS region where your cluster will be created. This default setting is set to us-east-1 but feel free to use another one which contains G2 instances [1].
  • game_az is the AWS availability zone, with the region prefix. It should be the same as the one you get in Starting the initialization AMI. The default settings is a. However, it happens often that a zone doesn’t have any G2 instances left and you must change the availability zone to have one. There is, right now, no way to know in advance if an instance will be available in a specific zone.
  • admin_password is the administrator password for the Windows machine. It is set to 1genvid6 by default but feel free to change it. The Windows machine is only accessible from the other server instances and from other machines that share the same external IP as yours [2]. It is a good practice to not keep the same admin password that for everyone else.
  • ami_prefix is a common prefix for the game AMI that we will create at the next step. This is the prefix used in the section Saving the AMI, and the default is default. You can change it if you want to experiment with your own AMI.

Two other setting’s values are provided automatically to the terraform configuration via environment variables. So they don’t need to be set manually.

  • cluster is the name of your cluster.
  • bastionid is the name of your bastion.

See the Terraform Configuration Documentation for more information on how to setup those variables globally or locally.

[1]There is a current limitation right now where the region must be the same as the default region in your AWS configuration.
[2]Future versions of the Cluster will use a bastion host instead, which will be far more secure.

Applying terraform infrastructure

Terraform apply is the operation by witch the cluster infrastructure is builded.

Click on Apply to build the infrastructure

Terraform apply

You should see the log starting to appear. Some time terraform is not able to build up the infratructure. If this is the case, check the error message, change the settings and apply again. At the end of this step, there is a cluster running on the cloud, but the genvid SDK is not present in it.

Go to the clusters page. The cluster status is Up: Setup needed!. This means that the infrastructure is up, but the SDK is not yet present in it.

Destroying terraform infrastructure

To destroy the terraform infrastructure, simply click on the Destroy button.

Deleting a cluster

To delete a cluster, you must have destroyed terraform infrastructure. So go to the clusters page and click on the Delete button.