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

services: create a way to tsuru api run extra commands #863

Closed
andrewsmedina opened this issue Jul 24, 2014 · 3 comments
Closed

services: create a way to tsuru api run extra commands #863

andrewsmedina opened this issue Jul 24, 2014 · 3 comments
Milestone

Comments

@andrewsmedina
Copy link
Contributor

A service can has a plugin () to add extra commands to tsuru cli. There is no way to get the info passed to a service by tsuru to be used by the extra commands.

By example, if I have a mysql service and want to create a command to make a backup. On service-add and service-bind tsuru pass the info about user, and the instances. In my plugin I dont have any info about the user that makes impossible to verify if this user has permission to do a backup, and know how instances the user has access.

A way to make it possible is create a resource in tsuru api to be a proxy between the plugin and the service. This resource should receive the user token, process it and execute a url to the service custom url as callback.

By example:

POST /service/proxy/myservice?callback=/backup

@andrewsmedina andrewsmedina added this to the 0.6.0 milestone Jul 24, 2014
@fsouza
Copy link
Contributor

fsouza commented Jul 24, 2014

What's myservice. The service instance or the service itself?

Also, the callback would be just a path? Do we want to support query string in this path?

@andrewsmedina
Copy link
Contributor Author

@fsouza myservice is a service instance. The callback is a path. I don't know if we want to support querystrings.

@fsouza
Copy link
Contributor

fsouza commented Jul 25, 2014

Good. I think it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants