question

LuisMolinaMartinez-9067 avatar image
0 Votes"
LuisMolinaMartinez-9067 asked LuisMolinaMartinez-9067 commented

Develop a C# IoT Edge module to move files with Azure Stack Edge

Hi all,

I´m trying to follow this tutorial https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-create-iot-edge-module#update-the-module-with-custom-code along this other https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-deploy-configure-compute-advanced, the code is working, I put a file in the local share and the trigger jumps, my module installed in the ASE recognizes the event, the issue comes when dealing with the routes, in the second article there is a configuration


 {
    "HostConfig":{
       "Binds":[
          "/home/hcsshares/mydbesmbedgelocalshare1:/home/input",
          "/home/hcsshares/mydbesmbedgeshare1:/home/output"
       ]
    }
 }


I´m not able to fill it accordingly, moreover the properties of my local share doesn´t shows /home..., it is just the name of the share, so in my case I had to put this:

 "settings":{
       "image":"${MODULES.FileCopyModule}",
       "createOptions":{
          "HostConfig":{
             "Binds":[
                "/sharetdunfslocal:/home/input",
                "/nfslocal2:/home/output"
             ]
          }
       }
    }

but when the trigger raises, I got an error saying that the file "/home/input/test.txt" doesn´t exist, any tip?

Regards.



azure-iot-edge
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Welcome to Microsoft Q&A Platform and thanks for your query. Community SME's on this topic or our team will review your scenario and circle back at the possible earliest time.

1 Vote 1 ·
SandervandeVelde42 avatar image
1 Vote"
SandervandeVelde42 answered LuisMolinaMartinez-9067 commented

Hello @LuisMolinaMartinez-9067 ,

The binding is bound to certain path rules like:

{
"HostConfig": {
"Binds": [
"/var/iot-edge-filewatcher/exchange:/app/exchange"
]
}
}


Take a look at this blog post.

There you see an example of a C# module accessing a local folder in Linux.

You can test your module with:

sudo docker exec -i -t echo /bin/bash


· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I will do, thanks Sander.

Regards.

1 Vote 1 ·

Hi Dear @SandervandeVelde42 ,

sorry for the delay, I had another fire to fight and then I went on leave, at the end what works is to use Mounts instead of Binds, in one of the original posts there was some information about using the ASE PRO (not FGPA), but I didn't noticed it at the beginning.

I'm going to continue the testing, for now I noticed that the trigger is really slow, it takes too many time after uploading the files.

Thanks for your support.

1 Vote 1 ·

Hi @SandervandeVelde42 , thanks for the info, in your blog post the folder in the host is created with the deployment, but in my case I'm using an Azure Stack Edge device, there is no access to the shell,I want to use a Share created in the Azure Stack Edge. Anyway your post give me and idea on how to debug the issue, thanks.

Regards.

0 Votes 0 ·

Hello @LuisMolinaMartinez-9067 ,

I understand the complication. I hope this helps.

If you have found out the correct container create options or another solution, please share it.

Thanks,

Sander

0 Votes 0 ·
SatishBoddu-MSFT avatar image
1 Vote"
SatishBoddu-MSFT answered

Hello @LuisMolinaMartinez-9067 ,Thanks for reaching out on this forum.

Below is the response from our product team, I hope this helps with your initial query.


There is a step-by-step doc that walks through this exact scenario: reading/writing to files on ASE. The article is here: Tutorial to filter, analyze data on Azure Stack Edge Pro FPGA with compute | Microsoft Docs

Please let us know if you need further help in this matter.

If the response is helpful, please click "Accept Answer" and upvote it.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.