Remote Development with Quarkus
Add folowing dependencies:
quarkusDev 'io.quarkus:quarkus-minikube'- ~
quarkusDev 'io.quarkus:quarkus-container-image-docker'~ -> not needed, we use jib
Add variables to application.yml (if needed):
quarkus.package.type=mutable-jarquarkus.live-reload.password=quarkus
change to minikube container registry
eval $(minikube -p minikube docker-env)
build application with gradle, it will start in minikube
../gradlew build -x test -Dquarkus.kubernetes.deploy=true -Dquarkus.profile=dev
get your local minikube ip
minikube ip
connect local agent to remote dev using minikube ip
./gradlew quarkusRemoteDev -Dquarkus.live-reload.url=http://minikube-ip:8080 -Dquarkus.profile=dev
notes:
- ~what should networking path be? needs to be set with variable
quarkus.live-reload.url=http://my.cluster.host.com:8080~ ->set to minikube ip - ~need to add arg to start in dev mode~
- ~Error in devmode:
Exception in thread "main" java.nio.file.NoSuchFileException: /home/jboss/lib/deployment/deployment-class-path.dat~ wasn't starting with dev profile - when starting host instance in minikube, readiness probe failing, so local agent can't connect
So it works, but the dev console is not available or it can not reload classes into the jar?
@HknLof there was a bug because i wasn't starting the host in minikube with the dev profile.
only thing not working as of now is that the Readiness probe of the host is failing due to refused connection. Other than that i think it should work. I'm going to turn the Liveness/Readiness probes off for testing
@HknLof it's not the probes causing the problems, but our filters and transforms paths are causing our app to fail when running remote.
So we need to account for mounting the folder by adjusting the Dockerfile?
That's my guess. We could have a look together on monday if you'd like.
Currently, we are loading the images with load-image-k8s, that seems to be sufficient at this point. Closing!