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.
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
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.
Example: refresh every instance of
MY_EDGE_APP in MY_PROJECT:
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
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:
View Jobs
List jobs
Runzcli job show without a name to list all jobs with their status, start time, and finish time.
To list all jobs:
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:
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.
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 importcreates aBulkModelImportjob with a random UUID as its name, and waits until the job finishes. If the job fails or is aborted, ZCLI printsimport failed (job=<job-name>). To look up the job, use--obj-type=edge_node. See Manage Hardware Models.zcli edge-app importcreates aBulkBundleImportjob with a random UUID as its name, and waits until the job finishes. If the job fails or is aborted, ZCLI printsimport failed (job=<job-name>). To look up the job, use--obj-type=edge_app.zcli project createfor a deployment project andzcli project update-deploymentreturn immediately and print a message that ends withtrack job <job-id> to know the status. [TBD: confirm the--obj-typeto use withzcli job show --uuid=<job-id>for deployment jobs. The help text listsdeployment.] 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.