Prerequisites
Docker Desktop must be running.
Start ZCLI
docker run -it zededa/zcli:latest
Log in to ZCLI
Use your ZEDEDA Cloud credentials
- 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 in to 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
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>
ZCLI Command-Specific Usage
To see command-specific options and parameters, you can start typing a command and use --help to get the syntax for that command.
zcli> zcli datastore --help
Usage:
zcli datastore create <name> [--title=<title>] --dstype=<dstype> [--description=<description>] [--fqdn=<fqdn>] [--region=<region>] [--apikey=<apikey>] [--apipass=<password>] [--dpath=<dpath>] [--origin-type=<origin-type>] [--project-scope=<project-names>]
zcli datastore show [--dstype=<dstype>] [[[<name> | --uuid=<uuid>] [--detail]] | [[--summary] | [[--name-pattern=<name-pattern>]
...cont...
- Items within angle brackets are your own specific variables, such as <name>.
- Items within brackets are optional, such as [--title=<title>].
- Items that contain a pipe are choices, such as between true or false [--clear-text=<true|false>].
If you type the syntax incorrectly, such as missing required options, you'll get an error message:
zcli> zcli datastore create MY-DS --title=MY-DS-TITLE
Missing required option --dstype.
Accessing 'man' Pages for Specific Commands
You can access the manual pages for a specific ZCLI command by using the man command, as follows:
zcli> man zcli-<command>
For example, to see the manual page for the edge-node command, you would run the following:
zcli> man zcli-edge-node
To exit from man the pages and return to your ZCLI session, press q (for "quit").
Other useful navigation commands while viewing man pages:
- Space or Page Down - scroll down one page
- b or Page Up - scroll up one page
- j or Down Arrow - scroll down one line
- k or Up Arrow - scroll up one line
- / followed by text - search forward for text