Skip to content

Edge Xpert CLI

Edge Xpert provides a command-line interface (CLI) tool, named edgexpert, which simplifies the management of the Edge Xpert microservices.

Note that the license associated with your download defines what microservices are available to be started by the CLI tool. For further information on licensing, refer to Edge Xpert Licensing.

Command Format

The Edge Xpert CLI tool can be used by following this general command format:

edgexpert [--env-file <file>] <command> [<args>]

Some typical commands are described below.

Pull the Latest Images

Ensure you have the latest version of the Edge Xpert microservices with the pull command.

A single microservice image can be updated as follows:

edgexpert pull device-virtual
Output from this command is similar to the following:

Pulling device-virtual ... done
Alternatively, all microservice images can be updated as follows:

edgexpert pull --all
Output from this command is similar to the following:

Pulling redis                 ... done
Pulling sys-mgmt              ... done
Pulling core-data             ... done
Pulling core-metadata         ... done
Pulling core-keeper           ... done
Pulling support-scheduler     ... done
...

Starting the Services

To create and start the microservices, use the up command.

For example, the following command starts the Edge Xpert Core Services, the Edge Xpert Manager, and the Virtual Device Service:

edgexpert up xpert-manager device-virtual
which gives output similar to the following:
Creating redis          ... done
Creating mqtt-broker    ... done
Creating xpert-manager  ... done
Creating core-keeper    ... done
Creating core-metadata  ... done
Creating core-command   ... done
Creating core-data      ... done
Creating device-virtual ... done

To start only specified microservices, you must include the --no-core option. For example, the following command creates and starts only the Node-RED microservice and not the Edge Xpert Core Services:

edgexpert up --no-core nodered

This gives output similar to the following:

Creating nodered ... done

Checking Status

To verify that the microservices are running, use the status command, as shown below:

edgexpert status

The output from this command is similar to the following, depending on the services currently running:

NAMES            STATUS                        CREATED              PORTS
nodered          Up 3 minutes                  3 minutes ago        0.0.0.0:1880->1880/tcp
device-virtual   Up 4 minutes                  4 minutes ago        59900/tcp
core-command     Up 4 minutes                  4 minutes ago        59882/tcp
core-data        Up 4 minutes                  4 minutes ago        59880/tcp
core-metadata    Up 4 minutes                  4 minutes ago        59881/tcp
core-keeper      Up 4 minutes                  4 minutes ago        59890/tcp
xpert-manager    Up 4 minutes                  4 minutes ago        0.0.0.0:9090->9090/tcp
mqtt-broker      Up 4 minutes                  4 minutes ago        1883/tcp
redis            Up 4 minutes                  4 minutes ago        6379/tcp
consul           Up 4 minutes                  4 minutes ago        8300-8302/tcp, 8301-8302/udp, 8600/tcp, 8600/udp, 8500/tcp

Stopping the Services

The Edge Xpert CLI provides the stop, down, and clean commands that can all stop the Edge Xpert services.

Note

In addition to stopping the services, down deletes all Edge Xpert containers

In addition to stopping the services and deleting all containers, clean deletes any volumes or networks used by Edge Xpert

For example, to stop all running Edge Xpert services and delete the containers, use the down command, as shown below:

edgexpert down

The output from this command is similar to the following, depending on the services currently running:

Stopping xpert-manager  ... done
Stopping nodered        ... done
Stopping device-virtual ... done
Stopping core-command   ... done
Stopping core-data      ... done
Stopping core-metadata  ... done
Stopping core-keeper    ... done
Stopping mqtt-broker    ... done
Stopping redis          ... done
Removing nodered        ... done
Removing device-virtual ... done
Removing core-command   ... done
Removing core-data      ... done
Removing core-metadata  ... done
Removing core-keeper    ... done
Removing xpert-manager  ... done
Removing mqtt-broker    ... done
Removing redis          ... done

When the clean command is specified, you are prompted to continue deleting all Edge Xpert data, as shown below:

clean: delete all Edge Xpert data (y/n)?

Enter y to continue, or n to cancel the clean command. The output similar to the following, depending on the currently running services and volumes or networks used by Edge Xpert:

Removing network edgexpert_edgex-network
Removing network edgexpert_default
Removing Volumes:
edgexpert_db-data
edgexpert_consul-data
edgexpert_consul-config
edgexpert_kuiper-data
edgexpert_asc-config
edgexpert_grafana-data
edgexpert_nodered-data
edgexpert_portainer-data
edgexpert_mosquitto-log
edgexpert_mosquitto-data
edgexpert_influx-data
edgexpert_influx-config
edgexpert_xpert-manager-data

Warning

As mentioned above, the clean command will remove all Edge Xpert data including configuration data, proceed carefully!