genvid-sdk

Tool for manipulating the SDK.

usage: genvid-sdk [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR}]
                  [--logformat LOGFORMAT] [-c CLUSTER_ID]
                  {version,env,clean,clean-config,clean-images,clean-images-sdk,cluster-version,consul-template,docker-package,generate-ssl,list-nodes,load-config,load-config-sdk,log,monitor,open,open-link,package,render-template,set-taskgroup-count,setup,setup-nomad,setup-remote,setup-vault,show-config,show-config-sdk,show-jobs,start,stop,update-images,upload-images,upload-images-sdk}
                  ...

Positional Arguments

command Possible choices: version, env, clean, clean-config, clean-images, clean-images-sdk, cluster-version, consul-template, docker-package, generate-ssl, list-nodes, load-config, load-config-sdk, log, monitor, open, open-link, package, render-template, set-taskgroup-count, setup, setup-nomad, setup-remote, setup-vault, show-config, show-config-sdk, show-jobs, start, stop, update-images, upload-images, upload-images-sdk

Named Arguments

--loglevel

Possible choices: DEBUG, INFO, WARNING, ERROR

Set the script log level

--logformat Set the script log format
-c, --cluster_id
 The cluster id. If not set with the command line, uses the environment variable GENVID_CLUSTER_ID if it exists. Otherwise defaults to ‘local’

Sub-commands:

version

Print current versions

Changed in version 1.31.0: Now acts similarly to genvid-bastion version, returning the genvid-toolbox version instead of the SDK version. The old behavior is available through genvid-sdk cluster-version.

genvid-sdk version [-h]

env

Print used environment variables.

genvid-sdk env [-h]

clean

Uninstall services.

genvid-sdk clean [-h]

clean-config

Clean the whole configuration.

genvid-sdk clean-config [-h] [source]

Positional Arguments

source The configuration file that you want to remove.

clean-images

Delete all uploaded images.

genvid-sdk clean-images [-h] [-b BUCKET] [-p PATH] [-u]

Named Arguments

-b, --bucket Name of the bucket to use. Default is a combination of AWS account and bastion ids.
-p, --path The path in the bucket (default: “/images/custom”).
-u, --update-config
 Upload configuration in the current cluster.

clean-images-sdk

Clean uploaded SDK images.

New in version 1.20.0.

genvid-sdk clean-images-sdk [-h] [-b BUCKET] [-p PATH] [-u]

Named Arguments

-b, --bucket Name of the bucket to use. Default is a combination of AWS account and bastion ids.
-p, --path The path in the bucket (default: “/images/sdk-1.36.2.11”).
-u, --update-config
 Upload configuration in the current cluster.

cluster-version

Display the version of the Cluster API managing the cluster.

New in version 1.31.0.

genvid-sdk cluster-version [-h]

consul-template

Apply a Consul template.

Deprecated since version 1.33.0: Please, use render-template instead.

genvid-sdk consul-template [-h] template

Positional Arguments

template The template to load.

docker-package

Docker Package of form ImageName_Version_Id.zip

New in version 1.22.0.

genvid-sdk docker-package [-h] [-v VERSION] [-d DESTINATION] docker_image

Positional Arguments

docker_image Name of docker image to be packaged

Named Arguments

-v, --version Version to be given to the package
-d, --destination
 Target directory where the archive will be written (default: “ROOTDIR/images”)

generate-ssl

Generate SSL certificate

New in version 1.29.0.

genvid-sdk generate-ssl [-h] [-d DOMAIN] [-o OUTPUTDIR] [-r ROLE]

Named Arguments

-d, --domain The name of domain that the certificate will be issued for. If none or empty is provided, the certificate will apply only to localhost
-o, --outputdir
 The folder to save the result. If none is provided, the current folder is used.
-r, --role Role name to use for certificates (“sslrole”).

list-nodes

List the registered nodes.

New in version 1.18.0.

genvid-sdk list-nodes [-h] [-t TEMPLATE] [-s SORTEDBY]

Named Arguments

-t, --template The template for displaying the nodes. default: “{Name:15} ({NodeClass:^10}): {Status}”
-s, --sortedby The property to sort the nodes.

load-config

Append specified configuration to current configuration.

Changed in version 1.26.0: Added the --dryrun parameter.

genvid-sdk load-config [-h] [--with-consul-template]
                       [--job-template-dir JOB_TEMPLATE_DIR] [-n]
                       source

Positional Arguments

source The Nomad template to load.

Named Arguments

--with-consul-template
 Use consul-template to resolve the template.
--job-template-dir
 Directory containing nomad job templates to load
-n, --dryrun Don’t load the settings, just show the output as JSON.

load-config-sdk

Load the SDK configuration.

genvid-sdk load-config-sdk [-h]

log

Show a log.

genvid-sdk log [-h] [-t] [-n LINES] [-f] [log]

Positional Arguments

log The name of the log. List all logs if not set.

Named Arguments

-t, --tail Only show the last line.
-n, --lines The number of lines to tail (10).
-f, --follow Wait for additional content at the end of file.

monitor

Open cluster-ui for this cluster.

genvid-sdk monitor [-h]

open

Open a GUI to the specified service

genvid-sdk open [-h] [link]

Positional Arguments

link The name of the link.

package

Create a package of the form <NAME>_<VERSION>_<CHECKSUM>.zip

New in version 1.22.0.

genvid-sdk package [-h] [-n NAME] [-v VERSION] [-d DESTINATION] [--flatten]
                   directory_or_file

Positional Arguments

directory_or_file
 Path to a file or directory to be packaged

Named Arguments

-n, --name Name of package
-v, --version Version to be given to the package.
-d, --destination
 Target Directory to find the archives (default: “ROOTDIR/images”).
--flatten Package will be flattened if set, otherwise it will be hierarchical

render-template

Render the template in sources on the cluster-api.

New in version 1.33.0.

genvid-sdk render-template [-h] [-t TEMPLATE_PATH | -c CONTENT] [-s SOURCES]
                           [-e [ENVIRONMENT [ENVIRONMENT ...]]] [-q]
                           [--set-config] [--print-config]

Named Arguments

-t, --template-path
 The relative path inside sources for the template to render.
-c, --content A file to upload and render as template.
-s, --sources An URL accessible by the cluster-api containing the sources for the template.
-e, --environment
 An environment variable in the form NAME=VALUE to add to the template rendering environment.
-q, --quiet Don’t print out the rendered template.
--set-config The result is loaded as config. This is equivalent to saving the result on disk, and loading it back using the SDK.set_config.
--print-config Convert to a config but print it out in JSON format. Can be used with or without --set-config. Imply --quiet.

set-taskgroup-count

Set the group count of a task group.

New in version 1.23.0.

genvid-sdk set-taskgroup-count [-h] [-j JOB] [-s STEP] [-i INTERVAL]
                               taskgroup count

Positional Arguments

taskgroup The name of the task group to change.
count The target number to set.

Named Arguments

-j, --job The name of the job if different from the task group.
-s, --step The size of the increment or decrement between interval. If 0, directly set the value.
-i, --interval The interval in seconds between each increment (default: 1.00 s).

setup

Set up the services.

Changed in version 1.20.0: Fixed the default key for the SDK images.

genvid-sdk setup [-h] [-b BUCKET] [-p PATH]

Named Arguments

-b, --bucket Name of the bucket to use. Default is a combination of AWS account and bastion ids.
-p, --path The path in the bucket (default: “/images/sdk-1.36.2.11”).

setup-nomad

Setup nomad-server token on nomad server.

New in version 1.15.0.

genvid-sdk setup-nomad [-h]

setup-remote

BETA: register remote cluster

genvid-sdk setup-remote [-h]
                        cluster server-ip ssh-private-key-pem-file ssh-user

Positional Arguments

cluster Cluster name
server-ip Cluster Consul server IP
ssh-private-key-pem-file
 File containing the ssh key used to connect to the cluster machines
ssh-user User name used to connect to the cluster machines

setup-vault

Setup vault service.

New in version 1.15.0.

genvid-sdk setup-vault [-h]

show-config

Show the SDK configuration.

genvid-sdk show-config [-h]

show-config-sdk

Show the SDK configuration.

genvid-sdk show-config-sdk [-h]

show-jobs

Show the jobs.

genvid-sdk show-jobs [-h]

start

Start jobs.

genvid-sdk start [-h] [jobs [jobs ...]]

Positional Arguments

jobs The jobs to start.

stop

Stop jobs.

genvid-sdk stop [-h] [jobs [jobs ...]]

Positional Arguments

jobs The jobs to start.

update-images

Update images from a specific bucket.

New in version 1.20.0.

genvid-sdk update-images [-h] [-b BUCKET] [-p PATH] [-s] [-n] [-j JSFILE] [-q]

Named Arguments

-b, --bucket Name of the bucket to use. Default is a combination of AWS account and bastion ids.
-p, --path The path in the bucket (default: “/images/custom”).
-s, --sdk Use SDK default configuration
-n, --dryrun Only print the configuration. Do not update.
-j, --jsfile Use this configuration instead of fetching it from the bucket.
-q, --quiet Don’t print the configuration on standard output.

upload-images

Upload the specified images prefix.

Changed in version 1.26.0: Added the --region parameter.

genvid-sdk upload-images [-h] [-b BUCKET] [-p PATH] [-u] [-d BASEDIR]
                         [--cloud-provider {aws,azure}] [--region REGION]
                         [prefixes [prefixes ...]]

Positional Arguments

prefixes The prefixes of the images to upload.

Named Arguments

-b, --bucket Name of the bucket to use. Default is a combination of AWS account and bastion ids.
-p, --path The path in the bucket (default: “/images/custom”).
-u, --update-config
 Upload configuration in the current cluster.
-d, --basedir The basedir where to find the images to upload (default: “ROOTDIR/images”).
--cloud-provider
 

Possible choices: aws, azure

Cloud Provider to use, default: “aws”

--region Region where the images will be uploaded.

upload-images-sdk

Upload the SDK images.

Changed in version 1.26.0: Added the --region parameter.

genvid-sdk upload-images-sdk [-h] [-b BUCKET] [-p PATH] [-u]
                             [--cloud-provider {aws,azure}] [--region REGION]

Named Arguments

-b, --bucket Name of the bucket to use. Default is a combination of AWS account and bastion ids.
-p, --path The path in the bucket (default: “/images/sdk-1.36.2.11”).
-u, --update-config
 Upload configuration in the current cluster.
--cloud-provider
 

Possible choices: aws, azure

Cloud Provider to use, default: “aws”

--region Region where the images will be uploaded.