Azure / iot-edge-v1

Azure IoT Edge
http://azure.github.io/iot-edge/
Other
525 stars 258 forks source link

[V2] Get Host IP Address in Modules #616

Closed danigian closed 6 years ago

danigian commented 6 years ago

Description of the issue:

In order to enable containers to host communication we should have the possibility to retrieve the host IP address in the Edge Modules. At the moment this is not feasible in an easy way (the easiest should be mounting a text file from the host filesystem)​

mrohera commented 6 years ago

This seems like a reasonable request. Would hostname work for you instead? If you really need IP, can you please state why? It would be good to understand the reasons.

mrohera commented 6 years ago

We will add this request to our task list.

danigian commented 6 years ago

@mrohera hostname would be perfect too

mrohera commented 6 years ago

We have implemented the hostname piece for modules and will be released with our June release. The way to query this within an Edge module would be via env variable IOTEDGE_GATEWAYHOSTNAME. This hostname would be data that would be configured by the deployer of the Edge runtime.

If the hostname (or for that matter any configuration) were to be ever modified, the entire deployment would be recreated. This way modules will always be in sync with what is explicitly configured.

myagley commented 6 years ago

Hello, this has now been released as part of the GA of IoT Edge. There are some changes required to the installation that are required to migrate from the Public Preview. You can learn more here: https://docs.microsoft.com/en-us/azure/iot-edge/quickstart-linux