genvid-ami

See also

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

Initial setup for Genvid Windows Game AMI.

usage: genvid-ami [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR}]
                  [--logformat LOGFORMAT]
                  {clean,copy,delete,describe-permissions,list,modify-permissions,output,rename,save,setup}
                  ...

Positional Arguments

command Possible choices: clean, copy, delete, describe-permissions, list, modify-permissions, output, rename, 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

Uninstall services.

genvid-ami clean [-h] [-f] cluster_id

Positional Arguments

cluster_id The cluster ID.

Named Arguments

-f, --force

Force delete the cluster.

Default: False

copy

Copy an AMI across AWS regions.

genvid-ami copy [-h] [--region REGION] [--public] srcami regions [regions ...]

Positional Arguments

srcami The ID of the source AMI.
regions The region to copy the AMI.

Named Arguments

--region The region of the source AMI.
--public

Make the new AMI public.

Default: False

delete

Delete the AMIs and their EBS snapshots.

New in version 1.13.0.

genvid-ami delete [-h] [-r REGION] [-n] ids [ids ...]

Positional Arguments

ids Ids of the AMI to delete.

Named Arguments

-r, --region The region of the AMIs.
-n, --dryrun

Don’t actually delete the AMIs, just log what would be done.

Default: False

describe-permissions

Describe the permissions of an AMI.

genvid-ami describe-permissions [-h] [--region REGION] ami

Positional Arguments

ami The ID of the AMI.

Named Arguments

--region The region of the source AMI.

list

List available AMI.

Changed in version 1.13.0: Added --region argument.

genvid-ami list [-h] [--region REGION] [--version VERSION] [--prefix PREFIX]
                [--owner OWNER] [--output OUTPUT]
                {wingame,server}

Positional Arguments

ami_type

Possible choices: wingame, server

The type of AMI.

Named Arguments

--region The region of the source AMI.
--version

The version to check (“1.36.0.9”).

Default: “1.36.0.9”

--prefix

The prefix to look for. (default depends on type)

Default: “”

--owner

The owner of the ami (“self”).

Default: “self”

--output

The formatted output of each AMI. Will be used as a template over the AMI object (passed as argument ami). (“{ami.name}”)

Default: “{ami.name}”

modify-permissions

Modify the permissions of an AMI.

genvid-ami modify-permissions [-h] [--region REGION] [--public]
                              [--remove | --reset]
                              ami [user_ids [user_ids ...]]

Positional Arguments

ami The ID of the AMI.
user_ids The list of accounts to give access to the AMI.

Named Arguments

--region The region of the source AMI.
--public

Make the AMI public.

Default: False

--remove

Remove permissions instead of adding them.

Default: False

--reset

Reset permissions prior to add them.

Default: False

output

Return the output of the cluster state.

genvid-ami output [-h] cluster_id [name]

Positional Arguments

cluster_id The cluster ID.
name

An optional variable name. Outputs everything otherwise.

Default: “”

rename

Copy a Windows AMI from one prefix to another.

genvid-ami rename [-h] [--region REGION] [--public] srcami dstprefix

Positional Arguments

srcami The ID of the source AMI.
dstprefix The prefix of the destination AMI.

Named Arguments

--region The region of the source AMI.
--public

Make the new AMI public.

Default: False

save

Create the game AMI

genvid-ami save [-h] [--prefix PREFIX] cluster_id

Positional Arguments

cluster_id The cluster ID.

Named Arguments

--prefix

Prefix to save the AMI under.

Default: “default”

setup

Initialize a new game instance on AWS.

Changed in version 1.14.0: Added --module argument.

Changed in version 1.27.0: Terraform module path is changed from basic/setup-ami to basic/setup_ami

genvid-ami setup [-h] [--az AZ] [--tfvars TFVARS] [--plan] [--module MODULE]
                 [-t TIMEOUT] [--ami-version AMI_VERSION] [--region REGION]
                 cluster_id

Positional Arguments

cluster_id The cluster ID.

Named Arguments

--az Availability zone to use. Use the default settings if None are specified.
--tfvars A default .tfvars file to set the cluster.
--plan

Only plan the action.

Default: False

--module

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

Default: “SDK-1.36.0/basic/setup_ami”

-t, --timeout

Timeout in minutes for the setup (60).

Default: 60

--ami-version Version to use for the AMI.
--region The region where the VM will be created to initialize the AMI.