zCLI Overview

Introduction

zCLI is a python based command-line interface used to interact with ZedControl.

 

1. Requirements

  • You will have to first download Docker before running the zCLI.
  • Once Docker is installed, head to the terminal and run the commands mentioned in the next section:

2. Commands usage

Run the Docker using the command: docker run -it zededa/zcli:latest
$ docker run -it zededa/zcli:latest
zcli>
Warning: Docker will download quite a few files over the internet on the first-ever attempt.
 
 

3. Options to Login into zCLI

Option A

Login into zCLI using the credentials provided by ZEDEDA. Point zCLI to the cloud by executing the zcli configure command.
zcli> zcli configure
Server [zedcontrol.zededa.net]:
Username [admin@enterprise.com]:
Password [**********]:
Output format [text]:
zcli>


Option B

Login into zCLI using a token generated in the ZedUI screen.
Once you enter the user credentials and log in to ZedControl, you can see the home screen below.
  • Step 1 > Click the Profile (Profile_icon.png) icon on the top navigation bar.
  • Step 2 > Click on the username from the list.
 
ZC_3_screen_10.png
 
Clicking on the username will take you to the User Details screen to copy the session token.
  • Step 3 > Click 'Copy' to copy the session token to the clipboard. You will also get a toast message announcing as shown below:
Session Token has been copied to clipboard
 
ZC_3_screen_11.png
  • Step 4 > You can paste the token in the below zCLI configure screen.
zcli> zcli configure
Server [zedcontrol.zededa.net]:
Login with token?(y/n) [n]: y
Token: <enter the copied token here>
Output format [text]:
zcli>
  • Step 5 > Login into the configured cloud by executing thezcli login command.
zcli> zcli login
User admin@enterprise.com logged in.
zcli>


4. List of zCLI Commands

Once you have logged in to the zCLI, execute the zcli command and hit the return button to display usage, options, and commands sections as shown below. You can self-read the sections with descriptions for each CLI term.
zcli> zcli
Usage:
 zcli [--help|-h|--version|-v]
 zcli [--debug] [--format=<json|text>] [--no-verify] <command> [<args>...]
Name:
 zcli - ZEDEDA Command Line Interface
Description:
 zcli is a client for interacting with ZEDEDA Cloud controller.
 zcli helps in lifecycle management of Edge nodes and orchestrating
 Edge applications on those Edge nodes.
 zcli has many commands. The commands are listed below and each has
 its own man page which explain usage and arguments. To see the man
 page for a command run `man zcli-<command>`.
Commands:
 auth-profile
   Manage Authorization profiles
 brand
   Manage Hardware brands for Edge nodes
 configure
   Configure access to ZEDEDA Cloud controller
 datastore
   Manage Datastores for images
 edge-app
   Manage Edge application manifests
 edge-app-instance
    Manage Edge application instances running on edge-nodes
 edge-node
   Manage Edge nodes
 events
   View events from Edge nodes and log of user actions
 image
   Manage Edge application images in datastores
 job
   Manage long-standing tasks on multiple Edge nodes and/or Edge
   application instances
 login
   Login to ZEDEDA Cloud controller
 logout
   Logout from ZEDEDA Cloud controller
 model
   Manage Hardware models for Edge nodes
 network
   Manage Edge node networking
 network-instance
   Manage Edge application networking within an Edge node
 project
   Manage Projects (resource groups)
 role
   Manage Roles
 user
   Manage User access to ZEDEDA Cloud controller
 volume-instance
   Manage Volume instances
Examples:
 zcli --help
 zcli --version
 For specific zcli command examples please see the man page for the
 command. For example: `man zcli-edge-node` or `man zcli-project`
Options:
 -v, --version
   Show zcli version and ZEDEDA Cloud controller version (if logged in).
 -h, --help
   Print usage statement.
 -d, --debug
   Enable debug mode. Default is false.
 -o, --format=<json|text>
   The formatting style for command output. This will suprecede
   format configured in `zcli configure`.
   - json
   - text
 -k, --no-verify
   By default, zcli uses TLS when communicating with ZEDEDA Cloud controller.
   For each TLS connection, zcli will verify TLS certificates.
   This option overrides the default behavior of verifying TLS
   certificates.
zcli>
Was this article helpful?
1 out of 2 found this helpful

Articles in this section