The purpose of this repo is as a short-term solution for enabling the testing of plugin resolution in DevWorkspaces (see: https://github.com/devfile/devworkspace-operator) when those plugins are specified by plugin ID and registry URL.
This repo consists of
- A small go program that converts plugin meta.yamls (from https://github.com/eclipse/che-plugin-registry) to devfiles (see https://github.com/devfile/api)
- A dockerfile that extracts meta.yamls from an existing che-plugin-registry and converts its meta.yamls into devfiles using the program above, and builds a new registry that serves devfiles instead.
- A script that can be used to deploy the devfile plugin registry to an OpenShift or minikube cluster
- To avoid significant complexity, the conversion program cannot convert plugins that use init containers (i.e. Theia). Directory
/manualhas plugin devfiles that are copied into the resulting image. - The DevWorkspaceOperator requires a slightly different che-machine-exec plugin, as the default listens only on localhost and the DevWorkspaceOperator does not deploy an in-container proxy yet.
- Plugins that require downloading
.vsixfiles are implemented by having avsx-installercomponent in the theia plugin that downloadsvsixes from annotations on containers. This is a temporary solution. It also means that non-sidecar plugins are currently unsupported, as there's nowhere to define such an annotation.
This repo is intended for testing and development purposes only.
The Dockerfile at the root of the repo will 1) build the go binary, 2) grab meta.yamls from the current che-plugin-registry, and 3) build a new registry using the converted devfiles:
docker build -t my-plugin-registry .To deploy the registry, use the ./deploy-registry.sh script at the root of this repo. The script supports environment variables:
-
NAMESPACE- namespace in which to deploy the registry, defaultdevworkspace-plugins -
REGISTRY_IMAGE- the image to deploy for the regsitry, defaultdocker.io/amisevsk/devworkspace-plugin-registry:dev -
ROUTING_SUFFIX- Suffix to use for generating plugin registry URL on Kubernetes (i.e. registry is deployed atche-plugin-registry.${ROUTING_SUFFIX}).Required on Kubernetes; should be auto-detected on
minikube($(minikube ip).nip.io). Ignored when running on OpenShift as a route is created instead.