Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Invoker extensibility #1093
In the past riff had an Invoker CRD that allowed users to create riff functions with a new language. With the transition to buildpacks, we scaled back the number of languages we support and lost the extensibility to add new languages.
There are three key components to adding a new language
With an appropriate buildpack and invoker, adding a new language/runtime support to riff should be as easy as it was previously. Before exposing a model to users, we should experiment with making all current languages and invokers pluggable. Eliminating, or isolating, imperative logic and coupling between invokers.
Our current thinking is that we will create a buildpack per language that is responsible for contributing the invoker and managing any build time configuration or steps required. The invoker manages the runtime lifecycle of the function, the buildpack managed the compile time aspects of the function.
This means that invoker authors will also be responsible for authoring a buildpack in order for the invoker to be consumed. In riff 0.0.x this role was managed by a Dockerfile provided by the invoker that knew how to compile the function atop a base image.
In theory, a buildpack can be implemented in any language. In practice, using a library is much more convenient. We are looking at creating a function buildpack library in the model of libbuildpack and libcfbuildpack.
Thanks @kingdonb. I really appreciate your sticking with us through these changes.
We'll absolutely need to create a guide and reference documentation for creating new invokers and registering them within the system. I'll let you know when we're ready to test the model.
This was referenced
Feb 14, 2019
riff-buildpack is acting as:
With this change, it is possible to implement a custom invokers and a function buildpack that are pulled into a builder image that contains that buildpack/invoker.