Skip to content

Edge Xpert CLI Environment Variables

EDGEXPERT_COMPOSE_PATH

Used to specify a custom path for docker-compose files. This provides a flexible way to use and maintain multiple configurations without changing the directory.

$ export EDGEXPERT_COMPOSE_PATH=/home/user/debug
$ edgexpert up
Overriding configuration with /home/user/debug/docker-compose.yml
...

EDGEXPERT_PROJECT

Overrides the current configuration file. EdgeXpert CLI will look for a docker-compose.<env_value>.yml file to override the current configuration.

An example usage of this could be integrating a service into Edge Xpert which needs to connect to a Redis container. In this case, a simple docker-compose file can be provided to override the default configuration and expose the port.

Create docker-compose.redis.yml containing the following:

services:
  redis:
    ports:
      - "6379:6379"

Specify the EDGEXPERT_PROJECT variable and run Edge Xpert:

$ export EDGEXPERT_PROJECT=redis
$ edgexpert up 
Overriding configuration with local docker-compose.redis.yml
...
$ edgexpert status
NAMES              STATUS             CREATED             PORTS
...
redis              Up 2 hours         2 hours ago         0.0.0.0:6379->6379/tcp, :::6379->6379/tcp

You can see the 6379 port is successfully exposed to the host machine.

EDGEXPERT_IMAGE_VERSION

This variable allows you to specify which version of Edge Xpert should be used.

For example, we can use it to specify Edge Xpert v2.1.6.

Specify the EDGEXPERT_IMAGE_VERSION variable and run edgexpert pull --all to obtain the specified version of image.

$ export EDGEXPERT_IMAGE_VERSION=2.1.6
$ edgexpert pull --all 
$ edgexpert image version
Name                                                        | version
----------------------------------------------------------------------------------------------------------
iotechsys/edgexpert-app-configurable:2.1.6                  | 2.1.6
iotechsys/edgexpert-core-command:2.1.6                      | 2.1.6
iotechsys/edgexpert-core-data:2.1.6                         | 2.1.6
iotechsys/edgexpert-core-metadata:2.1.6                     | 2.1.6
iotechsys/edgexpert-device-bacnet-ip:2.1.6                  | 2.1.6
iotechsys/edgexpert-device-bacnet-mstp:2.1.6                | 2.1.6
iotechsys/edgexpert-device-gps:2.1.6                        | 2.1.6
iotechsys/edgexpert-device-modbus:2.1.6                     | 2.1.5
iotechsys/edgexpert-device-mqtt:2.1.6                       | 2.1.5
iotechsys/edgexpert-device-opc-ua:2.1.6                     | 2.1.4
iotechsys/edgexpert-device-rest:2.1.6                       | 2.1.5
iotechsys/edgexpert-device-s7:2.1.6                         | 2.1.6
iotechsys/edgexpert-device-virtual:2.1.6                    | 2.1.5
iotechsys/edgexpert-device-websocket:2.1.6                  | 2.1.5
iotechsys/edgexpert-security-proxy-setup:2.1.6              | 2.1.6
iotechsys/edgexpert-security-secretstore-setup:2.1.6        | 2.1.6
iotechsys/edgexpert-security-bootstrapper:2.1.6             | 2.1.6
iotechsys/edgexpert-support-notifications:2.1.6             | 2.1.6
iotechsys/edgexpert-support-provision:2.1.6                 | 2.1.6
iotechsys/edgexpert-support-scheduler:2.1.6                 | 2.1.6
iotechsys/edgexpert-sys-mgmt-agent:2.1.6                    | 2.1.6
iotechsys/edgexpert-iotech-manager:2.1.6                    | 2.1.6

You can see that the image version of Edge Xpert is locked by 2.1.6 on the left.