This section explains how to modify the existing content of the devfile and plug-in registries: the devfiles and plug-in metadata.

Prerequisites

Adding a new plug-in

The v3/plugins/ directory in the repository contains the plug-ins. The following is the structure of a plug-in directory:

./che-plugin-registry/v3/plugins
 ├── <publisher>
 ├── <plugin-name>
 ├── <plugin-version>
 └── meta.yaml

To add a new plug-in:

Procedure
  1. In the v3/plugins/ directory, create a new directory and name it <publisher>/<plugin-name>/<plugin-version>/.

  2. Create a plug-in meta.yaml file in the new directory.

    Example

    The following is an example directory called my-org/my-plugin/1.0.0/, and it contains a meta.yaml file:

    $ mkdir -p che-plugin-registry/v3/plugins/my-org/my-plugin/1.0.0/
    $ touch che-plugin-registry/v3/plugins/my-org/my-plugin/1.0.0/meta.yaml
    $ tree ./che-plugin-registry/v3/plugins
    ./che-plugin-registry/v3/plugins
     ├── my-org
     ├── my-plugin
     ├── 1.0.0
     └── meta.yaml
  3. Add valid content to the meta.yaml file. See the “Using a Visual Studio Code extension in Che” section or the README.md file in the eclipse/che-plugin-registry repository for a detailed description of the meta.yaml file format.

  4. Create a directory called latest/ and copy the meta.yaml file in it, too. The meta.yaml file in the latest/ directory is used when the plug-in version is not specified (in a devfile, for example).

    The latest/ directory should always contain a copy of the latest stable meta.yaml file.
    Example
    $ mkdir che-plugin-registry/v3/plugins/my-org/my-plugin/latest/
    $ copy che-plugin-registry/v3/plugins/my-org/my-plugin/1.0.0/meta.yaml \
    che-plugin-registry/v3/plugins/my-org/my-plugin/latest
    $ tree ./che-plugin-registry/v3/plugins
    ./che-plugin-registry/v3/plugins
     ├── my-org
     ├── my-plugin
     ├── 1.0.0
     ├── meta.yaml
     ├── latest
     └── meta.yaml

Adding a new devfile

The devfiles/ directory contains the devfiles. Every devfile directory has the following structure:

./che-devfile-registry/devfiles
 ├── <stack-name>
 ├── devfile.yaml
 └── meta.yaml

To add a new devfile:

Procedure
  1. In the devfiles/ directory, create a new subdirectory <stack-name>/.

  2. In this new subdirectory, add a new plug-in devfile.yaml file and a meta.yaml file. The following is an example my-stack/ directory, and it contains a devfile.yaml file and a meta.yaml file:

    $ mkdir -p che-devfile-registry/devfiles/my-devfile
    $ touch che-devfile-registry/devfiles/my-devfile/devfile.yaml
    $ touch che-devfile-registry/devfiles/my-devfile/meta.yaml
    $ tree ./che-devfile-registry/devfiles
    ./che-devfile-registry/devfiles
     ├── my-devfile
     ├── devfile.yaml
     └── meta.yaml
  3. Add valid content in the devfile.yaml file. For a detailed description of the devfile format, see the Making a workspace portable using a Devfile section.

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

    displayName: My Stack                                        (1)
    description: This is a custom stack for Che                  (2)
    tags: ["Java", "maven", "ubi"]                               (3)
    icon: https://www.eclipse.org/che/images/logo-eclipseche.svg (4)
    globalMemoryLimit: 1686Mi                                    (5)
    1 Name of the stack as it appears on the user dashboard.
    2 Description of the stack as it appears on the user dashboard.
    3 Tags of the stack. Tags usually include the tools included in the stack.
    4 The link to an .svg file that is displayed on the user dashboard.
    5 The sum of the memory limits of all the components of the stack. This number will be visible on the user dashboard. It is informative and is not taken into account by the Che server.