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 devfile. The image contains all sample projects referenced in devfiles.

Prerequisites
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.42.x
  2. In the ./che-devfile-registry/devfiles/ directory, create a subdirectory <devfile-name>/ and add the devfile.yaml and meta.yaml files.

    Example 1. 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 Authoring a devfile 2.

  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.

    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.

    globalMemoryLimit

    Optional parameter: 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.

    Example 2. 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:

    $ ./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-ins registry image

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

Prerequisites
  • Node.js 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.

Procedure
  1. Clone the plug-ins 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.42.x
  2. In the ./che-plugin-registry/ directory, edit the che-theia-plugins.yaml file.

  3. Add valid content to the che-theia-plugins.yaml file, for detailed information see: Adding a VS Code extension to the Che plug-ins registry.

  4. Build a custom plug-ins registry image:

    $ ./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.

  5. Observe the contents of ./che-plugin-registry/v3/plugins/ present in the container after building the registry. All meta.yaml files resulting from a successful plug-ins registry build will be located here.

    ./che-plugin-registry/v3/plugins/
    ├── <publisher>
    │   └── <plugin-name>
    │       ├── latest
    │       │   └── meta.yaml
    │       └── latest.txt
    Additional resources