Connect Public Cloud

This section will introduce to you how to integrate the public cloud service provider’s IoT SDK with EdgeScale.

Azure IoT Setup

Overall picture of the Azure setup

_images/azure-iot.png

Hardware logistics

  • Extra Ethernet cable
  • Ethernet Router
  • Power Strip
  • SD card (8 or 32GB)
  • Connect LS1012ARDB to a Linux PC by a serial port. The port device can be found as device /dev/ttyACMx (x can be 0, 1, etc).

Steps for cloud

  • Register a free user account: free account.
  • Follow the setup in the iot-edge quick-start
    1. Create an IoT hub with Azure CLI.
    2. Register an IoT Edge device.
  • After the device registration, a connection string will appear.

Steps for board

$ iotedgectl setup --edge-hostname "nxp-iot-ls1012rdb" --connection-string "HostName=RoyIotHub.azure-devices.net;DeviceId=LS1012ARDB-01;SharedAccessKey=yT4r08JimivFTPGrBtw7xlxvQC4OqN0qzn2/aur8K3o=" --auto-cert-gen-force-no-passwords
  • Replace the string with your device string generated in previous step of device registration.
  • A different host name other than “nxp-iot-ls1012rdb” needs to be used, but the name should not be the localhost.
$ iotedgectl start

Deploy a module

  • Deploy a module.
  • View generated data.

Ali-Cloud IoT Setup

Overall picture of the Ali-Cloud IoT setup

_images/ali-iot.png

Hardware logistics

  • Extra Ethernet cable
  • Ethernet Router
  • Power Strip
  • SD card (8 or 32GB)
  • Connect LS1012ARDB or LS1043/6ARDB to a Linux PC by a serial port. The port device can be found as device /dev/ttyACMx (x can be 0, 1, etc).

Steps for cloud

_images/ali-iot-prod1.png _images/ali-iot-prod2.png _images/ali-iot-device.png _images/ali-iot-msg.png _images/ali-iot-sub.png _images/ali-iot-msgqueue.png

Steps for board

  • Download Ali IoT SDK IoT-SDKV2.0.tar.bz2 or other versions.
  • Replace “PRODUCT_KEY”, “DEVICE_NAME” and “DEVICE_SECRET” with your device in Ali Cloud.
  • Build the binary files and run.

Steps for MNS

  • Download MNS SDK

  • Get Access Key

  • Install Python SDK.

    pip install aliyun-python-sdk-core

    pip install aliyun-python-sdk-iot

  • Modify the MNS SDK according to the requirement.

  • Build the binary files and run.

AWS Greengrass Setup

AWS Greengrass core can run as a container, so EdgeScale can deploy it.

Please refer to Getting Started with AWS Greengrass. And, create certificates and groups to deploy Greengrass core.

There is a Docker image edgerepos/aws-greengrass on hub.docker.com, which can act as a base image which includes the package greengrass-linux-aarch64-1.6.0.tar.gz. Users can create a new Docker image based on this image. Add this line to the Dockerfile to include the base Docker image:
FROM edgerepos/aws-greengrass:latest

And add certificates you got from the website of the AWS Greengrass and the config file.

Make sure the storage driver of the Docker engine on the device is “devicemapper”. This can prevent problems when Greengrass is running in a Docker container. Details here.

Add these lines in /etc/docker/daemon.json to change the storage driver.

{
    "storage-driver": "devicemapper"
}

Google IoT Setup

To create a new Google IoT App for EdgeScale, users can integrate the python application program with the Docker base image, edgerepos/google-iot. The base image contains Google Cloud Client for python and Google Cloud SDK.

Add this line to the Dockerfile to include the base Docker image:
FROM edgerepos/google-iot:latest

And, add user’s application program.

Please refer to Google Cloud IoT Documentation.

IBM Watson IoT Setup

To create a new IBM Watson IoT APP for EdgeScale, user can integrate the python application program with the Docker base image, edgerepos/ibm-iot. The base image contains IBM Watson IoT library for Python.

Add this line to the Dockerfile to include the base Docker image:
FROM edgerepos/ibm-iot:latest

And, add user’s application program.

Please refer to Getting started with Watson IoT Platform.