eclipse-arrowhead / core-java-spring

Eclipse Public License 2.0
28 stars 51 forks source link

Service recognition with multiple Docker instances not possible #362

Closed BlackRose01 closed 1 year ago

BlackRose01 commented 2 years ago

Hello,

currently I try to set up an arrowhead use case which uses multiple docker instances. Service A wants to consume Service B. The problem here is that normally Docker bridges the network adapters so that containers receive a docker internal IP which is not part of the "host network". Thats means from the host and other external devices you can access the services if you know the hosts address but in a productive environment you will not get this information. Instead your container will get a hostname but when I try to access my container in Docker 1 with its hostname (e.g. servicea.docker.test) the container is not reachable from any device.

Another problem here is when I want to use Arrowhead with certificates. For that I need the ip from the host and the container but the ip of the container is dynamic.

Are there any solutions currently there to solve this problems?

KR, BlackRose01

Docker 1                     Docker 2                               Docker 1
----------       ----->      --------------------       ----->      --------------
Service A                    Arrowhead Services                     Service B
tsvetlin commented 2 years ago

Hello, did you fill out the domain.name key in the application.properties file? That key should solve this issue. If not and you have a solution, feel free to open a PR, I have not tested the framework with multiple instances of a core system before.

Thank you in advance

borditamas commented 1 year ago

Hello,

Unfortunately Arrowhead 4th generation doesn't support having multiple instances of a core system for the same cloud. But this feature is definitely should be considered for generation 5.

We have just released the v4.6.1, where a more flexible docker approach has been taken and bug fixes were managed. Take a look and please open a new issue if you still runs into some error.