Setting Up the Genvid Cluster¶
In This Section
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.
Important
Before configuring the cluster, make sure that azure account has been set up and you are logged in to azure. Also, the azure base images needs to be created and configured. The information on how to login to azure and configure images can be found here Creating a Cloud Environment.
Configure the Cluster¶
The next step is to open a Bastion-UI website to manage the Clusters.
From your shell, run:
genvid-bastion monitor
Select the Terraform page.
Click Add Config.
Enter a unique ID.
Select cluster as the category.
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.
Click Commands.
Select the SDK-{version}/basic/azurerm_basic_cluster module.
Click Import 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.
Click Plan Apply to create an execution plan.
Verify the changes match what you need.
Click Apply to execute the plan.
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.
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.