Customize the dashboard samples for your team

Customize the OpenShift Dev Spaces Dashboard to display custom samples that reflect your organization’s preferred languages, frameworks, and project templates for faster onboarding.

Before you begin

Procedure

  1. Create a JSON file with the samples configuration. The file must contain an array of objects, where each object represents a sample.
    cat > my-samples.json <<EOF
    [
      {
        "displayName": "<display_name>",
        "description": "<description>",
        "tags": <tags>,
        "url": "<url>",
        "icon": {
          "base64data": "<base64data>",
          "mediatype": "<mediatype>"
        }
      }
    ]
    EOF

    where:

    displayName
    The display name of the sample.
    description
    The description of the sample.
    tags
    The JSON array of tags, for example, ["java", "spring"].
    url
    The URL to the repository containing the devfile.
    base64data
    The base64-encoded data of the icon.
    mediatype
    The media type of the icon. For example, image/png.
  2. Create a ConfigMap with the samples configuration:
    oc create configmap getting-started-samples --from-file=my-samples.json -n openshift-devspaces
  3. Add the required labels to the ConfigMap:
    oc label configmap getting-started-samples app.kubernetes.io/part-of=che.eclipse.org app.kubernetes.io/component=getting-started-samples -n openshift-devspaces

Results

  • Refresh the OpenShift Dev Spaces Dashboard page and verify that the new samples are displayed on the Create Workspace page.