Azure IoT EdgeHub Dev Tool
Project description
Azure IoT EdgeHub Dev Tool
The Azure IoT EdgeHub Dev Tool provide a local development experience with a simulator for creating, developing, testing, running, and debugging Azure IoT Edge modules and solutions.
- The bits/code of Edge module running on simulator and IoT Edge Runtime are same.
- The Edge solution could be run with the simulator locally without pushing image and creating IoT Edge deployment.
- The credential needed to run Edge solution on simulator is IoT Edge Device Connectionstring. And IoT Hub Connectionstring is not needed.
- It helps to debug the module on the host (not in container) with the EdgeHub
The following table compares the steps needed to run the solution on the IoT Edge Runtime and iotedgehubdev tool.
IoT Edge Runtime | iotedgehubdev | |
---|---|---|
Device Credential Needed | YES | YES |
IoT Hub Credential Needed | YES | NO |
Build Image | YES | YES |
Push Image | YES | NO |
Create Deployment | YES | NO |
Support native debug scenario | No | YES |
Installing
-
Install Docker CE (18.02.0+) on Windows, macOS or Linux.
-
Install Docker Compose (1.20.0+) (Only required for Linux. Compose has already been included in Windows/macOS Docker CE installation)
-
Install iotedgehubdev by running below command in your terminal
pip install --upgrade iotedgehubdev
Note: Please install iotedgehubdev to root on Linux/macOS (Don't use '--user' option in the 'pip install' command).
Please make sure there is no Azure IoT Edge runtime running on the same machine with iotedgehubdev since they require the same ports.
Quickstart
-
Setup
Windows
iotedgehubdev setup -c "<edge-device-connection-string>"
Linux/macOS
sudo iotedgehubdev setup -c "<edge-device-connection-string>"
-
Start/stop an IoT Edge solution in simulator
Windows
iotedgehubdev start -d <path/to/deployment-manifest> iotedgehubdev stop
Linux/macOS
sudo iotedgehubdev start -d <path/to/deployment-manifest> sudo iotedgehubdev stop
-
Start and debug a single module natively
-
Start the module with specific input(s)
Windows
iotedgehubdev start -i "<module-inputs>"
Linux/macOS
sudo iotedgehubdev start -i "<module-inputs>"
For example:
iotedgehubdev start -i "input1,input2"
-
Start the module with specific input(s) and environment variable(s)
Windows
iotedgehubdev start -i "<module-inputs>" -e "<environment-variable>"
Linux/macOS
sudo iotedgehubdev start -i "<module-inputs>" -e "<environment-variable>"
For example:
iotedgehubdev start -i "input1,input2" -e "TestEnv1=Value1" -e "TestEnv2=Value2"
-
Output the module credential environment variables
iotedgehubdev modulecred
-
Start the module natively with the environment variables got from previous step
-
Send message to the module through RESTful API.
For example:
curl --header "Content-Type: application/json" --request POST --data '{"inputName": "input1","data": "hello world"}' http://localhost:53000/api/v1/messages
-
Stop the simulator
Windows
iotedgehubdev stop
Linux/macOS
sudo iotedgehubdev stop
-
Other resources
Data/Telemetry
This project collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more.
If you don’t wish to send usage data to Microsoft, you can change your telemetry settings by updating collect_telemetry
to no
in the ini file.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file iotedgehubdev-0.12.0-py2.py3-none-any.whl
.
File metadata
- Download URL: iotedgehubdev-0.12.0-py2.py3-none-any.whl
- Upload date:
- Size: 36.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a30868e034836c1481b13cd5675da9ba580b1d49dfcbc78749ea6b063b5f94a3 |
|
MD5 | a0933a35e6fa2ebc1830227200830153 |
|
BLAKE2b-256 | 62230e1998fee2959cbcb3027d247bac9dbe08ca6876c56a43ecf9280892ce7e |