Building custom registry images

Building a custom devfile registry image

This section describes how to build a custom devfile registry image. The procedure explains how to add a new devfile. The image contains all sample projects referenced in devfiles.

Procedure
  1. Clone the devfile registry repository and check out the version to deploy:

    $ git clone git@github.com:eclipse/che-devfile-registry.git
    $ cd che-devfile-registry
    $ git checkout 7.26.x
  2. In the ./che-devfile-registry/devfiles/ directory, create a subdirectory <devfile-name>/ and add the devfile.yaml and meta.yaml files.

    File organization for a devfile
    ./che-devfile-registry/devfiles/
    └── <devfile-name>
        ├── devfile.yaml
        └── meta.yaml
  3. Add valid content in the devfile.yaml file. For a detailed description of the devfile format, see Configuring a workspace using a devfile.

  4. Ensure that the meta.yaml file conforms to the following structure:

    Table 1. Parameters for a devfile meta.yaml
    Attribute Description

    description

    Description as it appears on the user dashboard.

    displayName

    Name as it appears on the user dashboard.

    globalMemoryLimit

    The sum of the expected memory consumed by all the components launched by the devfile. This number will be visible on the user dashboard. It is informative and is not taken into account by the Che server.

    icon

    Link to an .svg file that is displayed on the user dashboard.

    tags

    List of tags. Tags typically include the tools included in the stack.

    Example 1. Example devfile meta.yaml
    displayName: Rust
    description: Rust Stack with Rust 1.39
    tags: ["Rust"]
    icon: https://www.eclipse.org/che/images/logo-eclipseche.svg
    globalMemoryLimit: 1686Mi
  5. Build a custom devfile registry image:

    Prerequisites:
    • NodeJS 12.x

    • A running version of yarn. See Installing Yarn.

    • ./node_modules/.bin is in the PATH environment variable.

    • A running installation of podman or docker.

./build.sh --organization <my-org> \
           --registry <my-registry> \
           --tag <my-tag> \

+

To display full options for the build.sh script, use the --help parameter.

Building a custom plug-in registry image

This section describes how to build a custom plug-in registry image. The procedure explains how to add a new plug-in. The image contains plug-ins or extensions metadata.

Procedure
  1. Clone the plug-in registry repository and check out the version to deploy:

    $ git clone git@github.com:eclipse/che-plugin-registry.git
    $ cd che-plugin-registry
    $ git checkout 7.26.x
  2. In the ./che-plugin-registry/v3/plugins/ directory, create new directories <publisher>/<plugin-name>/<plugin-version>/ and a meta.yaml file in the last directory.

    File organization for a plugin
    ./che-plugin-registry/v3/plugins/
    ├── <publisher>
    │   └── <plugin-name>
    │       ├── <plugin-version>
    │       │   └── meta.yaml
    │       └── latest.txt
  3. Add valid content to the meta.yaml file. See: Publishing metadata for a VS Code extension.

  4. Create a file named latest.txt with content the name of the latest <plugin-version> directory.

    Example 2. Example plug-in files tree
    $ tree che-plugin-registry/v3/plugins/redhat/java/
    che-plugin-registry/v3/plugins/redhat/java/
    ├── 0.38.0
    │   └── meta.yaml
    ├── 0.43.0
    │   └── meta.yaml
    ├── 0.45.0
    │   └── meta.yaml
    ├── 0.46.0
    │   └── meta.yaml
    ├── 0.50.0
    │   └── meta.yaml
    └── latest.txt
    $ cat che-plugin-registry/v3/plugins/redhat/java/latest.txt
    0.50.0
  5. Build a custom plug-in registry image:

    Prerequisites:
    • NodeJS 12.x

    • A running version of yarn. See Installing Yarn.

    • ./node_modules/.bin is in the PATH environment variable.

    • A running installation of podman or docker.

./build.sh --organization <my-org> \
           --registry <my-registry> \
           --tag <my-tag> \

+

To display full options for the build.sh script, use the --help parameter.

To include the plug-in binaries in the registry image, add the --offline parameter.