-
Notifications
You must be signed in to change notification settings - Fork 349
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
jib builder #1656
Comments
/cc @astefanutti |
This issue has been automatically marked as stale due to 90 days of inactivity. |
I think it would be nice to consolidate on jib (except of s2i probably) and get rid of the other build strategies mentioned here: #3336 |
Would it make sense to target for a 2.0 version? It looks like we won't be able to maintain compatibility (at least, not that easily) if we switch to something new. |
Yes for 2.x |
Something else we want to consider is to support multi-architecture via JIB: see #1238 |
I spent some time getting to know the existing JIB plugins available. The ones I found and tested are:
I did some build test using the following requirements :
The native build still needs to be tested but in the context of container image build is it also about a runner being made available in /tmp/kit-xxxxxx-yyyyy/context after the build phase, so it should be covered but the requirements. I put all my data here : https://github.com/gansheer/jib-work Only two of the tested plugins validate all the requirements : Jib maven plugin and Fabric8 docker plugin. Seeing the Fabric8 docker plugin's version is 0.41.0, I feel the Jib maven plugin is the best choice. The Jkube Kubernetes Plugin is still a good candidate if it can add the multi-architecture support. I found it offers a lot of flexibility and also come with a Jkube Openshift Plugin built on top of Kubernetes Plugin that has s2i features. What I see as an implementation roadmap for the addition of a jib publish strategy would be:
Last notes:
Please don't hesitate to tell me your opinions on this and any additional inputs. cc @lburgazzoli @astefanutti @oscerd @claudio4j @christophd @tadayosi |
Great analysis. I think that eventually JIB and JKube may coexist if we manage to have enough resources to support both. For the time being we could start with JIB implementation IMO. |
I am trying to understand the reason behind some code designs. This is partially related to the #4024 discussion. From what I can see the effective build code consist of 2 Tasks: a BuildTask and a PublishTask. The BuildTask itself contains many Steps separated in 5 phases:
I want to find a right way to add the maven command for the Jib build in the new Publish strategy. From the current code, I don't get the information about the build maven command already generated by the build task (passed through the steps in the builderContext), that leaves me 3 choices (that I can see):
Before making any design choice I would like to understand the following points:
I would really like your opinions and any input that could help me avoid any known pitfall. cc @squakez @claudio4j @christophd @lburgazzoli @astefanutti @oscerd @tadayosi |
@gansheer I don't have the full historical context to answer, but from what I've experimented in the past, the best approach is to go in iterations and make live past and new approaches for a short period of time. IMO, you can keep the "build" part the way it is now (we may rework this part in #4024). The "publish" part with the JIB strategy may be overlapping what we're already doing in the "build". What I think you could do is not to worry at this stage. I think you should consider the input coming from the build part (ie, the Maven project in a given directory), then, you should "decorate" it with the configuration required by JIB (ie, adding plugin and registry configuration). Finally you can run, again, a maven command but through the JIB plugin this time. Hope it helps. |
Thank for you input @squakez . To explain the technical code problem. The maven command expect the following informations:
camel-k/pkg/util/maven/maven_command.go Lines 157 to 166 in 4b5b5d3
Just to be clear : your advice is to only take what is in the /tmps/kit-xxxxxx directory by principle and ignore what is computed in the build task ? |
So, what you're trying to do is to unmarshal what the "build" has provided before. IMO we could avoid that step and instead change the configuration structure on the directory files. Basically it would be a very low level "publisher" whose goal is to parse the pom xml, add some configuration with some raw editor, save it back and run the |
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy * Use google jib plugin
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Manage container layers in generated image
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Use builder maven profiles trait to configure jib plugin * The ConfigMap is created with: * maven jib plugin profile content in profile.xml * kit as an owner * The Jib Profile is used in the Jib published strategy
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Use builder maven profiles trait to configure jib plugin * The ConfigMap is created with: * maven jib plugin profile content in profile.xml * kit as an owner * The Jib Profile is used in the Jib published strategy
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Use builder maven profiles trait to configure jib plugin * The ConfigMap is created with: * maven jib plugin profile content in profile.xml * kit as an owner * The Jib Profile is used in the Jib published strategy
Closed by #4680 |
Evaluate to use jib [1] as a builder strategy and eventually leverage its plug-in extension mechanism [2]
[1] https://github.com/GoogleContainerTools/jib
[2] https://cloud.google.com/blog/products/application-development/using-jib-to-containerize-java-apps
The text was updated successfully, but these errors were encountered: