Configuring getting started samples
This procedure describes how to configure Che Dashboard to display custom samples.
Prerequisites
-
An active
kubectl
session with administrative permissions to the Kubernetes cluster. See Overview of kubectl.
Procedure
-
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>", (1) "description": "<description>", (2) "tags": <tags>, (3) "url": "<url>", (4) "icon": { "base64data": "<base64data>", (5) "mediatype": "<mediatype>" (6) } } ] EOF
1 The display name of the sample. 2 The description of the sample. 3 The JSON array of tags, for example, ["java", "spring"]
.4 The URL to the repository containing the devfile. 5 The base64-encoded data of the icon. 6 The media type of the icon. For example, image/png
. -
Create a ConfigMap with the samples configuration:
kubectl create configmap getting-started-samples --from-file=my-samples.json -n eclipse-che
-
Add the required labels to the ConfigMap:
kubectl label configmap getting-started-samples app.kubernetes.io/part-of=che.eclipse.org app.kubernetes.io/component=getting-started-samples -n eclipse-che
-
Refresh the Che Dashboard page to see the new samples.