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.
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.debInstall the moby container engine:
sudo apt update && sudo apt install -y moby-engineConfigure 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 dockerInstall Azure IoT packages:
sudo apt-get install aziot-edge defender-iot-micro-agent-edgeConfigure 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'Check that the IoT edge deployment was successful:
sudo iotedge checkIt 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
Uninstall and purge configuration files:
sudo apt-get autoremove --purge aziot-edgeList running containers and check that all Azure IoT containers have been deleted:
sudo docker ps -aDelete unwanted/unneeded containers using their name:
sudo docker rm -f container_nameUninstall and purge the moby container engine:
sudo apt-get autoremove --purge moby-engine