-
Notifications
You must be signed in to change notification settings - Fork 771
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
Define build strategy with Kubernetes #97
Comments
One point I would like to add here is the builds should be generic enough that image format is supported for both container runtimes that kubernetes supports i.e. docker and rkt |
you want to run kompose within a k8s cluster ? I am not sure I get it. It is a client side tool. |
Hmm, I'm not sure I get it either. Only way how to do builds with Kubernetes that I can think of right now is to build image (similarly as docker-compose would) and than push it to some registry that is also accessible by targeted Kubernetes cluster. |
I created this issue if we wanna give a end-to-end feel on k8s we will have to decide what we do with builds, are we gonna handle image builds for user? or right now keeping it out of our scope and giving user a warning and asking them to build themselves? Our target users are gonna be developers who use kompose + k8s running locally in minikube like env, so how are we gonna handle this? I want views of all of you folks. |
ok got it. IMHO for now we should skip "builds" and define it as "unsupported". Because for images to be used within a k8s cluster they would need to be uploaded to a registry as well. So it will be difficult to run out of the box with kompose. There will be manual intervention not matter what. |
I agree with @Runseb 😃 |
I'm +1 for @Runseb |
Just to be clear, I also agree with @surajssd that we should give an end-to-end feel and should support "builds" in the future. We can push to a registry specified in a preference file. K8s provides private Docker registry addon that we can use. |
With support for openshift buildconfig implemented, we are now in a position to complete the end-to-end build story by supporting local builds for kubernetes and openshift. Below, I am documenting the local build feature. GoalTo support IssueKubernetes has a registry addon to host container images privately, but it does not have a mechanism like Openshift's buildconfig to internally build images from source in an automated way and push it to the internal registry. As a result, a kompose user trying to convert a compose file with a build directive and deploy it to kubernetes will need to do the following:
In order to provide a good user experience to Kubernetes Kompose users, we need to automate local image build, image upload to Kuberenetes (or Openshift) accessible registry. This will also prove to be useful for Openshift as well by allowing Kompose users (developers) to deploy local code without pushing it to a public repository. Proposed solution
|
@rtnpro Thank you for the proposal. To be clear, I am NOT against the proposal. In fact, I would like to see this done and will highly appreciate the end-to-end feature in Kompose. But just wanted to bring this though to the table so that we know what we are changing. Looks good otherwise but I would appreciate other folks who are more knowledgeable than me. |
On Mon, Jan 2, 2017 at 10:20 AM, Pradeepto Bhattacharya ***@***.***> wrote:
@rtnpro Thank you for the proposal.
I have one question though - one of the tenet of Kompose is that the user
doesn't need docker engine / CLI installed / running. This proposal assumes
that Docker engine / CLI is installed and running. Is that correct?
Yes
|
If we assume that Kompose is used by developers developing containerized applications that they will need Docker anyway. (More so if they have docker-compose file with Kompose will be still useful without Docker (it will be required only if build is used)
We don't need any metadata to override it. Ff you have docker-compose file like this: version: '2'
services:
foo:
build: .
image: myregistry.example.com/myimage:v0.1 You don't need any additional information you have everything that you need. (Expecting that docker is already authenticated to access myregistr.example.com) |
+1. I think that makes sense to have Kompose triggers the |
we don't need label for that. As repository is part of the image name and that can be set by |
Yes I agree. If user doesn't set repository in the image name then we make the default to docker hub. |
But also consider the part where images need to be pushed to registry? Who will do that user does manually or kompose does build and push both(using docker in backend)? |
Kompose will do it. It will use docker engine to do build and push. |
okay so we are assuming here that user will have:
|
Yes, it will be usually local docker or boot2docker on mac.
That is one of the options that user has. He can use some hosted registry like Docker Hub or quay.io
If his registry is signed by untrusted certification authority or selfsigned, than yes.
yes But overall it is yes to your list. It is not that great UX as with just docker-compose but this is by design more complicated thing. We can do this to start with it, and than improve it if we figure out how. |
Initial work pushed to #372 |
In case of supporting local builds for openshift, let's add an optional flag: |
I would probably do it other way around. As BuildConfig requires relaxed
permissions on OpenShift cluster that are not in default configurations. I
think that we should use local build as default for OpenShift.
…On Wed, Jan 11, 2017 at 1:58 PM, Ratnadeep Debnath ***@***.*** > wrote:
In case of supporting local builds for openshift, let's add an optional
flag: --local-build for convert for openshift provider. By default,
Openshift will use buildconfig.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#97 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADfdpJEWRSr9dbV_v_G_nekGyuFp_rIks5rRNIDgaJpZM4JhUBg>
.
|
#521 Has been merged! 🎉 🎉 🎉 Let's close this! 👍 |
Kubernetes by default has no container image build mechanism, so what are the ways are we gonna support it?
The text was updated successfully, but these errors were encountered: