Multi Container Dev Services #38398
Replies: 2 comments 36 replies
-
Wrt to "within the same network", this is still a mystery to me -- it works most of the time, but sometimes not. I do set this in all containers (if shared of course, which they are by default)
and then set aliases to all of them.
Anyway, I'm just about to do a new PR (closed the previous one - as it was too big :-) -- and you can see the concept behind it. |
Beta Was this translation helpful? Give feedback.
-
As explained in an above comment, I finally succeeded in making things work and having a devservice configuring itself differently (using 1, 2 or 3 containers) depending on other discovered running devservices. For that, I had to force the creation of a shared network for my dev service containers and those related to brokers (eg. Kafka). Kafka dev service manages this well by adding an extra listener when a shared network is detected. So it presents 2 possibilities for connection in the property of the bootstrap server: something like However, we discovered side effects... See microcks/microcks-quarkus#30, as that when I need help with this as introducing advanced relationships between dev services container breaks basic stuffs... I'd like to know if we can't introduce a flag that prevents the usage of shared network by devservices where it doesn't make sense. Something like: %dev.quarkus.mongodb.devservices.use-shared-network=false would prevent MongoDB from registering itself in the shared network automatically. From what I saw (and vaguely understood), a shared network was first introduced for running integration tests and thus using them by default in dev mode is an over-complication. What do you think? I appreciate your help and ideas on this! |
Beta Was this translation helpful? Give feedback.
-
Hello,
This is based on an email from @lbroudoux asking me about multi-container dev services and links between dev service containers.
I wonder how to manage dependencies between Quarkus DevServices and, more generally, between containers managed by DevServices.
I would need to attach/initialize them within the same network to enable communication via aliases and set dependencies to constrain the startup order.
For example, start the Microcks container after the Kafka container to avoid DNS resolution failures.
I know that @ozangunalp and @alesj have recently worked on that subject (or worked around the issue). Can you provide your insights?
Beta Was this translation helpful? Give feedback.
All reactions