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
s/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Azure IoT Edge Dev Tool
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/iotedgedev)
|
|
4
|
+
[](https://dev.azure.com/Azure-IoT-DDE-EdgeExperience/IoTEdgeDev/_build/latest?definitionId=35&branchName=main)
|
|
5
|
+
|
|
6
|
+
The **IoT Edge Dev Tool** greatly simplifies [Azure IoT Edge](https://azure.microsoft.com/en-us/services/iot-edge/) development down to simple commands driven by environment variables.
|
|
7
|
+
|
|
8
|
+
- It gets you started with IoT Edge development with the [IoT Edge Dev Container](https://hub.docker.com/r/microsoft/iotedgedev/) and IoT Edge solution scaffolding that contains a default module and all the required configuration files.
|
|
9
|
+
- 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._
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
For the absolute fastest way to get started with IoT Edge Dev, please see the [Quickstart](#quickstart) section below.
|
|
13
|
+
|
|
14
|
+
For a more detailed overview of IoT Edge Dev Tool including setup and commands, please see the [Wiki](https://github.com/Azure/iotedgedev/wiki).
|
|
15
|
+
|
|
16
|
+
## Quickstart
|
|
17
|
+
|
|
18
|
+
> To set up development machines manually instead of using the IoT Edge Dev Container, please see the [Manual Development Machine Setup Wiki](https://github.com/Azure/iotedgedev/wiki/manual-dev-machine-setup).
|
|
19
|
+
|
|
20
|
+
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.
|
|
21
|
+
|
|
22
|
+
<!-- Here's a 3 minute video walk-through of this Quickstart:
|
|
23
|
+
|
|
24
|
+
[](https://aka.ms/iotedgedevquickstart) -->
|
|
25
|
+
|
|
26
|
+
The only thing you need to install is Docker. All of the other dev dependencies are included in the container.
|
|
27
|
+
|
|
28
|
+
1. **Install [Docker CE](https://docs.docker.com/install/)**
|
|
29
|
+
|
|
30
|
+
- For Windows, please follow [the document](https://docs.docker.com/docker-for-windows/#shared-drives) to open Docker Settings and setup a Shared Drive.
|
|
31
|
+
- For macOS, please follow [the document](https://docs.docker.com/docker-for-mac/#file-sharing) to choose local directories to share with your containers.
|
|
32
|
+
|
|
33
|
+
Note: If the device is behind the proxy server, you can set the [proxy manually](https://docs.docker.com/network/proxy/#configure-the-docker-client)
|
|
34
|
+
|
|
35
|
+
1. **Run the IoT Edge Dev Container**
|
|
36
|
+
|
|
37
|
+
Before you run the container, you will need to create a local folder to store your IoT Edge solution files.
|
|
38
|
+
|
|
39
|
+
**Windows**
|
|
40
|
+
```
|
|
41
|
+
mkdir c:\temp\iotedge
|
|
42
|
+
docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v c:/temp/iotedge:/home/iotedge mcr.microsoft.com/iotedge/iotedgedev
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Linux**
|
|
46
|
+
```
|
|
47
|
+
sudo mkdir /home/iotedge
|
|
48
|
+
sudo docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/iotedge:/home/iotedge mcr.microsoft.com/iotedge/iotedgedev
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**macOS**
|
|
52
|
+
```
|
|
53
|
+
mkdir ~/iotedge
|
|
54
|
+
docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/iotedge:/home/iotedge mcr.microsoft.com/iotedge/iotedgedev
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
1. **Initialize IoT Edge solution and setup Azure resources**
|
|
58
|
+
|
|
59
|
+
`iotedgedev init`
|
|
60
|
+
|
|
61
|
+
> `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`.
|
|
62
|
+
|
|
63
|
+
<details>
|
|
64
|
+
<summary>More information</summary>
|
|
65
|
+
|
|
66
|
+
1. You will see structure of current folder like below:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
│ .env
|
|
70
|
+
│ .gitignore
|
|
71
|
+
│ deployment.debug.template.json
|
|
72
|
+
│ deployment.template.json
|
|
73
|
+
│
|
|
74
|
+
├─.vscode
|
|
75
|
+
│ launch.json
|
|
76
|
+
│
|
|
77
|
+
└─modules
|
|
78
|
+
└─filtermodule
|
|
79
|
+
│ .gitignore
|
|
80
|
+
│ Dockerfile.amd64
|
|
81
|
+
│ Dockerfile.amd64.debug
|
|
82
|
+
│ Dockerfile.arm32v7
|
|
83
|
+
│ Dockerfile.windows-amd64
|
|
84
|
+
│ filtermodule.csproj
|
|
85
|
+
│ module.json
|
|
86
|
+
│ Program.cs
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
2. Open `.env` file, you will see the `IOTHUB_CONNECTION_STRING` and `DEVICE_CONNECTION_STRING` environment variables filled correctly.
|
|
90
|
+
3. Open `deployment.template.json` file
|
|
91
|
+
1. You will see below section in the modules section:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
"filtermodule": {
|
|
95
|
+
"version": "1.0",
|
|
96
|
+
"type": "docker",
|
|
97
|
+
"status": "running",
|
|
98
|
+
"restartPolicy": "always",
|
|
99
|
+
"settings": {
|
|
100
|
+
"image": "${MODULES.filtermodule}",
|
|
101
|
+
"createOptions": {}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
2. Two default routes are added:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
"routes": {
|
|
110
|
+
"sensorTofiltermodule": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/filtermodule/inputs/input1\")",
|
|
111
|
+
"filtermoduleToIoTHub": "FROM /messages/modules/filtermodule/outputs/* INTO $upstream"
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
4. You will see privacy statement like below:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Welcome to iotedgedev!
|
|
119
|
+
-------------------------
|
|
120
|
+
Telemetry
|
|
121
|
+
---------
|
|
122
|
+
The iotedgedev collects usage data in order to improve your experience.
|
|
123
|
+
The data is anonymous and does not include commandline argument values.
|
|
124
|
+
The data is collected by Microsoft.
|
|
125
|
+
|
|
126
|
+
You can change your telemetry settings by updating 'collect_telemetry' to 'no' in ~/.iotedgedev/setting.ini
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</details>
|
|
130
|
+
|
|
131
|
+
1. **Build IoT Edge module images**
|
|
132
|
+
|
|
133
|
+
`sudo iotedgedev build`
|
|
134
|
+
|
|
135
|
+
> This step will build user modules in deployment.template.json targeting amd64 platform.
|
|
136
|
+
|
|
137
|
+
<details>
|
|
138
|
+
<summary>More information</summary>
|
|
139
|
+
|
|
140
|
+
1. You will see a "BUILD COMPLETE" for each module and no error messages in the terminal output.
|
|
141
|
+
1. Open `config/deployment.amd64.json` file, you will see the module image placeholders expanded correctly.
|
|
142
|
+
1. Run `sudo docker image ls`, you will see the module images you just built.
|
|
143
|
+
|
|
144
|
+
</details>
|
|
145
|
+
|
|
146
|
+
1. **Setup and start the IoT Edge Simulator to run the solution**
|
|
147
|
+
|
|
148
|
+
`sudo iotedgedev start --setup --file config/deployment.amd64.json`
|
|
149
|
+
|
|
150
|
+
<details>
|
|
151
|
+
<summary>More information</summary>
|
|
152
|
+
|
|
153
|
+
1. You will see an "IoT Edge Simulator has been started in solution mode." message at the end of the terminal output
|
|
154
|
+
2. Run `sudo docker ps`, you will see your modules running as well as an edgeHubDev container
|
|
155
|
+
|
|
156
|
+
</details>
|
|
157
|
+
|
|
158
|
+
1. **Monitor messages sent from IoT Edge Simulator to IoT Hub**
|
|
159
|
+
|
|
160
|
+
`iotedgedev monitor`
|
|
161
|
+
|
|
162
|
+
<details>
|
|
163
|
+
<summary>More information</summary>
|
|
164
|
+
|
|
165
|
+
1. You will see your expected messages sending to IoT Hub
|
|
166
|
+
2. Stopping the monitor doesn't stop the simulator. It will continue running until it is explicitely stopped using `iotedgedev stop` and at that time all containers used by the simulator will be cleaned up.
|
|
167
|
+
|
|
168
|
+
</details>
|
|
169
|
+
|
|
170
|
+
1. **Docker containers/images management**
|
|
171
|
+
1. The containers used by the simulator will be cleaned up when the simulator stops running `iotedgedev stop`
|
|
172
|
+
2. All remaining containers can be cleaned up using `iotedgedev docker clean -c`
|
|
173
|
+
3. All remaining images can be cleaned up using `iotedgedev docker clean -i`
|
|
174
|
+
|
|
175
|
+
## Resources
|
|
176
|
+
Please refer to the [Wiki](https://github.com/Azure/iotedgedev/wiki) for details on setup, usage, and troubleshooting.
|
|
177
|
+
|
|
178
|
+
## Data/Telemetry
|
|
179
|
+
This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) to learn more.
|
|
180
|
+
If you don’t wish to send usage data to Microsoft, you can change your telemetry settings by updating `collect_telemetry` to `no` in `~/.iotedgedev/settings.ini`.
|
|
181
|
+
|
|
182
|
+
## Contributing
|
|
183
|
+
This project welcomes contributions and suggestions. Please refer to the [Contributing file](CONTRIBUTING.md) for details on contributing changes.
|
|
184
|
+
|
|
185
|
+
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to,
|
|
186
|
+
and actually do, grant us the rights to use your contribution. For details, visit
|
|
187
|
+
https://cla.microsoft.com.
|
|
188
|
+
|
|
189
|
+
When you submit a pull request, a CLA-bot will automatically determine whether you need
|
|
190
|
+
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
|
|
191
|
+
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
|
|
192
|
+
|
|
193
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
194
|
+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
|
195
|
+
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
196
|
+
|
|
197
|
+
## Support
|
|
198
|
+
The team monitors the issue section on regular basis and will try to assist with troubleshooting or questions related IoT Edge tools on a best effort basis.
|
|
199
|
+
|
|
200
|
+
A few tips before opening an issue. Try to generalize the problem as much as possible. Examples include
|
|
201
|
+
- Removing 3rd party components
|
|
202
|
+
- Reproduce the issue with provided deployment manifest used
|
|
203
|
+
- Specify whether issue is reproducible on physical device or simulated device or both
|
|
204
|
+
Also, Consider consulting on the [docker docs channel](https://github.com/docker/docker.github.io) for general docker questions.
|
|
Binary file
|
s/assets/armoutputs.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<ItemGroup Label="ProjectConfigurations">
|
|
4
|
+
<ProjectConfiguration Include="Debug|AnyCPU">
|
|
5
|
+
<Configuration>Debug</Configuration>
|
|
6
|
+
<Platform>AnyCPU</Platform>
|
|
7
|
+
</ProjectConfiguration>
|
|
8
|
+
<ProjectConfiguration Include="Release|AnyCPU">
|
|
9
|
+
<Configuration>Release</Configuration>
|
|
10
|
+
<Platform>AnyCPU</Platform>
|
|
11
|
+
</ProjectConfiguration>
|
|
12
|
+
</ItemGroup>
|
|
13
|
+
<PropertyGroup Label="Globals">
|
|
14
|
+
<ProjectGuid>80bd4064-a00f-4afd-bed3-f9ac609663d1</ProjectGuid>
|
|
15
|
+
</PropertyGroup>
|
|
16
|
+
<PropertyGroup>
|
|
17
|
+
<TargetFrameworkIdentifier>Deployment</TargetFrameworkIdentifier>
|
|
18
|
+
<TargetFrameworkVersion>1.0</TargetFrameworkVersion>
|
|
19
|
+
<PrepareForBuildDependsOn>
|
|
20
|
+
</PrepareForBuildDependsOn>
|
|
21
|
+
</PropertyGroup>
|
|
22
|
+
<Import Condition=" Exists('Deployment.targets') " Project="Deployment.targets" />
|
|
23
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
|
24
|
+
<!-- vertag<:>start tokens<:>maj.min -->
|
|
25
|
+
<Import Condition=" Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Deployment\1.1\DeploymentProject.targets') " Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Deployment\1.1\DeploymentProject.targets" />
|
|
26
|
+
<!-- vertag<:>end -->
|
|
27
|
+
<ItemGroup>
|
|
28
|
+
<Content Include="azuredeploy.json" />
|
|
29
|
+
<Content Include="azuredeploy.parameters.json" />
|
|
30
|
+
<None Include="Deployment.targets">
|
|
31
|
+
<Visible>False</Visible>
|
|
32
|
+
</None>
|
|
33
|
+
<Content Include="Deploy-AzureResourceGroup.ps1" />
|
|
34
|
+
</ItemGroup>
|
|
35
|
+
<Target Name="GetReferenceAssemblyPaths" />
|
|
36
|
+
</Project>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#Requires -Version 3.0
|
|
2
|
+
|
|
3
|
+
Param(
|
|
4
|
+
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
|
|
5
|
+
[string] $ResourceGroupName = 'ARMDeployment',
|
|
6
|
+
[switch] $UploadArtifacts,
|
|
7
|
+
[string] $StorageAccountName,
|
|
8
|
+
[string] $StorageContainerName = $ResourceGroupName.ToLowerInvariant() + '-stageartifacts',
|
|
9
|
+
[string] $TemplateFile = 'azuredeploy.json',
|
|
10
|
+
[string] $TemplateParametersFile = 'azuredeploy.parameters.json',
|
|
11
|
+
[string] $ArtifactStagingDirectory = '.',
|
|
12
|
+
[string] $DSCSourceFolder = 'DSC',
|
|
13
|
+
[switch] $ValidateOnly
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
[Microsoft.Azure.Common.Authentication.AzureSession]::ClientFactory.AddUserAgent("VSAzureTools-$UI$($host.name)".replace(' ','_'), '3.0.0')
|
|
18
|
+
} catch { }
|
|
19
|
+
|
|
20
|
+
$ErrorActionPreference = 'Stop'
|
|
21
|
+
Set-StrictMode -Version 3
|
|
22
|
+
|
|
23
|
+
function Format-ValidationOutput {
|
|
24
|
+
param ($ValidationOutput, [int] $Depth = 0)
|
|
25
|
+
Set-StrictMode -Off
|
|
26
|
+
return @($ValidationOutput | Where-Object { $_ -ne $null } | ForEach-Object { @(' ' * $Depth + ': ' + $_.Message) + @(Format-ValidationOutput @($_.Details) ($Depth + 1)) })
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
$OptionalParameters = New-Object -TypeName Hashtable
|
|
30
|
+
$TemplateFile = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, $TemplateFile))
|
|
31
|
+
$TemplateParametersFile = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, $TemplateParametersFile))
|
|
32
|
+
|
|
33
|
+
if ($UploadArtifacts) {
|
|
34
|
+
# Convert relative paths to absolute paths if needed
|
|
35
|
+
$ArtifactStagingDirectory = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, $ArtifactStagingDirectory))
|
|
36
|
+
$DSCSourceFolder = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, $DSCSourceFolder))
|
|
37
|
+
|
|
38
|
+
# Parse the parameter file and update the values of artifacts location and artifacts location SAS token if they are present
|
|
39
|
+
$JsonParameters = Get-Content $TemplateParametersFile -Raw | ConvertFrom-Json
|
|
40
|
+
if (($JsonParameters | Get-Member -Type NoteProperty 'parameters') -ne $null) {
|
|
41
|
+
$JsonParameters = $JsonParameters.parameters
|
|
42
|
+
}
|
|
43
|
+
$ArtifactsLocationName = '_artifactsLocation'
|
|
44
|
+
$ArtifactsLocationSasTokenName = '_artifactsLocationSasToken'
|
|
45
|
+
$OptionalParameters[$ArtifactsLocationName] = $JsonParameters | Select -Expand $ArtifactsLocationName -ErrorAction Ignore | Select -Expand 'value' -ErrorAction Ignore
|
|
46
|
+
$OptionalParameters[$ArtifactsLocationSasTokenName] = $JsonParameters | Select -Expand $ArtifactsLocationSasTokenName -ErrorAction Ignore | Select -Expand 'value' -ErrorAction Ignore
|
|
47
|
+
|
|
48
|
+
# Create DSC configuration archive
|
|
49
|
+
if (Test-Path $DSCSourceFolder) {
|
|
50
|
+
$DSCSourceFilePaths = @(Get-ChildItem $DSCSourceFolder -File -Filter '*.ps1' | ForEach-Object -Process {$_.FullName})
|
|
51
|
+
foreach ($DSCSourceFilePath in $DSCSourceFilePaths) {
|
|
52
|
+
$DSCArchiveFilePath = $DSCSourceFilePath.Substring(0, $DSCSourceFilePath.Length - 4) + '.zip'
|
|
53
|
+
Publish-AzureRmVMDscConfiguration $DSCSourceFilePath -OutputArchivePath $DSCArchiveFilePath -Force -Verbose
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
# Create a storage account name if none was provided
|
|
58
|
+
if ($StorageAccountName -eq '') {
|
|
59
|
+
$StorageAccountName = 'stage' + ((Get-AzureRmContext).Subscription.SubscriptionId).Replace('-', '').substring(0, 19)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
$StorageAccount = (Get-AzureRmStorageAccount | Where-Object{$_.StorageAccountName -eq $StorageAccountName})
|
|
63
|
+
|
|
64
|
+
# Create the storage account if it doesn't already exist
|
|
65
|
+
if ($StorageAccount -eq $null) {
|
|
66
|
+
$StorageResourceGroupName = 'ARM_Deploy_Staging'
|
|
67
|
+
New-AzureRmResourceGroup -Location "$ResourceGroupLocation" -Name $StorageResourceGroupName -Force
|
|
68
|
+
$StorageAccount = New-AzureRmStorageAccount -StorageAccountName $StorageAccountName -Type 'Standard_LRS' -ResourceGroupName $StorageResourceGroupName -Location "$ResourceGroupLocation"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# Generate the value for artifacts location if it is not provided in the parameter file
|
|
72
|
+
if ($OptionalParameters[$ArtifactsLocationName] -eq $null) {
|
|
73
|
+
$OptionalParameters[$ArtifactsLocationName] = $StorageAccount.Context.BlobEndPoint + $StorageContainerName
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# Copy files from the local storage staging location to the storage account container
|
|
77
|
+
New-AzureStorageContainer -Name $StorageContainerName -Context $StorageAccount.Context -ErrorAction SilentlyContinue *>&1
|
|
78
|
+
|
|
79
|
+
$ArtifactFilePaths = Get-ChildItem $ArtifactStagingDirectory -Recurse -File | ForEach-Object -Process {$_.FullName}
|
|
80
|
+
foreach ($SourcePath in $ArtifactFilePaths) {
|
|
81
|
+
Set-AzureStorageBlobContent -File $SourcePath -Blob $SourcePath.Substring($ArtifactStagingDirectory.length + 1) `
|
|
82
|
+
-Container $StorageContainerName -Context $StorageAccount.Context -Force
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
# Generate a 4 hour SAS token for the artifacts location if one was not provided in the parameters file
|
|
86
|
+
if ($OptionalParameters[$ArtifactsLocationSasTokenName] -eq $null) {
|
|
87
|
+
$OptionalParameters[$ArtifactsLocationSasTokenName] = ConvertTo-SecureString -AsPlainText -Force `
|
|
88
|
+
(New-AzureStorageContainerSASToken -Container $StorageContainerName -Context $StorageAccount.Context -Permission r -ExpiryTime (Get-Date).AddHours(4))
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
# Create or update the resource group using the specified template file and template parameters file
|
|
93
|
+
New-AzureRmResourceGroup -Name $ResourceGroupName -Location $ResourceGroupLocation -Verbose -Force
|
|
94
|
+
|
|
95
|
+
if ($ValidateOnly) {
|
|
96
|
+
$ErrorMessages = Format-ValidationOutput (Test-AzureRmResourceGroupDeployment -ResourceGroupName $ResourceGroupName `
|
|
97
|
+
-TemplateFile $TemplateFile `
|
|
98
|
+
-TemplateParameterFile $TemplateParametersFile `
|
|
99
|
+
@OptionalParameters)
|
|
100
|
+
if ($ErrorMessages) {
|
|
101
|
+
Write-Output '', 'Validation returned the following errors:', @($ErrorMessages), '', 'Template is invalid.'
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
Write-Output '', 'Template is valid.'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $TemplateFile).BaseName + '-' + ((Get-Date).ToUniversalTime()).ToString('MMdd-HHmm')) `
|
|
109
|
+
-ResourceGroupName $ResourceGroupName `
|
|
110
|
+
-TemplateFile $TemplateFile `
|
|
111
|
+
-TemplateParameterFile $TemplateParametersFile `
|
|
112
|
+
@OptionalParameters `
|
|
113
|
+
-Force -Verbose `
|
|
114
|
+
-ErrorVariable ErrorMessages
|
|
115
|
+
if ($ErrorMessages) {
|
|
116
|
+
Write-Output '', 'Template deployment returned the following errors:', @(@($ErrorMessages) | ForEach-Object { $_.Exception.Message.TrimEnd("`r`n") })
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
3
|
+
"contentVersion": "1.0.0.0",
|
|
4
|
+
"parameters": {
|
|
5
|
+
},
|
|
6
|
+
"variables": {
|
|
7
|
+
"iothubname": "[substring(toLower(concat('iotedgehub', uniqueString(resourceGroup().id))), 0, 20)]",
|
|
8
|
+
"iotedgestg": "[substring(toLower(concat('iotedgestg', uniqueString(resourceGroup().id))), 0, 20)]",
|
|
9
|
+
"storageApiVersion": "2017-06-01",
|
|
10
|
+
"iotHubStgCntrName": "iotdedge",
|
|
11
|
+
"iothubApiVersion": "2016-02-03",
|
|
12
|
+
"registryName": "[substring(toLower(concat('iotedgacr', uniqueString(resourceGroup().id))), 0, 20)]",
|
|
13
|
+
"registryLocation": "[resourceGroup().location]",
|
|
14
|
+
"registrySku": "Standard",
|
|
15
|
+
"registryApiVersion": "2017-10-01",
|
|
16
|
+
"adminUserEnabled": "true"
|
|
17
|
+
},
|
|
18
|
+
"resources": [
|
|
19
|
+
{
|
|
20
|
+
"kind": "Storage",
|
|
21
|
+
"type": "Microsoft.Storage/storageAccounts",
|
|
22
|
+
"location": "[resourceGroup().location]",
|
|
23
|
+
"name": "[variables('iotedgestg')]",
|
|
24
|
+
"apiVersion": "[variables('storageApiVersion')]",
|
|
25
|
+
"sku": {
|
|
26
|
+
"name": "Standard_LRS",
|
|
27
|
+
"tier": "Standard"
|
|
28
|
+
},
|
|
29
|
+
"dependsOn": [],
|
|
30
|
+
"tags": {
|
|
31
|
+
"displayName": "IoT Edge Storage"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "Microsoft.Devices/IotHubs",
|
|
36
|
+
"sku": {
|
|
37
|
+
"name": "S1",
|
|
38
|
+
"tier": "Standard",
|
|
39
|
+
"capacity": 1
|
|
40
|
+
},
|
|
41
|
+
"name": "[variables('iothubname')]",
|
|
42
|
+
"apiVersion": "[variables('iotHubApiVersion')]",
|
|
43
|
+
"location": "[resourceGroup().location]",
|
|
44
|
+
"tags": {
|
|
45
|
+
"displayName": "IoT Edge Hub"
|
|
46
|
+
},
|
|
47
|
+
"scale": null,
|
|
48
|
+
"properties": {
|
|
49
|
+
"operationsMonitoringProperties": {
|
|
50
|
+
"events": {
|
|
51
|
+
"None": "None",
|
|
52
|
+
"Connections": "None",
|
|
53
|
+
"DeviceTelemetry": "None",
|
|
54
|
+
"C2DCommands": "None",
|
|
55
|
+
"DeviceIdentityOperations": "None",
|
|
56
|
+
"FileUploadOperations": "None",
|
|
57
|
+
"Routes": "None"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"ipFilterRules": [],
|
|
61
|
+
"eventHubEndpoints": {
|
|
62
|
+
"events": {
|
|
63
|
+
"retentionTimeInDays": 1,
|
|
64
|
+
"partitionCount": 4
|
|
65
|
+
},
|
|
66
|
+
"operationsMonitoringEvents": {
|
|
67
|
+
"retentionTimeInDays": 1,
|
|
68
|
+
"partitionCount": 4
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"routing": {
|
|
72
|
+
"endpoints": {
|
|
73
|
+
"serviceBusQueues": [],
|
|
74
|
+
"serviceBusTopics": [],
|
|
75
|
+
"eventHubs": []
|
|
76
|
+
},
|
|
77
|
+
"routes": [],
|
|
78
|
+
"fallbackRoute": {
|
|
79
|
+
"name": "$fallback",
|
|
80
|
+
"source": "DeviceMessages",
|
|
81
|
+
"condition": "true",
|
|
82
|
+
"endpointNames": [
|
|
83
|
+
"events"
|
|
84
|
+
],
|
|
85
|
+
"isEnabled": true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"storageEndpoints": {
|
|
89
|
+
"$default": {
|
|
90
|
+
"sasTtlAsIso8601": "PT1H",
|
|
91
|
+
"connectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('iotedgestg'),';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts/', variables('iotedgestg')), '2017-06-01').keys[0].value)]",
|
|
92
|
+
"containerName": "[variables('iotHubStgCntrName')]"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"enableFileUploadNotifications": false,
|
|
96
|
+
"cloudToDevice": {
|
|
97
|
+
"maxDeliveryCount": 10,
|
|
98
|
+
"defaultTtlAsIso8601": "PT1H",
|
|
99
|
+
"feedback": {
|
|
100
|
+
"lockDurationAsIso8601": "PT1M",
|
|
101
|
+
"ttlAsIso8601": "PT1H",
|
|
102
|
+
"maxDeliveryCount": 10
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"features": "None"
|
|
106
|
+
},
|
|
107
|
+
"dependsOn": [
|
|
108
|
+
"[concat('Microsoft.Storage/storageAccounts/', variables('iotedgestg'))]"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "[variables('registryName')]",
|
|
113
|
+
"type": "Microsoft.ContainerRegistry/registries",
|
|
114
|
+
"location": "[variables('registryLocation')]",
|
|
115
|
+
"apiVersion": "[variables('registryApiVersion')]",
|
|
116
|
+
"tags": {
|
|
117
|
+
"displayName": "ACR Registry"
|
|
118
|
+
},
|
|
119
|
+
"sku": {
|
|
120
|
+
"name": "[variables('registrySku')]"
|
|
121
|
+
},
|
|
122
|
+
"properties": {
|
|
123
|
+
"adminUserEnabled": "[variables('adminUserEnabled')]"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"outputs": {
|
|
128
|
+
"IOTHUB_CONNECTIONSTRING": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"value": "[concat('HostName=', reference(concat('Microsoft.Devices/IotHubs/', variables('iothubname')), variables('iothubApiVersion')).hostName, ';SharedAccessKeyName=iothubowner;SharedAccessKey=', listKeys(variables('iothubname'), variables('iotHubApiversion')).value[0].primaryKey)]"
|
|
131
|
+
},
|
|
132
|
+
"CONTAINER_REGISTRY_NAME": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"value": "[reference(concat('Microsoft.ContainerRegistry/registries/', variables('registryName')), variables('registryApiVersion')).loginServer]"
|
|
135
|
+
},
|
|
136
|
+
"CONTAINER_REGISTRY_USERNAME": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"value": "[listCredentials(variables('registryName'), variables('registryApiVersion')).username]"
|
|
139
|
+
},
|
|
140
|
+
"CONTAINER_REGISTRY_PASSWORD": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"value": "[listCredentials(variables('registryName'), variables('registryApiVersion')).passwords[0].value]"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
3
|
+
# Visual Studio 15
|
|
4
|
+
VisualStudioVersion = 15.0.26730.16
|
|
5
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
|
6
|
+
Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "ARMDeployment", "ARMDeployment\ARMDeployment.deployproj", "{80BD4064-A00F-4AFD-BED3-F9AC609663D1}"
|
|
7
|
+
EndProject
|
|
8
|
+
Global
|
|
9
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
10
|
+
Debug|Any CPU = Debug|Any CPU
|
|
11
|
+
Release|Any CPU = Release|Any CPU
|
|
12
|
+
EndGlobalSection
|
|
13
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
14
|
+
{80BD4064-A00F-4AFD-BED3-F9AC609663D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
15
|
+
{80BD4064-A00F-4AFD-BED3-F9AC609663D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
16
|
+
{80BD4064-A00F-4AFD-BED3-F9AC609663D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
17
|
+
{80BD4064-A00F-4AFD-BED3-F9AC609663D1}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
18
|
+
EndGlobalSection
|
|
19
|
+
GlobalSection(SolutionProperties) = preSolution
|
|
20
|
+
HideSolutionNode = FALSE
|
|
21
|
+
EndGlobalSection
|
|
22
|
+
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
23
|
+
SolutionGuid = {93B65869-967C-4B8C-A7C8-374A641540E5}
|
|
24
|
+
EndGlobalSection
|
|
25
|
+
EndGlobal
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|