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

Devfile registry support for Devfile v2 zip files #20720

Closed
Tracked by #20830
l0rd opened this issue Nov 3, 2021 · 4 comments
Closed
Tracked by #20830

Devfile registry support for Devfile v2 zip files #20720

l0rd opened this issue Nov 3, 2021 · 4 comments
Assignees
Labels
area/devfile-registry kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. sprint/current

Comments

@l0rd
Copy link
Contributor

l0rd commented Nov 3, 2021

Is your enhancement related to a problem? Please describe

Devfile v2 are specified using the link.v2 field in meta.yaml:

---
displayName: Go
description: Stack with Go 1.14
tags: ["Debian", "Go"]
icon: /images/go.svg
links:
  v2: https://github.com/che-samples/golang-echo-example/tree/devfile2

The link.v2 URL points to a git repository that includes a devfile (devfiles are not included in the devfile registry anymore).

In the case of zip files what should be the value of link.v2? Where is the devfile stored?

Describe the solution you'd like

There are 2 alternatives:

Alternative n1: Include v2 devfile DevWorkspace files in the devfile registry

At registry build time we should:

  • extract the devfile.yaml, .vscode/extensions.json and .che/che-theia-plugins.yaml from the git repo
  • export the git repository as a zip file
  • generate a devfilev2.yaml DevWorkspace and DevWorkspaceTemplates yaml files from the .vscode/extensions.json, .che/che-theia-plugins.yaml
  • include the DevWorkspace and DevWorkspaceTemplates yaml files in the stack folder
  • update the meta.yaml
generatedDevWorkspaceFiles:
  path: ./DevWorkspaceFiles/

Alternative n2: Include a git server in the devfile registry

  • clone the sample in some devfile-registry folders
  • expose these git repositories through gitweb
  • Update v2 links URLs with the devfile registry URL in entrypoint
    --> Need to add a gitweb URL provider/resolver to handle it properly (protocol could be used with something like gitweb://<host>/repository-name )
@l0rd l0rd added the kind/enhancement A feature request - must adhere to the feature request template. label Nov 3, 2021
@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 Nov 3, 2021
@l0rd l0rd added severity/P1 Has a major impact to usage or development of the system. area/devfile-registry and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Nov 4, 2021
@benoitf
Copy link
Contributor

benoitf commented Nov 4, 2021

we could as well implement #19718 to have DevWorkspace templates instead of inlining everything into the devfile so we'll avoid other processing time at runtime

@svor
Copy link
Contributor

svor commented Nov 9, 2021

We are going to start with #19718 to provide Dev Workspace templates for che-theia editor and host them in the devfile registry

@svor svor removed the sprint/next label Nov 9, 2021
@l0rd
Copy link
Contributor Author

l0rd commented Nov 15, 2021

Updated the description to use DevWorkspace yaml files instead of devfile

@svor
Copy link
Contributor

svor commented Dec 2, 2021

We finished work to pre-build DevWorkspace templates for devfile v2 in devfile registry #19718. But this templates don't have projects section which references on zip file. Currently we are working on it.

To support AirGap scenarios, the final step should be done on the dashboard side to apply generated DevWorspace objects from the registry: Use generated DevWorkspaceTemplates from the devfile registry to create workspaces

cc @l0rd @ibuziuk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-registry kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. sprint/current
Projects
None yet
Development

No branches or pull requests

5 participants