-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update Helm chart to support deployment of Turing App with experiment engine plugins #153
Update Helm chart to support deployment of Turing App with experiment engine plugins #153
Conversation
{{- define "turing.plugins.initContainers" -}} | ||
{{ if .Values.turing.experimentEngines }} | ||
initContainers: | ||
{{ range $expEngine := .Values.turing.experimentEngines }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to support multiple experiment engines at run time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's nothing new, Turing can be deployed with multiple experiment engines, and it's up to users to decide which experiment engine to use during the router configuration step
# type: rpc-plugin | ||
# rpcPlugin: | ||
# image: ghcr.io/turing/my-exp-engine:latest | ||
# options: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is options
here? Is it meant to hold the engine's configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. This configuration is later placed (or merged with, if some configuration already exists there) under turing.config.Experiment.<engine name>
: https://github.com/romanwozniak/turing/blob/938ee0b09d7c3fd226afb282f43467792ba2431b/infra/charts/turing/templates/_helpers.tpl#L142-L148
Context:
In the previous PRs (#143, #147, #149 to name a few) we added support of external experiment engines implemented as RPC plugins. This PR introduces a base Docker image to make it simpler to package and distribute experiment engine plugins and adds necessary changes to Turing's Helm chart to support the deployment of Turing application with such plugins.
Details:
Experiment engine plugins are supported via hashicorp/go-plugins, where each plugin is running in a separate process and host application (turing-app) communicates with the plugin over the network. Plugin's process is started by the host application, meaning that the plugin's executable binary should be accessible from the host app.
To achieve precisely this, we added a new
emptyDir
volume into the deployment, where plugin executables are expected to be placed.Now Turing's user can package their plugin as a docker image:
And then deploy it with Turing, by providing
turing.experimentEngines
configuration via Helm values file:Under the hood, the docker image with the plugin's binary will be added as an
initContainer
on the Turing app deployment, and the binary will be copied over to theplugins-volume
, where it can be accessed by the host application.Note:
This PR touches only the deployment of Turing app, meaning that the plugin will not be available to the Turing router, after the one is deployed. This will be addressed separately in the next PR.