-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to integrate Quarkiverse Amazon DevServices with custom Dev Services #1527
Comments
AFAIK, it is currently not possible to orchestrate order of dev services from different extensions. I guess each container should be responsible of waiting for its dependencies to be available to be ready. This should be enough if the dependency graph acyclic and it keeps things simple and isolated. When not possible, this discussion is a good start describing your issue. you could also look at this DevServices Processor where it implements a consumer of DevServicesLauncherConfigResultBuildItem to ultimately start a container but you will not be able to return dev services properties. As for, Quarkus Amazon extension, I think that if we add ability to configure a network alias for the container, you should be able to connect to it from your other dev services when using a shared network. The line Would you like to contribute ? |
Hi @scrocquesel - yes i'd be happy to contribute! The network alias makes a lot of sense. One thing I noticed was that the localstack container seems to always be configured to use a shared network today, the A way to do this without making this a breaking change would be to update the Alternatively, since the container is always configured with a shared network, we could simply always add the network alias like is done in other quarkus extensions that always use shared networking (keycloak, kerberos, rabbitmq, kafka, etc). Let me know your thoughts! |
By the way, I got my use case to work following the conventions from |
I think this is the easiest and conformist solution. |
Sounds good, thanks! This will definitely simplify my setup, I can send a PR with the network alias. If it's helpful, I can include some docs about how to integrate another dev service with this extensions dev service |
I have a quarkus app that uses Amazon S3 that I like to use in quarkus dev mode. I really enjoy and appreciate this extensions ability to start a localstack container and configure my AWS SDK inside the app.
My app has an external dependency on another service that I run locally with Docker. This service also needs access to the same localstack container as my app. I attempted to write a dev service and can quite easily create another extension that creates a new
DevServicesResultBuildItem
responsible for starting/stopping a docker container.However, getting access to the localstack container's generated host name on the the network is quite challenging. This line of code is responsible for configuring the network with the hostname
localstack-<random-string>
.It would be nice to be able to explicitly depend on the Amazon Dev Service build item in some way shape or form, but I was unable to do that. I can't reliably find that the amazon devservice container starts before my own build item so manually inspecting the docker daemon state and attempting to discover the localstack network/hostname/host port doesn't seem to work either.
Is there some mechanism I'm missing with quarkus extensions?
The text was updated successfully, but these errors were encountered: