Share via

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

Luis Molina Martinez 6 Reputation points
2021-07-16T15:11:32.317+00:00

Hi all,

I´m trying to follow this tutorial https://learn.microsoft.com/en-us/azure/databox-online/azure-stack-edge-create-iot-edge-module#update-the-module-with-custom-code along this other https://learn.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
Azure IoT Edge

An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.


2 answers

Sort by: Most helpful
  1. QuantumCache 20,681 Reputation points Moderator
    2021-07-28T00:43:15.323+00:00

    Hello @Luis Molina Martinez ,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 Learn

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

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

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Sander van de Velde | MVP 37,066 Reputation points MVP
    2021-07-17T10:27:02.833+00:00

    Hello @Luis Molina Martinez ,

    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

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.