Command Reference

Core commands

handoff.core.admin.artifacts_archive(project_dir: str, workspace_dir: str, **kwargs) → None

handoff artifacts archive -p <project_directory>

Copy the artifacts directory from (remote) last to (remote) runs/.

handoff.core.admin.artifacts_delete(project_dir: str, workspace_dir: str, **kwargs) → None

handoff artifacts delete -p <project_directory>

Delete artifacts from the remote artifacts/last directory

handoff.core.admin.artifacts_get(project_dir: str, workspace_dir: str, **kwargs) → None

handoff artifacts archive -p <project_directory> -w <workspace_directory>

Download artifacts from the (remote) last to

handoff.core.admin.artifacts_push(project_dir: str, workspace_dir: str, **kwargs) → None

handoff artifacts push -p <project_directory> -w <workspace_directory>

Push local artifacts file to remote storage under last directory.

handoff.core.admin.config_delete(project_dir: str, workspace_dir: str, **kwargs) → None

handoff config delete -p <project_directory> Delete the project configuration from the remote parameter store.

handoff.core.admin.config_deleteold(project_dir: str, workspace_dir: str, **kwargs) → None

handoff config delete -p <project_directory> Delete the project configuration from the remote parameter store.

handoff.core.admin.config_print(project_dir: str, workspace_dir: str, **kwargs) → None

handoff config print -p <project_directory> Print the project configuration in the remote parameter store.

handoff.core.admin.config_push(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff config push -p <project_directory> Push project.yml and the contents of project_dir/config as a secure parameter key.

handoff.core.admin.files_delete(project_dir: str, workspace_dir: str, **kwargs) → None

handoff files delete -p <project_directory> Delete files and templates from the remote storage

handoff.core.admin.files_get(project_dir: str, workspace_dir: str, **kwargs) → None

handoff files get -p <project_directory> -w <workspace_directory> Download remote files to /files It also parse the templates with secrets and populate under

/files

handoff.core.admin.files_get_local(project_dir: str, workspace_dir: str, **kwargs) → None

handoff files get local -p <project_directory> -w <workspace_directory> Copy files from the local project_dir to workspace_dir.

It also parse the templates with secrets and populate under

/files

Any existing files in workspace_dir will be deleted.

handoff.core.admin.files_push(project_dir: str, workspace_dir: str, **kwargs) → None

handoff files push -p <project_directory> Push the contents of /files and /templates to remote storage

handoff.core.admin.project_push(project_dir: str, workspace_dir: str, **kwargs) → None

handoff project push -p <project_directory> Push config, files, secrets all together

handoff.core.admin.secrets_delete(project_dir: str, workspace_dir: str, yes: bool = False, **kwargs)

handoff secrets delete -p <project_directory> -d file=<secrets_file>

Delete the contents of to remote parameter store By default, .secrets/secrets.yml in the current working directory is searched for the list of the secrets.

handoff.core.admin.secrets_print(project_dir: str, workspace_dir: str, **kwargs)

handoff secrets print -p <project_directory>

Get the secrets in the remote parameter store and dump in YAML format.

handoff.core.admin.secrets_push(project_dir: str, workspace_dir: str, yes: bool = False, **kwargs) → None

handoff secrets push -p <project_directory> -d file=<secrets_file>

Push the contents of to remote parameter store

–vars file (.secrets/secrets.yml): The YAML file storing secrets with format:

handoff.core.admin.version(project_dir: str, workspace_dir: str, **kwargs) → None

Print handoff version

handoff.core.admin.workspace_init(project_dir: str, workspace_dir: str, **kwargs) → None
handoff.core.admin.workspace_install(project_dir: str, workspace_dir: str, **kwargs) → None

handoff workspace install -p <project_directory> -w <workspace_directory> Install dependencies in the local virtual environment

handoff.core.task.run(config: Dict, **kwargs) → None

handoff run -w <workspace_directory> -e resource_group=<resource_group_name> task=<task_name> Run the task by the configurations and files stored in the remote parameter store and the file store.

handoff.core.task.run_local(config, **kwargs)

handoff run local -p <project_directory> -w <workspace_directory> Run the task locally.

Container commands

handoff.services.container.build(project_dir: str, workspace_dir: str, **kwargs) → None

handoff container build -p <project_directory> -v docker_file=<docker_file> files_dir=<addtnl_files_dir> Build the container image Optionally, use docker_file to specify own Dockerfile

handoff.services.container.push(project_dir: str, workspace_dir: str, **kwargs) → None

handoff container push -p <project_directory> Push the container image to remote repository

handoff.services.container.run(project_dir: str, workspace_dir: str, **kwargs) → None

handoff container run -p <project_directory> -e resource_group=<resource_group_name> task=<task_name> __VARS='key1=val1 key2=val2...' Run the container

If the environment variable VARS is specified via -e option, it will be used as: `handoff run -d $(eval echo $VARS)`

Cloud commands

handoff.services.cloud.bucket_create(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud bucket create -p <project_directory> Create remote storage bucket. Bucket is attached to the resource group.

handoff.services.cloud.bucket_delete(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud bucket delete -p <project_directory> Delete remote storage bucket.

handoff.services.cloud.bucket_update(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud bucket update -p <project_directory> Update remote storage bucket info

handoff.services.cloud.logs(project_dir: str, workspace_dir: str, file_descriptor=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, vars: Dict = {}, **kwargs) → None

handoff cloud logs -v start_time=<start_time> end_time=<end_time> follow=<True/False> Show logs Use –vars (-v) option to:

  • start_time: ISO 8086 formatted date time to indicate the start time
  • end_time
  • follow: If set, it waits for more logs until interrupted by ctrl-c
handoff.services.cloud.resources_create(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud resources create -p <project_directory> Create resources necessary for task execution. The resources are shared among the tasks under the same resource group.

AWS:

handoff.services.cloud.resources_delete(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud resources delete -p <project_directory> Delete the resources

The resources are shared among the tasks under the same resource group.

handoff.services.cloud.resources_update(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud resources update -p <project_directory> Update the resources

The resources are shared among the tasks under the same resource group.

handoff.services.cloud.role_create(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff cloud role create -p <project_directory> -v external_id=<id> grantee_account_id=<grantee_id> Create the role with deployment privilege.

handoff.services.cloud.role_delete(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff cloud role delete -p <project_directory> -v grantee_account_id=<grantee_id> Delete the role.

handoff.services.cloud.role_update(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff cloud role update -p <project_directory> -v external_id=<id> grantee_account_id=<grantee_id> Update the role privilege information.

handoff.services.cloud.run(project_dir: str, workspace_dir: str, envs: Dict = {}, extras: str = None, **kwargs) → None

handoff cloud run -v resource_group=<resource_group_name> task=<task_name> -e vars='key1=val1 key2=val2...' Run a task once in the platform

If the environment variable vars is specified via -e option, it will be used as: handoff run -v $(eval echo $vars)

handoff.services.cloud.schedule_create(project_dir: str, workspace_dir: str, envs: Dict = {}, vars: Dict = {}, extras: str = None, **kwargs) → None

handoff cloud schedule create -v target_id=<target_id> cron="<cron_format>" -e vars='key1=val1 key2=val2...' Schedule a task named at the recurring scheduled specified as . An example of cron-format string is 10 01 * * ? * for every day at 01:10 (1:10AM)

If the environment variable vars is specified via -e option, it will be used as: handoff run -v $(eval echo $vars)

handoff.services.cloud.schedule_delete(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff cloud schedule delete -v target_id=<target_id> Unschedule a task named

handoff.services.cloud.schedule_list(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud schedule list List the scheduled tasks

handoff.services.cloud.task_create(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff cloud task create -p <project_directory> Create the task Optionally, -v cpu=256, memory=512

handoff.services.cloud.task_delete(project_dir: str, workspace_dir: str, **kwargs) → None

handoff cloud task delete -p <project_directory> Delete the task

handoff.services.cloud.task_status(project_dir: str, workspace_dir: str, vars: str = None, **kwargs) → None

handoff cloud task status -p <project_directory> -v full=False resource_group_level=False list task status options:

  • full: Print the full description
  • resource_group_level: List all the tasks under the same resource groups
handoff.services.cloud.task_stop(project_dir: str, workspace_dir: str, vars: str = None, **kwargs) → None

handoff cloud task stop -p <project_directory> -v id=<task_id> reason=<reason> stop a running task Options:

  • reason
handoff.services.cloud.task_update(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff cloud task update -p <project_directory> Update the task Optionally, -v cpu=256, memory=512

Envs commands

handoff.plugins.envs.get(project_dir: str, workspace_dir: str, vars: Dict = {}, **kwargs) → None

handoff envs get -p <project_dir> -d key=<env_var_key> Get the value of an evirohment varaible specified by

Quick start commands

handoff.plugins.quick_start.make(project_dir: str, workspace_dir: str, **kwargs) → None

handoff quick_start make Copy the test projects to the test_projects under the current directory