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

Native S2I Builder image #1358

Merged
merged 19 commits into from
Mar 19, 2019
Merged

Conversation

vorburger
Copy link
Contributor

No description provided.

@vorburger
Copy link
Contributor Author

How cool is this? (for #304)

@siamaksade @cescoffier @dmlloyd @gsmet @geoand @gastaldi

@geoand
Copy link
Contributor

geoand commented Mar 8, 2019

Looks great!

Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Added some minor suggestions, feel free to approve or reject them 😄

docker/centos-graal-maven-s2i/Dockerfile Outdated Show resolved Hide resolved
docker/centos-graal-maven-s2i/Dockerfile Outdated Show resolved Hide resolved
gastaldi and others added 2 commits March 8, 2019 22:36
Co-Authored-By: vorburger <mike@vorburger.ch>
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geoand
Copy link
Contributor

geoand commented Mar 8, 2019

Very good stuff!

Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's pretty cool, I've made a few comments.

docker/centos-graal-maven-s2i/Dockerfile Show resolved Hide resolved
LABEL io.openshift.s2i.scripts-url="image:///usr/local/s2i" \
io.openshift.s2i.destination="/tmp" \

io.k8s.description="Platform for building and running Quarkus.io Native Java applications" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've attempted to adhere to that in an upcoming update (and raised #1377), hopefully better now.

docker/centos-graal-maven-s2i/README.md Show resolved Hide resolved
docker/centos-graal-maven-s2i/README.md Outdated Show resolved Hide resolved
oc new-app quarkus-native-s2i~https://github.com/quarkusio/quarkus-quickstarts --context-dir=getting-started-native --name=getting-started-native

Note that GraalVM-based native build are more memory & CPU intensive than regular pure Java builds,
and you therefore may need to increase the quota for OpenShift's S2I builder containers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give some hint about this?
I guess you can edit the build object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping someone else would help with how exactly to do that... 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There now is at least some doc. Could always be further improved, but god enough for a 0.1?

docker/centos-graal-maven-s2i/s2i/assemble Outdated Show resolved Hide resolved
docker/centos-graal-maven-s2i/s2i/run Outdated Show resolved Hide resolved
@cescoffier
Copy link
Member

BTW, how will we version the S2I, during the release process? If so how does that work?

@vorburger
Copy link
Contributor Author

BTW, how will we version the S2I, during the release process? If so how does that work?

Not 100% sure I know what you mean, but if you are asking how we will release a container image from this Dockerfile to e.g. Quay.io (and/or Docker Hub), then that's trivial to set up (IFF you keep a single Dockerfile ... see above), and it can easily be made to "tag" such images based on the branch in this repo. Does this help?

Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments

docker/centos-graal-maven-s2i/Dockerfile Outdated Show resolved Hide resolved
docker/centos-graal-maven-s2i/Dockerfile Show resolved Hide resolved
docker/centos-graal-maven-s2i/Dockerfile Show resolved Hide resolved

ENV PATH=$PATH:"/usr/local/s2i"

RUN mkdir /quarkus.io/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really minor, but I try to about . in my directory name. What about just "quarkus"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's now /home/quarkus OK for you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

docker/centos-graal-maven-s2i/Dockerfile Show resolved Hide resolved
@vorburger vorburger changed the title add Native S2I Builder image v0.1 (#304) [WIP] {NOK} add Native S2I Builder image v0.1 (#304) Mar 18, 2019
This should fix this S2I build error seen on OpenShift:

build error: image "..." must specify a user that is numeric and within the range of allowed users
* master: (167 commits)
  Allow for usage of @ConfigProperty on fields without the need for @Inject. Fixes quarkusio#1315.
  Expose all flavors (core, axle, rx) of Vert.x EventBus
  RestClient - passing incoming JAX-RS headers, fixes quarkusio#1017
  JAX-RS body writers for Vert.x JsonObject and JsonArray
  Increase CI memory
  PathTestHelper should accept default Gradle build paths now + make sure we run the test in gradle-it
  Change to use ./mvnw
  Update opentracing guide to describe using application.properties as alternative to env vars
  fix npe in dev mode when source is missing in recompilation diagnostic
  Add the quarkus-elytron-security component in the BOM
  Moves the logic that handles the registration of schema class for serialization in smallrye-openapi-extension
  Add Maven Wrapper to generated projects
  [security extension] - AuthConfig only configured if IdentityManager is produced
  quarkusio#1522 Warning to keep H2 version as is
  Minor corrections to mx and git repo clone instructions.
  programmatic client generation for MP Rest Client, fixes quarkusio#1317
  Hibernate ORM - Fix config property name in error message
  Camel - Use a constant for Camel root package directory
  Micro version updates
  JAX-RS Generate reflection declaration from MP OpenAPI schema definition
  ...
@vorburger vorburger changed the title [WIP] {NOK} add Native S2I Builder image v0.1 (#304) add Native S2I Builder image v0.1 (#304) Mar 18, 2019
@vorburger
Copy link
Contributor Author

@cescoffier I've further tested this, and (from my side) this is good for merge now.

@cescoffier cescoffier changed the title add Native S2I Builder image v0.1 (#304) Native S2I Builder image Mar 19, 2019
@cescoffier cescoffier added this to the 0.12.0 milestone Mar 19, 2019
@cescoffier
Copy link
Member

Waiting for CI and will merge.

# This part is heavily inspired by ../centos-graal/Dockerfile
FROM centos:latest

ARG GRAAL_VERSION=1.0.0-rc13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future we would need to have a way to easily remember to update this every time we are working on updating to the latest GraalVM version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@geoand geoand Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

# a TODO future PRODUCTION version of this would probably want tomake it possible to
# e.g. pass additional parameters to the executable, as does fabric8io-images/s2i's run script.

${QUARKUS_HOME}/*-runner -Dquarkus.http.host=0.0.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-Dquarkus.http.host=0.0.0.0 shouldn't be needed anymore since it's now the default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is that already released, right now? I would prefer to keep this and then see it removed a while after a new release, together with more generally cleaning this up in many places where it currently still appears.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is in master and will be present in the 0.12.0 release that I think @cescoffier will be doing tomorrow.
I'll leave it up to you to best decide how to handle this :)

Copy link
Contributor

@geoand geoand Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should keep it based on this #1312 (comment)

@vorburger
Copy link
Contributor Author

Waiting for CI and will merge.

@cescoffier merge?

@cescoffier cescoffier merged commit 6c7c813 into quarkusio:master Mar 19, 2019
@cescoffier
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants