Prerequisites: This assumes you already have docker up and running. You can also use Moby by following the instructions at https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-linux-arm just before the installation of IoT Edge in step: 10
- $
sudo dpkg --add-architecture armhf
- $
sudo apt-get update
- $
sudo apt-get install libc-bin libc-bin libc-dev-bin libc6 libc6:armhf libc6-dev libgcc1 libgcc1:armhf locales
- $
wget http://ports.ubuntu.com/ubuntu-ports/pool/main/h/hostname/hostname_3.16ubuntu2_armhf.deb
- $
sudo dpkg -i ./hostname_3.16ubuntu2_armhf.deb
- $
wget http://ftp.us.debian.org/debian/pool/main/o/openssl1.0/libssl1.0.2_1.0.2l-2+deb9u3_armhf.deb
- $
sudo dpkg -i libssl1.0.2_1.0.2l-2+deb9u3_armhf.deb
- $
sudo apt-get install -f
- If you get any error message, it may be related to the fact you have a non-compatible version of libssl like the libsll-dev version. In this case, just purge it with
- $
sudo apt-get purge libssl-dev
- $
- $
wget https://aka.ms/libiothsm-std-linux-armhf-latest -O libiothsm-std.deb
- $
sudo dpkg -i ./libiothsm-std.deb
- $
wget https://aka.ms/iotedged-linux-armhf-latest -O iotedge.deb
- $
sudo dpkg -i ./iotedge.deb
- If you get an error about hostname being required just go to the next step
- $
sudo apt-get install -f
- Type
Yes, do as I say!
- $
sudo nano /etc/iotedge/config.yaml
- or
sudo vim /etc/iotedge/config.yaml
- or if you are a GUI person, you can also use gedit in place of nano
- or
- Add the connection string to your Edge device as usual (or configure dps)
- Change the edgeAgent config/image to reflect the architecture. For example "mcr.microsoft.com/azureiotedge-agent:1.0.0-linux-arm32v7"
- Note: this may not be necessary if using Moby instead of docker to determine do
docker pull mcr.microsoft.com/azureiotedge-agent:1.0
and see if it just works.
- Note: this may not be necessary if using Moby instead of docker to determine do
- Save and close the file
- OPTIONAL Only do this step if iotedge still isn't working
- Edit the
/etc/systemd/system/multi-user.target.wants/iotedge.service
file
a. Add the line below in the In the [Service] section
b. Environment=LISTEN_FDNAMES=iotedge.mgmt.socket:iotedge.socket
- Edit the
- $
sudo systemctl restart iotedge
Troubleshooting:
- If you run edge as a daemon, you may end up getting 127 errors. This just says something went wrong in the process started by the system. If you want better error info, you can try running iotedged from the command line using:
- $ sudo /usr/bin/iotedged -c /etc/iotedge/config.yaml
- Note, if you run iotedged from the command line, and it configures hsm, you will need to clear that configuration before starting iotedged as a service. If not, the service will fail repeatedly at the configuring hsm stage. You can clear it by removing the libiothsm, and deleting the /var/lib/iotedge/hsm directory. Then reinstall libiothsm as before.
More info about the libssl install and adding LISTEN_FDNAMES environment variable is here: https://blogs.msdn.microsoft.com/laurelle/2018/08/17/azure-iot-edge-support-for-raspbian-8-0-debian-8-0/