Skip to content

Commit 5a6789c

Browse files
[release-1.6] RHIDP-6145: Added developer-focused content for software templates (#1164)
* Added software templates content * Incorporate Lindsey's comments * Added additional resource * Made changes * Fixing broken link * Updated intro * Updated screenshot * Incorporated minor change * Added screenshot * Incorporated Debsmita's comments * Minor change --------- Co-authored-by: Priyanka Abel <[email protected]>
1 parent 650d42a commit 5a6789c

9 files changed

+83
-24
lines changed

assemblies/assembly-configuring-templates.adoc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
:_mod-docs-content-type: ASSEMBLY
22
:context: configuring-templates
33
[id="{context}"]
4-
= Configuring templates
4+
= About Software Templates
55

6-
Configure templates to create software components, and publish these components to different locations, such as the {product} software catalog, or Git repositories.
6+
Software Templates in {product} provide a streamlined way to create software components and publish them to different version control repositories like Git. Platform engineers create and maintain Software Templates in {product}.
77

8-
A template is a form composed of different UI fields that is defined in a YAML file. Templates include _actions_, which are steps that are executed in sequential order and can be executed conditionally.
8+
You can configure Software Templates to create software components, and publish these components to Git repositories. Once the components are published to Git repositories, register these components in the Software Catalog.
9+
10+
A template is a form composed of different UI fields that is defined in a YAML file. Software Templates include _actions_, which are steps that are executed in sequential order and can be executed conditionally.
11+
12+
* See link:https://developers.redhat.com/articles/2025/03/17/10-tips-better-backstage-software-templates#[10 tips for better Backstage Software Templates].
913
1014
include::modules/customizing-templates/proc-creating-templates.adoc[leveloffset=+1]
1115
include::modules/customizing-templates/ref-creating-templates.adoc[leveloffset=+1]
16+
include::modules/customizing-templates/proc-creating-a-new-software-component-using-templates.adoc[leveloffset=+1]
17+
include::modules/customizing-templates/proc-searching-and-filtering-software-templates.adoc[leveloffset=+1]
18+
include::modules/customizing-templates/proc-adding-templates.adoc[leveloffset=+1]
1219

1320
[role="_additional-resources"]
1421
.Additional resources
22+
* link:{authentication-book-url}#assembly-auth-provider-github[Enabling the GitHub authentication provider]
1523
* link:https://backstage.io/docs/features/software-templates/writing-templates[Backstage documentation - Writing Templates]
1624
* link:https://backstage.io/docs/features/software-templates/builtin-actions[Backstage documentation - Builtin actions]
1725
* link:https://backstage.io/docs/features/software-templates/writing-custom-actions[Backstage documentation - Writing Custom Actions]
18-
19-
include::modules/customizing-templates/proc-adding-templates.adoc[leveloffset=+1]
20-
21-
[role="_additional-resources"]
22-
.Additional resources
23-
* link:{authentication-book-url}#assembly-auth-provider-github[Enabling the GitHub authentication provider]
138 KB
Loading
37.7 KB
Loading

images/rhdh/template-editor.png

-55.3 KB
Loading

modules/customizing-templates/proc-adding-templates.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="proc-adding-templates_{context}"]
7-
= Importing an existing template to {product}
7+
= Importing an existing Software Template to {product}
88

9-
You can add an existing template to your {product} instance by using the Catalog Processor.
9+
You can add an existing Software Template to your {product} instance by using the Catalog Processor.
1010

1111
.Prerequisites
1212

@@ -15,7 +15,7 @@ You can add an existing template to your {product} instance by using the Catalog
1515
1616
.Procedure
1717

18-
* In the `{my-app-config-file}` configuration file, modify the `catalog.rules` section to include a rule for templates, and configure the `catalog.locations` section to point to the template that you want to add, as shown in the following example:
18+
* In the `{my-app-config-file}` configuration file, modify the `catalog.rules` section to include a rule for Software Templates, and configure the `catalog.locations` section to point to the Software Template that you want to add, as shown in the following example:
1919
+
2020
[source,yaml]
2121
----
@@ -28,7 +28,7 @@ catalog:
2828
target: https://<repository_url>/example-template.yaml # <3>
2929
# ...
3030
----
31-
<1> To allow new templates to be added to the catalog, you must add a `Template` rule.
31+
<1> To allow new Software Templates to be added to the catalog, you must add a `Template` rule.
3232
<2> If you are importing templates from a repository, such as GitHub or GitLab, use the `url` type.
3333
<3> Specify the URL for the template.
3434
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * assemblies/assembly-configuring-templates.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="proc-creating-a-new-software-component-using-templates_{context}"]
7+
= Creating a new software component using Software Templates
8+
9+
You can create a new software component using the standard Software Templates that the platform engineers have created. The scaffolding process runs in your {product} instance.
10+
11+
.Procedure
12+
13+
. In your {product} navigation menu, click *Catalog* > *Self-service*.
14+
. On the *Self-service* page, click *Choose* on the *Templates* tile to initiate the scaffolding process for a template.
15+
. Follow the wizard instructions as you enter the required details. You can choose parameters from a set of pre-defined options.
16+
* Optional: In the *Deployment Information* step, you have an option to *Create Workbench for OpenShift AI*.
17+
+
18+
[NOTE]
19+
====
20+
This step is available only for a few templates.
21+
====
22+
. In the *Review* step, verify the parameters you have entered and click *Create*.
23+
+
24+
[NOTE]
25+
====
26+
* You can click *Cancel* to abort the software component creation during the template running step only if the current step supports the abort. The abort signal is then sent to a task and none of the following steps are executed.
27+
* During the creation of the software component, click *Show Logs* to view the log information.
28+
====
29+
30+
.Verification
31+
32+
* If your software component is not created successfully, you can review the logs on the error page. To return to the *Self-service* page with the same template form and your previously entered values, click *Start Over*.
33+
34+
image::rhdh/template-creation-not-successful.png[]
35+
36+
* If your Software Template is created successfully, a success page similar to the example in the following image is displayed:
37+
+
38+
--
39+
image::rhdh/template-creation-successful.png[template-creation-successful]
40+
--

modules/customizing-templates/proc-creating-templates.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="proc-creating-templates_{context}"]
7-
= Creating a template by using the Template Editor
7+
= Creating a Software Template by using the Template Editor
88

9-
You can create a template by using the Template Editor.
9+
You can create a Software Template by using the Template Editor.
1010

1111
.Procedure
1212

@@ -16,7 +16,7 @@ image::rhdh/template-editor.png[Template Editor]
1616
** Open the URL `\https://<rhdh_url>/create/edit` for your {product} instance.
1717
** Click *Self-service* in the navigation menu of the {product} console, then click the overflow menu button and select *Template editor*.
1818
. Click *Edit Template Form*.
19-
. Optional: Modify the YAML definition for the parameters of your template. For more information about these parameters, see <<Creating a template as a YAML file>>.
19+
. Optional: Modify the YAML definition for the parameters of your template. For more information about these parameters, see <<Creating a Software Template as a YAML file>>.
2020
. In the *Name* field, enter a unique name for your template.
2121
. From the *Owner* drop-down menu, choose an owner for the template.
2222
. Click *Next*.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * assemblies/assembly-configuring-templates.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="proc-searching-and-filtering-software-templates_{context}"]
7+
= Searching and filtering Software Templates in your {product} instance
8+
9+
You can search and filter for the Software Template that you want to use to create a new software component.
10+
11+
.Procedure
12+
13+
To search and filter for a Software Template, complete the following steps:
14+
15+
. In the {product} navigation menu, click *Catalog* > *Self-service*.
16+
. Type the name of the template you are looking for in the *Search* box.
17+
* If you are looking for templates in a certain category, you can use the *Categories* dropdown.

modules/customizing-templates/ref-creating-templates.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
:_mod-docs-content-type: REFERENCE
66
[id="ref-creating-templates_{context}"]
7-
= Creating a template as a YAML file
7+
= Creating a Software Template as a YAML file
88

9-
You can create a template by defining a `Template` object as a YAML file.
9+
You can create a Software Template by defining a `Template` object as a YAML file.
1010

11-
The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
11+
The `Template` object describes the Software Template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
1212

1313
.`Template` object example
1414
[source,yaml]
@@ -56,10 +56,10 @@ spec:
5656
entityRef: ${{ steps['register'].output.entityRef }}
5757
# ...
5858
----
59-
<1> Specify a name for the template.
60-
<2> Specify a title for the template. This is the title that is visible on the template tile in the *Self-service* view.
61-
<3> Specify a description for the template. This is the description that is visible on the template tile in the *Self-service* view.
62-
<4> Specify the ownership of the template. The `owner` field provides information about who is responsible for maintaining or overseeing the template within the system or organization. In the provided example, the `owner` field is set to `backstage/techdocs-core`. This means that this template belongs to the `techdocs-core` project in the `backstage` namespace.
59+
<1> Specify a name for the Software Template.
60+
<2> Specify a title for the Software Template. This is the title that is visible on the Software Template tile in the *Self-service* view.
61+
<3> Specify a description for the Software Template. This is the description that is visible on the Software Template tile in the *Self-service* view.
62+
<4> Specify the ownership of the Software Template. The `owner` field provides information about who is responsible for maintaining or overseeing the Software Template within the system or organization. In the provided example, the `owner` field is set to `backstage/techdocs-core`. This means that this Software Template belongs to the `techdocs-core` project in the `backstage` namespace.
6363
<5> Specify the component type. Any string value is accepted for this required field, but your organization should establish a proper taxonomy for these. {product} instances may read this field and behave differently depending on its value. For example, a `website` type component may present tooling in the {product} interface that is specific to just websites.
6464
+
6565
The following values are common for this field:
@@ -69,7 +69,7 @@ The following values are common for this field:
6969
`website`:: A website.
7070
`library`:: A software library, such as an npm module or a Java library.
7171
--
72-
<6> Use the `parameters` section to specify parameters for user input that are shown in a form view when a user creates a component by using the template in the {product} console. Each `parameters` subsection, defined by a title and properties, creates a new form page with that definition.
72+
<6> Use the `parameters` section to specify parameters for user input that are shown in a form view when a user creates a component by using the Software Template in the {product} console. Each `parameters` subsection, defined by a title and properties, creates a new form page with that definition.
7373
<7> Use the `steps` section to specify steps that are executed in the backend. These steps must be defined by using a unique step ID, a name, and an action. You can view actions that are available on your {product} instance by visiting the URL `\https://<rhdh_url>/create/actions`.
7474
<8> Use the `output` section to specify the structure of output data that is created when the template is used. The `output` section, particularly the `links` subsection, provides valuable references and URLs that users can utilize to access and interact with components that are created from the template.
7575
<9> Provides a reference or URL to the repository associated with the generated component.

0 commit comments

Comments
 (0)