Skip to content
This repository has been archived by the owner on Jul 29, 2018. It is now read-only.

Proposed subcommand Structure #34

Closed
bexelbie opened this issue Feb 11, 2016 · 15 comments
Closed

Proposed subcommand Structure #34

bexelbie opened this issue Feb 11, 2016 · 15 comments

Comments

@bexelbie
Copy link
Contributor

This plugin supports a subcommand structure. The proposed structure is

vagrant service-manager [noun] [arguments|sub-sub commands]

For example:

vagrant service-manager help - return help information

vagrant service-manager env - return information about all configured services
vagrant service-manager env docker - return information only about the docker service

vagrant service-manager box version - return information about box version

Future commands will follow this pattern.

The bare verb should return all of a concept. The noun should restrict it.

New verbs are added when at least 50% of hte supported services have a logical use for them.

There will be a generic verb for use when only one or a few services needs a special subcommand.

changelog:
@navidshaikh: Added subcommand for printing box version.

@hferentschik
Copy link
Contributor

I think personally I would still prefer to structure around services like openshift, kubernetes, docker.

$ vagrant service-manager docker env|copy-cli|status|start|stop|update-certs
$ vagrant service-manager openshift env|copy-cli|status|start|stop

Where general commands don't have no 'service' specifier:

$ vagrant service-manager help

@bexelbie
Copy link
Contributor Author

This seems great for the OpenShift use case and ugly for the docker+K8s use case. I feel like with one call I should get the env info I need. For Docker+K8s I need two. If I don't know the status of the box, I have N calls until I find one that returns data.

@navidshaikh
Copy link
Collaborator

I feel like with one call I should get the env info I need. For Docker+K8s I need two. If I don't know the status of the box, I have N calls until I find one that returns data.

+1

@hferentschik
Copy link
Contributor

ugly for the docker+K8s use case.

why? What's the difference for the two use cases? Note, the env call is to set environment variables into a shell. It seems odd to me to get for example Openshift variables set, even if I don't use it. For me this is about separation of concerns.

@bexelbie
Copy link
Contributor Author

@hferentschik When not using and IDE I need to call service manager twice. Once to enable the docker cli and once to enable kubectl. With verb first one call enables both. I can choose to be more fine grained if I want too

@hferentschik
Copy link
Contributor

But should vagrant service-manager env without further qualification not print a help for how to use the env command?

@pmuir
Copy link

pmuir commented Feb 15, 2016

Hmm, What about making kubernetes auto-configure docker, as you will always need docker in this case?

@navidshaikh
Copy link
Collaborator

But should vagrant service-manager env without further qualification not print a help for how to use the env command?

--help covers that option, one of the use case of vagrant service-manager env is to show all the active providers in the box.

@navidshaikh
Copy link
Collaborator

added following line in the original issue comment:

vagrant service-manager box version - return information about box version

@hferentschik
Copy link
Contributor

vagrant service-manager box version - return information about box version

what's the difference to #8? Which version are we taking about here? and why 'box'?

@navidshaikh
Copy link
Collaborator

what's the difference to #8?

No difference. Its the same thing.

Which version are we taking about here? and why 'box'?
We are talking about the underlying version of vagrant box [ADB / CDK]

This issue is updated to show the new command added to display the version of vagrant box.

@hferentschik
Copy link
Contributor

No difference. Its the same thing.

Ok, got you.

This issue is updated to show the new command added to display the version of vagrant box.

Got you. I was first thinking why not vagrant service-manager version, but one would of course get the version of the plugin instead. One needs to differentiate between the version of the plugin and the version of the VM/box.

@navidshaikh
Copy link
Collaborator

I was first thinking why not vagrant service-manager version, but one would of course get the version of the plugin instead. One needs to differentiate between the version of the plugin and the version of the VM/box.

Correct, vagrant service-manager version should show the version of plugin.

Idea behind using vagrant service-manager box <sub-command> is to add more sub-commands like ip etc.

@hferentschik
Copy link
Contributor

Idea behind using vagrant service-manager box is to add more sub-commands like ip etc.

got you. nice one

@bexelbie
Copy link
Contributor Author

bexelbie commented Apr 4, 2016

Closing this is either implemented or in progress.

@bexelbie bexelbie closed this as completed Apr 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants