You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 ConfigureUtil.configureSharedNetwork should be rewrited accordingly to a more recent pattern introduced by this PR. Then when shared network is turned on, we can add a predictable network aliases based on the serviceName (something like .withNetworkAliases(serviceName);) The alias will be localstack-s3 in dev mode.
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: