When generating the config json. The docker image does not get set correctly
AnOdyssey opened this issue · 2 comments
- VSCode Version: 1.85.0
- OS Version: Microsoft Windows 10 Pro Version 10.0.19045 Build 19045
- Extension Version: v1.25.11
Steps to Reproduce:
- Generate a new project. Parameters don't mather neither does the container registry that gets entered
- Generate the config file for running on the simulator
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"schemaVersion": "1.4",
"runtime": {
"type": "docker",
"settings": {
"minDockerVersion": "v1.25",
"loggingOptions": "",
"registryCredentials": {
"**Redacted**": {
"username": "**Redacted**",
"password": "**Redacted**",
"address": "**Redacted**"
}
}
}
},
"systemModules": {
"edgeAgent": {
"type": "docker",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-agent:1.4",
"createOptions": "{}"
}
},
"edgeHub": {
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-hub:1.4",
"createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}]}}}"
}
}
},
"modules": {
"modbusmodule": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULES.modbusmodule.debug}",
"createOptions": "{}"
}
},
"SimulatedTemperatureSensor": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.4",
"createOptions": "{}"
}
},
"testmodule": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"settings": {
"image": "${MODULES.testmodule}",
"createOptions": "{}"
}
}
}
}
},
"$edgeHub": {
"properties.desired": {
"schemaVersion": "1.4",
"routes": {
"modbusmoduleToIoTHub": "FROM /messages/modules/modbusmodule/outputs/* INTO $upstream",
"sensorTomodbusmodule": "FROM /messages/modules/SimulatedTemperatureSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/modbusmodule/inputs/input1\")",
"testmoduleToIoTHub": "FROM /messages/modules/testmodule/outputs/* INTO $upstream"
},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 7200
}
}
}
}
}
This is the generated deployment.debug.amd64.json
It seems like the Image url of the modules does not get set correctly.
Does this issue occur when all other extensions are disabled?: Yes
Is this a bug or why is thing happening. Am I missing something else?
So after some debugging and allot of troubleshooting with different project types and old iotedge projects. I have found what was giving the issues.
When generating a new csharp module the following files are missing and need to be added manually.
- All the docker files for the module
- module.json
Once these files are added in the output file the image will be set correctly and the docker-compose error will stop.
Hi @AnOdyssey
Thanks for reporting this issue.
The VSCode IoT Edge extension is in maintenance mode, so new updates to the dotnet template wont be applicable.
If you want to still use this extension it needs to be configured File->Preferences->Settings->IoT Edge configuration->Version Csharpmodule
to use 3.2.0
or in settings.json
{
"azure-iot-edge.version.csharpmodule": "3.2.0"
}