iotedgedev 3.3.4__zip → 3.3.6__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.
Files changed (134) hide show
  1. s/.git/FETCH_HEAD +3 -1
  2. s/.git/HEAD +1 -1
  3. s/.git/hooks/fsmonitor-watchman.sample +3 -2
  4. s/.git/index +0 -0
  5. s/.git/logs/HEAD +1 -1
  6. s/.git/logs/refs/remotes/origin/EO +1 -1
  7. s/.git/logs/refs/remotes/origin/avagraw/security_fix +1 -1
  8. s/.git/logs/refs/remotes/origin/cherry-pick-rename +1 -1
  9. s/.git/logs/refs/remotes/origin/chyuan/fix-validation-not-fail-test +1 -1
  10. s/.git/logs/refs/remotes/origin/chyuan/update-linux-agent +1 -1
  11. s/.git/logs/refs/remotes/origin/dependabot/pip/cookiecutter-2.1.1 +1 -0
  12. s/.git/logs/refs/remotes/origin/dependabot/pip/pyyaml-5.4 +1 -1
  13. s/.git/logs/refs/remotes/origin/main +1 -1
  14. s/.git/logs/refs/remotes/origin/ray-deps +1 -1
  15. s/.git/logs/refs/remotes/origin/ray-dev-setup +1 -1
  16. s/.git/logs/refs/remotes/origin/ray-tox +1 -1
  17. s/.git/logs/refs/remotes/origin/release-pipeline-automation +1 -1
  18. s/.git/logs/refs/remotes/origin/revert-594-user/vikas_bug-pyopenssl +1 -0
  19. s/.git/logs/refs/remotes/origin/spmcdono/fix-pipeline-test-install +1 -1
  20. s/.git/logs/refs/remotes/origin/spmcdono/layered-deployments +1 -1
  21. s/.git/logs/refs/remotes/origin/spmcdono/pypi-package-test-pipeline +1 -1
  22. s/.git/logs/refs/remotes/origin/spmcdono/remove-py2 +1 -1
  23. s/.git/logs/refs/remotes/origin/spmcdono/remove-py2-dev +1 -1
  24. s/.git/logs/refs/remotes/origin/spmcdono/test-native-runtime-install +1 -1
  25. s/.git/logs/refs/remotes/origin/spmcdono/update-pipeline +1 -1
  26. s/.git/logs/refs/remotes/origin/user/marine/EliiseS/devcontainer +1 -1
  27. s/.git/logs/refs/remotes/origin/user/marine/fixsimver +1 -1
  28. s/.git/logs/refs/remotes/origin/user/marine/layereddeploymentsbuildtest +1 -1
  29. s/.git/logs/refs/remotes/origin/user/marine/master-to-main +1 -1
  30. s/.git/logs/refs/remotes/origin/user/marine/pipeline +1 -1
  31. s/.git/logs/refs/remotes/origin/user/vikas +1 -1
  32. s/.git/logs/refs/remotes/origin/user/vikas-bud-fix +1 -0
  33. s/.git/logs/refs/remotes/origin/user/vikas0212/verify-tests +1 -1
  34. s/.git/logs/refs/remotes/origin/user/vikas2 +1 -1
  35. s/.git/logs/refs/remotes/origin/user/vikas_bug-pyopenssl +1 -0
  36. s/.git/logs/refs/remotes/origin/user/vikas_pypi +1 -1
  37. s/.git/logs/refs/remotes/origin/user/vikas_pypi-1 +1 -1
  38. s/.git/logs/refs/remotes/origin/user/vikas_supplychain-issue1 +1 -0
  39. s/.git/logs/refs/remotes/origin/user/vikas_testing +1 -1
  40. s/.git/logs/refs/remotes/origin/user/vikas_trigger +1 -0
  41. s/.git/logs/refs/remotes/origin/user/vikas_trigger_new +1 -0
  42. s/.git/logs/refs/remotes/origin/user/xinzed/dps_conn_str +1 -1
  43. s/.git/logs/refs/remotes/origin/user/xinzed/update-python-docker +1 -1
  44. s/.git/logs/refs/remotes/origin/vikas/azure +1 -1
  45. s/.git/logs/refs/remotes/origin/vikas/dependebot +1 -1
  46. s/.git/logs/refs/remotes/origin/vikas-triggers +1 -0
  47. s/.git/logs/refs/remotes/origin/xinzed/3_1_0rc1 +1 -1
  48. s/.git/logs/refs/remotes/origin/xinzed/update-runtime +1 -1
  49. s/.git/objects/pack/pack-b6923255c7f7ef51c11dbd2c8db7ce310d4daf99.idx +0 -0
  50. s/.git/objects/pack/{pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.pack → pack-b6923255c7f7ef51c11dbd2c8db7ce310d4daf99.pack} +0 -0
  51. s/.git/refs/remotes/origin/dependabot/pip/cookiecutter-2.1.1 +1 -0
  52. s/.git/refs/remotes/origin/main +1 -1
  53. s/.git/refs/remotes/origin/revert-594-user/vikas_bug-pyopenssl +1 -0
  54. s/.git/refs/remotes/origin/user/vikas-bud-fix +1 -0
  55. s/.git/refs/remotes/origin/user/vikas_bug-pyopenssl +1 -0
  56. s/.git/refs/remotes/origin/user/vikas_supplychain-issue1 +1 -0
  57. s/.git/refs/remotes/origin/user/vikas_trigger +1 -0
  58. s/.git/refs/remotes/origin/user/vikas_trigger_new +1 -0
  59. s/.git/refs/remotes/origin/vikas-triggers +1 -0
  60. s/.git/refs/tags/v3.3.5 +1 -0
  61. s/.git/refs/tags/v3.3.6 +1 -0
  62. s/.github/ISSUE_TEMPLATE/01_bug_report.yml +55 -0
  63. s/.github/ISSUE_TEMPLATE/02_feature_request.yml +14 -0
  64. s/.github/pull_request_template.md +35 -0
  65. s/.github/workflows/wiki.yml +1 -1
  66. s/.vscode/launch.json +2 -2
  67. s/.vscode/settings.json +2 -1
  68. s/CHANGELOG.md +68 -4
  69. s/CONTRIBUTING.md +30 -97
  70. s/Makefile +1 -2
  71. s/README.md +16 -169
  72. s/SECURITY.md +41 -0
  73. s/build/lib/iotedgedev/__init__.py +1 -1
  74. s/build/lib/iotedgedev/azurecli.py +47 -4
  75. s/build/lib/iotedgedev/cli.py +98 -52
  76. s/build/lib/iotedgedev/connectionstring.py +10 -8
  77. s/build/lib/iotedgedev/edge.py +1 -1
  78. s/build/lib/iotedgedev/envvars.py +1 -0
  79. s/build/lib/iotedgedev/output.py +4 -0
  80. s/dist/iotedgedev-3.3.6-py3-none-any.whl +0 -0
  81. s/docker/tool/build-docker.sh +3 -3
  82. s/docker/tool/deps.txt +1 -1
  83. s/docker/tool/linux/Dockerfile.base +7 -4
  84. s/docker/tool/windows/Dockerfile.base +1 -1
  85. s/docs/_Sidebar.md +5 -4
  86. s/docs/{Azure-Setup.md → azure-setup.md} +19 -18
  87. s/docs/{Command-List.md → command-list.md} +1 -0
  88. s/docs/{Edge-Device-Setup.md → edge-device-setup.md} +5 -4
  89. s/docs/environment-setup/install-docker.md +9 -0
  90. s/docs/environment-setup/manual-dev-machine-setup.md +79 -0
  91. s/docs/{Python-Virtual-Environment-Setup.md → environment-setup/python-virtual-environment-setup.md} +7 -8
  92. s/docs/environment-setup/run-devcontainer-docker.md +24 -0
  93. s/docs/home.md +10 -0
  94. s/docs/{Migration-Guides.md → migration-guides.md} +26 -26
  95. s/docs/quickstart.md +152 -0
  96. s/docs/run-modules-on-simulator.md +18 -0
  97. s/docs/run-modules-on-vm.md +54 -0
  98. s/docs/{Troubleshooting.md → troubleshooting.md} +5 -4
  99. s/docs/{Usage.md → usage.md} +19 -20
  100. s/iotedgedev/__init__.py +1 -1
  101. s/iotedgedev/azurecli.py +47 -4
  102. s/iotedgedev/cli.py +98 -52
  103. s/iotedgedev/connectionstring.py +10 -8
  104. s/iotedgedev/edge.py +1 -1
  105. s/iotedgedev/envvars.py +1 -0
  106. s/iotedgedev/output.py +4 -0
  107. s/iotedgedev.egg-info/PKG-INFO +1 -1
  108. s/iotedgedev.egg-info/SOURCES.txt +2 -1
  109. s/iotedgedev.egg-info/requires.txt +2 -2
  110. s/requirements.txt +3 -3
  111. s/setup.cfg +1 -1
  112. s/setup.py +5 -3
  113. s/tests/__init__.py +1 -1
  114. s/tests/assets/test_solution_shared_lib/deployment.template.json +1 -1
  115. s/tests/assets/test_solution_shared_lib/layered_deployment.flattened_props.template.json +43 -9
  116. s/tests/test_iotedgedev_iothub_deploy.py +0 -1
  117. s/tests/test_iotedgedev_solution.py +3 -4
  118. s/tests/test_iotedgedev_solution_build.py +0 -19
  119. s/tests/test_iotedgedev_solution_deploy.py +197 -0
  120. s/tests/test_iotedgedev_solution_init.py +34 -0
  121. s/.git/logs/refs/remotes/origin/eliises/add-device-tagging-docs +0 -1
  122. s/.git/objects/pack/pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.idx +0 -0
  123. s/.git/refs/remotes/origin/eliises/add-device-tagging-docs +0 -1
  124. s/.github/ISSUE_TEMPLATE/bug_report.md +0 -16
  125. s/.github/ISSUE_TEMPLATE/feature_request.md +0 -7
  126. s/dist/iotedgedev-3.3.4-py3-none-any.whl +0 -0
  127. s/docs/Home.md +0 -10
  128. s/docs/Manual-Dev-Machine-Setup.md +0 -77
  129. s/docs/Quickstart-with-IoT-Edge-Dev-Container.md +0 -145
  130. s/pull_request_template.md +0 -9
  131. s/tests/assets/test_solution_shared_lib/layered_deployment.no_modules.template.json +0 -12
  132. /s/docs/{Command-Tips.md → command-tips.md} +0 -0
  133. /s/docs/{Overview.md → overview.md} +0 -0
  134. /s/docs/{Test-Coverage.md → test-coverage.md} +0 -0
s/CHANGELOG.md CHANGED
@@ -1,118 +1,175 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project since 0.82.0 will be documented in this file.
3
4
 
5
+ ## [3.3.6] - 2022-10-10
6
+
7
+ - Update docker compose
8
+ - Update simulator version
9
+
10
+ ## [3.3.5] - 2022-05-17
11
+
12
+ - Update azure-cli-core
13
+ - Enable `iotedgedev solution deploy` with a DPS connection string
14
+ - Deprecate duplicate commands
15
+ - Fix issue with traceback error not being outputted from the `iotedgedev monitor` command
16
+ - Fix issue when provisioning default IoT Hub SKUs (F1) with `iotedgedev iothub setup`
17
+ - Add `iotedgedev init` an option to initialize in a new folder
18
+
4
19
  ## [3.3.4] - 2022-03-24
20
+
5
21
  - Lock simulator version at 0.14.14
6
22
  - Update Wiki and dev container to reflect changes about the simulator
7
23
 
8
24
  ## [3.3.3] - 2022-03-15
25
+
9
26
  - Add support for python 3.8, 3.9
10
27
  - Lock simulator version at 0.14.12
11
28
  - Upgrade docker SDK to version 5.0.3
12
29
 
13
30
  ## [3.3.2] - 2022-03-02
31
+
14
32
  - Lock simulator version at 0.14.11
15
33
 
16
34
  ## [3.3.1] - 2021-10-20
35
+
17
36
  - Updated Python Docker package versions to newest version and enable simulator dependencies
18
37
 
19
38
  ## [3.3.0] - 2021-8-24
39
+
20
40
  - Add support for layered deployment manifests when building, pushing and generating
21
41
  - Add support for creating deployments in IoTHub via the new command: `iotedgedev iothub deploy`
22
42
  - Add support for adding device tags via the new command: `iotedgedev tag`
23
43
 
24
44
  ## [3.2.0] - 2021-7-30
45
+
25
46
  - Added support for IoT Edge Runtime version 1.2
26
47
  - Enable change of edgehub and edgeagent schema versions
27
48
  - Added support for config generation, build and push off of a layered deployment manifest
28
49
 
29
50
  ## [3.1.0] - 2021-6-8
51
+
30
52
  - Added support for IoT Edge Runtime version 1.1
31
53
  - Enabled dynamic Edge runtime selection in CLI with -er flag
32
54
 
33
55
  ## [3.0.0] - 2021-01-27
56
+
34
57
  - Remove support for Python2. Only Python 3.6 and 3.7 are currently supported.
35
58
 
36
59
  ## [2.2.0] - 2021-01-06
60
+
37
61
  ### Changed
62
+
38
63
  - Remove explicit cryptography package install to resolve dependency conflicts so tests can run
39
64
  - Add local registry support for Windows
40
65
 
41
66
  ## [2.1.6] - 2020-09-23
67
+
42
68
  ### Changed
69
+
43
70
  - Fix warning about ConfigParser readfp deprecation
44
71
 
45
72
  ## [2.1.5] - 2020-08-18
73
+
46
74
  ### Changed
75
+
47
76
  - Fix error caused by latest bcrypt on Azure Pipelines agent
48
77
 
49
78
  ## [2.1.4] - 2020-04-01
79
+
50
80
  ### Changed
81
+
51
82
  - Fix configparser error from Azure Cli Core [[#426](https://github.com/Azure/iotedgedev/issues/426)]
52
83
 
53
84
  ## [2.1.3] - 2020-03-27
85
+
54
86
  ### Changed
87
+
55
88
  - Fix genconfig does not fail when schema validation failed. [[#424](https://github.com/Azure/iotedgedev/issues/424)]
56
89
 
57
90
  ## [2.1.2] - 2020-01-14
91
+
58
92
  ### Changed
93
+
59
94
  - Fix error when install on Azure Pipelines agent
60
95
 
61
96
  ## [2.1.1] - 2019-12-16
97
+
62
98
  ### Changed
99
+
63
100
  - Fix getconfig fails if template contains a placeholder that is not enclosed in quotes.[[#414](https://github.com/Azure/iotedgedev/issues/414)]
64
101
  - Fix wrong instruction to `iotedgedev iothub setup` with extra flags.[[#417](https://github.com/Azure/iotedgedev/issues/417)]
65
102
  - Python 3.8 is not supported due to Azure CLI IoT extension issue [[#128](https://github.com/Azure/azure-iot-cli-extension/issues/128)]
66
103
 
67
104
  ## [2.1.0] - 2019-10-28
105
+
68
106
  ### Added
107
+
69
108
  - Validate schema of deployment template and generated deployment manifest in `genconfig` command
70
109
 
71
110
  ### Changed
111
+
72
112
  - Show progress info for docker commands
73
113
 
74
114
  ## [2.0.2] - 2019-07-31
115
+
75
116
  ### Changed
117
+
76
118
  - Fix errors caused by latest lark-parser release.
77
119
 
78
120
  ## [2.0.1] - 2019-07-11
121
+
79
122
  ### Changed
123
+
80
124
  - Fix build errors when some projects under modules folder have no module.json [[#396](https://github.com/Azure/iotedgedev/issues/396)]
81
125
 
82
126
  ## [2.0.0] - 2019-06-10
127
+
83
128
  ### Added
129
+
84
130
  - Support relative path for module placeholder in deployment.template.json
85
131
 
86
132
  ### Changed
133
+
87
134
  - Fix issue with 'cs' keyerror [[#387](https://github.com/Azure/iotedgedev/issues/387)]. Thanks for jporcenaluk's contribution.
88
135
  - Drop support for ACTIVE_DOCKER_PLATFORMS environment variable
89
136
 
90
137
  ## [1.3.0] - 2019-04-25
138
+
91
139
  ### Added
140
+
92
141
  - Add module twin support for simulator
93
142
 
94
143
  ### Changed
144
+
95
145
  - Update azure-cli-core to fix module import error
96
146
  - Fix applicationinsights incompatible version issue [[#383](https://github.com/Azure/iotedgedev/issues/383)]
97
147
 
98
148
  ## [1.2.0] - 2019-02-26
149
+
99
150
  ### Changed
151
+
100
152
  - Fix issue creating C modules when temp folder and target project folder are on different disks [[#362](https://github.com/Azure/iotedgedev/pull/362)]
101
153
  - Fix issue connecting to Docker daemon with `tlsverify` enabled [[#364](https://github.com/Azure/iotedgedev/pull/364)]
102
154
  - Preserve tag cases when generating deployment manifests [[#372](https://github.com/Azure/iotedgedev/pull/372)]
103
155
 
104
156
  ## [1.1.0] - 2018-11-26
157
+
105
158
  ### Added
159
+
106
160
  - Support parsing `createOptions` in JSON dictionary format
107
161
  - Support multi-platform deployment manifest template, where modules' image placeholders are platform neutral (`${MODULE.filtermodule}` vs. `${MODULES.filtermodule.amd64}`). You can specify the platforms to build using the `--platform` parameter. By default, we provide "arm32v7", "amd64" and "windows-amd64" as the platform set since these are Azure IoT Edge supporting platforms today
108
162
  - Add **deployment.debug.template.json** when creating new solutions. This template refers to the debug flavour image of the modules and has debug `createOptions` populated automatically. You can specify the deployment manifest template to build using the `--file` parameter
109
163
 
110
164
  ### Changed
165
+
111
166
  - Default to JSON dictionary format for newly created modules' `createOptions`
112
167
  - Show more clear message when failing to connect to Docker daemon
113
168
 
114
169
  ## [1.0.0] - 2018-11-01
170
+
115
171
  ### Added
172
+
116
173
  - Support adding Java modules
117
174
  - Support adding C modules
118
175
  - Add OpenJDK and Maven to IoT Edge Dev Tool Container
@@ -120,6 +177,7 @@ All notable changes to this project since 0.82.0 will be documented in this file
120
177
  - Add `registryCredentials` to deployment manifest template
121
178
 
122
179
  ### Changed
180
+
123
181
  - Update .NET Core SDK in IoT Edge Dev Tool Container to version 2.1
124
182
  - Improve Docker build and push command output to show more information
125
183
  - Retry subscription prompt when multiple results are found
@@ -128,7 +186,9 @@ All notable changes to this project since 0.82.0 will be documented in this file
128
186
  - Fix error starting local registry with custom ports
129
187
 
130
188
  ## [0.82.0] - 2018-08-28
189
+
131
190
  ### Added
191
+
132
192
  - New command to add modules to solution
133
193
  - Support for adding and building Node.js and Python modules
134
194
  - Integration with IoT Edge Simulator provided by the [iotedgehubdev CLI](https://pypi.org/project/iotedgehubdev/)
@@ -140,17 +200,21 @@ All notable changes to this project since 0.82.0 will be documented in this file
140
200
  - Update `.vscode/launch.json` file when adding modules
141
201
 
142
202
  ### Changed
203
+
143
204
  - Switch to Azure CLI IoT extension (>= 0.5.1) to monitor messages for Python >= 3.5 users
144
205
  - Improve experience of creating Azure resources interactively
145
206
  - Breaking changes (learn how to migrate [here](https://github.com/Azure/iotedgedev/wiki/migration-guides))
146
- - Updated command list and options
147
- - Updated logic to determine which module images to build
148
- - New module folder structure
149
- - Building code in Dockerfiles instead on building code natively
207
+ - Updated command list and options
208
+ - Updated logic to determine which module images to build
209
+ - New module folder structure
210
+ - Building code in Dockerfiles instead on building code natively
150
211
 
151
212
  ### Removed
213
+
152
214
  - Support for `iotedgectl` and public preview runtime images
153
215
 
154
216
  ## [0.1.0] - 2017-12-29
217
+
155
218
  ### Added
219
+
156
220
  - First release on PyPI.
s/CONTRIBUTING.md CHANGED
@@ -2,121 +2,54 @@
2
2
 
3
3
  This section describes how to get your developer workspace running for the first time so that you're ready to start making contributions.
4
4
 
5
- Please fork, branch and pull-request any changes you'd like to make.
5
+ Please fork, branch and pull-request any changes you'd like to make. For more information on how to create a fork, see: [Fork a repo - GitHub Docs](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
6
6
 
7
- ## Workspace Setup
7
+ ## Workspace setup
8
8
 
9
- 1. Clone this repository
9
+ 1. Clone your fork of the repository
10
10
 
11
- `git clone https://github.com/azure/iotedgedev.git`
11
+ `git clone https://github.com/<your_id>/iotedgedev.git`
12
12
 
13
- 1. Rename `.env.tmp` in the root of the repo to `.env` and set the `IOTHUB_CONNECTION_STRING` and `DEVICE_CONNECTION_STRING` values to settings from your IoT Hub and Edge Device. To set these values you could run `iotedgedev iothub setup` in the root of the repo.
14
-
15
- 1. Install **[Docker](https://docs.docker.com/engine/installation/)**
16
- - Windows
13
+ 2. Install **[Docker](https://docs.docker.com/engine/installation/)**
14
+ - Windows
17
15
  - Be sure to check whether you are running in Linux container mode or Windows container mode.
18
16
  - Linux
19
17
  - We've seen some issues with docker.io. If IoT Edge doesn't run for you, then try installing Docker CE directly instead of via docker.io. Use the [CE install steps](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).
20
18
  - 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).
21
19
 
20
+ 3. Setup development environment
22
21
 
23
- ### A) Contributor Dev Machine Setup
24
-
25
- 1. Install **Python 3.6+**, and **pip**
26
- - Windows: [Install from Python's website](https://www.python.org/downloads/)
27
- - Linux: `sudo apt-get install python-pip python3-pip`
28
- - 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).
29
-
30
- 1. Install **[Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)**
31
-
32
- 1. Install **[Azure CLI IoT extension](https://github.com/Azure/azure-iot-cli-extension/)**
33
-
34
- - New Install: `az extension add --name azure-iot`
35
- - Update Install: `az extension update --name azure-iot`
36
-
37
- 1. Install **[Node.js](https://nodejs.org/en/download/)** and the **`iothub-explorer`** package
38
-
39
- - `npm i -g iothub-explorer`
40
-
41
- 1. (Linux only) Install [Docker Compose](https://docs.docker.com/compose/)
42
-
43
- ```
44
- pip install -U docker-compose
45
- ```
46
-
47
- 1. (Linux only) Install extra system dependencies
48
-
49
- ```
50
- sudo apt-get install -y libffi-dev libssl-dev
51
- ```
52
-
53
- 1. Install module dependencies
54
- ##### C# module and C# Azure Functions module
55
- Install **[.NET Core SDK 2.1 or later](https://www.microsoft.com/net/download)**
56
-
57
- ##### Python module
58
- 1. Install **[Git](https://git-scm.com/)**
59
- 2. Install **[Cookiecutter](https://github.com/audreyr/cookiecutter)**
60
- ```
61
- pip install -U cookiecutter
62
- ```
63
-
64
- ##### Node.js module
65
- 1. Install **[Node.js](https://nodejs.org/en/download/)**
66
- 2. Install **[Yeoman](http://yeoman.io/)** and **[Azure IoT Edge Node.js module generator](https://github.com/Azure/generator-azure-iot-edge-module)** packages
67
- ```
68
- npm i -g yo generator-azure-iot-edge-module
69
- ```
70
-
71
- ##### Java module
72
- 1. Install **[JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html)**
73
- 1. Install **[Maven](https://maven.apache.org/)**
74
-
75
- 1. Install Python development dependencies
76
-
77
- ```
78
- pip install -r requirements_dev.txt
79
- ```
80
-
81
- ### B) Contributor Docker Devcontainer Setup
82
-
83
- #### With VSCode
84
-
85
- Developing with docker using VSCode's [remote containers](https://code.visualstudio.com/docs/remote/containers):
86
-
87
- - Install [Remote Development Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) in VSCode
88
- - Open the project in VSCode
89
- - When prompted by VSCode, select "Reopen in Container"
22
+ There are three options to setup your development environment:
90
23
 
91
- > To further customize your devcontainer checkout [Personalizing with `dotfile` repositories](https://code.visualstudio.com/docs/remote/containers#_personalizing-with-dotfile-repositories). In the same settings you're also able to add personal extensions for your container.
24
+ - **Devcontainers**: Start the devcontainer from VS Code. See [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers) for steps on how to do so.
25
+ - **Local**: Setup the development environment manually. Please follow the [Manual Development Machine Setup Wiki](docs/environment-setup/manual-dev-machine-setup.md).
26
+ - Run IoT Edge Dev Tool in editable mode:
27
+ Run ›`pip install -e .` from the root of the repo to see changes to iotedgedev commands as you change code.
92
28
 
93
- #### Without VSCode
29
+ - **Codespaces**: Create a [GitHub Codespaces](https://github.com/features/codespaces) directly from your fork via the GitHub UI.
94
30
 
95
- - Build the development environment: `docker build -f .devcontainer/Dockerfile -t dev .`
96
- - Mount the root directory into the docker container, and drop into a bash shell in the container:
97
-
98
- ```bash
99
- docker run -it -v ${PWD}:/workspaces/iotedgedev iotedgedev
100
- ```
31
+ 4. Rename `.env.tmp` in the root of the repo to `.env` and set the `IOTHUB_CONNECTION_STRING` and `DEVICE_CONNECTION_STRING` values to settings from your existing IoT Hub and Edge Device. If you don't have these, or want to create new ones, you could run `iotedgedev iothub setup` in the root of the repo to setup your resources and fill out the values automatically.
101
32
 
102
- ## Developing
33
+ ### Known Issues
103
34
 
104
- 1. Run IoT Edge Dev Tool in editable mode
35
+ 1. "iotedgedev command not found": Sometimes the `postCreateCommand` from the [container](.devcontainer/devcontainer.json) does not get executed and the environment is not correctly initialized. Run `pip install -e .` in the root of the repo to fix this.
105
36
 
106
- Run the following command from the root of the repo to see changes to iotedgedev commands as you change code.
37
+ ## Run and debug tests
107
38
 
108
- ```
109
- pip install -e .
110
- ```
39
+ To **run** and **debug** the tests **individually** you can use the VSCode Test Runner UI provided by the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) (installed by default in the devcontainer).
111
40
 
41
+ An alternative way to **debug** is to select `Python: debug test file` in the `Run and debug` tab of vscode, open the test file you'd like to debug and hit `F5`.
112
42
 
113
- ## VS Code Debugging
114
- VS Code Debugging works only with Python 3.6 VS Code Python Environments for now. Make sure that your VS Code Python Environment is [pointing to Python 3.6](https://code.visualstudio.com/docs/python/environments#_how-to-choose-an-environment)
43
+ You can choose one of these following commands to easily **run all** tests:
115
44
 
116
- Set your CLI arguments in .vscode/launch.json and hit **F5**
117
-
118
- ## Run Tests
45
+ ```sh
46
+ # Run all tests with all python interpreters (fails for the ones not installed)
47
+ # This is the command that runs in the pipeline for all python versions
48
+ make test-all
49
+ # Run tests with tox in python version 3.9 (the python version installed in the devcontainer)
50
+ tox -e py39
51
+ # Run all tests with pytest for python version 3.9 (nicest output, fastest)
52
+ make test
53
+ ```
119
54
 
120
- Run the following command to run tests.
121
-
122
- `tox`
55
+ > It is recommended to run all tests with `tox -e py39` or `make test-all` at least once before making the PR. The pytest test runner environment is slightly different from tox, so some tests may pass with that and not in tox, resulting in failures in the pipeline.
s/Makefile CHANGED
@@ -51,8 +51,7 @@ lint: ## check style with flake8
51
51
  flake8 iotedgedev tests
52
52
 
53
53
  test: ## run tests quickly with the default Python
54
-
55
- python setup.py test
54
+ pytest ./tests
56
55
 
57
56
  test-all: ## run tests on every Python version with tox
58
57
  tox
s/README.md CHANGED
@@ -5,186 +5,27 @@
5
5
 
6
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
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._
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
10
 
11
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
- [![Azure IoT Edge Dev Tool: Quickstart](assets/edgedevtoolquickstartsmall.png)](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
12
 
59
- `iotedgedev init`
13
+ For the absolute fastest way to get started with IoT Edge Dev, please see the [quickstart](docs/quickstart.md) section.
60
14
 
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.
15
+ For a more detailed overview of IoT Edge Dev Tool including setup, commands and troubleshooting, please see the [Wiki](https://github.com/Azure/iotedgedev/wiki).
177
16
 
178
17
  ## 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.
18
+
19
+ 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
20
  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
21
 
182
22
  ## Contributing
23
+
183
24
  This project welcomes contributions and suggestions. Please refer to the [Contributing file](CONTRIBUTING.md) for details on contributing changes.
184
25
 
185
26
  Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to,
186
27
  and actually do, grant us the rights to use your contribution. For details, visit
187
- https://cla.microsoft.com.
28
+ <https://cla.microsoft.com>.
188
29
 
189
30
  When you submit a pull request, a CLA-bot will automatically determine whether you need
190
31
  to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
@@ -195,10 +36,16 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
195
36
  or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
196
37
 
197
38
  ## Support
39
+
198
40
  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
41
+
42
+ A few tips before opening an issue. Try to generalize the problem as much as possible. Examples include:
43
+
201
44
  - Removing 3rd party components
202
45
  - Reproduce the issue with provided deployment manifest used
203
46
  - Specify whether issue is reproducible on physical device or simulated device or both
204
47
  Also, Consider consulting on the [docker docs channel](https://github.com/docker/docker.github.io) for general docker questions.
48
+
49
+ ## Additional Resources
50
+
51
+ Please refer to the [Wiki](https://github.com/Azure/iotedgedev/wiki) for details on setup, usage, and troubleshooting.
s/SECURITY.md ADDED
@@ -0,0 +1,41 @@
1
+ <!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
2
+
3
+ ## Security
4
+
5
+ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6
+
7
+ If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8
+
9
+ ## Reporting Security Issues
10
+
11
+ **Please do not report security vulnerabilities through public GitHub issues.**
12
+
13
+ Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14
+
15
+ If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16
+
17
+ You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18
+
19
+ Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
+
21
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
+ * Full paths of source file(s) related to the manifestation of the issue
23
+ * The location of the affected source code (tag/branch/commit or direct URL)
24
+ * Any special configuration required to reproduce the issue
25
+ * Step-by-step instructions to reproduce the issue
26
+ * Proof-of-concept or exploit code (if possible)
27
+ * Impact of the issue, including how an attacker might exploit the issue
28
+
29
+ This information will help us triage your report more quickly.
30
+
31
+ If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32
+
33
+ ## Preferred Languages
34
+
35
+ We prefer all communications to be in English.
36
+
37
+ ## Policy
38
+
39
+ Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40
+
41
+ <!-- END MICROSOFT SECURITY.MD BLOCK -->
@@ -2,5 +2,5 @@
2
2
 
3
3
  __author__ = 'Microsoft Corporation'
4
4
  __email__ = 'opencode@microsoft.com'
5
- __version__ = '3.3.4'
5
+ __version__ = '3.3.6'
6
6
  __AIkey__ = 'fed7fc65-5b4a-4e66-9d46-c5f016d4e2b4'