genvid-azure-image

See also

The Cloud Environment - First Steps for a guide on how to setup your Windows image with Azure using this script.

Helper to create Genvidtech source game image

usage: genvid-azure-image [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR}]
                          [--logformat LOGFORMAT]
                          {clean,create-images,save,setup} ...

Positional Arguments

command

Possible choices: clean, create-images, save, setup

Named Arguments

--loglevel

Possible choices: DEBUG, INFO, WARNING, ERROR

Set the script log level

--logformat

Set the script log format

Sub-commands

clean

Clean up the clusters

genvid-azure-image clean [-h] [--force] cluster_id

Positional Arguments

cluster_id

The cluster ID.

Named Arguments

--force, -f

This applies to the cluster created to start the game VM whose resources will be removed from the cloud as they don’t require to be persisted. If the resources where manually destroyed it could impair the cleaning process. Use the force argument to remove the cluster from Bastion and ignore the current state of the resources on the cloud for the setup cluster.

Default: False

create-images

Creates a local shared image gallery

genvid-azure-image create-images [-h] [--resource-group RESOURCE_GROUP]
                                 [--gallery-name GALLERY_NAME]
                                 [--storage-account-name STORAGE_ACCOUNT_NAME]
                                 [--container-name CONTAINER_NAME]
                                 [--image-source-version IMAGE_SOURCE_VERSION]
                                 [--vhd-account-name VHD_ACCOUNT_NAME]
                                 [--module MODULE] [--timeout TIMEOUT]
                                 [--location LOCATION]
                                 [--shared-gallery-image-version SHARED_GALLERY_IMAGE_VERSION]
                                 [--keep-intermediate-resources]

Named Arguments

--resource-group, -g

Resource group in which shared image gallery must be created. Bastion must be running to see default value of resource group. (Default : “Genvid”)

Default: “Genvid”

--gallery-name, -n

Local shared gallery to be created. Bastion must be running to see default value of gallery name. (Default : “SDKgallery”)

Default: “SDKgallery”

--storage-account-name, -s

Storage account to be created.

--container-name, -c

Container name to be created. (Default : “genvid-images”)

Default: “genvid-images”

--image-source-version

The version used as a prefix for server image url. (Default : “1.42”)

Default: “1.42”

--vhd-account-name

Storage account name where vhd files are located. (Default : “genvidtechpublic”)

Default: “genvidtechpublic”

--module, -m

The name of the module to use. (Default : “SDK-1.42.0/basic/azurerm_shared_images”)

Default: “SDK-1.42.0/basic/azurerm_shared_images”

--timeout, -t

Timeout in minutes for the create-images (120).

Default: 120

--location, -l

The location where all the resources will be created. (Default : “eastus”)

Default: “eastus”

--shared-gallery-image-version, -v

The version under which the images will be imported in the Shared Image Gallery. (Default : “1.42.0018”)

Default: “1.42.0018”

--keep-intermediate-resources, -k

The intermediary resources will be deleted from Azure after the shared gallery images are created. (Default : False)Add this flag to keep them. This is a support feature meant to help resolving potential issues.

Default: False

save

Save the configured VM to the shared image gallery.

genvid-azure-image save [-h] [--module MODULE] [--tfvars TFVARS] [--plan]
                        [--timeout TIMEOUT] [--version-suffix VERSION_SUFFIX]
                        [--shared-gallery-image-prefix SHARED_GALLERY_IMAGE_PREFIX]
                        cluster_id

Positional Arguments

cluster_id

The cluster ID.

Named Arguments

--module, -m

The name of the module to use (“SDK-1.42.0/basic/azurerm_save_image”) to save the image.

Default: “SDK-1.42.0/basic/azurerm_save_image”

--tfvars

A .tfvars file that can be used to override the Terraform variables of the cluster created to save the image.

--plan, -p

Only plan the action.

Default: False

--timeout, -t

Timeout in minutes for the setup (120).

Default: 120

--version-suffix, -s

Suffix to append to the name of the image in Azure.

Default: “”

--shared-gallery-image-prefix, -i

The prefix of the name of the image definition to use for storing finalized image to the Shared Image Gallery.

Default: “default”

setup

Initialize a new game instance on Azure.

genvid-azure-image setup [-h] [--tfvars TFVARS] [--plan] [--module MODULE]
                         [--timeout TIMEOUT]
                         [--shared-gallery-image-version SHARED_GALLERY_IMAGE_VERSION]
                         [--location LOCATION]
                         [--shared-gallery-resource-group-name SHARED_GALLERY_RESOURCE_GROUP_NAME]
                         [--gallery-name GALLERY_NAME]
                         cluster_id

Positional Arguments

cluster_id

The cluster ID.

Named Arguments

--tfvars

A .tfvars file that can be used to override the Terraform variables of the cluster created to save the image.

--plan

Only plan the action.

Default: False

--module

The name of the module to use (“SDK-1.42.0/basic/azurerm_setup_image”).

Default: “SDK-1.42.0/basic/azurerm_setup_image”

--timeout, -t

Timeout in minutes for the setup (120).

Default: 120

--shared-gallery-image-version, -v

Shared image gallery image version to use to instantiate the image. (Default : “1.42.0018”)

Default: “1.42.0018”

--location, -l

The location where the VM will be created to initialize the Azure image.(Default : “eastus”)

Default: “eastus”

--shared-gallery-resource-group-name, -g

The name of the resource group containing the Shared Image Gallery used to start the game VM. (Default : “Genvid”)

Default: “Genvid”

--gallery-name, -n

The name of the Shared Image Gallery containing the source image used to start the game VM. (Default : “SDKgallery”)

Default: “SDKgallery”