Skip to content

Stack vs example in a devfile repo/registry #279

Closed
@elsony

Description

@elsony

Background:
The usage of the devfile repo/registry has been focusing on the usage of a runtime stack. A runtime stack is typically a generic stack that contains a devfile to provide support on applications of the same type. It allows tools users like odo to query for the list of odo components to build and run an existing user application. However, there is another set of use case for devfile where someone just wanted to provide samples for others to use to showcase certain technologies. This usage is slightly different from the starterProjects where is meant to provide a starter of a given stack. This proposal is to provide better support for samples where tools/users can query a list of samples and just download and use them as-is.

The current design on the registry structure can be found here: https://github.com/devfile/api/blob/master/docs/proposals/registry/registry-structure.md

The stack contents including the devfiles are stored under the directory registry/stacks (see https://github.com/devfile/registry as an example).

Proposal:
To support samples as a first-class citizen and differentiate between stack vs samples:

  1. add a file called "extraDevfileEntries.yaml" at the root of the registry source directory to add samples from other repositories to the registry (see proposal Configure codeowners and PR template #2 in the design doc below for details).
  2. on index.json, add a type (possible value stack and sample) to each entry to differentiate between stack vs samples
  3. change the index generator tools to generate the type for each entry based on the parent directory (registry/stacks and the sample entries in the extraDevfileEntries.yaml).
  4. common library will provide a filtering mechanism when querying the list of devfiles so that tools can easily find the list of stacks or samples
  5. add validation to the index generator tools to flag a warning if there are devfiles under the samples directory that has starterProjects entries

Design proposal: https://docs.google.com/document/d/1tbzZK9aWtpw5AtoZmUl1Jy8x8w9N5hhjXu3c26VYiYY/edit?usp=sharing
https://docs.google.com/document/d/1tpD0Mc7agEWSUSWc_NPyBBHwdNcwmI2BQBqYRoJxFDU/edit?usp=sharing

Metadata

Metadata

Assignees

Labels

area/registryDevfile registry for stacks and infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions