The Azure IoT Edge Dev Tool greatly simplifies your Azure IoT Edge development process. It has everything you need to get started and helps with your day-to-day Edge development.
Clone or download
LazarusX Collect template used when adding new modules (#335)
* Collect template used when adding new modules

* Remove specification of mvn template version
Latest commit 950b683 Oct 17, 2018
Permalink
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Adding issue templates (#266) Aug 20, 2018
.vscode Support adding C modules (#325) Sep 27, 2018
assets Add quickstart video (#161) Apr 18, 2018
docker Add OpenJDK and Maven to container (#330) Oct 12, 2018
iotedgedev Collect template used when adding new modules (#335) Oct 17, 2018
scripts Update gen-help-markdown.bat (#310) Aug 28, 2018
tests Collect IoT Hub hostname hash and suffix when deploying (#328) Oct 17, 2018
.env.tmp Remove DOTNET_VERBOSITY from env. Update requirements.txt. Fix push. (#… Aug 21, 2018
.gitignore Add iotedgehubdev integration (#233) Aug 15, 2018
.travis.yml Support for multiple registries (#193) Aug 11, 2018
.vsts-ci.yml Add VSTS CI Support (#280) Aug 21, 2018
CHANGELOG.md Fix wrong link in CHANGELOG Aug 28, 2018
CODE_OF_CONDUCT.md update license file, update code of conduct (#172) May 15, 2018
CONTRIBUTING.md Remove package(-lock).json as iothub-explorer should be installed glo… Sep 21, 2018
HISTORY.rst Init Commit Dec 30, 2017
LICENSE update license file, update code of conduct (#172) May 15, 2018
MANIFEST.in Update launch.json when adding modules (#262) Aug 16, 2018
Makefile Init Commit Dec 30, 2017
README.md Update quickstart for macOS Sep 20, 2018
build.sh Modify build.sh to run from Linux. (#329) Oct 8, 2018
cleanup.sh Added support for windows containers via nanoserver (#158) Aug 10, 2018
pytest.ini Configure travis for unit tests (#195) Jun 29, 2018
requirements.txt Include pypiwin32 in requirements (#302) Aug 23, 2018
requirements_dev.txt Buildupdates (#304) Aug 24, 2018
requirements_travis.txt Remove DOTNET_VERBOSITY from env. Update requirements.txt. Fix push. (#… Aug 21, 2018
setup.cfg Bump version: 0.81.0 → 0.82.0 Aug 28, 2018
setup.py Bump version: 0.81.0 → 0.82.0 Aug 28, 2018
tox.ini Modify build.sh to run from Linux. (#329) Oct 8, 2018
travis_pypi_setup.py Update to Tool and simplify pypi package name (#149) Apr 8, 2018

README.md

Azure IoT Edge Dev Tool

Travis Build Status VSTS Build Status

The IoT Edge Dev Tool greatly simplifies Azure IoT Edge development down to simple commands driven by environment variables.

  • It gets you started with IoT Edge development with the IoT Edge Dev Container and IoT Edge solution scaffolding that contains a default module and all the required configuration files.
  • It speeds up your inner-loop dev (dev, debug, test) by reducing multi-step build & deploy processes into one-line CLI commands as well as drives your outer-loop CI/CD pipeline. You can use all the same commands in both stages of your development life-cycle.

Overview

For the absolute fastest way to get started with IoT Edge Dev, please see the Quickstart section below.

For a more detailed overview of IoT Edge Dev Tool including setup and commands, please see the Wiki.

Quickstart

To set up development machines manually instead of using the IoT Edge Dev Container, please see the Manual Development Machine Setup Wiki.

This quickstart will run a container, create a solution, setup Azure resources, build and deploy modules to your device, setup and start the IoT Edge simulator, monitor messages flowing into IoT Hub, and finally deploy to the IoT Edge runtime.

The only thing you need to install is Docker. All of the other dev dependencies are included in the container.

  1. Install Docker CE

    • On Windows, only Linux containers are supported at this time. Windows container support is coming very soon! Please follow the document to open Docker Settings and setup a Shared Drive.
    • For macOS, please follow the document to choose local directories to share with your containers.
  2. Run the IoT Edge Dev Container

    Before you run the container, you will need to create a local folder to store your IoT Edge solution files.

    Windows

    mkdir c:\temp\iotedge
    docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v c:/temp/iotedge:/home/iotedge microsoft/iotedgedev
    

    Linux

    sudo mkdir /home/iotedge
    sudo docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v /home/iotedge:/home/iotedge microsoft/iotedgedev
    

    macOS

    mkdir ~/iotedge
    docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/iotedge:/home/iotedge microsoft/iotedgedev
    
  3. Initialize IoT Edge solution and setup Azure resources

    iotedgedev init

    iotedgedev init will create a solution and setup your Azure IoT Hub in a single command. The solution comes with a default C# module named filtermodule.

    More information
    1. You will see structure of current folder like below:
        │  .env
        │  .gitignore
        │  deployment.template.json
        │
        ├─.vscode
        │      launch.json
        │
        └─modules
            └─filtermodule
                │  .gitignore
                │  Dockerfile.amd64
                │  Dockerfile.amd64.debug
                │  Dockerfile.arm32v7
                │  Dockerfile.windows-amd64
                │  filtermodule.csproj
                │  module.json
                │  Program.cs
    
    1. Open .env file, you will see the IOTHUB_CONNECTION_STRING and DEVICE_CONNECTION_STRING environment variables filled correctly.

    2. Open deployment.template.json file

      1. You will see below section in the modules section:
      "filtermodule": {
          "version": "1.0",
          "type": "docker",
          "status": "running",
          "restartPolicy": "always",
          "settings": {
              "image": "${MODULES.filtermodule.amd64}",
              "createOptions": ""
          }
      }
      
      1. Two default routes are added:
      "routes": {
          "sensorTofiltermodule": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/filtermodule/inputs/input1\")",
          "filtermoduleToIoTHub": "FROM /messages/modules/filtermodule/outputs/* INTO $upstream"
      }
      
    3. You will see privacy statement like below:

      Welcome to iotedgedev!
      -------------------------
      Telemetry
      ---------
      The iotedgedev collects usage data in order to improve your experience.
      The data is anonymous and does not include commandline argument values.
      The data is collected by Microsoft.
      
      You can change your telemetry settings by updating 'collect_telemetry' to 'no' in ~/.iotedgedev/setting.ini
      
  4. Build IoT Edge module images

    sudo iotedgedev build

    More information
    1. You will see a "BUILD COMPLETE" for each module and no error messages in the terminal output.
    2. Open config/deployment.json file, you will see the module image placeholders expanded correctly.
    3. Run sudo docker image ls, you will see the module images you just built.
  5. Setup and start the IoT Edge Simulator to run the solution

    sudo iotedgedev start --setup

    IoT Edge Simulator does not support running Python and C modules yet. You'll need IoT Edge Runtime to run your Python and C modules.

    More information
    1. You will see an "IoT Edge Simulator has been started in solution mode." message at the end of the terminal output
    2. Run sudo docker ps, you will see your modules running as well as an edgeHubDev container
  6. Monitor messages sent from IoT Edge Simulator to IoT Hub

    iotedgedev monitor

    More information
    1. You will see your expected messages sending to IoT Hub

Resources

Please refer to the Wiki for details on setup, usage, and troubleshooting.

Please refer to the Contributing file for details on contributing changes.