Please fork, branch and pull-request any changes you'd like to make.
-
Clone this repository
git clone https://github.com/azure/iotedgedev.git
-
Rename
.env.tmp
in the root of the repo to.env
and set theIOTHUB_CONNECTION_STRING
andDEVICE_CONNECTION_STRING
values to settings from your IoT Hub and Edge Device. To set these values you could runiotedgedev iothub setup
in the root of the repo. -
Install Docker
- Windows
- Be sure to check whether you are running in Linux container mode or Windows container mode.
- Linux
- We've seen some issues with docker.io. If IoT Edge doesn't run for you, then try installing Docker CE directly instead of via docker.io. Use the CE install steps, or use the convenience script.
- By default, you need
sudo
to rundocker
commands. If you want to avoid this, please follow the post-installation steps for Linux.
- Windows
-
Install Python 2.7+, Python 3.6+, and pip
- Windows: Install from Python's website
- Linux:
sudo apt-get install python-pip python3-pip
- macOS: The OpenSSL used by the system built-in Python is old and vulnerable. Please use Python installed with Homebrew.
-
Install Azure CLI 2.0
-
Install Azure CLI IoT extension
- New Install:
az extension add --name azure-iot
- Update Install:
az extension update --name azure-iot
- New Install:
-
Install Node.js and the
iothub-explorer
packagenpm i -g iothub-explorer
-
(Linux only) Install Docker Compose
pip install -U docker-compose
-
(Linux only) Install extra system dependencies
sudo apt-get install -y python2.7-dev libffi-dev libssl-dev
-
Install module dependencies
Install .NET Core SDK 2.1 or later
- Install Git
- Install Cookiecutter
pip install -U cookiecutter
- Install Node.js
- Install Yeoman and Azure IoT Edge Node.js module generator packages
npm i -g yo generator-azure-iot-edge-module
-
Install Python development dependencies
pip install -r requirements_dev.txt
-
Run IoT Edge Dev Tool in editable mode
Run the following command from the root of the repo to see changes to iotedgedev commands as you change code.
pip install -e .
VS Code Debugging works only with Python 3.6 VS Code Python Environments for now. Make sure that your VS Code Python Environment is pointing to Python 3.6
Set your CLI arguments in .vscode/launch.json and hit F5
Run the following command to run tests.
tox