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

Make configurable images in both plugin and devfile registry #14693

Closed
l0rd opened this issue Sep 27, 2019 · 7 comments
Closed

Make configurable images in both plugin and devfile registry #14693

l0rd opened this issue Sep 27, 2019 · 7 comments
Assignees
Labels
area/install Issues related to installation, including offline/air gap and initial setup area/plugin-registry kind/enhancement A feature request - must adhere to the feature request template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Milestone

Comments

@l0rd
Copy link
Contributor

l0rd commented Sep 27, 2019

Is your enhancement related to a problem? Please describe.

In Air Gap mode a user needs to start a workspace using images from an internal/private container registry (not docker.io, not quay.io).

Che server and other components images can be configured using che.properties (and config maps).

But editors and plugins sidecars images are not currently configurable: they are hardcoded with the plugin registry. The same is true to the stack images in the devfile registry.

Describe the solution you'd like

A user should be able to configure the plugin sidecars and the sample stack images URL and the repository.

Additional context

A possible solution would be to use a configmap and a bash script used as entrypoint that replaces the images.

The configmap would look like:

apiVersion: v1
kind: ConfigMap
metadata:
  name: che-containers-registry
data:
  CHE_SIDECAR_CONTAINERS_REGISTRY_URL: "https://enterprise.container.registry:3000/"
  CHE_SIDECAR_CONTAINERS_REGISTRY_REPOSITORY: "che_sidecars"

Used in the deployment yaml as

...
   containers:
   - image: {{ .Values.chePluginRegistryImage }}
      imagePullPolicy: {{ .Values.chePluginRegistryImagePullPolicy }}
      envFrom:
      - configMapRef:
          name: che-containers-registry

And the containers entrypoint should call a script that replaces the images url and repo in the index.json and the plugins meta.yaml.

@l0rd l0rd added the kind/enhancement A feature request - must adhere to the feature request template. label Sep 27, 2019
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Sep 27, 2019
@tolusha tolusha added severity/P1 Has a major impact to usage or development of the system. area/plugin-registry and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Sep 27, 2019
@nickboldt
Copy link
Contributor

If we implement the idea of injecting plugins directly into Theia runtime without the need for theia-runtime-endpoint... do we obviate the need for this?

Also what about these images, from https://github.com/eclipse/che-devfile-registry/blob/master/arbitrary-users-patch/base_images

quay.io/eclipse/che-java8-maven
quay.io/eclipse/che-java11-maven

Will this approach work for overriding those? #productization

@nickboldt nickboldt added area/install Issues related to installation, including offline/air gap and initial setup team/productization labels Sep 27, 2019
@nickboldt
Copy link
Contributor

FWIW the current simple implementation of this is to sed-replace all references to docker.io\\|quay.io\\|registry.access.redhat.com\\|registry.redhat.io

with a user-defined myquay.mycorp.com registry, then rebuild the image.

https://github.com/redhat-developer/codeready-workspaces/blob/master/dependencies/che-plugin-registry/scripts/replace_container_repos.sh
https://github.com/redhat-developer/codeready-workspaces/blob/master/dependencies/che-plugin-registry/airgap_build.sh

Obviously my approach is flawed and requires manual effort. :)

Mario's approach is by far better because it means we can inject these changes to a running container image without having to rebuild and republish it. \o/

@nickboldt nickboldt added this to the 7.3.0 milestone Sep 27, 2019
@l0rd
Copy link
Contributor Author

l0rd commented Sep 30, 2019

If we implement the idea of injecting plugins directly into Theia runtime without the need for theia-runtime-endpoint... do we obviate the need for this?

@nickboldt no. We still need it.

FWIW the current simple implementation of this is to sed-replace all references to docker.io\|quay.io\|registry.access.redhat.com\|registry.redhat.io

I have discussed with @slemeur and it's simpler to replace the registries hostnames and repositories only. I have updated this issue description.

@nickboldt
Copy link
Contributor

Note that for testing containers before they're published to RHCC/RHIO, we will need this functionality in BOTH the plugin registry and the devfile registry so that any/all containers can be overridden to use a different base registry URL/repo/imagename:tag.

Then we can override registry.redhat.io/codeready-workspaces/stacks-java-rhel8:2.0 with quay.io/crw/stacks-java-rhel8:2.0-34 and test specific images prior to release.

@nickboldt nickboldt changed the title Make plugins sidecars images configurable Make plugin sidecar images and runtime images configurable in both plugin and devfile registry (whitelabel/QE requirement) Oct 1, 2019
@nickboldt nickboldt added team/che-qe severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. labels Oct 1, 2019
@l0rd l0rd changed the title Make plugin sidecar images and runtime images configurable in both plugin and devfile registry (whitelabel/QE requirement) Make configurable images in both plugin and devfile registry Oct 1, 2019
@l0rd l0rd added team/osio and removed severity/P1 Has a major impact to usage or development of the system. labels Oct 1, 2019
@amisevsk amisevsk self-assigned this Oct 4, 2019
@amisevsk
Copy link
Contributor

amisevsk commented Oct 6, 2019

PR for plugin registry: eclipse-che/che-plugin-registry#245

@amisevsk
Copy link
Contributor

amisevsk commented Oct 6, 2019

PR for devfile registry: eclipse-che/che-devfile-registry#110

@amisevsk
Copy link
Contributor

PRs merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to installation, including offline/air gap and initial setup area/plugin-registry kind/enhancement A feature request - must adhere to the feature request template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

No branches or pull requests

5 participants