zcli edge-app commands for creating an edge app from a manifest file, viewing edge apps, updating them, importing edge apps from the global Marketplace, exporting manifests, managing artifacts such as logos and screenshots, and deleting edge apps, with syntax and examples for each operation.
An edge app is the definition of an application in your enterprise library: the images it runs, the resources it needs (vCPUs, memory, and storage), and its network interfaces. The definition is stored as a JSON manifest. An edge app does not run on its own. To run it, deploy it to an edge node or node cluster as an application instance with zcli edge-app-instance. See Manage Application Instances. The images that an edge app references are managed separately with zcli image. See Manage Images.
Before You Start
- ZCLI is installed and authenticated against your enterprise. See Get Started.
- You have the SysManager or SysAdmin role in your enterprise. See Manage Roles.
- To create an edge app, you have a manifest JSON file and the images it references already exist in your enterprise. ZCLI sends the manifest exactly as it is in the file and does not check its content.
- Files that you pass to ZCLI, such as manifests and artifact images, are available inside the ZCLI container. See Work With Local Files.
- For console-based edge app management, see Edge Apps and Import Edge Applications.
Create an Edge App
Create an edge app from a manifest
Create an edge app record from a manifest JSON file. You can write a manifest yourself, or export the manifest of an existing edge app and modify it. See Export an Edge App Manifest.
Example:
ZCLI reads the manifest file before it sends anything. If the file is not found, ZCLI prints the file error and stops. If the file is not valid JSON, ZCLI stops with a Python error message instead of a short error. Check the JSON syntax of the manifest, then run the command again.
View Edge Apps
View a single edge app
Show one edge app by name or UUID. Add--detail to include the drives, interfaces, access control rules, version, and revision information.
--detail output also shows:
- The edge app ID, description, and project scope. The project scope reads
accessable to all projectsoraccessable to <n> projects. - A drives table with the image, maximum size, preserve setting, target, drive type, volume label, and mount path of each drive.
- An interfaces table and an access control rules table.
- The user-defined version, and who created and last updated the edge app.
--origin-type=global:
List edge apps
Runzcli edge-app show without a name to list edge apps. The list shows each edge app’s name, title, number of networks and drives, vCPUs, memory, storage, and origin type.
To list all edge apps:
ubuntu:
ubuntu app:
--summary ignores every other filter. It always counts all edge apps in your enterprise library.View the project scope of an edge app
List the projects that can use an edge app.Update an Edge App
Update an edge app
Update the title, description, manifest, version, project scope, or origin type of an edge app. ZCLI reads the current edge app, changes only the values that you pass, and sends the result back.
To change the title and version of an edge app:
--version on its own does not update anything. ZCLI prints Nothing to update because it checks only the other flags. To change only the version, also pass another flag with its current value, for example --title with the existing title.Import an Edge App From the Global Marketplace
Import an edge app
Copy an edge app from the global Marketplace into your enterprise library. The copy has the same name as the global edge app. To find the names of global edge apps, runzcli edge-app show --origin-type=global.
- If an edge app with the same name already exists in your library, ZCLI prints
App <name> already exists.and stops. - If the global Marketplace has no edge app with that name, ZCLI prints
Global App <name> not found. - If the import job fails, ZCLI prints
import failed (job=<job-name>)and the reason that the job reports. - If the import succeeds, ZCLI prints nothing. Verify the result with
zcli edge-app show <name>.
zcli edge-app show <name>.
Export an Edge App Manifest
Export a manifest
Save an edge app’s manifest, and the artifacts that it references, to a local directory. Use the exported manifest to copy an edge app, to keep a backup, or as the starting point for an update.<name>/manifest.json, the full manifest.<name>/artifacts/<type>/<artifact-name>, a copy of each logo, screenshot, license, and agreement file that the manifest references.
/home/zcli. To keep the files on your computer, run ZCLI with a mounted directory or copy the directory out with docker cp. See Work With Local Files.
To export only the custom configuration template and its variables, add --custom-configuration. ZCLI writes them to <name>/custom_config.json.
ZCLI does not overwrite an existing export. If the directory already exists, ZCLI prints
Remove directory <name> and try again. ZCLI also creates the directory before it looks up the edge app, so a failed export, for example with a misspelled name, leaves an empty directory behind. Remove it before you run the export again.If the edge app has no custom configuration,
--custom-configuration writes an empty JSON object to a file named <name>/.json instead of custom_config.json. The leading period hides the file in most directory listings.Create a copy of an edge app
To create a new edge app from an exported manifest, pass the exportedmanifest.json to create with a new name.
<name>/artifacts/ are local copies for your reference. ZCLI does not upload them again.
Manage Edge App Artifacts
Artifacts are the files that describe an edge app in the Marketplace, such as its logo, screenshots, license, and agreement. Each artifact is stored in the manifest’sdesc section under an artifact type, with a name of your choice.
export-manifest downloads artifacts of these four types. ZCLI does not check the --type value, so use one of these exact names.
Add an artifact
Upload a file and attach it to an edge app under an artifact type and name.
Example:
The syntax shows
--aname, --type, and --file as optional, but add-artifact requires all three. If any one is missing, ZCLI prints invalid parameters received and stops.ZCLI creates the artifact record before it opens the file. If the file path is wrong, ZCLI prints the file error and then stops with an
Unexpected error executing command 'edge-app' message that names TypeError. Check the file path, then run the command again. If you add an artifact with a name that already exists under the same type, the new artifact replaces the old one in the manifest.Remove an artifact
Detach an artifact from an edge app and delete the artifact file. Identify the artifact by its type and its key. The key is the artifact ID stored in the manifest. To find it, show the edge app as JSON and look undermanifestJSON > desc > the artifact type.
Example:
Given key is not attached to the specified edge app and stops. Pass both --key and --type.
Delete an Edge App
Delete an edge app
Delete an edge app from your enterprise library. ZCLI asksDelete edge-app <name>? [Y/N] unless you pass -f. If you answer no, ZCLI prints Edge-App <name> not deleted.
Next Steps
Manage Application Instances
Deploy an edge app to an edge node or node cluster and manage its instances.
Manage Images
Create and upload the images that edge apps run.
Import Edge Applications
Import or create edge apps using the Edge Infrastructure Services console.
Overview
All ZCLI command procedures, organized by resource type.