Comments (9)
Some formal docs on module.json would be nice. Might expose the various consistency issues too. I too was stumped by this and was just about to go down the path of ditching the use of module.json and iotedgedev.
from iotedge.
@adashen to share the schema of module.json
from iotedge.
@shizn Could you please take a look. Thanks!
from iotedge.
@damienpontifex , If you are using vscode-iot-edge-extension currently, you can use variables in module.json. And the values are expanded in the final deployment.json (deployment manifest). (Run command "Generate IoT Edge Deployment Manifest" or "Build Solution")
And I found you are mention CI system. We have VSTS plugin for the CI of IoT edge Project. We will double check this feature is enabled in the plugin and keep you updated.
from iotedge.
@adashen yes I can get that behaviour with deployment.json, but it'd be good to have the same with module.json for values specific to that module and it's docker image
And yes, I'm using the VSTS IoT Edge task off the marketplace and seeing the same behaviour working correctly in deployment.json but not module.json
Is this process just a string pattern replacement step? I could reproduce that in VSTS with other tasks to substitute build variables if that's the case.
from iotedge.
@damienpontifex currently, the env in module.json will be expanded when generating the final deployment.json.
Does your request is
- Expand env in module.json and out the result to another module.json file?
So can you provide more detail about your requirement in the scenario where you want the expanded module.json be used?
from iotedge.
@damienpontifex, For VSTS Edge extension, actually there's a test case here to track the variable expand in both deployment.template.json and module.json.
Here's my module.json
{
"$schema-version": "0.0.1",
"description": "",
"image": {
"repository": "michaeljqzq/multi-1${zhiqing}",
"tag": {
"version": "0.0.1${zhiqing}",
"platforms": {
"amd64": "./Dockerfile",
"amd64.debug": "./Dockerfile.amd64.debug",
"arm32v7": "./Dockerfile.arm32v7",
"windows-amd64": "./Dockerfile"
}
}
},
"language": "csharp"
}
Here's variable setting in VSTS
Here's the final docker image to push:
docker push ***/multi-1master:0.0.1master-amd64
By the way, are you using the latest version of VSTS extension? If not, you can upgrade to latest extension to verify the env expand function.
from iotedge.
Thanks everyone for the support and rapid replies. Using the format ${VARIABLE}
worked in both files.
from iotedge.
For those getting here late to the party: the closest I found to official docs about the module.json is in the VS code IoT Edge extension repo
from iotedge.
Related Issues (20)
- edgeHub Module to Module Communication causes cleanup the Message Queue HOT 4
- iotedge check: ensure all preloaded certificates match preloaded private keys with the same ID HOT 6
- Nest edge devices - child showing 502 Bad Gateway HOT 5
- Layered deployment returns only layered desired properties. Not idempotent? HOT 7
- edgeAgent keep restarting after [ERR] - Shutting down because no response from unix:///var/run/iotedge/workload.sock for Encrypt HOT 12
- EdgeHub - TimeoutException: Message completion response not received HOT 5
- EOL update HOT 4
- How to get Azure IoT Edge device current deployment manifest file using .NET SDK? HOT 3
- Your services are very verbose in logs regardless of RuntimeLogLevel HOT 3
- Severe Vulnerabilities in Moby BuildKit and OCI runc: CVE-2024-23651, CVE-2024-23652, CVE-2024-23653, CVE-2024-21626 HOT 6
- [edge_ca] auto_generated_edge_ca_expiry_days not set in /etc/aziot/edged/config.d/00-super.toml- after following quickstart Edge CA guidelines HOT 2
- Configuration on unattained embedded devices HOT 4
- Protecting Edge (Docker) Module Images at rest with the IoT-Edge? HOT 3
- Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException HOT 3
- Unable to communicate with Edge modules (in EFLOW) from the host OS HOT 7
- Offline detection status / event HOT 4
- edgeAgent automatically stopping all modules HOT 1
- IoT Edge 1.4 install fails if system has users with UID 13622 / 13623 HOT 7
- IoT device works perfectly for days, then it does not - reboot fixes issue HOT 2
- Error getting device scope result from IoTHub (IotHubUnauthorizedAccess) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iotedge.