Skip to content
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

Review hal-maven-jdk image #4

Open
8 tasks
metacosm opened this issue Oct 25, 2019 · 6 comments
Open
8 tasks

Review hal-maven-jdk image #4

metacosm opened this issue Oct 25, 2019 · 6 comments

Comments

@metacosm
Copy link
Contributor

metacosm commented Oct 25, 2019

  • make sure that it works for all supported java runtimes
  • make sure that maven dependencies are persisted between pod re-creation in /tmp/artefacts
  • make sure that the generated binary is persisted across pod re-creation in /deployments
  • make sure that build and run scripts work properly
  • clean things up (/tmp/artefacts is probably not the best spot where to put the maven dependencies, see if we can reuse the infra set up by the base image)
  • audit for best docker practices

Optional:

  • Figure out what's the best strategy for fast initial first build: have per-runtime images bundling their default dependencies (in the SB case, that would mean making sure that the BOM dependencies exist in the runtime image when we pull it) or whether a minimal hence fast pulling image is better even if we take an initial toll having to download maven dependencies for the first build.
  • Figure if adopting a layered approach where runtime dependencies would be put in a separate layer would be worth it (assuming the point above results in having bundled initial dependencies)
@gytis
Copy link

gytis commented Oct 25, 2019

Deployed a Spring Boot app in dev mode and then attached a link to it. All /tmp/artefacts/app.jar, /deployments/app.jar and /usr/src/app.jar are still there

@gytis
Copy link

gytis commented Oct 25, 2019

However, removing the link by oc delete -f src/main/resources/link.yml does not cause pod restart as oc apply -f src/main/resources/link.yml did

@gytis
Copy link

gytis commented Oct 28, 2019

Quarkus dev mode component fails with the following error:

time="2019-10-28T11:43:18Z" level=info msg="success to start program" program=run
  | Exception in thread "main" java.lang.NoClassDefFoundError: io/quarkus/runtime/Application
  | at java.lang.ClassLoader.defineClass1(Native Method)
  | at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
  | at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  | at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
  | at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
  | at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
  | at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
  | at java.security.AccessController.doPrivileged(Native Method)
  | at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
  | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
  | at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:27)
  | Caused by: java.lang.ClassNotFoundException: io.quarkus.runtime.Application
  | at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
  | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
  | ... 13 more
  | time="2019-10-28T11:43:19Z" level=debug msg="wait program exit" program=run
  | time="2019-10-28T11:43:19Z" level=error msg="program stopped with error:exit status 1" program=run

java -jar target/quarkus-demo-1.0.0-SNAPSHOT-runner.jar works locally. @metacosm any thoughts?

@metacosm
Copy link
Contributor Author

However, removing the link by oc delete -f src/main/resources/link.yml does not cause pod restart as oc apply -f src/main/resources/link.yml did

This is a known issue: halkyonio/operator#143

@metacosm
Copy link
Contributor Author

Quarkus dev mode component fails with the following error:
...
java -jar target/quarkus-demo-1.0.0-SNAPSHOT-runner.jar works locally. @metacosm any thoughts?

I don't know what Quarkus' dev mode does exactly so I'm not sure what's wrong. However, you probably need to check /deployments/app.jar and see if that file indeed contains the class that it looks for. I assumed that the *-runner.jar would be similar to a Spring Boot uber-jar but maybe I was wrong. Actually, now that I think of it, I think Quarkus doesn't use uber-jars so we might need to find another way to make things work.

@gytis
Copy link

gytis commented Oct 28, 2019

@metacosm I've created an issue for this but I don't have permissions to assign it to myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants