zcli image commands, with syntax and examples for each operation. An application image is the virtual machine disk, container, Docker Compose TAR archive, or other file that an edge application uses. You reference images from an edge application, and EVE-OS (Edge Virtualization Engine) on the edge node downloads them from a datastore when it deploys an application instance.
Adding an image always takes two steps:
- Create an image record in Edge Infrastructure Services with
zcli image create. The record holds the image name, format, architecture, type, and the datastores where the file is stored. - Associate the image file with the record. There are two ways to do this.
- Upload the file from your computer with
zcli image upload. ZCLI copies the file into a ZEDEDA-managed datastore. - Uplink a file that is already stored in a datastore with
zcli image uplink. You give Edge Infrastructure Services the file’s location, SHA-256 checksum, and size, and the file is not copied.
- Upload the file from your computer with
READY and you can use the image in an edge application. See Manage Edge Apps.
Before You Start
- ZCLI is installed and authenticated against your enterprise. See Get Started.
- You have the SysManager role in your enterprise. See Manage Roles.
- The datastore for the image already exists. See Manage Datastores.
- To upload a file, the datastore must be a ZEDEDA-managed datastore (type
ZEDEDAS3orZEDEDABLOB). To use a datastore of any other type, store the file there yourself and uplink it.
Image Types
The kind of image you create depends on which of the following flags you pass tozcli image create. create requires exactly one of --arch, --patch-artifact-image, or --compose-tar-image.
With
--arch, you can also set --type:
If you pass
--type together with --compose-tar-image or --patch-artifact-image, ZCLI ignores --type.
Create an Image Record
Create an image record
The syntax shows the datastore flags as optional, but
create requires one of them. Without --datastore-name or --datastores, ZCLI prints Please provide datastore details and does not create the record.ZCLI does not check
--image-format or the project names in --project-scope before it sends the request. If a project name in --project-scope does not exist, ZCLI does not report an error. Check the names with zcli project show before you create the image.Add the Image File
Upload a file from your computer
Upload the image file into the image record’s datastore. The image record must already exist.
ZCLI uploads the file in 2 MiB chunks and shows a progress bar. When the transfer finishes, ZCLI prints
Uploading in progress. Check upload status with "zcli image show <name>". Run that command until the status is READY.
Example:
-
Upload the file:
-
Check the status until it is
READY:
Image upload to datastore of type <type> not supported. and does not upload. Uplink the file instead.
ZCLI cannot resume an interrupted upload. Run the upload again to send the whole file from the beginning. If the image status is still
UPLOADING or UPLINKING, ZCLI prints Image upload/uplink in progress already and does not start a new upload.Uplink a file that is already in a datastore
Uplinking associates the image record with a file that is already stored in a datastore. Use uplink for any datastore type, and for large files that you have already copied to your own storage.The syntax shows
--image-sha and --image-size as optional, but they are required for every format except container. Without them, ZCLI prints Error Input --image-sha is mandatory field. or Error Input --image-size is mandatory field. and does not uplink the image. --image-size must be a whole number of bytes. Any other value, such as 220M, stops ZCLI with a Python error.--image-url format for a container image in a container registry datastore, for example whether it includes the tag.]
Add a Docker Compose TAR image
A Docker Compose TAR image holds the contents of a Docker Compose application directory.-
Put all of the application’s files (for example,
compose.yaml,.envfiles, and supporting scripts) in a single directory, for examplemy-compose-app. -
From the parent directory, create a gzipped TAR archive of the directory’s contents.
-
Create the image record.
-
Upload the archive.
-
Check that the image status is
READY.
View Images
View a single image
Show an image by name or UUID. Add--detail to include the description, project scope, all datastore names, upload or uplink errors, the relative URL, and version history.
CREATED (the record exists but has no file), UPLOADING, UPLINKING, READY, and FAILED. If the status is FAILED, run zcli image show <name> --detail and read the Upload / Uplink Error Status line.
--latest shows the default EVE-OS image for an architecture. See EVE-OS Images.
List images
Runzcli image show without a name to list images. The list shows each image’s name, title, type, format, size, and status. Use the following flags to filter the list.
To list all images:
ubuntu:
View project scope
Show the projects that can use one or more images. When you name several images, the output shows the projects that they have in common.Update an Image Record
Update an image record’s title, architecture, project scope, origin type, datastores, or file details.
You cannot change an image’s name, format, or type. To change them, delete the image and create it again. If you pass no options, ZCLI prints
Nothing to update and makes no change.
--project-scope and --datastores replace the current values. They are not added to them. To add a project, pass every project that should keep access. Run zcli image show <name> --detail first to see the current values.Delete an Image
Delete an image record
Delete an image by name. ZCLI asksDelete image <name>? [Y/N] unless you pass -f. If you answer no, ZCLI prints Image <name> not deleted.
Delete images by keyword
<name> deleted for each image that it deletes.
EVE-OS Images
EVE-OS images use the samezcli image commands as application images, with --type=Eve. The following pages cover the EVE-OS procedures in full:
- Add a rootfs EVE-OS Image to Your Enterprise: create the record with
--type=Eve --image-format=raw, then upload or uplink the rootfs image. - Manage Default EVE-OS Images: view and set the default image for each architecture.
- Delete an EVE-OS Image: delete an image that is not the default and not installed on any edge node.
View the default EVE-OS image
Set the default EVE-OS image
Example:
Onboard an EVE-OS image to other enterprises
onboard uploads an EVE-OS image to your enterprise if it is not there already, and then uplinks it to other enterprises that your account can see.
Next Steps
Manage Edge Apps
Create edge applications that reference your images.
Manage Datastores
Create and manage the datastores that hold image files.
Manage Application Instances
Deploy edge applications to edge nodes as application instances.
Overview
All ZCLI command procedures, organized by resource type.