Skip to content

Commands manual

Wei Shen edited this page May 15, 2019 · 2 revisions

Scaffold and Edit

Azure IoT Edge: New IoT Edge Solution

Create a new Azure IoT Edge Solution. The created solution contains

  • Deployment template file: deployment.template.json
    • It uses parameter ${MODULES.<module>} to reference the image name of modules under modules folder. The value will be expanded when building/generating manifest for the solution.
  • Deployment template file with debug flavor: deployment.debug.template.json
    • It uses parameter ${MODULES.<module>.debug} to reference the image name of the modules under modules folder. The value will be expanded when building/generating manifest for the solution.
  • Modules folder: modules
    • It contains the module projects created based the language user specified. For each module project, besides the source code, there are several docker files created targeting for different platforms and a module.json file is created to manage the module version and the module build information.

Azure IoT Edge: Add IoT Edge Module

Add a module into the selected Azure IoT Edge Solution.

  • If the custom module type is selected (C, C#, Java, Node.js, Python, Azure Functions - C#). A module project is created under the modules folder. And the module is referenced in the deployment.template.json and deployment.debug.template.json.
  • Otherwise, just the module referenced will be added into deployment.template.json and deployment.debug.template.json

Azure IoT Edge: Build IoT Edge Module Image

Build the module docker image with specific platform (Dockerfile) user selected.

  • Platform list is populated from the "platforms" field defined in the module.json file.
  • The final image tag is generated with the fields defined in module.json with format <repository>:<version>-<platform>. For example "localhost:5000/samplemodule:0.0.1-amd64".

Azure IoT Edge: Build and Push IoT Edge Module Image

Build the module docker image with specific platform (Dockerfile) user selected. And push the result image to the docker registry.

  • Since docker push needs user login to the corresponding registry. Please make sure you have docker login the target registry before running this command.

Azure IoT Edge: Build IoT Edge Solution

Build the custom module images referenced in the deployment template file and generate the deployment manifest under ./config folder.

  • The default platform is used to pick the Dockerfile for the module is there is no explicit platform specified. (${MODULES.<module>})
  • If you would like to override the default platform. You can specify the platform like ${MODULES.<module>.<platform>}

Azure IoT Edge: Build and Push IoT Edge Solution

Azure IoT Edge: Generate IoT Edge Deployment Manifest

Azure IoT Edge: Set Default Target Platform for Edge Solution

Run Edge Solution in Simulator

Azure IoT Edge: Setup IoT Edge Simulator

Azure IoT Edge: Build and Run IoT Edge Solution in Simulator

Azure IoT Edge: Run IoT Edge Solution in Simulator

Azure IoT Edge: Start IoT Edge Hub Simulator for Single Module

Azure IoT Edge: Set Module Credentials to User Settings

Azure IoT Edge: Stop IoT Edge Simulator

Azure IoT Edge: Edit module twin

Deploy

Azure IoT Edge: Create deployment for Edge device