Skip to content

canonical/iot-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Go Report Card codecov

IoT Agent

The IoT Agent enrolls a device with the IoT Identity service and receives credentials to access the MQTT broker. Via MQTT, it establishes communication with an IoT Management service, so the device can be remotely monitored and managed over a secure connection. The state of the device is mirrored in the cloud by the IoT Device Twin service.

The agent is intended to operate on a device running Ubuntu or Ubuntu Core with snapd enabled. The device management features are implemented using the snapd REST API.

IoT Management Solution Overview

Build

The project uses vendorized dependencies using govendor. Development has been done on minimum Go version 1.12.1.

$ cd iot-agent
$ go mod tidy
$ go build cmd/agent/main.go
$ go build cmd/configure/main.go

Connect Interfaces

iot-agent uses snapd-control interface which is super powerful. Only the private IoT App Store (aka Brand Store) owners can automatically connect the mentioned interface. To use the iot-agent, one can either install it with --devmode or manually connect snapd-control interface. Please note that a snap with snapd-control interface can not be uploaded to the Global Snap Store. iot-agent snap is an exception for demonstrating purposes.

$ snap connect iot-agent:snapd-control :snapd-control

Run

go run cmd/agent/main.go -help
  -credentials string
        The full path to the credentials file (default ".secret")
  -url string
        The URL of the Identity Service (default "http://localhost:8030/")

Contributing

Before contributing you should sign Canonical's contributor agreement, it’s the easiest way for you to give us permission to use your contributions.

Releases

No releases published

Packages

No packages published