This snap was created due to the lack of options to install onto ubuntu core. This runtime has dependencies for python and docker. Python is packaged as a dependency inside of the snap but you will need to install the docker snap before hand.
To get started, you will need to install the docker snap and then build this snap. On the target machine:
snap install docker
To compile the snap on your build machine, navigate to the root folder and type: snapcraft and press enter. Once the build is completed, you will see a snap in the same directory called: iotedgectl_preview_amd64.snap
Thats it! Now the snap is ready to be published to your private snap repo or scp'd to another machine:
To ubuntu repo:
snapcraft login
snapcraft register mysnapname
snapcraft push --release=edge iotedgectl_preview_amd64*.snap
To another machine (in the same folder as the snap):
sudo scp -P 22 iotedgectl_preview_amd64.snap user@ipaddress:/home/userdirectory
On the taraget machine you will need to have docker installed by running this command in the terminal:
sudo snap install docker
NOTE:
Since snaps are read only, you will need to create a directory for the snap to write to. In the .yaml file we granted access to several interfaces:
plugs: [network, docker-executables, docker-cli, privileged, home]
This will allow us to communicate with docker and also read/write in the users home directory. Great documentation here: https://docs.snapcraft.io/reference/interfaces
To create the necessary directory run the following commands in the terminal:
sudo su
cd $HOME
mkdir iotedge
Setup your device in the IoT Hub (documentation can be found here: https://docs.microsoft.com/en-us/azure/iot-edge/quickstart-linux)
Navigate back to the directory that you scp'd the .snap to (/home/userdirectory) and install the snap:
snap install iotedgectl_preview_amd64.snap --devmode --dangerous
Configure the runtime (note the directory parameters):
iotedgectl setup --connection-string "connstringhere" --auto-cert-gen-force-no-passwords --edge-config-dir $HOME/iotedge --edge-home-dir $HOME/iotedge
iotedgectl start
and your up and running!
This project is licensed under the MIT License - see the LICENSE.md file for details