Xenter Azure IoT Documentation

This documentation covers the usage of Azure IoT relative to Xenter’s use cases. This guide is specific to Ubuntu 20.04.

Table of Contents

Installing IoT Edge on Ubuntu W/ Symmetric Keys

Xenter’s IoT devices for the XenFi and XenMe platforms currently leverages Azure’s IoT platform for managing IoT devices at scale. XenMe software packages can be remotely deployed and managed via containers.

  1. Install IoT Edge:

    wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
    sudo dpkg -i packages-microsoft-prod.deb
    rm packages-microsoft-prod.deb
  2. Install the moby container engine:

    sudo apt update && sudo apt install -y moby-engine
  3. Configure logging to use systemd and journald:

    echo -e '{\n\t"log-driver": "journald",\n\t"dns": \n\t[\n\t\t"1.1.1.3",\n\t\t"1.0.0.3"\n\t]\n}' | sudo tee /etc/docker/daemon.json > /dev/null
    sudo systemctl restart docker
  4. Install Azure IoT packages:

    sudo apt-get install aziot-edge defender-iot-micro-agent-edge
  5. Configure IoT Edge to use a connection string:

    sudo iotedge config mp --connection-string 'PASTE_DEVICE_CONNECTION_STRING_HERE'
    sudo iotedge config apply -c '/etc/aziot/config.toml'
  6. Check that the IoT edge deployment was successful:

    sudo iotedge check

    It is expected to see 1 error message related to the Edge Hub modules sotrage. This error will go away after the iot device connects to the cloud services for the first time.

    × production readiness: Edge Hub's storage directory is persisted on the host filesystem - Error
    Could not check current state of edgeHub container

Uninstalling Azure IoT Edge

  1. Uninstall and purge configuration files:

    sudo apt-get autoremove --purge aziot-edge
  2. List running containers and check that all Azure IoT containers have been deleted:

    sudo docker ps -a

    Delete unwanted/unneeded containers using their name:

    sudo docker rm -f container_name
  3. Uninstall and purge the moby container engine:

    sudo apt-get autoremove --purge moby-engine