iotedgedev 3.3.4__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- s/.devcontainer/Dockerfile +75 -0
- s/.devcontainer/devcontainer.json +40 -0
- s/.devcontainer/library-scripts/docker-in-docker-debian.sh +236 -0
- s/.env.tmp +108 -0
- s/.git/FETCH_HEAD +61 -0
- s/.git/HEAD +1 -0
- s/.git/config +12 -0
- s/.git/description +1 -0
- s/.git/hooks/applypatch-msg.sample +15 -0
- s/.git/hooks/commit-msg.sample +24 -0
- s/.git/hooks/fsmonitor-watchman.sample +173 -0
- s/.git/hooks/post-update.sample +8 -0
- s/.git/hooks/pre-applypatch.sample +14 -0
- s/.git/hooks/pre-commit.sample +49 -0
- s/.git/hooks/pre-merge-commit.sample +13 -0
- s/.git/hooks/pre-push.sample +53 -0
- s/.git/hooks/pre-rebase.sample +169 -0
- s/.git/hooks/pre-receive.sample +24 -0
- s/.git/hooks/prepare-commit-msg.sample +42 -0
- s/.git/hooks/push-to-checkout.sample +78 -0
- s/.git/hooks/update.sample +128 -0
- s/.git/index +0 -0
- s/.git/info/exclude +6 -0
- s/.git/logs/HEAD +1 -0
- s/.git/logs/refs/remotes/origin/EO +1 -0
- s/.git/logs/refs/remotes/origin/avagraw/security_fix +1 -0
- s/.git/logs/refs/remotes/origin/cherry-pick-rename +1 -0
- s/.git/logs/refs/remotes/origin/chyuan/fix-validation-not-fail-test +1 -0
- s/.git/logs/refs/remotes/origin/chyuan/update-linux-agent +1 -0
- s/.git/logs/refs/remotes/origin/dependabot/pip/pyyaml-5.4 +1 -0
- s/.git/logs/refs/remotes/origin/eliises/add-device-tagging-docs +1 -0
- s/.git/logs/refs/remotes/origin/main +1 -0
- s/.git/logs/refs/remotes/origin/ray-deps +1 -0
- s/.git/logs/refs/remotes/origin/ray-dev-setup +1 -0
- s/.git/logs/refs/remotes/origin/ray-tox +1 -0
- s/.git/logs/refs/remotes/origin/release-pipeline-automation +1 -0
- s/.git/logs/refs/remotes/origin/spmcdono/fix-pipeline-test-install +1 -0
- s/.git/logs/refs/remotes/origin/spmcdono/layered-deployments +1 -0
- s/.git/logs/refs/remotes/origin/spmcdono/pypi-package-test-pipeline +1 -0
- s/.git/logs/refs/remotes/origin/spmcdono/remove-py2 +1 -0
- s/.git/logs/refs/remotes/origin/spmcdono/remove-py2-dev +1 -0
- s/.git/logs/refs/remotes/origin/spmcdono/test-native-runtime-install +1 -0
- s/.git/logs/refs/remotes/origin/spmcdono/update-pipeline +1 -0
- s/.git/logs/refs/remotes/origin/user/marine/EliiseS/devcontainer +1 -0
- s/.git/logs/refs/remotes/origin/user/marine/fixsimver +1 -0
- s/.git/logs/refs/remotes/origin/user/marine/layereddeploymentsbuildtest +1 -0
- s/.git/logs/refs/remotes/origin/user/marine/master-to-main +1 -0
- s/.git/logs/refs/remotes/origin/user/marine/pipeline +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas0212/verify-tests +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas2 +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas_pypi +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas_pypi-1 +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas_testing +1 -0
- s/.git/logs/refs/remotes/origin/user/xinzed/dps_conn_str +1 -0
- s/.git/logs/refs/remotes/origin/user/xinzed/update-python-docker +1 -0
- s/.git/logs/refs/remotes/origin/vikas/azure +1 -0
- s/.git/logs/refs/remotes/origin/vikas/dependebot +1 -0
- s/.git/logs/refs/remotes/origin/xinzed/3_1_0rc1 +1 -0
- s/.git/logs/refs/remotes/origin/xinzed/update-runtime +1 -0
- s/.git/objects/pack/pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.idx +0 -0
- s/.git/objects/pack/pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.pack +0 -0
- s/.git/refs/remotes/origin/EO +1 -0
- s/.git/refs/remotes/origin/avagraw/security_fix +1 -0
- s/.git/refs/remotes/origin/cherry-pick-rename +1 -0
- s/.git/refs/remotes/origin/chyuan/fix-validation-not-fail-test +1 -0
- s/.git/refs/remotes/origin/chyuan/update-linux-agent +1 -0
- s/.git/refs/remotes/origin/dependabot/pip/pyyaml-5.4 +1 -0
- s/.git/refs/remotes/origin/eliises/add-device-tagging-docs +1 -0
- s/.git/refs/remotes/origin/main +1 -0
- s/.git/refs/remotes/origin/ray-deps +1 -0
- s/.git/refs/remotes/origin/ray-dev-setup +1 -0
- s/.git/refs/remotes/origin/ray-tox +1 -0
- s/.git/refs/remotes/origin/release-pipeline-automation +1 -0
- s/.git/refs/remotes/origin/spmcdono/fix-pipeline-test-install +1 -0
- s/.git/refs/remotes/origin/spmcdono/layered-deployments +1 -0
- s/.git/refs/remotes/origin/spmcdono/pypi-package-test-pipeline +1 -0
- s/.git/refs/remotes/origin/spmcdono/remove-py2 +1 -0
- s/.git/refs/remotes/origin/spmcdono/remove-py2-dev +1 -0
- s/.git/refs/remotes/origin/spmcdono/test-native-runtime-install +1 -0
- s/.git/refs/remotes/origin/spmcdono/update-pipeline +1 -0
- s/.git/refs/remotes/origin/user/marine/EliiseS/devcontainer +1 -0
- s/.git/refs/remotes/origin/user/marine/fixsimver +1 -0
- s/.git/refs/remotes/origin/user/marine/layereddeploymentsbuildtest +1 -0
- s/.git/refs/remotes/origin/user/marine/master-to-main +1 -0
- s/.git/refs/remotes/origin/user/marine/pipeline +1 -0
- s/.git/refs/remotes/origin/user/vikas +1 -0
- s/.git/refs/remotes/origin/user/vikas0212/verify-tests +1 -0
- s/.git/refs/remotes/origin/user/vikas2 +1 -0
- s/.git/refs/remotes/origin/user/vikas_pypi +1 -0
- s/.git/refs/remotes/origin/user/vikas_pypi-1 +1 -0
- s/.git/refs/remotes/origin/user/vikas_testing +1 -0
- s/.git/refs/remotes/origin/user/xinzed/dps_conn_str +1 -0
- s/.git/refs/remotes/origin/user/xinzed/update-python-docker +1 -0
- s/.git/refs/remotes/origin/vikas/azure +1 -0
- s/.git/refs/remotes/origin/vikas/dependebot +1 -0
- s/.git/refs/remotes/origin/xinzed/3_1_0rc1 +1 -0
- s/.git/refs/remotes/origin/xinzed/update-runtime +1 -0
- s/.git/refs/tags/v0.49.0 +1 -0
- s/.git/refs/tags/v0.50.0 +1 -0
- s/.git/refs/tags/v0.51.0 +1 -0
- s/.git/refs/tags/v0.52.0 +1 -0
- s/.git/refs/tags/v0.53.0 +1 -0
- s/.git/refs/tags/v0.54.0 +1 -0
- s/.git/refs/tags/v0.55.0 +1 -0
- s/.git/refs/tags/v0.56.0 +1 -0
- s/.git/refs/tags/v0.57.0 +1 -0
- s/.git/refs/tags/v0.58.0 +1 -0
- s/.git/refs/tags/v0.59.0 +1 -0
- s/.git/refs/tags/v0.60.0 +1 -0
- s/.git/refs/tags/v0.61.0 +1 -0
- s/.git/refs/tags/v0.62.0 +1 -0
- s/.git/refs/tags/v0.63.0 +1 -0
- s/.git/refs/tags/v0.64.0 +1 -0
- s/.git/refs/tags/v0.65.0 +1 -0
- s/.git/refs/tags/v0.66.0 +1 -0
- s/.git/refs/tags/v0.67.0 +1 -0
- s/.git/refs/tags/v0.68.0 +1 -0
- s/.git/refs/tags/v0.69.0 +1 -0
- s/.git/refs/tags/v0.70.0 +1 -0
- s/.git/refs/tags/v0.71.0 +1 -0
- s/.git/refs/tags/v0.72.0 +1 -0
- s/.git/refs/tags/v0.73.0 +1 -0
- s/.git/refs/tags/v0.74.0 +1 -0
- s/.git/refs/tags/v0.75.0 +1 -0
- s/.git/refs/tags/v0.76.0 +1 -0
- s/.git/refs/tags/v0.77.0 +1 -0
- s/.git/refs/tags/v0.78.0 +1 -0
- s/.git/refs/tags/v0.79.0 +1 -0
- s/.git/refs/tags/v0.82.0 +1 -0
- s/.git/refs/tags/v0.82.0-container +1 -0
- s/.git/refs/tags/v1.0.0 +1 -0
- s/.git/refs/tags/v1.1.0 +1 -0
- s/.git/refs/tags/v1.2.0 +1 -0
- s/.git/refs/tags/v1.3.0 +1 -0
- s/.git/refs/tags/v2.0.0 +1 -0
- s/.git/refs/tags/v2.0.1 +1 -0
- s/.git/refs/tags/v2.0.2 +1 -0
- s/.git/refs/tags/v2.1.0 +1 -0
- s/.git/refs/tags/v2.1.1 +1 -0
- s/.git/refs/tags/v2.1.2 +1 -0
- s/.git/refs/tags/v2.1.3 +1 -0
- s/.git/refs/tags/v2.1.4 +1 -0
- s/.git/refs/tags/v2.1.6 +1 -0
- s/.git/refs/tags/v2.2.0 +1 -0
- s/.git/refs/tags/v3.0.0 +1 -0
- s/.git/refs/tags/v3.0.0-rc +1 -0
- s/.git/refs/tags/v3.1.0 +1 -0
- s/.git/refs/tags/v3.1.1 +1 -0
- s/.git/refs/tags/v3.1.2 +1 -0
- s/.git/refs/tags/v3.2.0 +1 -0
- s/.git/refs/tags/v3.2.0rc0 +1 -0
- s/.git/refs/tags/v3.3.0 +1 -0
- s/.git/refs/tags/v3.3.1 +1 -0
- s/.git/refs/tags/v3.3.2 +1 -0
- s/.git/refs/tags/v3.3.3 +1 -0
- s/.git/refs/tags/v3.3.3-rc0 +1 -0
- s/.git/refs/tags/v3.3.4 +1 -0
- s/.github/ISSUE_TEMPLATE/bug_report.md +16 -0
- s/.github/ISSUE_TEMPLATE/feature_request.md +7 -0
- s/.github/workflows/wiki.yml +54 -0
- s/.gitignore +103 -0
- s/.vscode/launch.json +26 -0
- s/.vscode/settings.json +30 -0
- s/CHANGELOG.md +156 -0
- s/CODE_OF_CONDUCT.md +1 -0
- s/CONTRIBUTING.md +122 -0
- s/LICENSE +14 -0
- s/MANIFEST.in +7 -0
- s/Makefile +87 -0
- s/README.md +204 -0
- s/assets/armdeployment.png +0 -0
- s/assets/armoutputs.png +0 -0
- s/assets/deploy/ARMDeployment/ARMDeployment.deployproj +36 -0
- s/assets/deploy/ARMDeployment/Deploy-AzureResourceGroup.ps1 +118 -0
- s/assets/deploy/ARMDeployment/azuredeploy.json +145 -0
- s/assets/deploy/ARMDeployment/azuredeploy.parameters.json +6 -0
- s/assets/deploy/ARMDeployment.sln +25 -0
- s/assets/edgedevtool2mins.png +0 -0
- s/assets/edgedevtoolintro.png +0 -0
- s/assets/edgedevtoolquickstartlarge.png +0 -0
- s/assets/edgedevtoolquickstartsmall.png +0 -0
- s/assets/edgedevtoolwsl.png +0 -0
- s/azure-pipelines.yml +144 -0
- s/build/lib/iotedgedev/__init__.py +6 -0
- s/build/lib/iotedgedev/args.py +18 -0
- s/build/lib/iotedgedev/azurecli.py +542 -0
- s/build/lib/iotedgedev/buildoptionsparser.py +151 -0
- s/build/lib/iotedgedev/buildprofile.py +5 -0
- s/build/lib/iotedgedev/cli.py +830 -0
- s/build/lib/iotedgedev/connectionstring.py +58 -0
- s/build/lib/iotedgedev/constants.py +12 -0
- s/build/lib/iotedgedev/containerregistry.py +5 -0
- s/build/lib/iotedgedev/decorators.py +116 -0
- s/build/lib/iotedgedev/deploymentmanifest.py +313 -0
- s/build/lib/iotedgedev/dockercls.py +255 -0
- s/build/lib/iotedgedev/dotnet.py +31 -0
- s/build/lib/iotedgedev/edge.py +33 -0
- s/build/lib/iotedgedev/envvars.py +240 -0
- s/build/lib/iotedgedev/iothub.py +65 -0
- s/build/lib/iotedgedev/module.py +62 -0
- s/build/lib/iotedgedev/modules.py +332 -0
- s/build/lib/iotedgedev/organizedgroup.py +48 -0
- s/build/lib/iotedgedev/output.py +57 -0
- s/build/lib/iotedgedev/simulator.py +58 -0
- s/build/lib/iotedgedev/solution.py +48 -0
- s/build/lib/iotedgedev/telemetry.py +155 -0
- s/build/lib/iotedgedev/telemetryconfig.py +85 -0
- s/build/lib/iotedgedev/telemetryuploader.py +53 -0
- s/build/lib/iotedgedev/template/.env.tmp +87 -0
- s/build/lib/iotedgedev/template/.gitignore +10 -0
- s/build/lib/iotedgedev/template/deployment.template.json +79 -0
- s/build/lib/iotedgedev/template/launch_c.json +50 -0
- s/build/lib/iotedgedev/template/launch_csharp.json +43 -0
- s/build/lib/iotedgedev/template/launch_java.json +27 -0
- s/build/lib/iotedgedev/template/launch_node.json +36 -0
- s/build/lib/iotedgedev/template/launch_python.json +22 -0
- s/build/lib/iotedgedev/utility.py +179 -0
- s/build/lib/iotedgedev/version.py +4 -0
- s/build.sh +150 -0
- s/cleanup.sh +7 -0
- s/dist/iotedgedev-3.3.4-py3-none-any.whl +0 -0
- s/docker/tool/build-docker.sh +168 -0
- s/docker/tool/deps.txt +7 -0
- s/docker/tool/linux/Dockerfile +7 -0
- s/docker/tool/linux/Dockerfile.base +61 -0
- s/docker/tool/linux/install-dev.sh +8 -0
- s/docker/tool/linux/run.ps1 +5 -0
- s/docker/tool/linux/run.sh +5 -0
- s/docker/tool/push-docker.sh +35 -0
- s/docker/tool/windows/Dockerfile +4 -0
- s/docker/tool/windows/Dockerfile.base +63 -0
- s/docker/tool/windows/install-dev.bat +4 -0
- s/docker/tool/windows/run.ps1 +30 -0
- s/docs/Azure-Setup.md +102 -0
- s/docs/Command-List.md +564 -0
- s/docs/Command-Tips.md +51 -0
- s/docs/Edge-Device-Setup.md +23 -0
- s/docs/Home.md +10 -0
- s/docs/Manual-Dev-Machine-Setup.md +77 -0
- s/docs/Migration-Guides.md +131 -0
- s/docs/Overview.md +66 -0
- s/docs/Python-Virtual-Environment-Setup.md +35 -0
- s/docs/Quickstart-with-IoT-Edge-Dev-Container.md +145 -0
- s/docs/Test-Coverage.md +7 -0
- s/docs/Troubleshooting.md +21 -0
- s/docs/Usage.md +123 -0
- s/docs/_Sidebar.md +13 -0
- s/iotedgedev/__init__.py +6 -0
- s/iotedgedev/args.py +18 -0
- s/iotedgedev/azurecli.py +542 -0
- s/iotedgedev/buildoptionsparser.py +151 -0
- s/iotedgedev/buildprofile.py +5 -0
- s/iotedgedev/cli.py +830 -0
- s/iotedgedev/connectionstring.py +58 -0
- s/iotedgedev/constants.py +12 -0
- s/iotedgedev/containerregistry.py +5 -0
- s/iotedgedev/decorators.py +116 -0
- s/iotedgedev/deploymentmanifest.py +313 -0
- s/iotedgedev/dockercls.py +255 -0
- s/iotedgedev/dotnet.py +31 -0
- s/iotedgedev/edge.py +33 -0
- s/iotedgedev/envvars.py +240 -0
- s/iotedgedev/iothub.py +65 -0
- s/iotedgedev/module.py +62 -0
- s/iotedgedev/modules.py +332 -0
- s/iotedgedev/organizedgroup.py +48 -0
- s/iotedgedev/output.py +57 -0
- s/iotedgedev/simulator.py +58 -0
- s/iotedgedev/solution.py +48 -0
- s/iotedgedev/telemetry.py +155 -0
- s/iotedgedev/telemetryconfig.py +85 -0
- s/iotedgedev/telemetryuploader.py +53 -0
- s/iotedgedev/template/.env.tmp +87 -0
- s/iotedgedev/template/.gitignore +10 -0
- s/iotedgedev/template/deployment.template.json +79 -0
- s/iotedgedev/template/launch_c.json +50 -0
- s/iotedgedev/template/launch_csharp.json +43 -0
- s/iotedgedev/template/launch_java.json +27 -0
- s/iotedgedev/template/launch_node.json +36 -0
- s/iotedgedev/template/launch_python.json +22 -0
- s/iotedgedev/utility.py +179 -0
- s/iotedgedev/version.py +4 -0
- s/iotedgedev.egg-info/PKG-INFO +21 -0
- s/iotedgedev.egg-info/SOURCES.txt +100 -0
- s/iotedgedev.egg-info/dependency_links.txt +1 -0
- s/iotedgedev.egg-info/entry_points.txt +3 -0
- s/iotedgedev.egg-info/not-zip-safe +1 -0
- s/iotedgedev.egg-info/requires.txt +18 -0
- s/iotedgedev.egg-info/top_level.txt +1 -0
- s/pull_request_template.md +9 -0
- s/pytest.ini +4 -0
- s/requirements.txt +12 -0
- s/requirements_dev.txt +17 -0
- s/scripts/gen-help-markdown.bat +177 -0
- s/scripts/install-pip.sh +1 -0
- s/scripts/setup-wsl.sh +7 -0
- s/setup.cfg +18 -0
- s/setup.py +66 -0
- s/tests/__init__.py +5 -0
- s/tests/assets/deployment.manifest_invalid.json +106 -0
- s/tests/assets/deployment.manifest_invalid_createoptions.json +102 -0
- s/tests/assets/deployment.manifest_invalid_schema.json +69 -0
- s/tests/assets/deployment.template.non_str_placeholder.json +79 -0
- s/tests/assets/deployment.template_1.json +163 -0
- s/tests/assets/deployment.template_2.json +163 -0
- s/tests/assets/deployment.template_3.json +174 -0
- s/tests/assets/deployment.template_4.json +79 -0
- s/tests/assets/deployment.template_invalidresult.json +183 -0
- s/tests/assets/deployment.template_without_schema_template.json +99 -0
- s/tests/assets/launch.json +225 -0
- s/tests/assets/launch_without_nodejs.json +194 -0
- s/tests/assets/test_solution_shared_lib/.gitignore +2 -0
- s/tests/assets/test_solution_shared_lib/.vscode/launch.json +43 -0
- s/tests/assets/test_solution_shared_lib/deployment.debug.template.json +100 -0
- s/tests/assets/test_solution_shared_lib/deployment.escapedpath.template.json +90 -0
- s/tests/assets/test_solution_shared_lib/deployment.template.json +106 -0
- s/tests/assets/test_solution_shared_lib/layered_deployment.flattened_props.template.json +21 -0
- s/tests/assets/test_solution_shared_lib/layered_deployment.no_modules.template.json +12 -0
- s/tests/assets/test_solution_shared_lib/libs/sharedlib/Class1.cs +12 -0
- s/tests/assets/test_solution_shared_lib/libs/sharedlib/sharedlib.csproj +7 -0
- s/tests/assets/test_solution_shared_lib/modules/non_module_project/placeholder.txt +0 -0
- s/tests/assets/test_solution_shared_lib/modules/sample_module/.gitignore +34 -0
- s/tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.amd64 +18 -0
- s/tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.amd64.debug +25 -0
- s/tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.windows-amd64 +15 -0
- s/tests/assets/test_solution_shared_lib/modules/sample_module/Program.cs +91 -0
- s/tests/assets/test_solution_shared_lib/modules/sample_module/module.json +18 -0
- s/tests/assets/test_solution_shared_lib/modules/sample_module/sample_module.csproj +26 -0
- s/tests/assets/test_solution_shared_lib/sample_module_2/.gitignore +34 -0
- s/tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.amd64 +18 -0
- s/tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.amd64.debug +25 -0
- s/tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.windows-amd64 +15 -0
- s/tests/assets/test_solution_shared_lib/sample_module_2/Program.cs +91 -0
- s/tests/assets/test_solution_shared_lib/sample_module_2/module.json +18 -0
- s/tests/assets/test_solution_shared_lib/sample_module_2/sample_module_2.csproj +26 -0
- s/tests/test_azurecli.py +33 -0
- s/tests/test_buildoptionsparser.py +155 -0
- s/tests/test_cli.py +55 -0
- s/tests/test_config.py +28 -0
- s/tests/test_connectionstring.py +87 -0
- s/tests/test_decorators.py +44 -0
- s/tests/test_deploymentmanifest.py +106 -0
- s/tests/test_envvars.py +169 -0
- s/tests/test_iotedgedev_iothub_deploy.py +199 -0
- s/tests/test_iotedgedev_simulator.py +133 -0
- s/tests/test_iotedgedev_solution.py +457 -0
- s/tests/test_iotedgedev_solution_build.py +246 -0
- s/tests/test_iotedgedev_solution_tag.py +99 -0
- s/tests/test_utility.py +132 -0
- s/tests/utility.py +132 -0
- s/tox.ini +29 -0
- s/vsts_ci/.vsts-ci.yml +93 -0
- s/vsts_ci/darwin/continuous-build-darwin.yml +54 -0
- s/vsts_ci/linux/continuous-build-linux.yml +28 -0
- s/vsts_ci/win32/continuous-build-win32.yml +26 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Here is what you need to do to get Azure IoT Edge Dev Tool (aka `iotedgedev`) running on your dev machine manually instead of using the IoT Edge Dev Container.
|
|
2
|
+
|
|
3
|
+
If you are using a separate Edge device, like a Raspberry Pi, you do not need to run all of these steps on your IoT Edge device, you can install and setup Edge runtime directly on the device. See the [Edge Device Setup](edge-device-setup) wiki page for more information on setting up your Edge device.
|
|
4
|
+
|
|
5
|
+
> Note: See the ["Test Coverage"](test-coverage) wiki page to see what the IoT Edge Dev Tool has been tested with.
|
|
6
|
+
|
|
7
|
+
1. Install **[Docker](https://docs.docker.com/engine/installation/)**
|
|
8
|
+
- Windows
|
|
9
|
+
- Be sure to check whether you are running in Linux container mode or Windows container mode.
|
|
10
|
+
- Linux
|
|
11
|
+
- We've seen some issues with docker.io. If Edge doesn't run for you, then try installing Docker CE directly instead of via docker.io. Use the [CE install steps](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce), or use the [convenience script](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-convenience-script).
|
|
12
|
+
- By default, you need `sudo` to run `docker` commands. If you want to avoid this, please follow the [post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user).
|
|
13
|
+
|
|
14
|
+
1. Install **Python 2.7+ or Python 3.6+** and **pip** (Python 3.6 is recommended)
|
|
15
|
+
- Windows: [Install from Python's website](https://www.python.org/downloads/)
|
|
16
|
+
- Linux: `sudo apt install python-pip` or `sudo apt install python3-pip`
|
|
17
|
+
- macOS: The OpenSSL used by the system built-in Python is old and vulnerable. Please use Python installed with [Homebrew](https://docs.brew.sh/Homebrew-and-Python)
|
|
18
|
+
|
|
19
|
+
1. Install **[Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)**
|
|
20
|
+
|
|
21
|
+
1. Install **[Azure CLI IoT extension](https://github.com/Azure/azure-iot-cli-extension/)**
|
|
22
|
+
|
|
23
|
+
- New Install: `az extension add --name azure-iot`
|
|
24
|
+
- Update Install: `az extension update --name azure-iot`
|
|
25
|
+
|
|
26
|
+
1. (Python < 3.5 only) Install **[Node.js](https://nodejs.org/en/download/)** and the **`iothub-explorer`** package
|
|
27
|
+
|
|
28
|
+
- uamqp, which is needed by Azure CLI IoT extension for monitoring messages, is not supported in Python < 3.5. For Python < 3.5 users, please install [Node.js](https://nodejs.org/en/download/) and the `iothub-explorer` Node.js package: `npm i -g iothub-explorer`
|
|
29
|
+
|
|
30
|
+
1. (Raspberry Pi only) Install extra system dependencies
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
sudo apt-get install python2.7-dev libffi-dev libssl-dev -y
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
1. (Linux only) Install [Docker Compose](https://docs.docker.com/compose/)
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
pip install -U docker-compose
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
1. Install **`iotedgedev`**
|
|
43
|
+
|
|
44
|
+
> You do not need to run this on the Edge device. See the [Edge Device Setup](edge-device-setup) page for more information on setting up your Edge device.
|
|
45
|
+
|
|
46
|
+
> You can also run under a Python Virtual Environment. See the [Python Virtual Environment Setup](python-virtual-environment-setup) instructions page for details on how to set that up.
|
|
47
|
+
|
|
48
|
+
> There is a known dependency conflict between `iotedgedev` and now-deprecated `azure-iot-edge-runtime-ctl`. Please make sure you have uninstalled `azure-iot-edge-runtime-ctl` before installing `iotedgedev`: `pip uninstall azure-iot-edge-runtime-ctl `, or use a clean virtual environment.
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pip install -U iotedgedev
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
1. Install module dependencies
|
|
55
|
+
##### C# module and C# Azure Functions module
|
|
56
|
+
Install **[.NET Core SDK](https://www.microsoft.com/net/download)**.
|
|
57
|
+
> You need .NET Core SDK 2.1 or later to run it on ARM. There is no official document on installing .NET Core SDK on ARM yet, but you can follow the [ARM32v7 Dockerfile](https://github.com/dotnet/dotnet-docker/blob/master/src/sdk/3.1/buster/arm32v7/Dockerfile).
|
|
58
|
+
|
|
59
|
+
##### Python module
|
|
60
|
+
1. Install **[Git](https://git-scm.com/)**
|
|
61
|
+
2. Install **[Cookiecutter](https://github.com/audreyr/cookiecutter)**
|
|
62
|
+
```
|
|
63
|
+
pip install -U cookiecutter
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
##### Node.js module
|
|
67
|
+
1. Install **[Node.js](https://nodejs.org/en/download/)**
|
|
68
|
+
2. Install **[Yeoman](http://yeoman.io/)** and **[Azure IoT Edge Node.js module generator](https://github.com/Azure/generator-azure-iot-edge-module)** packages
|
|
69
|
+
```
|
|
70
|
+
npm i -g yo generator-azure-iot-edge-module
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
##### Java module
|
|
74
|
+
1. Install **[JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html)**
|
|
75
|
+
1. Install **[Maven](https://maven.apache.org/)**
|
|
76
|
+
|
|
77
|
+
1. Follow the [Usage Wiki](usage) to learn the usage of IoT Edge Dev Tool
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
IoT Edge Dev Tool 0.82.0 provides support for the GA release of Azure IoT Edge and other new features, while on the other hand, introduces some breaking changes to better serve these new features. If you have used IoT Edge Dev Tool during the Azure IoT Edge public preview, this document will help you migrate your code and workflow to IoT Edge Dev Tool 0.82.0.
|
|
2
|
+
|
|
3
|
+
### Retirement of `iotedgectl`
|
|
4
|
+
With the GA release of Azure IoT Edge, iotedgectl (a.k.a, [azure-iot-edge-runtime-ctl](https://pypi.org/project/azure-iot-edge-runtime-ctl/)) is retired. In IoT Edge Dev Tool 0.82.0, we replace `iotedgectl` with the IoT Edge Simulator provided by the [iotedgehubdev CLI](https://pypi.org/project/iotedgehubdev/). The `setup`, `start`, and `stop` commands will now control IoT Edge Simulator instead.
|
|
5
|
+
|
|
6
|
+
### Updated command list and options
|
|
7
|
+
IoT Edge Dev Tool 0.82.0 comes with a new CLI UX. All commands are organized into four categories: `docker`, `iothub`, `simulator`, and `solution`. The general style is **iotedgedev _category_ _command_ --_parameter_**. For some frequently used commands, there is also an **iotedgedev _command_ --_parameter_** style shortcut (only if the shortcut won't cause confusion, similar to the relationship between `docker logs` and `docker container logs`). The shortcuts also add backward compatibility with some public preview style commands.
|
|
8
|
+
|
|
9
|
+
Here is what you would see when you type `iotedgedev --help` (shortcuts are intentionally listed before the categories):
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
$ iotedgedev --help
|
|
13
|
+
Usage: iotedgedev [OPTIONS] COMMAND [ARGS]...
|
|
14
|
+
|
|
15
|
+
Options:
|
|
16
|
+
--version Show the version and exit.
|
|
17
|
+
-h, --help Show this message and exit.
|
|
18
|
+
|
|
19
|
+
Commands:
|
|
20
|
+
add Add a new module to the solution
|
|
21
|
+
build Build the solution
|
|
22
|
+
deploy Deploy solution to IoT Edge device
|
|
23
|
+
genconfig Expand environment variables and placeholders in *.template.json
|
|
24
|
+
and copy to config folder
|
|
25
|
+
init Create a new IoT Edge solution and provision Azure resources
|
|
26
|
+
log Open a new terminal window for EdgeAgent, EdgeHub and each Edge
|
|
27
|
+
module and save to LOGS_PATH
|
|
28
|
+
monitor Monitor messages from IoT Edge device to IoT Hub
|
|
29
|
+
new Create a new IoT Edge solution
|
|
30
|
+
push Push module images to container registry
|
|
31
|
+
setup Setup IoT Edge simulator. This must be done before starting
|
|
32
|
+
start Start IoT Edge simulator
|
|
33
|
+
stop Stop IoT Edge simulator
|
|
34
|
+
docker Manage Docker
|
|
35
|
+
iothub Manage IoT Hub and IoT Edge devices
|
|
36
|
+
simulator Manage IoT Edge simulator
|
|
37
|
+
solution Manage IoT Edge solutions
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Here is the help message for a category:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
$ iotedgedev solution --help
|
|
44
|
+
Usage: iotedgedev solution [OPTIONS] COMMAND [ARGS]...
|
|
45
|
+
|
|
46
|
+
Manage IoT Edge solutions
|
|
47
|
+
|
|
48
|
+
Options:
|
|
49
|
+
-h, --help Show this message and exit.
|
|
50
|
+
|
|
51
|
+
Commands:
|
|
52
|
+
add Add a new module to the solution
|
|
53
|
+
build Build the solution
|
|
54
|
+
deploy Deploy solution to IoT Edge device
|
|
55
|
+
e2e Push, deploy, start, monitor
|
|
56
|
+
genconfig Expand environment variables and placeholders in *.template.json
|
|
57
|
+
and copy to config folder
|
|
58
|
+
init Create a new IoT Edge solution and provision Azure resources
|
|
59
|
+
new Create a new IoT Edge solution
|
|
60
|
+
push Push module images to container registry
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Here is the help message for a specific command. Only the parameters relevant to the command are listed. In addition, parameter shortcuts are also added, like `-t` below for `--template`, whenever possible.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
$ iotedgedev solution add --help
|
|
67
|
+
Usage: iotedgedev add [OPTIONS] NAME
|
|
68
|
+
|
|
69
|
+
Add a new module to the solution, where NAME is the module name
|
|
70
|
+
|
|
71
|
+
Options:
|
|
72
|
+
-t, --template [c|csharp|java|nodejs|python|csharpfunction]
|
|
73
|
+
Specify the template used to create the
|
|
74
|
+
default module [default: csharp]
|
|
75
|
+
-g, --group-id TEXT (Java modules only) Specify the groupId
|
|
76
|
+
[default: com.edgemodule]
|
|
77
|
+
-h, --help Show this message and exit.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Below is a full table of the public preview commands, new commands, and shortcuts (if applicable):
|
|
81
|
+
|
|
82
|
+
Public Preview Command | New Command | Shortcut
|
|
83
|
+
-- | -- | --
|
|
84
|
+
`--set-config` | `solution genconfig` | `genconfig `
|
|
85
|
+
`solution --create --module --template` | `solution new --module/-t --template/-t` | `new`
|
|
86
|
+
`init` | `solution init` | `init`
|
|
87
|
+
`e2e` | `solution e2e` |
|
|
88
|
+
`addmodule --template` | `solution add --template/-t` | `add --template/-t`
|
|
89
|
+
`build --push --deploy` | `solution build --push/-p --deploy/-d` | `build --push/-p --deploy/-d`
|
|
90
|
+
`push --deploy --no-build` | `solution push --deploy/-d --no-build` | `push --deploy/-d --no-build`
|
|
91
|
+
`deploy` | `solution deploy` | `deploy`
|
|
92
|
+
`monitor --timeout` | `iothub monitor --timeout/-t` | `monitor --timeout/-t`
|
|
93
|
+
`azure --setup --credentials --service-principal --subscription --resource-group-location --resource-group-name --iothub-sku --iothub-name --edge-device-id --update-dotenv` | `iothub setup --credentials --service-principal --subscription --resource-group-location --resource-group-name --iothub-sku --iothub-name --edge-device-id --update-dotenv/-u` |
|
|
94
|
+
`modules --add --template` | `solution add --template` | `add --template/-t`
|
|
95
|
+
`modules --build --push --deploy` | `solution build --push/-p --deploy/-d` | `build --push/-p --deploy/-d`
|
|
96
|
+
`modules --push --deploy` | `solution push --deploy/-d --no-build` | `push --deploy/-d --no-build`
|
|
97
|
+
`modules --deploy` | `solution deploy` | `deploy`
|
|
98
|
+
`runtime --setup` | *deprecated, see [Retirement of `iotedgectl`](#retirement-of-iotedgectl) section* |
|
|
99
|
+
`runtime --start` | *deprecated, see [Retirement of `iotedgectl`](#retirement-of-iotedgectl) section* |
|
|
100
|
+
`runtime --stop` | *deprecated, see [Retirement of `iotedgectl`](#retirement-of-iotedgectl) section* |
|
|
101
|
+
`runtime --restart` | *deprecated, see [Retirement of `iotedgectl`](#retirement-of-iotedgectl) section* |
|
|
102
|
+
`runtime --status` | *deprecated, see [Retirement of `iotedgectl`](#retirement-of-iotedgectl) section* |
|
|
103
|
+
`docker --setup-registry` | `docker setup` |
|
|
104
|
+
`docker --clean --remove-modules --remove-containers --remove-images` | `docker clean --modules/-m --containers/-c --image/-i` |
|
|
105
|
+
`docker --logs --show-logs --save-logs` | `docker log --show/-l --save/-s` | `docker log --show/-l --save/-s`
|
|
106
|
+
|
|
107
|
+
### Deployment manifest template
|
|
108
|
+
IoT Edge Dev Tool 0.82.0 relies on the deployment manifest template to build the solution (see [Deprecation of `ACTIVE_MODULES`](#deprecation-of-active_modules) section for details). By default, it's the `deployment.template.json` file in the root of the solution folder, but you can also customize it with the `DEPLOYMENT_CONFIG_TEMPLATE_FILE` environment variable. The major difference between deployment manifest template and deployment manifest is that module image URLs in deployment manifest template can be placeholders (whose format looks like `${MODULES.filtermodule.amd64}`). The image placeholders can help you easily update the referenced module and image platform without typing lengthy image URLs. When building solutions, IoT Edge Dev Tool will parse the image placeholders, expand them with the actual image URLs and save the results in the deployment manifest in the config output folder. By default, it's the `deployment.json` file in the `config` folder, but you can also customize it with the `DEPLOYMENT_CONFIG_FILE` and `CONFIG_OUTPUT_DIR` environment variables. In addition, when adding modules, IoT Edge Dev Tool will add a corresponding section for the module in the deployment manifest template with `${MODULES.<module-name>.amd64}` as the image.
|
|
109
|
+
|
|
110
|
+
To migrate your solutions created in the public preview to leverage the new build process, you can rename your deployment manifest, and update the images of the modules which you want to build with the corresponding image placeholders.
|
|
111
|
+
|
|
112
|
+
### New module folder structure
|
|
113
|
+
IoT Edge Dev Tool now calls module templates when adding new modules to the solution. For C# module developers, you don't need to execute `dotnet new` commands yourself. You only need to execute `iotedgedev add` command, specify the module name and template (for example, `csharp` or `csharpfunction`). IoT Edge Dev Tool will scaffold a new module from the template, save the module files in the `${MODULES_PATH}/<module-name>` folder (`modules/<module-name>` by default), and update the deployment manifest template for you. In each module folder, there are now four types of files:
|
|
114
|
+
* Module code files, for example, `Program.cs` and `*.csproj`
|
|
115
|
+
* Dockerfiles for each platform, for example, `Dockerfile.amd64`, `Dockerfile.amd64.debug` and `Dockerfile.arm32v7`
|
|
116
|
+
* `module.json` file which specifies the meta-data of the module, including image repository, mapping between platforms and Dockerfiles, and build options.
|
|
117
|
+
* Miscellaneous files, for example, `.gitignore`.
|
|
118
|
+
|
|
119
|
+
To migrate your modules created in the public preview to work with IoT Edge Dev Tool 0.82.0, you need to create a module.json file from [here](https://github.com/Azure/dotnet-template-azure-iot-edge-module/blob/master/content/dotnet-template-azure-iot-edge-module/CSharp/module.json), update the `repository` as the module image repository such as `myregistry.azurecr.io/filtermodule`, or with environment variable placeholders `${CONTAINER_REGISTRY_SERVER}/filtermodule`. Next you need to update the `platforms` dictionary to make sure that platform-Dockerfile mapping is correct. The built module image will have the tag format `<repository>:<version>-<platform>`, for example `myregistry.azurecr.io/filtermodule:0.0.1-amd64`.
|
|
120
|
+
|
|
121
|
+
### Building code in Dockerfiles
|
|
122
|
+
The recent releases of IoT Edge module templates ship with Dockerfiles which will build the code binaries in the containers. For example, C# module developers now don't need to run `dotnet build` or `dotnet publish` on their development machine. A single `docker build` command will build the binaries in the container and copy them to the final module image. You can check the C# module template Dockerfile [here](https://github.com/Azure/dotnet-template-azure-iot-edge-module/blob/master/content/dotnet-template-azure-iot-edge-module/CSharp/Dockerfile.amd64), which leverages Docker's [multi-stage build feature](https://docs.docker.com/develop/develop-images/multistage-build/). On the other hand, IoT Edge Dev Tool is continuously adding support for modules in more languages such as Node.js and Python, with diverse steps to build. As a result, the `iotedgedev build` command will only build the Dockerfiles, but not run language-specific building commands.
|
|
123
|
+
|
|
124
|
+
### Deprecation of `ACTIVE_MODULES`
|
|
125
|
+
With the full support of deployment manifest template for module management, IoT Edge Dev Tool 0.82.0 now comes with new logic of determining which Dockerfiles to build. The `ACTIVE_MODULES` environment variable will be replaced by the image placeholders (whose format looks like `${MODULES.filtermodule.amd64}`) in deployment manifest template, and the `BYPASS_MODULES` and `ACTIVE_DOCKER_PLATFORMS` environment variables jointly. IoT Edge Dev Tool will built a Dockerfile if it meets either of the following two requirements:
|
|
126
|
+
1. The module name is not in `BYPASS_MODULES`, and a module specifies `${MODULES.<module-name>.<platform>}` as its image in the deployment manifest template.
|
|
127
|
+
1. The module name is not in `BYPASS_MODULES`, and the platform is in `ACTIVE_DOCKER_PLATFORMS`.
|
|
128
|
+
|
|
129
|
+
The default value of `BYPASS_MODULES` and `ACTIVE_DOCKER_PLATFORM` are both `""`, which means you only need to update the deployment manifest template to specify which Dockerfiles to build. Although this will serve most requirements, you are free to update `BYPASS_MODULES` and `ACTIVE_DOCKER_PLATFORM` for your specific scenarios.
|
|
130
|
+
|
|
131
|
+
### Misc
|
s/docs/Overview.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
The **Azure IoT Edge Dev Tool** enables you to do all of the following with simple one-line CLI commands.
|
|
2
|
+
|
|
3
|
+
1. **Start Container**:
|
|
4
|
+
|
|
5
|
+
`docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v c:/temp/iotedge:/home/iotedge microsoft/iotedgedev`
|
|
6
|
+
|
|
7
|
+
This container includes all of the dependencies you need for IoT Edge development, including:
|
|
8
|
+
|
|
9
|
+
- Docker
|
|
10
|
+
- Python
|
|
11
|
+
- Pip
|
|
12
|
+
- Azure CLI
|
|
13
|
+
- Git
|
|
14
|
+
- .NET Core SDK
|
|
15
|
+
- OpenJDK
|
|
16
|
+
- Node.js
|
|
17
|
+
- [C# module template](https://www.nuget.org/packages/Microsoft.Azure.IoT.Edge.Module/)
|
|
18
|
+
- Maven (for scaffolding [Java modules](https://github.com/Microsoft/azure-maven-archetypes/tree/master/azure-iot-edge-archetype))
|
|
19
|
+
- [Yeoman](http://yeoman.io/) and [Node.js module template](https://www.npmjs.com/package/generator-azure-iot-edge-module)
|
|
20
|
+
- [Cookiecutter](https://cookiecutter.readthedocs.io/en/latest/) (for scaffolding [Python modules](https://github.com/Azure/cookiecutter-azure-iot-edge-module))
|
|
21
|
+
- [C# Functions module template](https://www.nuget.org/packages/Microsoft.Azure.IoT.Edge.Function/)
|
|
22
|
+
|
|
23
|
+
You can also directly install with: `pip install iotedgedev`
|
|
24
|
+
|
|
25
|
+
1. **Create Solution**: Create a new IoT Edge Solution that includes a sample module and all the the required configuration files.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
iotedgedev new edgesolution`
|
|
29
|
+
cd edgesolution
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
1. **Setup Azure**: Creates or selects your Azure IoT Hub and Edge Device and updates your Environment Variables.
|
|
33
|
+
|
|
34
|
+
`iotedgedev iothub setup`
|
|
35
|
+
|
|
36
|
+
> This must be run from the root of your solution, so make sure you cd into the `edgesolution1` folder before you run this command.
|
|
37
|
+
|
|
38
|
+
1. **Build, Push & Deploy**: Build, Push and Deploy modules:
|
|
39
|
+
|
|
40
|
+
`iotedgedev push --deploy`
|
|
41
|
+
|
|
42
|
+
> This will run `iotedgedev build`, `iotedgedev push`, and `iotedgedev deploy` on deployment.template.json targeting amd64 platform. You can use the `--file` and `--platform` parameters to change this behavior.
|
|
43
|
+
|
|
44
|
+
If your module is included in the `BYPASS_MODULES` environment variable, or not included in the deployment manifest template, then the `iotedgedev build` and `iotedgedev push` steps will be skipped.
|
|
45
|
+
|
|
46
|
+
1. **Setup**: Setup the IoT Edge Simulator (provided by the [iotedgehubdev](https://pypi.org/project/iotedgehubdev/) tool):
|
|
47
|
+
|
|
48
|
+
`iotedgedev setup`
|
|
49
|
+
|
|
50
|
+
1. **Start**: Start IoT Edge Simulator:
|
|
51
|
+
|
|
52
|
+
`iotedgedev start -f config/deployment.amd64.json`
|
|
53
|
+
|
|
54
|
+
1. **View Messages**: View Messages Sent from IoT Edge to IoT Hub:
|
|
55
|
+
|
|
56
|
+
`iotedgedev monitor`
|
|
57
|
+
|
|
58
|
+
1. **View Logs**: View and Save Docker log files:
|
|
59
|
+
|
|
60
|
+
`iotedgedev docker log`
|
|
61
|
+
|
|
62
|
+
1. **Setup Custom Registry**: Use a Custom Container Registry:
|
|
63
|
+
|
|
64
|
+
`iotedgedev docker setup-registry`
|
|
65
|
+
|
|
66
|
+
Please see [Azure IoT Edge Dev Resources](https://github.com/Azure/iotedgedev) for links to official docs and other IoT Edge dev information.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
You can run IoT Edge Dev Tool inside a [Python Virtual Environment](https://docs.python.org/3/tutorial/venv.html). A Python virtual environment is a self-contained directory tree that contains a Python installation for a particular version of Python, plus a number of additional packages.
|
|
2
|
+
|
|
3
|
+
1. Install `virtualenv`
|
|
4
|
+
|
|
5
|
+
`pip install virtualenv`
|
|
6
|
+
|
|
7
|
+
1. Create a virtual environment
|
|
8
|
+
|
|
9
|
+
`virtualenv venv`
|
|
10
|
+
|
|
11
|
+
> `venv` is just a env name that can be anything you want, but we recommend sticking with `venv` if you want to contribute to IoT Edge Dev Tool because the `.gitignore` file excludes it.
|
|
12
|
+
|
|
13
|
+
> To create a virtual environment with a Python version different with your system default, just use the `--python/-p` option to specify the Python executable path, *e.g.*:
|
|
14
|
+
> ```
|
|
15
|
+
> virtualenv --python /usr/bin/python2.7 py27
|
|
16
|
+
> ```
|
|
17
|
+
|
|
18
|
+
1. Activate the virtual environment
|
|
19
|
+
|
|
20
|
+
- Windows
|
|
21
|
+
- cmd.exe: `venv\Scripts\activate.bat`
|
|
22
|
+
- PowerShell: `venv\Scripts\activate.ps1` (You may need to run `Set-ExecutionPolicy RemoteSigned` in an Administrator Powershell first to allow scripts to run)
|
|
23
|
+
|
|
24
|
+
- Posix: `source venv/bin/activate`
|
|
25
|
+
> It will be active until you deactivate it or close the terminal instance.
|
|
26
|
+
|
|
27
|
+
1. Install dependencies
|
|
28
|
+
|
|
29
|
+
Continue with the instructions above starting with the [Manual Dev Machine Setup](manual-dev-machine-setup) -> Install Dependencies.
|
|
30
|
+
|
|
31
|
+
1. Deactivate the virtual environment
|
|
32
|
+
|
|
33
|
+
When you are done with your virtualenv, you can deactivate it with the follow command:
|
|
34
|
+
|
|
35
|
+
`deactivate`
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Here is the absolute fastest way to get IoT Edge Dev Tool (aka `iotedgedev`) running on your dev machine with the IoT Edge Dev Container.
|
|
2
|
+
|
|
3
|
+
You can use the IoT Edge Dev Tool container to avoid having to install all the dependencies on your local dev machine. The only thing you need to install is Docker. All of the other dev dependencies are included in the container.
|
|
4
|
+
|
|
5
|
+
1. **Install [Docker CE](https://docs.docker.com/install/)**
|
|
6
|
+
|
|
7
|
+
- For Windows, please follow [the document](https://docs.docker.com/docker-for-windows/#shared-drives) to open Docker Settings and setup a Shared Drive.
|
|
8
|
+
- For macOS, please follow [the document](https://docs.docker.com/docker-for-mac/#file-sharing) to choose local directories to share with your containers.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
1. **Run the IoT Edge Dev Container**
|
|
12
|
+
|
|
13
|
+
Before you run the container, you will need to create a local folder to store your IoT Edge solution files.
|
|
14
|
+
|
|
15
|
+
**Windows**
|
|
16
|
+
```
|
|
17
|
+
mkdir c:\temp\iotedge
|
|
18
|
+
docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v c:/temp/iotedge:/home/iotedge microsoft/iotedgedev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Linux**
|
|
22
|
+
```
|
|
23
|
+
sudo mkdir /home/iotedge
|
|
24
|
+
sudo docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/iotedge:/home/iotedge microsoft/iotedgedev
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**macOS**
|
|
28
|
+
```
|
|
29
|
+
mkdir ~/iotedge
|
|
30
|
+
docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/iotedge:/home/iotedge microsoft/iotedgedev
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
1. **Initialize IoT Edge solution and setup Azure resources**
|
|
34
|
+
|
|
35
|
+
`iotedgedev init`
|
|
36
|
+
|
|
37
|
+
> `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`.
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary>More information</summary>
|
|
41
|
+
|
|
42
|
+
1. You will see structure of current folder like below:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
│ .env
|
|
46
|
+
│ .gitignore
|
|
47
|
+
│ deployment.debug.template.json
|
|
48
|
+
│ deployment.template.json
|
|
49
|
+
│
|
|
50
|
+
├─.vscode
|
|
51
|
+
│ launch.json
|
|
52
|
+
│
|
|
53
|
+
└─modules
|
|
54
|
+
└─filtermodule
|
|
55
|
+
│ .gitignore
|
|
56
|
+
│ Dockerfile.amd64
|
|
57
|
+
│ Dockerfile.amd64.debug
|
|
58
|
+
│ Dockerfile.arm32v7
|
|
59
|
+
│ Dockerfile.windows-amd64
|
|
60
|
+
│ filtermodule.csproj
|
|
61
|
+
│ module.json
|
|
62
|
+
│ Program.cs
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
2. Open `.env` file, you will see the `IOTHUB_CONNECTION_STRING` and `DEVICE_CONNECTION_STRING` environment variables filled correctly.
|
|
66
|
+
3. Open `deployment.template.json` file
|
|
67
|
+
1. You will see below section in the modules section:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
"filtermodule": {
|
|
71
|
+
"version": "1.0",
|
|
72
|
+
"type": "docker",
|
|
73
|
+
"status": "running",
|
|
74
|
+
"restartPolicy": "always",
|
|
75
|
+
"settings": {
|
|
76
|
+
"image": "${MODULES.filtermodule}",
|
|
77
|
+
"createOptions": ""
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
2. Two default routes are added:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
"routes": {
|
|
86
|
+
"sensorTofiltermodule": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/filtermodule/inputs/input1\")",
|
|
87
|
+
"filtermoduleToIoTHub": "FROM /messages/modules/filtermodule/outputs/* INTO $upstream"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
4. You will see privacy statement like below:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Welcome to iotedgedev!
|
|
95
|
+
-------------------------
|
|
96
|
+
Telemetry
|
|
97
|
+
---------
|
|
98
|
+
The iotedgedev collects usage data in order to improve your experience.
|
|
99
|
+
The data is anonymous and does not include commandline argument values.
|
|
100
|
+
The data is collected by Microsoft.
|
|
101
|
+
|
|
102
|
+
You can change your telemetry settings by updating 'collect_telemetry' to 'no' in ~/.iotedgedev/setting.ini
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</details>
|
|
106
|
+
|
|
107
|
+
1. **Build IoT Edge module images**
|
|
108
|
+
|
|
109
|
+
`sudo iotedgedev build`
|
|
110
|
+
|
|
111
|
+
> This step will build user modules in deployment.template.json targeting amd64 platform. You can use the `--file` and `--platform` parameters to change this behavior.
|
|
112
|
+
|
|
113
|
+
<details>
|
|
114
|
+
<summary>More information</summary>
|
|
115
|
+
|
|
116
|
+
1. You will see a "BUILD COMPLETE" for each module and no error messages in the terminal output.
|
|
117
|
+
2. Open `config/deployment.amd64.json` file, you will see the module image placeholders expanded correctly.
|
|
118
|
+
3. Run `sudo docker image ls`, you will see the module images you just built.
|
|
119
|
+
|
|
120
|
+
</details>
|
|
121
|
+
|
|
122
|
+
1. **Setup and start the IoT Edge Simulator to run the solution**
|
|
123
|
+
|
|
124
|
+
`sudo iotedgedev start --setup --file config/deployment.amd64.json`
|
|
125
|
+
|
|
126
|
+
> 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.
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary>More information</summary>
|
|
130
|
+
|
|
131
|
+
1. You will see an "IoT Edge Simulator has been started in solution mode." message at the end of the terminal output
|
|
132
|
+
2. Run `sudo docker ps`, you will see your modules running as well as an edgeHubDev container
|
|
133
|
+
|
|
134
|
+
</details>
|
|
135
|
+
|
|
136
|
+
1. **Monitor messages sent from IoT Edge Simulator to IoT Hub**
|
|
137
|
+
|
|
138
|
+
`iotedgedev monitor`
|
|
139
|
+
|
|
140
|
+
<details>
|
|
141
|
+
<summary>More information</summary>
|
|
142
|
+
|
|
143
|
+
1. You will see your expected messages sending to IoT Hub
|
|
144
|
+
|
|
145
|
+
</details>
|
s/docs/Test-Coverage.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
This module has been tested with the following:
|
|
2
|
+
- Windows 10 April 2018 Update
|
|
3
|
+
- Ubuntu 16.04
|
|
4
|
+
- macOS High Sierra 10.13.6
|
|
5
|
+
- Raspberry Pi with Raspbian Stretch
|
|
6
|
+
- Python 2.7.13, Python 3.6.5 and Python 3.7.0
|
|
7
|
+
- Docker Version 18.06.1-ce-win73 (19507), Channel: stable, b0f14f1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
1. `Invalid Reference Format`
|
|
2
|
+
```
|
|
3
|
+
500 Server Error: Internal Server Error for url: http+docker://localunixsocket/v1.30/images
|
|
4
|
+
500 Server Error: Internal Server Error ("invalid reference format")
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
Solution: You likely installed Docker via `sudo apt install docker.io`. Use the proper steps for [CE here](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce), or use the [convenience script](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-convenience-script).
|
|
8
|
+
|
|
9
|
+
1. `('Connection aborted.', error(2, 'No such file or directory'))`
|
|
10
|
+
|
|
11
|
+
This means that you have likely do not have `DOCKER_HOST` Environment Variable set.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
ERROR: Could not login to Container Registry. Please verify your credentials in CONTAINER_REGISTRY_ environment variables.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
('Connection aborted.', error(2, 'No such file or directory'))
|
|
19
|
+
ERROR: Could not connect to docker daemon.
|
|
20
|
+
ERROR: Docker is unavailable
|
|
21
|
+
CRITICAL: IoT Edge dependency not available: docker
|
s/docs/Usage.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Usage
|
|
2
|
+
|
|
3
|
+
You can use the IoT Edge Dev Tool container to avoid having to install all the dependencies on your local dev machine. The only thing you need to install is Docker. All of the other dev dependencies are included in the container. Please see the [Quickstart](quickstart-with-IoT-Edge-Dev-Container) to learn more.
|
|
4
|
+
|
|
5
|
+
To set up development machines manually instead of using the IoT Edge Dev Container, please see the [Manual Development Machine Setup Wiki](manual-Dev-Machine-Setup).
|
|
6
|
+
|
|
7
|
+
If you are using a separate Edge device, like a Raspberry Pi, you do not need to run all of these steps on your IoT Edge device, you can install and setup Edge runtime directly on the device. See the [Edge Device Setup](edge-device-setup) wiki page for more information on setting up your Edge device.
|
|
8
|
+
|
|
9
|
+
Note: See the ["Test Coverage"](test-coverage) wiki page to see what the IoT Edge Dev Tool has been tested with.
|
|
10
|
+
|
|
11
|
+
1. **Initialize IoT Edge solution and setup Azure resources**
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
iotedgedev init
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`iotedgedev init` will run both `iotedgedev new .` and `iotedgedev iothub setup`, which will create a new solution and setup your Azure resources in a single command.
|
|
18
|
+
|
|
19
|
+
If you want to use your existing IoT Hub and IoT Edge device, you can run `iotedgedev new .`, and update the `.env` file with the IoT Hub connection string and IoT Edge device connection string.
|
|
20
|
+
|
|
21
|
+
`iotedgedev init` and `iotedgedev new .` will add a default C# module named `filtermodule` to the solution. To customize this behavior, append the parameters `--module <module-name--template <template>`.
|
|
22
|
+
|
|
23
|
+
1. **Add modules to IoT Edge solution**
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
iotedgedev add <module-name--template <template>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Currently the available template values are `c`, `csharp`, `java`, `nodejs`, `python`, `csharpfunction`. We are working on supporting more templates.
|
|
30
|
+
|
|
31
|
+
1. **Build IoT Edge module images**
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
sudo iotedgedev build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
You can avoid `sudo` if you are running IoT Edge Dev Tool outside Docker container, and:
|
|
38
|
+
* You are on Windows or macOS.
|
|
39
|
+
* You are on Linux, and you have followed the [post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) to allow running Docker commands without `sudo`.
|
|
40
|
+
|
|
41
|
+
1. **Setup the [IoT Edge Simulator]((https://pypi.org/project/iotedgehubdev/).)**
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
sudo iotedgedev setup
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
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.
|
|
48
|
+
|
|
49
|
+
You can avoid `sudo` if you are on Windows, and running IoT Edge Dev Tool outside Docker container.
|
|
50
|
+
|
|
51
|
+
1. **Start the IoT Edge Simulator to run the solution**
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
sudo iotedgedev start
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
You can also combine setup and start with `sudo iotedgedev start --setup`
|
|
58
|
+
|
|
59
|
+
You can avoid `sudo` if you are running IoT Edge Dev Tool outside Docker container, and:
|
|
60
|
+
* You are on Windows or macOS.
|
|
61
|
+
* You are on Linux, and you have followed the [post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) to allow running Docker commands without `sudo`.
|
|
62
|
+
|
|
63
|
+
1. **Monitor messages sent from IoT Edge Simulator to IoT Hub**
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
iotedgedev monitor
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
1. **Stop the IoT Edge Simulator**
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
sudo iotedgedev stop
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
You can avoid `sudo` if you are running IoT Edge Dev Tool outside Docker container, and:
|
|
76
|
+
* You are on Windows or macOS.
|
|
77
|
+
* You are on Linux, and you have followed the [post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) to allow running Docker commands without `sudo`.
|
|
78
|
+
|
|
79
|
+
1. **Setup the IoT Edge Runtime**
|
|
80
|
+
|
|
81
|
+
1. Copy the device connection string from the `DEVICE_CONNECTION_STRING` environment variable in the `.env` file, [Azure Portal](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-register-device-portal#retrieve-the-connection-string), or [Azure CLI](https://docs.microsoft.com/en-us/azure/iot-edge/how-to-register-device-cli#retrieve-the-connection-string).
|
|
82
|
+
1. Follow [Edge Device Setup](edge-device-setup) to setup and start the IoT Edge Runtime with the copied device connection string
|
|
83
|
+
|
|
84
|
+
1. **Push IoT Edge module images**
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
sudo iotedgedev push
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
You can avoid `sudo` if you are running IoT Edge Dev Tool outside Docker container, and:
|
|
91
|
+
* You are on Windows or macOS.
|
|
92
|
+
* You are on Linux, and you have followed the [post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) to allow running Docker commands without `sudo`.
|
|
93
|
+
|
|
94
|
+
1. **Deploy modules to IoT Edge device**
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
iotedgedev deploy
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
You can also combine push and deploy with `iotedgedev push --deploy`
|
|
101
|
+
|
|
102
|
+
1. **Deploy modules with automatic deployments to IoT Hub**
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
iotedgedev iothub deploy --name TEXT --priority TEXT --target-condition TEXT
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
You can also combine tagging the device and deploy with the `--device-tag TEXT` flag
|
|
109
|
+
|
|
110
|
+
> More information on how automatic deployments work can be found here: <https://docs.microsoft.com/en-us/azure/iot-edge/module-deployment-monitoring?view=iotedge-2020-11>
|
|
111
|
+
|
|
112
|
+
1. **Tag IoT Edge Device**
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
iotedgedev solution tag --tags TEXT
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
1. **Monitor messages sent from IoT Edge Runtime to IoT Hub**
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
iotedgedev monitor
|
|
123
|
+
```
|
s/docs/_Sidebar.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
* [Home](home)
|
|
2
|
+
* Dev Machine Setup
|
|
3
|
+
* [Quickstart with IoT Edge Dev Container](quickstart-with-iot-edge-dev-container)
|
|
4
|
+
* [Manual Setup](manual-dev-machine-setup)
|
|
5
|
+
* [Azure Setup](azure-setup)
|
|
6
|
+
* [Edge Device Setup](edge-device-setup)
|
|
7
|
+
* [Command List](command-list)
|
|
8
|
+
* [Python Virtual Environment Setup](python-virtual-environment-setup)
|
|
9
|
+
* [Test Coverage](test-coverage)
|
|
10
|
+
* [Troubleshooting](troubleshooting)
|
|
11
|
+
* [Contributing](https://github.com/Azure/iotedgedev/blob/main/CONTRIBUTING.md)
|
|
12
|
+
* Misc
|
|
13
|
+
* [Migration Guides for Public Preview Users](migration-guides)
|
s/iotedgedev/__init__.py
ADDED
s/iotedgedev/args.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
# We had to implement this custom arg parsing class because Click doesn't have a handler to detect command before any arguments are parsed,
|
|
4
|
+
# which we need for the dotenv load command. We don't want to load dotenv for some commands and we terse output for other commands.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Args():
|
|
8
|
+
def get_current_command(self):
|
|
9
|
+
if sys.argv and len(sys.argv) > 1 and not self.is_info_command():
|
|
10
|
+
return ' '.join(sys.argv[1:]).strip()
|
|
11
|
+
else:
|
|
12
|
+
return ''
|
|
13
|
+
|
|
14
|
+
def is_info_command(self):
|
|
15
|
+
for arg in sys.argv:
|
|
16
|
+
if arg.startswith('--version') or arg.startswith('-h') or arg.startswith('--help'):
|
|
17
|
+
return True
|
|
18
|
+
return False
|