Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
cours:iot:node-red_on_docker [2019/01/16 11:28] tigli [Mosquitto Installation in a second container] |
cours:iot:node-red_on_docker [2019/01/28 19:22] (Version actuelle) tigli [Network Management in Docker] |
||
---|---|---|---|
Ligne 59: | Ligne 59: | ||
* toke/mosquitto Finally this tells Docker which container to lookup on DockerHub. I’ve been using this image from Toke without issue for many months now. | * toke/mosquitto Finally this tells Docker which container to lookup on DockerHub. I’ve been using this image from Toke without issue for many months now. | ||
- | == Caveats : Docker Containers Network Configuration == | + | == Caveats : Docker Containers Mosquitto Configuration == |
+ | {{ :cours:iot:hostname-port_configuration.png?500 |}} | ||
+ | |||
+ | |||
+ | == Containers Network configuration for docker and its containers == | ||
+ | |||
+ | // They in bridge mode and disconnect to host network // in the following steps. | ||
+ | |||
+ | The result is described in the figure bellow. | ||
+ | ==== Caveats : Docker Containers Network Configuration ==== | ||
{{ :cours:iot:docker_containers_network.jpg?700 |}} | {{ :cours:iot:docker_containers_network.jpg?700 |}} | ||
- | == Caveats : Docker Containers Mosquitto Configuration == | ||
- | {{ :cours:iot:hostname-port_configuration.png |}} | ||
=== Test with a GUI Clients === | === Test with a GUI Clients === | ||
[[http://mqttfx.org/|JavaFX based MQTT Client]] | [[http://mqttfx.org/|JavaFX based MQTT Client]] | ||
+ | |||
+ | The GUI client is running on the native computer, so the access to the mosquitto broker is done through // localhost:2500 // in this case (see above). | ||
=== Test Shell MQTT Clients === | === Test Shell MQTT Clients === | ||
docker run -it ubuntu bash | docker run -it ubuntu bash | ||
+ | |||
+ | If the clients are running on the native computer, the access to the mosquitto broker is done through // localhost:2500 // in this case (see above). | ||
+ | |||
=== Test with Node-Red in a Docker Container === | === Test with Node-Red in a Docker Container === | ||
+ | |||
+ | Because Node-Red is running in a Docker container, the MQTT client nodes can access to the mosquitto broker through //172.17.0.1// (the gateway address) in our case. | ||
+ | |||
+ | ===== Appendices ===== | ||
+ | |||
+ | ==== Network Management in Docker ==== | ||
+ | |||
+ | [[https://blog.docker.com/2016/12/understanding-docker-networking-drivers-use-cases/|understanding docker networking drivers use cases]] | ||
+ | [[cours:iot:network_management_in_docker|Network in Docker]] | ||
+ | |||
+ | |||
+ | ====== Solutions ====== | ||
+ | |||
+ | {{:cours:iot:solution_node_red_and_mosquitto_clients.rtf|}} |