iotedgedev 3.3.4__zip → 3.3.5__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/.git/FETCH_HEAD +2 -1
- s/.git/HEAD +1 -1
- s/.git/hooks/fsmonitor-watchman.sample +3 -2
- s/.git/index +0 -0
- s/.git/logs/HEAD +1 -1
- s/.git/logs/refs/remotes/origin/EO +1 -1
- s/.git/logs/refs/remotes/origin/avagraw/security_fix +1 -1
- s/.git/logs/refs/remotes/origin/cherry-pick-rename +1 -1
- s/.git/logs/refs/remotes/origin/chyuan/fix-validation-not-fail-test +1 -1
- s/.git/logs/refs/remotes/origin/chyuan/update-linux-agent +1 -1
- s/.git/logs/refs/remotes/origin/dependabot/pip/cookiecutter-2.1.1 +1 -0
- s/.git/logs/refs/remotes/origin/dependabot/pip/pyyaml-5.4 +1 -1
- s/.git/logs/refs/remotes/origin/main +1 -1
- s/.git/logs/refs/remotes/origin/ray-deps +1 -1
- s/.git/logs/refs/remotes/origin/ray-dev-setup +1 -1
- s/.git/logs/refs/remotes/origin/ray-tox +1 -1
- s/.git/logs/refs/remotes/origin/release-pipeline-automation +1 -1
- s/.git/logs/refs/remotes/origin/spmcdono/fix-pipeline-test-install +1 -1
- s/.git/logs/refs/remotes/origin/spmcdono/layered-deployments +1 -1
- s/.git/logs/refs/remotes/origin/spmcdono/pypi-package-test-pipeline +1 -1
- s/.git/logs/refs/remotes/origin/spmcdono/remove-py2 +1 -1
- s/.git/logs/refs/remotes/origin/spmcdono/remove-py2-dev +1 -1
- s/.git/logs/refs/remotes/origin/spmcdono/test-native-runtime-install +1 -1
- s/.git/logs/refs/remotes/origin/spmcdono/update-pipeline +1 -1
- s/.git/logs/refs/remotes/origin/user/marine/EliiseS/devcontainer +1 -1
- s/.git/logs/refs/remotes/origin/user/marine/fixsimver +1 -1
- s/.git/logs/refs/remotes/origin/user/marine/layereddeploymentsbuildtest +1 -1
- s/.git/logs/refs/remotes/origin/user/marine/master-to-main +1 -1
- s/.git/logs/refs/remotes/origin/user/marine/pipeline +1 -1
- s/.git/logs/refs/remotes/origin/user/vikas +1 -1
- s/.git/logs/refs/remotes/origin/user/vikas0212/verify-tests +1 -1
- s/.git/logs/refs/remotes/origin/user/vikas2 +1 -1
- s/.git/logs/refs/remotes/origin/user/vikas_pypi +1 -1
- s/.git/logs/refs/remotes/origin/user/vikas_pypi-1 +1 -1
- s/.git/logs/refs/remotes/origin/user/vikas_supplychain-issue1 +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas_testing +1 -1
- s/.git/logs/refs/remotes/origin/user/vikas_trigger +1 -0
- s/.git/logs/refs/remotes/origin/user/vikas_trigger_new +1 -0
- s/.git/logs/refs/remotes/origin/user/xinzed/dps_conn_str +1 -1
- s/.git/logs/refs/remotes/origin/user/xinzed/update-python-docker +1 -1
- s/.git/logs/refs/remotes/origin/vikas/azure +1 -1
- s/.git/logs/refs/remotes/origin/vikas/dependebot +1 -1
- s/.git/logs/refs/remotes/origin/vikas-triggers +1 -0
- s/.git/logs/refs/remotes/origin/xinzed/3_1_0rc1 +1 -1
- s/.git/logs/refs/remotes/origin/xinzed/update-runtime +1 -1
- s/.git/objects/pack/pack-7a60b35c219082b6cfceccd45f3712d11b9c0e3b.idx +0 -0
- s/.git/objects/pack/{pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.pack → pack-7a60b35c219082b6cfceccd45f3712d11b9c0e3b.pack} +0 -0
- s/.git/refs/remotes/origin/dependabot/pip/cookiecutter-2.1.1 +1 -0
- s/.git/refs/remotes/origin/main +1 -1
- s/.git/refs/remotes/origin/user/vikas_supplychain-issue1 +1 -0
- s/.git/refs/remotes/origin/user/vikas_trigger +1 -0
- s/.git/refs/remotes/origin/user/vikas_trigger_new +1 -0
- s/.git/refs/remotes/origin/vikas-triggers +1 -0
- s/.git/refs/tags/v3.3.5 +1 -0
- s/.github/ISSUE_TEMPLATE/01_bug_report.yml +55 -0
- s/.github/ISSUE_TEMPLATE/02_feature_request.yml +14 -0
- s/.github/pull_request_template.md +35 -0
- s/.github/workflows/wiki.yml +1 -1
- s/.vscode/launch.json +2 -2
- s/.vscode/settings.json +2 -1
- s/CHANGELOG.md +63 -4
- s/CONTRIBUTING.md +30 -97
- s/Makefile +1 -2
- s/README.md +16 -169
- s/SECURITY.md +41 -0
- s/build/lib/iotedgedev/__init__.py +1 -1
- s/build/lib/iotedgedev/azurecli.py +14 -4
- s/build/lib/iotedgedev/cli.py +36 -25
- s/build/lib/iotedgedev/connectionstring.py +10 -8
- s/build/lib/iotedgedev/edge.py +1 -1
- s/dist/{iotedgedev-3.3.4-py3-none-any.whl → iotedgedev-3.3.5-py3-none-any.whl} +0 -0
- s/docker/tool/build-docker.sh +3 -3
- s/docker/tool/deps.txt +1 -1
- s/docker/tool/linux/Dockerfile.base +7 -4
- s/docker/tool/windows/Dockerfile.base +1 -1
- s/docs/_Sidebar.md +5 -4
- s/docs/{Azure-Setup.md → azure-setup.md} +19 -18
- s/docs/{Edge-Device-Setup.md → edge-device-setup.md} +5 -4
- s/docs/environment-setup/install-docker.md +9 -0
- s/docs/environment-setup/manual-dev-machine-setup.md +79 -0
- s/docs/{Python-Virtual-Environment-Setup.md → environment-setup/python-virtual-environment-setup.md} +7 -8
- s/docs/environment-setup/run-devcontainer-docker.md +24 -0
- s/docs/home.md +10 -0
- s/docs/{Migration-Guides.md → migration-guides.md} +26 -26
- s/docs/quickstart.md +152 -0
- s/docs/run-modules-on-simulator.md +18 -0
- s/docs/run-modules-on-vm.md +54 -0
- s/docs/{Troubleshooting.md → troubleshooting.md} +5 -4
- s/docs/{Usage.md → usage.md} +19 -20
- s/iotedgedev/__init__.py +1 -1
- s/iotedgedev/azurecli.py +14 -4
- s/iotedgedev/cli.py +36 -25
- s/iotedgedev/connectionstring.py +10 -8
- s/iotedgedev/edge.py +1 -1
- s/iotedgedev.egg-info/PKG-INFO +1 -1
- s/iotedgedev.egg-info/SOURCES.txt +2 -1
- s/iotedgedev.egg-info/requires.txt +1 -1
- s/requirements.txt +2 -2
- s/setup.cfg +1 -1
- s/setup.py +4 -2
- s/tests/__init__.py +1 -1
- s/tests/assets/test_solution_shared_lib/deployment.template.json +1 -1
- s/tests/assets/test_solution_shared_lib/layered_deployment.flattened_props.template.json +43 -9
- s/tests/test_iotedgedev_iothub_deploy.py +0 -1
- s/tests/test_iotedgedev_solution.py +3 -4
- s/tests/test_iotedgedev_solution_build.py +0 -19
- s/tests/test_iotedgedev_solution_deploy.py +197 -0
- s/tests/test_iotedgedev_solution_init.py +34 -0
- s/.git/logs/refs/remotes/origin/eliises/add-device-tagging-docs +0 -1
- s/.git/objects/pack/pack-a8179feb7da51d11a42c37c5b3c8593cffe17075.idx +0 -0
- s/.git/refs/remotes/origin/eliises/add-device-tagging-docs +0 -1
- s/.github/ISSUE_TEMPLATE/bug_report.md +0 -16
- s/.github/ISSUE_TEMPLATE/feature_request.md +0 -7
- s/docs/Home.md +0 -10
- s/docs/Manual-Dev-Machine-Setup.md +0 -77
- s/docs/Quickstart-with-IoT-Edge-Dev-Container.md +0 -145
- s/pull_request_template.md +0 -9
- s/tests/assets/test_solution_shared_lib/layered_deployment.no_modules.template.json +0 -12
- /s/docs/{Command-List.md → command-list.md} +0 -0
- /s/docs/{Command-Tips.md → command-tips.md} +0 -0
- /s/docs/{Overview.md → overview.md} +0 -0
- /s/docs/{Test-Coverage.md → test-coverage.md} +0 -0
s/CHANGELOG.md
CHANGED
|
@@ -1,118 +1,170 @@
|
|
|
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.5] - 2022-05-17
|
|
6
|
+
|
|
7
|
+
- Update azure-cli-core
|
|
8
|
+
- Enable `iotedgedev solution deploy` with a DPS connection string
|
|
9
|
+
- Deprecate duplicate commands
|
|
10
|
+
- Fix issue with traceback error not being outputted from the `iotedgedev monitor` command
|
|
11
|
+
- Fix issue when provisioning default IoT Hub SKUs (F1) with `iotedgedev iothub setup`
|
|
12
|
+
- Add `iotedgedev init` an option to initialize in a new folder
|
|
13
|
+
|
|
4
14
|
## [3.3.4] - 2022-03-24
|
|
15
|
+
|
|
5
16
|
- Lock simulator version at 0.14.14
|
|
6
17
|
- Update Wiki and dev container to reflect changes about the simulator
|
|
7
18
|
|
|
8
19
|
## [3.3.3] - 2022-03-15
|
|
20
|
+
|
|
9
21
|
- Add support for python 3.8, 3.9
|
|
10
22
|
- Lock simulator version at 0.14.12
|
|
11
23
|
- Upgrade docker SDK to version 5.0.3
|
|
12
24
|
|
|
13
25
|
## [3.3.2] - 2022-03-02
|
|
26
|
+
|
|
14
27
|
- Lock simulator version at 0.14.11
|
|
15
28
|
|
|
16
29
|
## [3.3.1] - 2021-10-20
|
|
30
|
+
|
|
17
31
|
- Updated Python Docker package versions to newest version and enable simulator dependencies
|
|
18
32
|
|
|
19
33
|
## [3.3.0] - 2021-8-24
|
|
34
|
+
|
|
20
35
|
- Add support for layered deployment manifests when building, pushing and generating
|
|
21
36
|
- Add support for creating deployments in IoTHub via the new command: `iotedgedev iothub deploy`
|
|
22
37
|
- Add support for adding device tags via the new command: `iotedgedev tag`
|
|
23
38
|
|
|
24
39
|
## [3.2.0] - 2021-7-30
|
|
40
|
+
|
|
25
41
|
- Added support for IoT Edge Runtime version 1.2
|
|
26
42
|
- Enable change of edgehub and edgeagent schema versions
|
|
27
43
|
- Added support for config generation, build and push off of a layered deployment manifest
|
|
28
44
|
|
|
29
45
|
## [3.1.0] - 2021-6-8
|
|
46
|
+
|
|
30
47
|
- Added support for IoT Edge Runtime version 1.1
|
|
31
48
|
- Enabled dynamic Edge runtime selection in CLI with -er flag
|
|
32
49
|
|
|
33
50
|
## [3.0.0] - 2021-01-27
|
|
51
|
+
|
|
34
52
|
- Remove support for Python2. Only Python 3.6 and 3.7 are currently supported.
|
|
35
53
|
|
|
36
54
|
## [2.2.0] - 2021-01-06
|
|
55
|
+
|
|
37
56
|
### Changed
|
|
57
|
+
|
|
38
58
|
- Remove explicit cryptography package install to resolve dependency conflicts so tests can run
|
|
39
59
|
- Add local registry support for Windows
|
|
40
60
|
|
|
41
61
|
## [2.1.6] - 2020-09-23
|
|
62
|
+
|
|
42
63
|
### Changed
|
|
64
|
+
|
|
43
65
|
- Fix warning about ConfigParser readfp deprecation
|
|
44
66
|
|
|
45
67
|
## [2.1.5] - 2020-08-18
|
|
68
|
+
|
|
46
69
|
### Changed
|
|
70
|
+
|
|
47
71
|
- Fix error caused by latest bcrypt on Azure Pipelines agent
|
|
48
72
|
|
|
49
73
|
## [2.1.4] - 2020-04-01
|
|
74
|
+
|
|
50
75
|
### Changed
|
|
76
|
+
|
|
51
77
|
- Fix configparser error from Azure Cli Core [[#426](https://github.com/Azure/iotedgedev/issues/426)]
|
|
52
78
|
|
|
53
79
|
## [2.1.3] - 2020-03-27
|
|
80
|
+
|
|
54
81
|
### Changed
|
|
82
|
+
|
|
55
83
|
- Fix genconfig does not fail when schema validation failed. [[#424](https://github.com/Azure/iotedgedev/issues/424)]
|
|
56
84
|
|
|
57
85
|
## [2.1.2] - 2020-01-14
|
|
86
|
+
|
|
58
87
|
### Changed
|
|
88
|
+
|
|
59
89
|
- Fix error when install on Azure Pipelines agent
|
|
60
90
|
|
|
61
91
|
## [2.1.1] - 2019-12-16
|
|
92
|
+
|
|
62
93
|
### Changed
|
|
94
|
+
|
|
63
95
|
- Fix getconfig fails if template contains a placeholder that is not enclosed in quotes.[[#414](https://github.com/Azure/iotedgedev/issues/414)]
|
|
64
96
|
- Fix wrong instruction to `iotedgedev iothub setup` with extra flags.[[#417](https://github.com/Azure/iotedgedev/issues/417)]
|
|
65
97
|
- 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
98
|
|
|
67
99
|
## [2.1.0] - 2019-10-28
|
|
100
|
+
|
|
68
101
|
### Added
|
|
102
|
+
|
|
69
103
|
- Validate schema of deployment template and generated deployment manifest in `genconfig` command
|
|
70
104
|
|
|
71
105
|
### Changed
|
|
106
|
+
|
|
72
107
|
- Show progress info for docker commands
|
|
73
108
|
|
|
74
109
|
## [2.0.2] - 2019-07-31
|
|
110
|
+
|
|
75
111
|
### Changed
|
|
112
|
+
|
|
76
113
|
- Fix errors caused by latest lark-parser release.
|
|
77
114
|
|
|
78
115
|
## [2.0.1] - 2019-07-11
|
|
116
|
+
|
|
79
117
|
### Changed
|
|
118
|
+
|
|
80
119
|
- Fix build errors when some projects under modules folder have no module.json [[#396](https://github.com/Azure/iotedgedev/issues/396)]
|
|
81
120
|
|
|
82
121
|
## [2.0.0] - 2019-06-10
|
|
122
|
+
|
|
83
123
|
### Added
|
|
124
|
+
|
|
84
125
|
- Support relative path for module placeholder in deployment.template.json
|
|
85
126
|
|
|
86
127
|
### Changed
|
|
128
|
+
|
|
87
129
|
- Fix issue with 'cs' keyerror [[#387](https://github.com/Azure/iotedgedev/issues/387)]. Thanks for jporcenaluk's contribution.
|
|
88
130
|
- Drop support for ACTIVE_DOCKER_PLATFORMS environment variable
|
|
89
131
|
|
|
90
132
|
## [1.3.0] - 2019-04-25
|
|
133
|
+
|
|
91
134
|
### Added
|
|
135
|
+
|
|
92
136
|
- Add module twin support for simulator
|
|
93
137
|
|
|
94
138
|
### Changed
|
|
139
|
+
|
|
95
140
|
- Update azure-cli-core to fix module import error
|
|
96
141
|
- Fix applicationinsights incompatible version issue [[#383](https://github.com/Azure/iotedgedev/issues/383)]
|
|
97
142
|
|
|
98
143
|
## [1.2.0] - 2019-02-26
|
|
144
|
+
|
|
99
145
|
### Changed
|
|
146
|
+
|
|
100
147
|
- 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
148
|
- Fix issue connecting to Docker daemon with `tlsverify` enabled [[#364](https://github.com/Azure/iotedgedev/pull/364)]
|
|
102
149
|
- Preserve tag cases when generating deployment manifests [[#372](https://github.com/Azure/iotedgedev/pull/372)]
|
|
103
150
|
|
|
104
151
|
## [1.1.0] - 2018-11-26
|
|
152
|
+
|
|
105
153
|
### Added
|
|
154
|
+
|
|
106
155
|
- Support parsing `createOptions` in JSON dictionary format
|
|
107
156
|
- 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
157
|
- 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
158
|
|
|
110
159
|
### Changed
|
|
160
|
+
|
|
111
161
|
- Default to JSON dictionary format for newly created modules' `createOptions`
|
|
112
162
|
- Show more clear message when failing to connect to Docker daemon
|
|
113
163
|
|
|
114
164
|
## [1.0.0] - 2018-11-01
|
|
165
|
+
|
|
115
166
|
### Added
|
|
167
|
+
|
|
116
168
|
- Support adding Java modules
|
|
117
169
|
- Support adding C modules
|
|
118
170
|
- Add OpenJDK and Maven to IoT Edge Dev Tool Container
|
|
@@ -120,6 +172,7 @@ All notable changes to this project since 0.82.0 will be documented in this file
|
|
|
120
172
|
- Add `registryCredentials` to deployment manifest template
|
|
121
173
|
|
|
122
174
|
### Changed
|
|
175
|
+
|
|
123
176
|
- Update .NET Core SDK in IoT Edge Dev Tool Container to version 2.1
|
|
124
177
|
- Improve Docker build and push command output to show more information
|
|
125
178
|
- Retry subscription prompt when multiple results are found
|
|
@@ -128,7 +181,9 @@ All notable changes to this project since 0.82.0 will be documented in this file
|
|
|
128
181
|
- Fix error starting local registry with custom ports
|
|
129
182
|
|
|
130
183
|
## [0.82.0] - 2018-08-28
|
|
184
|
+
|
|
131
185
|
### Added
|
|
186
|
+
|
|
132
187
|
- New command to add modules to solution
|
|
133
188
|
- Support for adding and building Node.js and Python modules
|
|
134
189
|
- Integration with IoT Edge Simulator provided by the [iotedgehubdev CLI](https://pypi.org/project/iotedgehubdev/)
|
|
@@ -140,17 +195,21 @@ All notable changes to this project since 0.82.0 will be documented in this file
|
|
|
140
195
|
- Update `.vscode/launch.json` file when adding modules
|
|
141
196
|
|
|
142
197
|
### Changed
|
|
198
|
+
|
|
143
199
|
- Switch to Azure CLI IoT extension (>= 0.5.1) to monitor messages for Python >= 3.5 users
|
|
144
200
|
- Improve experience of creating Azure resources interactively
|
|
145
201
|
- Breaking changes (learn how to migrate [here](https://github.com/Azure/iotedgedev/wiki/migration-guides))
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
202
|
+
- Updated command list and options
|
|
203
|
+
- Updated logic to determine which module images to build
|
|
204
|
+
- New module folder structure
|
|
205
|
+
- Building code in Dockerfiles instead on building code natively
|
|
150
206
|
|
|
151
207
|
### Removed
|
|
208
|
+
|
|
152
209
|
- Support for `iotedgectl` and public preview runtime images
|
|
153
210
|
|
|
154
211
|
## [0.1.0] - 2017-12-29
|
|
212
|
+
|
|
155
213
|
### Added
|
|
214
|
+
|
|
156
215
|
- 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
|
|
7
|
+
## Workspace setup
|
|
8
8
|
|
|
9
|
-
1. Clone
|
|
9
|
+
1. Clone your fork of the repository
|
|
10
10
|
|
|
11
|
-
`git clone https://github.com
|
|
11
|
+
`git clone https://github.com/<your_id>/iotedgedev.git`
|
|
12
12
|
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
29
|
+
- **Codespaces**: Create a [GitHub Codespaces](https://github.com/features/codespaces) directly from your fork via the GitHub UI.
|
|
94
30
|
|
|
95
|
-
|
|
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
|
-
|
|
33
|
+
### Known Issues
|
|
103
34
|
|
|
104
|
-
1. Run
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
|
|
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
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
|
-
|
|
9
|
-
|
|
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
|
-
[](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
|
-
|
|
13
|
+
For the absolute fastest way to get started with IoT Edge Dev, please see the [quickstart](docs/quickstart.md) section.
|
|
60
14
|
|
|
61
|
-
|
|
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
|
-
|
|
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 -->
|