The ZEDEDA CLI (ZCLI) is a command-line interface that enables you to interact with ZEDEDA Cloud. It's one of the the three primary ways that you can interact with ZEDEDA Cloud: the ZEDEDA GUI, the ZEDEDA API, and the ZEDEDA CLI.
Prerequisites
Docker Desktop must be running.
Start the ZCLI
The ZCLI is a Docker container, which you must run in a terminal. The first time you start the container, Docker will pull from ZEDEDA's registry to get all of the required images. This may take a few moments.
To start the ZCLI Docker container, run the following command in your terminal
docker run -it zededa/zcli:latest
Log in to the ZCLI
Use your ZEDEDA Cloud credentials
Log in to ZEDEDA Cloud using the same credentials you use for the ZEDEDA GUI. To do so, follow the steps below:
- Use the zcli configure command to trigger the prompt for authentication
-
zcli configure
-
- Specify the server address, zedcontrol.zededa.net is the default server
- Answer "n" to "Login with token?(y/n) [n]:"
- Enter the Username and Password fields
- Log in to ZEDEDA Cloud with the zcli login command.
-
zcli login
-
Use a unique session token
To authenticate with ZEDEDA Cloud using a session token, you'll need to copy your token from the ZEDEDA GUI and then paste it into the ZCLI when it prompts you for it. To do so, follow these steps.
- Log in to the ZEDEDA GUI.
- Click on your user profile dropdown, located in the top right area of your GUI.
- Hover over your username and select User Details.
- Follow the instructions in the User Details page's Session Information section to copy your session token.
- Use the zcli configure command to trigger the prompt for your session token.
-
zcli configure
-
- Specify the server address, zedcontrol.zededa.net is the default server
- Answer "y" to "Login with token?(y/n) [n]:"
- Paste the session token from previous steps and press enter
- Log in to ZEDEDA Cloud with the zcli login command.
-
zcli login
-
ZCLI Commands
To see a list of commands available to you in the ZCLIe, run the zcli command. For the majority of ZCLI commands, if the command runs successfully, there won't be any output. If the command fails to execute as expected, however, you will see relevant error messages.
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>