Skip to content

Commit

Permalink
chore: Add Configuring getting started samples article (#2646)
Browse files Browse the repository at this point in the history
* chore: Add Configuring getting started samples article

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Sep 13, 2023
1 parent 734025b commit ab6ef6c
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/administration-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
*** xref:configuring-storage-classes.adoc[]
*** xref:configuring-the-storage-strategy.adoc[]
*** xref:configuring-storage-sizes.adoc[]
** xref:configuring-dashboard.adoc[]
*** xref:configuring-getting-started-samples.adoc[]
** xref:managing-identities-and-authorizations.adoc[]
*** xref:configuring-oauth-for-git-providers.adoc[]
**** xref:configuring-oauth-2-for-github.adoc[]
Expand Down
10 changes: 10 additions & 0 deletions modules/administration-guide/pages/configuring-dashboard.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:_content-type: ASSEMBLY
:description: Configuring dashboard
:keywords: administration-guide, configuring, dashboard
:navtitle: Configuring dashboard
:page-aliases:

[id="configuring-dashboard"]
= Configuring dashboard

* xref:configuring-getting-started-samples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
:_content-type: PROCEDURE
:description: Configuring getting started samples
:keywords: administration guide, configuring, dashboard, samples
:navtitle: Configuring getting started samples
:page-aliases: installation-guide:configuring-getting-started-samples.adoc

[id="configuring-getting-started-samples"]
= Configuring getting started samples

This procedure describes how to configure {prod-short} Dashboard to display custom samples.

.Prerequisites

* An active `{orch-cli}` session with administrative permissions to the {orch-name} cluster. See {orch-cli-link}.

.Procedure

. Create a JSON file with the samples configuration.
The file must contain an array of objects, where each object represents a sample.
+
[source,shell,subs="+quotes,+attributes"]
----
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:
+
[source,shell,subs="+quotes,+attributes"]
----
{orch-cli} create configmap getting-started-samples --from-file=my-samples.json -n {prod-namespace}
----

. Add the required labels to the ConfigMap:
+
[source,shell,subs="+quotes,+attributes"]
----
{orch-cli} label configmap getting-started-samples app.kubernetes.io/part-of=che.eclipse.org app.kubernetes.io/component=getting-started-samples -n {prod-namespace}
----

. Refresh the {prod-short} Dashboard page to see the new samples.

0 comments on commit ab6ef6c

Please sign in to comment.