Open AlexandrStarov opened 9 months ago
thanks @AlexandrStarov for your feedback.
With .NET 7, we'd like to use the latest container builds that will simplify the process by do not requiring Dockerfiles, as described in https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container?pivots=dotnet-7-0
You are right, we need to update the docs accordingly, I'll keep this issue open until the docs reflect the current change.
We have removed the PrjectCapability to reflect that the VS support for IoTEdge modules is in maintenance mode https://github.com/microsoft/vs-azure-iot-edge-docs/issues/42
In addition to the new documentation, it would be nice to have a working example of a project on GitHub, since today it is impossible to create a new project as described in the documentation. I will be very grateful if you can share it.
I also encountered the impossibility of creating a module and connecting a common project to it. This issue is described in this item https://github.com/Azure/iotedge/issues/6606
good suggestion, we'll provide that sample to show the e2e flow to create and deploy IoTEdge modules based on the latest template.
I believe that by adopting the new "publish container" tooling it will fix the 6606 issue.
I just realized this too. I'm used to module.json and dockerfiles way to work, what can I do now to build and push my module? Is there any tutorial? The Readme file is not helping me enough.
We will provide a sample with the complete flow, including how to debug from VS, or VSCode.
For now, you can create the docker image with
Here are the docs to use this new method https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container?pivots=dotnet-7-0
if you need further customization on the base image, you can create your own base image, and then use containerbaseimage
what is missing, is the use of module.json to produce the deploymentManifest, so for now you can use the portal to deploy.
@rido-min When can I expect new documentation?
Hi @AlexandrStarov
Checkout this article https://dev.to/ridomin/developing-iotedge-modules-32ag and let me know if you are missing anything.
Hi @ridomin
First of all, thanks for the article, it has become a little more transparent how to work with IoT edge.
Now I have several questions about this article:
@AlexandrStarov I see your points, however the article is not a replacement of the current tooling, instead it shows how to develop (and debug) modules without any special tool. With this in mind:
virtual IoT edge device
. If you mean two instances of $edgeHub, I dont think so since the ports are hardcoded. If you are happy with the current tools in VS, Code or CLI, you can continue using those, and replace the dotnet projects with the updated version.
Also, keep in mind this repo only covers the dotnet template to scaffold a project to implement a module, and does not include any feature to deploy, since it should cover multiple modules and global configuration. What I usually do, is to configure the initial deployment from the portal to produce the deploymentManifest.json, so I can deploy from the CLI.
I believe the dockerfiles included in the previous version, are no longer required, since dotnet already has better docker integration story.
@ridomin Regarding point 3 in my previous comment. You are right, I meant to launch 2 $edgeHubs instances, which will be for two different devices.
I tried updating the projects for my current solution and updated the .Net version to 7. Fortunately, after the changes I can successfully launch using the tools in VS Code.
Unfortunately, I was unable to successfully apply your solution with "aziotedge-modinit" on my project. I understand the value of your example. But your example does not fully reflect step by step how to write such projects yourself.
Is there a publicly available roadmap for IoT products? What languages are preferable to use for writing modules? Because now it looks as if this direction is no longer planned to be developed.
I dont think you can run two instances of $edgeHub, since each one requires exclusive access to the same ports, and AFAIK those are not configurable.
aziotedge-modinit is only required to initialize the $edgeHub module in IoTHub to have a connection string, if you already have an IoTEdge device identity initialized you can omit this step. And if you have any issues with the tool, you can report it to https://github.com/ridomin/aziotedge-modinit
I'm guessing the step by step instructions you miss are for deployment rather than develop/debug. Once you have the container image pushed to a container registry, you can follow this doc https://learn.microsoft.com/en-us/azure/iot-edge/how-to-deploy-modules-portal?view=iotedge-1.4
I'm not aware of any roadmap at this point, but I've been told IoTEdge is feature complete, and we should not expect any new features, just security and bug fixes.
Some files are missing for a new solution. Can't follow this instruction https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-develop-for-linux?view=iotedge-1.4&tabs=csharp&pivots=iotedge-dev-ext.