openfaas / faas-cli

Official CLI for OpenFaaS
https://www.openfaas.com/
Other
793 stars 229 forks source link

Proposal: Create/extract faas-cli SDK #232

Open muka opened 6 years ago

muka commented 6 years ago

Detach faas-cli logic currently in commands package to an autonomous package. This would make reusability a lot easier and testing (as library or exposed as service) .

Expected Behaviour

I would like to reuse commands in a grpc service (https://github.com/muka/faas-cli-grpc) to expose build & deploy as a service API

Currently this may be done by just running shell scipts, but raw response, error management and configuration make it difficult to handle.

Other area of improvement are where to store local files (eg. the template/ folder ) and also ease up test eventually as a positive side effect.

Current Behaviour

The CLI works great but there is room for improvement on reusability of the features

Possible Solution

I have built a POC here https://github.com/muka/faas-cli Not all commands has been ported (still missing logout, new, remove, version) but all tests passes

Would love to get feedback! Thanks

Context

I am looking to enable function building as a service in a multi-tenant and eventually distributed environment

Issue that may be related or addressable

alexellis commented 6 years ago

Derek add label: question

alexellis commented 6 years ago

Hi @muka I'll send this to the contributors channel on slack for feedback

alexellis commented 6 years ago

Don't go too far with your gRPC service until we've had a chance to validate the changes. It's likely that we'll make changes that you'll want to keep in sync with.

muka commented 6 years ago

Sure, I will not make further changes / dev until I have your feedback. Thanks

ivanayov commented 5 years ago

@muka do you have any input on the issue? This seems pretty outdated. How do you feel with the latest faas-cli?

muka commented 5 years ago

Please close, thank you!