quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.53k stars 2.61k forks source link

Improve developer experience of remote-dev #6103

Open sdaschner opened 4 years ago

sdaschner commented 4 years ago

Description We should consider improving the developer experience of containerized workflows:

Questions / possible implementation

geoand commented 4 years ago

cc @maxandersen

maxandersen commented 4 years ago

Hi @sdaschner much of this is captured in epic #5917 but I got a few questions to clarify your comments.

  • If developers run multiple contains locally during development, e.g. databases, external systems, mockservers, Quarkus dev mode should be supported easier to be run in Docker containers.

Do you just mean that it would be nice if we could run quarkus dev mode without requiring containers to include the build tools like maven or gradle ? then yes - that’s what #5917 is about. If not, can you clarify what you mean by "easier"

  • Developers might need to run a Quarkus (dev mode) inside a container, that is connected to the (cluster / Docker) network, and can access other services, while source file changes get reflected as well.

That is the exact usecase binary devmode (#5917) and remote-devmode is for so I hope that is captured.

  • Is it only possible to have the reload capabilities of dev mode with Maven (quarkus:dev)

No, you can do it with gradle too.

  • Or could we also start Quarkus from Java / JAR, and have a remote-dev mode attached to it?

In #5917 we got notion of "binary devmode" that will work on a binary level so when running in the container we don't need the build tools but just let your laptop do the work.

sdaschner commented 4 years ago

Thanks @maxandersen!

Do you just mean that it would be nice if we could run quarkus dev mode without requiring containers to include the build tools like maven or gradle ? then yes - that’s what #5917 is about. If not, can you clarify what you mean by "easier"

Yes, and also a leaner way to start that container in the first place, e.g. to use the same Docker image like the production app (if even possible), so the users don't have to craft a second Dockerfile for that local dev mode. E.g. that users can simply docker run [<my-special-networking-and-docker-confs>] <my-usual-image> <maybe-different-command> and then "connect" to that container from :remote-dev.

No, you can do it with gradle too.

Ok, you're right, I meant, with Maven from my build tool :)

Yes, I'm pretty sure we're on the same page. So what I want is:

Now, this works manually if I create an image similar to this, then run the container as desired and connect to it (see scripts).

maxandersen commented 4 years ago

its not settle yet how it will work yet but for the usecase of being able to use same image as production there would be no build tools nor any sources thus it would need what I call "binary devmode" and that would preferably just be a flag to the launch.

if we don't get that soon then yes, we should make it easy to have images with the right stuff built in; but then the base images would be quite much bigger so users would probably want to have two different ones.

sdaschner commented 4 years ago

In case there's something I can help with, lmk