ZEDEDA CLI Overview

Introduction

ZEDEDA CLI is a Python-based command-line interface used to interact with ZEDEDA.

1. Requirements

  • You will have to first download Docker before running the ZEDEDA CLI.
  • 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 ZEDEDA CLI

Option A

Login into ZEDEDA CLI using the credentials provided by ZEDEDA. Point ZEDEDA CLI 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

Log in to ZEDEDA CLI using a token generated in the ZEDEDA GUI screen.
Once you enter the user credentials and log in to ZEDEDA GUI, you can see the dashboard below.
  • Step 1 > Click the Profile icon on the top navigation bar.
  • Step 2 > Click on the username from the list.
 
image__1_.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:
 
image.png
  • Step 4 > You can paste the token in the below ZEDEDA CLI 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 ZEDEDA CLI Commands

Once you have logged in to the ZEDEDA CLI, 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 ZEDEDA 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>
 
Note: If the command gets executed successfully, no output message is displayed. However, if the command execution fails, an error message is displayed accordingly.
 

5. ZEDEDA CLI Referenced Documents

The following documents render details about the specific ZEDEDA CLI operation for a particular ZEDEDA object:
Was this article helpful?
2 out of 3 found this helpful