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

Add OpenShift support #36

Closed
kadel opened this issue Jul 13, 2016 · 12 comments
Closed

Add OpenShift support #36

kadel opened this issue Jul 13, 2016 · 12 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/P1

Comments

@kadel
Copy link
Member

kadel commented Jul 13, 2016

We would like to contribute OpenShift support to kompose2.
In core OpenShift is basically Kubernetes with some additional objects like BuildConfig, DeploymentConfig, ImageStream or Route.
With BuildConfig OpenShift can even support docker-compose build directive.

I guess that this first design question would be how command line is going to look like.
What if we use provider (orchestration tool) name as command and actions as subcommands?
Examples how it would look like:

kompose kubernetes convert
kompose kubernetes up

kompose openshift convert
kompose openshift up

When we do it like this, than in future different providers could even have different actions.

@ngtuna
Copy link
Contributor

ngtuna commented Jul 13, 2016

@kadel I suggest to go with:

kompose convert --provider openshift

Then we can support different providers with a small change of the current code base. Also IMHO adding --provider flag looks better

@ngtuna ngtuna added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 13, 2016
@janetkuo
Copy link
Member

+1 on adding flag

@sebgoa
Copy link
Contributor

sebgoa commented Jul 13, 2016

I was thinking about this a bit, especially considering that I feel the options are getting a bit "crazy".

Maybe we should use subcommands to have a better structure and avoid so many boolean definition and if statements.

We could use subcommands for objects and keep the option for --stdout --out --yaml and --provider.

something like:

kompose convert daemonset
kompose convert daemonset --provider openshift
kompose convert rc
kompose convert rc --provider openshift

By default we create a service for every docker-compose service.

thoughts ?

@janetkuo
Copy link
Member

janetkuo commented Jul 13, 2016

@Runseb I like your proposal. Will we still provide default controller (i.e. deployment) when kompose convert is executed without specifying which controller? I'm leaning toward yes, since users don't need to figure out which to choose if they're new to kubernetes.

@janetkuo
Copy link
Member

@Runseb does your proposal imply that converting compose to multiple types of controllers (e.g. kompose convert -d -ds) won't be supported anymore?

@kadel
Copy link
Member Author

kadel commented Jul 13, 2016

I'm afraid that this might get little messy 😢

As OpenShift adds few thinks on top of Kubernetes you will get options that are not valid for all providers.
For example:
kompose convert deploymentconfig - This will be valid only for OpenShift and not for Kubernetes.

@ngtuna
Copy link
Contributor

ngtuna commented Jul 14, 2016

I also like Sebastien's approach. Currently convert functiin doesn't look good because of many boolean variables and if statements. Need to think a bit more in order to cover multiple controllers generation.

We can add validation for subcommand relating to Openshift primitives only.

@kadel
Copy link
Member Author

kadel commented Jul 14, 2016

I think that we should think about this more from users perspective than from code perspective.

For me it seems little strange because it emphasize choosing controller object to much.
I think of choosing controller object as optional configuration how convert should behave.
With syntax like this I would expect that controller is required. But that shouldn't be the case.

I expect that most user will use default one and won't care that much about others.

@sebgoa
Copy link
Contributor

sebgoa commented Jul 15, 2016

I suggest to @kadel assigns this issues to himself and starts working in a branch.

For the configuration, we need to investigate #39 , using a .kompose preference file, which can have multiple profiles.

The idea being that using kubernetes or openshift or any other future provider could be hidden and made default. That way users familiar with docker-compose can use kompose up at the beginning without worrying about providers or default objects.

@kadel
Copy link
Member Author

kadel commented Jul 15, 2016

+1 for preference file, this will keep command-line clean and simple.

I will keep in my mind that we might go this way when working on openshift provider.

@ngtuna
Copy link
Contributor

ngtuna commented Aug 25, 2016

Can we close this one? @kadel @surajssd

@kadel
Copy link
Member Author

kadel commented Aug 29, 2016

I think we can close this. Basic OpenShift support has been merged. We can always open new issues to track adding additional features.

@kadel kadel closed this as completed Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/P1
Projects
None yet
Development

No branches or pull requests

4 participants