Install Azure IoT Edge runtime on Linux (ARM32v7/armhf)

The Azure IoT Edge runtime is deployed on all IoT Edge devices. It has three components. The IoT Edge security daemon provides and maintains security standards on the Edge device. The daemon starts on every boot and bootstraps the device by starting the IoT Edge agent. The IoT Edge agent facilitates deployment and monitoring of modules on the Edge device, including the IoT Edge hub. The IoT Edge hub manages communications between modules on the IoT Edge device, and between the device and IoT Hub.

This article lists the steps to install the Azure IoT Edge runtime on a Linux ARM32v7/armhf Edge device (for example, Raspberry Pi).

Note

Packages in the Linux software repositories are subject to the license terms located in each package (/usr/share/doc/package-name). Read the license terms prior to using the package. Your installation and use of the package constitutes your acceptance of these terms. If you do not agree with the license terms, do not use the package.

Install the container runtime

Azure IoT Edge relies on a OCI-compatible container runtime. For production scenarios, it is highly recommended you use the Moby-based engine provided below. It is the only container engine officially supported with Azure IoT Edge. Docker CE/EE container images are compatible with the Moby-based runtime.

Commands below install both the Moby-based engine and command-line interface (CLI). The CLI is useful for development but optional for production deployments.


# You can copy the entire text from this code block and 
# paste in terminal. The comment lines will be ignored.

# Download and install the moby-engine
curl -L https://aka.ms/moby-engine-armhf-latest -o moby_engine.deb && sudo dpkg -i ./moby_engine.deb

# Download and install the moby-cli
curl -L https://aka.ms/moby-cli-armhf-latest -o moby_cli.deb && sudo dpkg -i ./moby_cli.deb

# Run apt-get fix
sudo apt-get install -f

Install the IoT Edge Security Daemon

# You can copy the entire text from this code block and 
# paste in terminal. The comment lines will be ignored.

# Download and install the standard libiothsm implementation
curl -L https://aka.ms/libiothsm-std-linux-armhf-latest -o libiothsm-std.deb && sudo dpkg -i ./libiothsm-std.deb

# Download and install the IoT Edge Security Daemon
curl -L https://aka.ms/iotedged-linux-armhf-latest -o iotedge.deb && sudo dpkg -i ./iotedge.deb

# Run apt-get fix
sudo apt-get install -f

Configure the Azure IoT Edge Security Daemon

The daemon can be configured using the configuration file at /etc/iotedge/config.yaml. The file is write-protected by default, you might need elevated permissions to edit it.

sudo nano /etc/iotedge/config.yaml

The edge device can be configured manually using a device connection string or automatically via Device Provisioning Service.

  • For manual configuration, uncomment the manual provisioning mode. Update the value of device_connection_string with the connection string from your IoT Edge device.

    provisioning:
      source: "manual"
      device_connection_string: "<ADD DEVICE CONNECTION STRING HERE>"
    
    # provisioning: 
    #   source: "dps"
    #   global_endpoint: "https://global.azure-devices-provisioning.net"
    #   scope_id: "{scope_id}"
    #   registration_id: "{registration_id}"
    
  • For automatic configuration, uncomment the dps provisioning mode. Update the values of scope_id and registration_id with the values from your IoT Hub DPS instance and your IoT Edge device with TPM.

    # provisioning:
    #   source: "manual"
    #   device_connection_string: "<ADD DEVICE CONNECTION STRING HERE>"
    
    provisioning: 
      source: "dps"
      global_endpoint: "https://global.azure-devices-provisioning.net"
      scope_id: "{scope_id}"
      registration_id: "{registration_id}"
    

After entering the provisioning information in the configuration, restart the daemon:

sudo systemctl restart iotedge

Verify successful installation

If you used the manual configuration steps in the previous section, the IoT Edge runtime should be successfully provisioned and running on your device. If you used the automatic configuration steps, then you need to complete some additional steps so that the runtime can register your device with your IoT hub on your behalf. For next steps, see Create and provision a simulated TPM Edge device on a Linux virtual machine.

You can check the status of the IoT Edge Daemon using:

systemctl status iotedge

Examine daemon logs using:

journalctl -u iotedge --no-pager --no-full

And, list running modules with:

sudo iotedge list

Note

On resource constrained devices like RaspberryPi, it is highly recommended that OptimizeForPerformance environment variable is set to false as per instructions in the troubleshooting guide.

Next steps

If you are having problems with the Edge runtime installing properly, checkout the troubleshooting page.