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,create-docker-machine,delete,describe-permissions,list,modify-permissions,output,rename,save,setup} ...
Positional Arguments
- command
Possible choices: clean, copy, create-docker-machine, 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.
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.
create-docker-machine
Call docker-machine create
on Amazon EC2 with a Genvid AMI.
This command is a shortcut for the following:
docker-machine create {name} --driver amazonec2 --amazonec2-ami {ami-id} --amazonec2-region {region}
--amazonec2-instance-type {instance-type} --amazonec2-root-size {root-size}
--amazonec2-device-name {device-name} --amazonec2-ssh-user admin [extras...]
Where the ami-id is selected to correspond to the specified version and region.
New in version 1.37.0.
genvid-ami create-docker-machine [-h] [--region REGION] [--version VERSION] [--instance-type INSTANCE_TYPE] [--root-size ROOT_SIZE] [--device-name DEVICE_NAME] name [extras ...]
Positional Arguments
- name
Name of the docker machine to create.
- extras
Extra arguments to pass.
Named Arguments
- --region
The region of the source AMI.
- --version
The version to check (“1.45.0.0”).
- --instance-type
EC2 Instance type. Default: “t3.micro”.
- --root-size
Size of the root disk in gigabytes. Sizes smaller than the default can be less reliable. Default: 50.
- --device-name
The name of the root device. Default: “/dev/xvda”
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.
describe-permissions
Describe the permissions of an AMI.
New in version 1.30.0.
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.45.0.0”).
- --prefix
The prefix to look for. (default depends on type)
- --owner
The owner of the AMI. Default:
self
for wingame,genvidtech
for server.- --output
The formatted output of each AMI. Will be used as a template over the AMI object (passed as argument ami). (“{ami.name}”)
modify-permissions
Modify the permissions of an AMI.
New in version 1.30.0.
genvid-ami modify-permissions [-h] [--region REGION] [--public] [--remove | --reset] ami [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.
- --remove
Remove permissions instead of adding them.
- --reset
Reset permissions prior to add them.
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.
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.
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.
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.
- --module
The name of the module to use (“SDK-1.45.0/basic/setup_ami”).
- -t, --timeout
Timeout in minutes for the setup (60).
- --ami-version
Version to use for the AMI.
- --region
The region where the VM will be created to initialize the AMI.