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 a Bastion-UI web site to manage the Clusters.

genvid-bastion monitor
On the Bastion-UI page:
  • Click Change config.
  • Choose a Bastion name.
Choosing a unique name for the Bastion
On the clusters page:
  • Click create.
  • Choose a unique cluster id.
Create a cluster

You can select another source if needed. For now, you can stick with the default values.

Terraform Initialization

Before configuring the cluster, you must initialized it with the source provided. This will copy the source template provided earlier, and will download any modules and plugins required by it. Click on the Infrastructure link and go in the Commands section. There, simply click on the Init button. The initialization usually take only a few seconds, but could vary depending on your connections and the requirements of your source.

Terraform Configuration

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

  • region is the AWS region where your cluster will be created. The default setting is us-east-1. You can use any region that 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. If a zone doesn’t have any G2 instances available you must change to a zone that does. (Currently, there isn’t a 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. The Windows machine is only accessible from the other server instances and from other machines that share the same external IP as yours [2].
  • ami_prefix is a common prefix for the game AMI. This is the prefix used in the section Saving the AMI. The default is default. You can change it if you want to experiment with your own AMI.

The next 2 settings’ 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]The region currently must be the same as the default region in your AWS configuration.
[2]Future versions of the Cluster will use a bastion host instead for increased security.

Applying terraform infrastructure

Terraform apply is the operation that builds the cluster infrastructure.

Click on Apply to build the infrastructure

Terraform apply

You should see the log starting to appear.

If Terraform fails to build the infrastructure:
  • Check the error message.
  • Update the settings.
  • Apply again.

At the end of this step, there is a cluster running on the cloud. When you check the Clusters page, the status is Up: Setup needed!. This means that the infrastructure is up, but the Genvid SDK is not yet present in it.

Destroying Terraform infrastructure

To destroy the Terraform infrastructure, click the Destroy button.

Deleting a cluster

To delete a cluster, you have to destroy the Terraform infrastructure first. Go to the clusters page and click the Delete button.