Setting Up the Genvid Cluster

Set Up a Bastion Server

To create a cluster, you first need a Genvid bastion server running. You can set up and manage a bastion server using the genvid-bastion script. The following command will set up one with the minimal services required.

From your shell, run:

genvid-bastion install --bastionid mybastion --checkmodules --update-global-tfvars --loadconfig
–bastionid mybastion

This option sets the unique identifier for your bastion. It must:

  • Be between 3 and 8 characters.
  • Only contain lowercase letters, numbers, or hyphens.
  • Start with a letter.
–checkmodules
This option installs new modules if none exist or updates the ones already present.
–update-global-tfvars
This option updates the global Terraform variables.
–loadconfig
This option loads the jobs and logs.

Configure the Cluster

The next step is to open a Bastion-UI website to manage the Clusters.

  1. From your shell, run:

    genvid-bastion monitor
    
  2. Select the Terraform page.

  3. Click Add Config.

  4. Enter a unique ID.

  5. Select cluster as the category.

Create a cluster

You can select another backend if needed. For now, you can stick with the default values. Some backends may require configuring variables.

After creating a cluster, its status is EMPTY. This means that the cluster needs a module. The cluster statuses are:

Initialize Cluster Using a Terraform Module

Before configuring the cluster, you must initialize it with a module. This copies the module template and downloads any modules and plugins it requires.

  1. Click Commands.

  2. Select the SDK-{version}/basic/azurerm_basic_cluster module.

  3. Click Import module.

Terraform module

You will see an initialization log appear. This step should last only a few seconds.

Build the Cluster Infrastructure

To build the cluster infrastructure, you apply a Terraform execution plan.

  1. Click Plan Apply to create an execution plan.

  2. Verify the changes match what you need.

  3. Click Apply to execute the plan.

Terraform Plan Apply
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 All Configs on the Terraform page, the status is UP. This means that the infrastructure is up and ready for the Genvid SDK.

Your cluster is now ready for you to set up the game machine.

Note

When you have an existing cluster that you no longer need, there are specific commands used to clean them up. See Cleaning Up Unneeded Clusters for more information.