Skip to content

Add odo watch + quarkus:dev live reload support as one mode of the S2I #1390

@emmanuelbernard

Description

@emmanuelbernard

In Quarkus, we have an integrated live reload model that listens to resources (like config files) and .class changes.
When someone hits refresh in the browser, Quarkus checks if any file has changed and restart the app
(not the JVM).
It’s fast enough (less than .5 to 1s for a reasonable size app).
So for Quarkus we do need of odo watch to rsync specific directories so that Quarkus’s live reload that we call quarkus:dev today kicks in accordingly.

Note that it's different from a classical S2I Java process which AFAIK is like this:

  1. push code
  2. s2i starts maven build
  3. start java app off the maven build

In the Live reload mode, the model is more like this

  1. enable odo watch
  2. deploy the container which will run mvn package quarkus:dev and be ready to listen to requests
  3. on .class or resource changes in a specific set of directories, rsync said files into the container in the specific location /some/determined/path/target
  4. on resource changes, Quarkus does its magic from within the container

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions