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

Remote build command using the Function Builder API #931

Closed
alexellis opened this issue Sep 22, 2022 · 2 comments · Fixed by #961
Closed

Remote build command using the Function Builder API #931

alexellis opened this issue Sep 22, 2022 · 2 comments · Fixed by #961

Comments

@alexellis
Copy link
Member

alexellis commented Sep 22, 2022

This is a proposal for a remote build command using the Function Builder API, plus an SDK struct that can be vendored into a Go API / microservice to perform builds with the Function Builder API that OpenFaaS Pro offers.

https://docs.openfaas.com/openfaas-pro/builder/

Expected Behaviour

faas-cli publish --remote /faas-cli pro-build?

kubectl port-forward \
    -n openfaas \
    svc/pro-builder 8081:8080

kubectl get secret \
    -n openfaas payload-secret -o jsonpath='{.data.payload-secret}' \
    | base64 --decode \
    > builder-payload-secret.txt

faas-cli pro-build \
  -f stack.yml 
  --filter hello-world \
  --builder-url http://127.0.0.1:8081 \
  --build-token-file builder-payload-secret

Plus some kind of SDK:

imageRef, err:= sdk.RemoteBuild("./handler", "golang-middleware", "127.0.0.1:8081`, buildToken)

Current Behaviour

We have different code examples, but they're relatively complex and involve quite a few steps. Can we make it simpler to get started?

https://github.com/openfaas/function-builder-examples

Why do you need this?

I've seen interest in the Function Builder API from low-code companies or SaaS companies and want to make it more accessible for them to get started and try it out.

@NikhilSharmaWe
Copy link
Contributor

NikhilSharmaWe commented Apr 26, 2023

@alexellis I am unable to locate the code for the pro function builder, could you please share the code pointers or packages responsible for pro builder currently? So, that I can get some idea of how the functions are currently implemented and think of how can we integrate them into the function builder API.

It is possible I am missing something here since I am not much familiar with the codebase currently.

@alexellis
Copy link
Member Author

Hi @NikhilSharmaWe I'll email you a trial license so you can play with it.

Thanks for offering to help.

Alex

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

Successfully merging a pull request may close this issue.

2 participants