Skip to content

Run Device Service Components

Standalone on Command Line

To run the device services, complete the following steps:

  1. Ensure that the relevant [device_service_name]_device_service.json file and any other required configuration files, such as device profiles, are in the config folder. For further information on device profiles, see Device Profiles.

  2. Set the environment variables required for Edge Xrt:

    • XRT_PROFILE_DIR, which points towards the directory containing any device profiles that will be usable with the device service
    • XRT_STATE_DIR, which points towards the directory containing any state required for using the device service, such as schedules and devices
    • XRT_LICENSE_FILE, which points to the location of license.json, as the name implies. Obtain a licence from IoTech and supply the path as this environment variable
  3. Run the Edge Xrt executable using the following command where <config_directory> provides the location of the config folder and <time_in_seconds> defines the time for which Edge Xrt is to run in seconds:

    sh> xrt <config_directory> [time_in_seconds]

Docker Container

For instructions to run the device services within a docker container, please refer to Device Service Docker Setup