Skip to main content
Use the ZEDEDA CLI (ZCLI) to manage jobs from the command line. This article covers zcli job commands, with syntax and examples for each operation. A job is an asynchronous bulk operation that Edge Infrastructure Services runs on many objects at once, for example on every edge node in a project. You create the job, and then check its status until it finishes. This page is the command reference. For the console view of the same jobs, see Cloud jobs.

Before You Start

  • ZCLI is installed and authenticated against your enterprise. See Get Started.
  • You have a role that allows you to update the objects that the job acts on. [TBD: confirm the minimum role required to create and delete jobs with ZCLI. Updating EVE-OS in the console requires the SysManager or SysAdmin role.]
  • The project, EVE-OS image, edge app, and edge nodes that you name in a job already exist. ZCLI looks each one up by name and stops with an error if it is not found.

Job Types

You choose the operation with --job-type. The value is case-sensitive. Each job type acts on one object type, which you pass as --obj-type when you view or delete the job.
The zcli job --help text lists BulkAppInstanceDeploy, BulkModelImport, and BulkBundleImport as supported job types, and shows a --model-params form of job create. In the current ZCLI, job create with any of these job types, or with any value that is not in the preceding table, prints ERROR Unsupported job-type. and creates nothing.

Create a Job

zcli job create sends the job to Edge Infrastructure Services and returns. It does not wait for the job to finish. To follow its progress, see View Jobs.
Jobs act on many objects at once and start immediately. There is no confirmation prompt and no dry run. Check the project name, edge app name, and node names before you run job create.
For EVE-OS update, refresh, and purge jobs, ZCLI creates the job record first and then looks up the project and edge app. If a name is wrong, ZCLI prints an error, but the job record that it already created remains. Delete it with zcli job delete. See Delete a Job.

Update EVE-OS on all nodes in a project

In the current ZCLI, this command always fails before it sends any request. ZCLI prints ERROR %s: %s KeyError 'retry' followed by Unexpected error executing command 'job'. No job is created. Until this is fixed, update EVE-OS on each node with zcli edge-node eveimage-update, or update all the nodes in a project from the Edge Infrastructure Services console. See Update EVE-OS on a Node and Update EVE-OS on Nodes.

Refresh or purge application instances

Refresh or purge every instance of one edge app in a project.
  • Refresh updates each application instance to the latest version of the edge app and restarts it.
  • Purge does the same and also deletes the application instance’s data.
ZCLI decides between refresh and purge from --purge, not from --job-type:
  • --job-type=BulkAppInstancePurge without --purge only refreshes the application instances.
  • --job-type=BulkAppInstanceRefresh with --purge purges the application instances and deletes their data.
To purge, always pass both --job-type=BulkAppInstancePurge and --purge. To refresh, pass --job-type=BulkAppInstanceRefresh without --purge.
Example: refresh every instance of MY_EDGE_APP in MY_PROJECT:
Example: purge every instance of MY_EDGE_APP in MY_PROJECT:

Set a deployment tag on all nodes in a project

To set the deployment tag on a single node instead, use zcli edge-node update <name> --deployment-tag=<deployment-tag>. See Manage Nodes. Example:

Add tags to nodes in a project

ZCLI reads only the first --device-tags value and the first --device-names value. If you repeat either flag, ZCLI ignores the second and later values without a message. Always put all tags in one --device-tags value and all node names in one --device-names value, separated by commas.
Each tag must contain exactly one colon. If a tag does not, ZCLI prints Please provide tag values as key-value pairs. Example: region:India, but it still creates the job and sends it with no tags. Example: tag two nodes:
Example: tag every node in the project and override their existing tags:

View Jobs

List jobs

Run zcli job show without a name to list all jobs with their status, start time, and finish time.
To list all jobs:
To list the jobs whose name contains MY_JOB:

View a single job

Show one job by name or UUID. --obj-type is required and must match the job type. See Job Types. Example:
The output includes the following fields:
ZCLI fills in Start Time and Finish Time only after a job has a finish time. While a job is still running, both fields are empty, in the list and in the single-job view.

Delete a Job

Delete a job record by name. --obj-type is required and must match the job type. ZCLI asks Delete job <name>? [Y/N] unless you pass -f. If you answer no, ZCLI prints job <name> not deleted.
Example:
The zcli job --help example deletes an EVE-OS update job with --obj-type=edge_app. EVE-OS update jobs use edge_node. Use the object type from Job Types.

Jobs Created by Other Commands

Some ZCLI commands create a job for you:
  • zcli model import creates a BulkModelImport job with a random UUID as its name, and waits until the job finishes. If the job fails or is aborted, ZCLI prints import failed (job=<job-name>). To look up the job, use --obj-type=edge_node. See Manage Hardware Models.
  • zcli edge-app import creates a BulkBundleImport job with a random UUID as its name, and waits until the job finishes. If the job fails or is aborted, ZCLI prints import failed (job=<job-name>). To look up the job, use --obj-type=edge_app.
  • zcli project create for a deployment project and zcli project update-deployment return immediately and print a message that ends with track job <job-id> to know the status. [TBD: confirm the --obj-type to use with zcli job show --uuid=<job-id> for deployment jobs. The help text lists deployment.] See Manage Projects.

Next Steps

Manage Nodes

Update EVE-OS, set tags, and manage individual edge nodes.

Manage Application Instances

Refresh, purge, and manage individual application instances.

View Events

Review events from your edge nodes and user actions.

Get Started

Install ZCLI, configure access to Edge Infrastructure Services, and sign in.