Installation Using Ubuntu SNAPs

Steps to install EdgeIQ Coda on devices supporting Canonical SNAPS, including Ubuntu and Ubuntu Core.

EdgeIQ Coda Snap

EdgeIQ Coda, the EdgeIQ local agent, can be installed on many Linux distributions and offers native support for Ubuntu Core through an official SNAP package available in the EdgeIQ Coda - Canonical Snap Store.

Using EdgeIQ Coda as a SNAP is the recommended installation option for all devices supporting SNAP packages.

EdgeIQ Coda is available as an official image the Canonical Snap Store

EdgeIQ Coda is available as an official image the Canonical Snap Store

Getting Started

To install EdgeIQ Coda through SNAP packages, you need a device running either regular Ubuntu or Ubuntu Core (both support SNAP packages). EdgeIQ Coda is available for amd64, armhf, and arm64 architectures.

Installation

To install Coda, run the following command in your terminal:

sudo snap install coda

Basic Configuration

Configure your device with a unique ID and company ID using the following commands:

sudo snap set coda bootstrap.unique-id=your-unique-id
sudo snap set coda bootstrap.company-id=your-company-id
sudo snap restart coda

Note: By default, during the installation, Snap tries to use the MAC address of the first Ethernet port as the unique-id. This will happen only one time during the first installation and then can be changed via the snap set command.

Change MQTT Password

To update the MQTT broker password:

sudo snap set coda conf.mqtt.broker.password="your-encrypted-password"
sudo snap restart coda

Connect to a different environment

To connect to a different EdgeIQ environment, run the following command to set the corresponding broker:

sudo snap set coda conf.mqtt.broker.host="mqtt.edgeiq.io"
sudo snap restart coda

The brokers are:

EnvironmentMQTT Broker
Productionmqtt.edgeiq.io
Stagingmqtt.stage.edgeiq.io

Configuration

Configuration Keys

The snap configuration keys correspond to paths in the configuration files, with hyphens instead of underscores due to snapd restrictions. For example, edge.relay_frequency_limit in conf.json translates to snap set conf.edge.relay-frequency-limit=10.

Viewing Configuration Files

sudo snap get coda "bootstrap"
cat /var/snap/coda/common/conf/bootstrap.json
cat /var/snap/coda/common/conf/identifier.json

sudo snap get coda "conf"
cat /var/snap/coda/common/conf/conf.json

Use-cases

Reboot or Shutdown the Device

To grant access the coda snap to reboot or shutdown the device, please connect the following plugs:

sudo snap connect coda:shutdown :shutdown

Managing Snaps on the Device

To manage snaps on the device, please connect the following plugs:

sudo snap connect coda:snapd-control :snapd-control

Network Configuration

To have ability create and apply network configurations to your device via API, please connect the following plug:

sudo snap connect coda:network-control :network-control 
sudo snap connect coda:network-manager :network-manager
sudo snap connect coda:network-manager-observe :network-manager-observe
sudo snap connect coda:firewall-control :firewall-control

Note: At this time modem-manager is reserved but not supported by the Coda. We are working on adding support for it in nearest the future.

Certificate-Based Authentication with TPM 2.0

To configure your Device with TPM Support for Enhanced Security , please connect the following plug:

sudo snap connect coda:tpm :tpm

Development

The source code for the EdgeIQ Coda Snap image is public and available to build custom SNAP images including EdgeIQ Coda. We recommend using the official EdgeIQ Coda image from the Canonical SNAP store whenever possible.

Instructions on how to build the EdgeIQ Coda Snap from source are available on Github - EdgeIQ Coda Snap.