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

Kompose up for OpenShift #200

Merged
merged 3 commits into from
Oct 18, 2016
Merged

Kompose up for OpenShift #200

merged 3 commits into from
Oct 18, 2016

Conversation

kadel
Copy link
Member

@kadel kadel commented Oct 11, 2016

kompose --provider openshift up
This has similar behavior as kompose up for k8s. It assumes that you already have .kube/config setup (you are logged using oc login).
It converts docker-compose.yaml to DeploymentConfigs, Services and ImageStreams, those objects are then deployed to OpenShift cluster.

This PR also updates bunch of vendored libs.
Mainly OpenShift 1.4.0-alpha.0 this is required to avoid collisions between Docker version that is required by OpenShift and version that Kompose requires for bundle support.
Upgrading OpenShift forced updates for a lots of other libs. Kubernetes is now in version v1.4.0-beta.3
#40

requires #199 - merged

Issues:

Can't update vendored libs :-(

godep save ./...
godep: Package (github.com/docker/docker/pkg/term/winconsole) not found

Solved in 2273436 - upgrading OpenShift to 1.4.0-apha.0 this version is using docker version that is compatible version that we require for bundle support.

is still not working (fails while creating deployment) :-(

All issues are solved, and it is ready for review

@ngtuna
Copy link
Contributor

ngtuna commented Oct 11, 2016

Can't update vendored libs :-(
godep save ./...
godep: Package (github.com/docker/docker/pkg/term/winconsole) not found

Does it (g/docker/docker) conflict revision with one I upgraded at #174 ?

@kadel
Copy link
Member Author

kadel commented Oct 11, 2016

It was in conflict even before that :-(
But it was OK, because we haven't been using parts of OpenShift that are calling this.

It his PR I'm using github.com/openshift/origin/pkg/client and github.com/openshift/origin/pkg/cmd/util/clientcmd and it looks like that they both have dependency on github.com/docker/docker/pkg/term/winconsole

@kadel kadel force-pushed the openshift-up-new branch 3 times, most recently from 1bf46d5 to 2273436 Compare October 13, 2016 13:27
@kadel
Copy link
Member Author

kadel commented Oct 13, 2016

🎉 , now it is ready for testing and review

@kadel kadel changed the title [WIP] Kompose up for OpenShift Kompose up for OpenShift Oct 13, 2016
@kadel kadel mentioned this pull request Oct 13, 2016
@sebgoa
Copy link
Contributor

sebgoa commented Oct 13, 2016

Do you have tests in there for conversion to DeploymentConfigs and ImageStreams ? does not look like Travis run any.

Also if would be good to add a user-guide in /docs ....

@kadel
Copy link
Member Author

kadel commented Oct 13, 2016

Yes, test for DeploymentConfigs are there (every conversion to OpenShift generates DeploymentConfig). Same for ImageStreams, every OpenShift conversion generates ImageStream, tests was updated in #160

@kadel
Copy link
Member Author

kadel commented Oct 13, 2016

I've added commit with updated user-guide.

@dustymabe
Copy link
Contributor

seems to be working for me - one of my imagestreams was not working right, but I think that might be another issue.

@dustymabe
Copy link
Contributor

ok - i'm having some trouble with image streams in the example I am trying to do. This is the file: https://github.com/dustymabe/kompose/blob/dusty-foo-bar/examples/mlbparks.yml

When I create with openshift it doesn't work complaining about imagepullbackoff for the dustymabe/mlbparks image. Here is what I used to get into openshift:

$ ../kompose --provider openshift -f mlbparks.yml up                                                                                                                                              
We are going to create OpenShift DeploymentConfigs and Services for your Dockerized application. 
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. 

INFO[0000] Successfully created service: mlbparks       
INFO[0000] Successfully created service: mongodb        
INFO[0000] Successfully created deployment: mlbparks    
INFO[0000] Successfully created ImageStream: mlbparks   
INFO[0000] Successfully created deployment: mongodb     
INFO[0000] Successfully created ImageStream: mongodb    

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is' for details.

When I convert to "pretend" that I am kube by passing --rc then the image pulls fine and the application comes up. Here is that command:

$ ../kompose -f mlbparks.yml convert --stdout --rc | oc create -f -
service "mlbparks" created
service "mongodb" created
replicationcontroller "mlbparks" created
replicationcontroller "mongodb" created

The openshift environment I am targeting is:

OpenShift Master:
    v3.2.1.15-8-gc402626
Kubernetes Master:
    v1.2.0-36-g4a3f9c5 

@kadel
Copy link
Member Author

kadel commented Oct 14, 2016

hmm :-(
I've just tried your mlbparks.yml and it worked fine for me.
Only difference is that I used OpenShift Origin 1.3.0.

It complained only for dustymabe/mlbparks image? centos/mongodb-26-centos7 pulled successfully?

@dustymabe
Copy link
Contributor

I've just tried your mlbparks.yml and it worked fine for me.

Then I wouldn't worry about it. Most likely my setup.

It complained only for dustymabe/mlbparks image?

yes. It only complained for one of the images. The onther one was fine.

@dustymabe
Copy link
Contributor

Can we get this rebased? :)

@kadel
Copy link
Member Author

kadel commented Oct 18, 2016

Ah, It conflicted with my other PR :-)

Rebased.

@dustymabe
Copy link
Contributor

ping @surajssd @janetkuo @ngtuna @sebgoa - can we get this reviewed by a maintainer?

@ngtuna
Copy link
Contributor

ngtuna commented Oct 18, 2016

@dustymabe I think some of us don't have Openshift account for testing. But you guys made some tests already and user-guide was also added, it should be good to let it pass. We can always open issue later.

@kadel
Copy link
Member Author

kadel commented Oct 18, 2016

@ngtuna If you would like to play with OpenShift in future you can use minishift it is practically same as minikube but it starts vm with OpenShift ;-)

@kadel kadel merged commit d9899b7 into kubernetes:master Oct 18, 2016
@ngtuna
Copy link
Contributor

ngtuna commented Oct 18, 2016

Thanks @kadel for the reference 👍

On Tuesday, October 18, 2016, Tomas Kral notifications@github.com wrote:

@ngtuna https://github.com/ngtuna If you would like to play with
OpenShift in future you can use minishift
https://github.com/jimmidyson/minishift it is practically same as
minikube but it starts vm with OpenShift ;-)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#200 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB31xxMoSAu2_gZJum51UknzbAiRzxpkks5q1Of9gaJpZM4KTa-U
.

Regards,
Tu Nguyen
Sent from mobile

@dustymabe
Copy link
Contributor

@ngtuna also you can try out for free in openshift online: https://www.openshift.com/devpreview/

@surajssd
Copy link
Member

@dustymabe @kadel so this worked for me when I tried it today with the docker-compose file in examples well.

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.

5 participants