genvid-sdk
New in version 1.44.0: Moved from the genvid.toolbox
package.
Tool for manipulating the SDK.
usage: genvid-sdk [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR}]
[--logformat LOGFORMAT] [-c CLUSTER_ID]
{sdk-version,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,load-settings-schema,log,monitor,open,open-link,package,render-template,set-taskgroup-count,setup,setup-nomad,setup-vault,show-config,show-config-sdk,show-jobs,show-settings-schema,start,stop,update-images,upload-images,upload-images-sdk}
...
Positional Arguments
- command
Possible choices: sdk-version, 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, load-settings-schema, log, monitor, open, open-link, package, render-template, set-taskgroup-count, setup, setup-nomad, setup-vault, show-config, show-config-sdk, show-jobs, show-settings-schema, 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
sdk-version
Print current SDK versions
genvid-sdk sdk-version [-h]
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.47.0.7”).
- -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: “
GENVID_SDK_FOLDER
/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
argument.
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] [--schema SCHEMA | --no-schema]
Named Arguments
- --schema
The schema to load
- --no-schema
Do not load the default schema.
load-settings-schema
Load the schema for the settings API.
New in version 1.41.0.
genvid-sdk load-settings-schema [-h] schema
Positional Arguments
- schema
The JSON schema for the cluster settings.
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
Changed in version 1.41.0: Added the --use-proxy
argument.
genvid-sdk open [-h] [--use-proxy] [link]
Positional Arguments
- link
The name of the link.
Named Arguments
- --use-proxy
Always use the bastion proxy to access the service.
open-link
Open a link or show the list of links.
Changed in version 1.41.0: Added the --use-proxy
argument.
genvid-sdk open-link [-h] [--use-proxy] [link]
Positional Arguments
- link
The name of the link.
Named Arguments
- --use-proxy
Always use the bastion proxy to access the service.
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: “
GENVID_SDK_FOLDER
/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 ...]] [-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.
Changed in version 1.41.0: Load schema from GENVID_SDK_SETTINGS_SCHEMA
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.47.0.7”).
setup-nomad
Setup nomad-server token on nomad server.
New in version 1.15.0.
genvid-sdk setup-nomad [-h]
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]
show-settings-schema
Show the current schema for the settings API.
New in version 1.41.0.
genvid-sdk show-settings-schema [-h]
start
Start jobs.
Changed in version 1.46.0: Added the --force
parameter.
genvid-sdk start [-h] [--force] [jobs ...]
Positional Arguments
- jobs
The jobs to start.
Named Arguments
- --force
Force to reset the task counts.
stop
Stop jobs.
Changed in version 1.46.0: Added the --purge
parameter.
genvid-sdk stop [-h] [--purge] [jobs ...]
Positional Arguments
- jobs
The jobs to start.
Named Arguments
- --purge
Purge the job immediately.
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
argument.
genvid-sdk upload-images [-h] [-b BUCKET] [-p PATH] [-u] [-d BASEDIR]
[--cloud-provider {aws,azure}] [--region REGION]
[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: “
GENVID_SDK_FOLDER
/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
argument.
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.47.0.7”).
- -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.