The software catalog setup procedures in this topic make use of Backstage. For more information about Backstage, see the Backstage documentation.
This section describes how you can format your own catalog. Creating catalogs consists of building meta data YAML files stored together with the code. This information is read from a Git-compatible repository consisting of these YAML catalog definition files. Changes made to the catalog definitions on your Git infrastructure are automatically reflected every 200 seconds or when manually registered. For each catalog entity kind you create, there is a file format you must follow. Below is an overview of a few core entities, here are details about all types of entities. You can use the example Blank Catalog to create user, group, system, and main component YAML files.
A User entity describes a specific person and is used for identity purposes. A Group entity describes an organizational team or unit. Users are members of one or more Groups.
The descriptor files for both require values for apiVersion
, kind
, metadata.name
.
Users also require spec.memberOf
. Groups require spec.type
and spec.children
, where
spec.children
is another Group.
To link a logged in user to a user entity, include the optional spec.profile.email
field.
Sample user entities:
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: default-user
spec:
profile:
displayName: Default User
email: [email protected]
picture: https://avatars.dicebear.com/api/avataaars/[email protected]?background=%23fff
memberOf: [default-team]
Sample group entities:
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: default-team
description: Default Team
spec:
type: team
profile:
displayName: Default Team
email: [email protected]
picture: https://avatars.dicebear.com/api/identicon/[email protected]?background=%23fff
parent: default-org
children: []
More information about user entities and group entities is available in Backstage documentation.
A System entity is a collection of resources and components.
System descriptor files require values for apiVersion
, kind
, metadata.name
, and spec.owner
,
where spec.owner
is a User or Group. A system has components belonging to it when that component
specifies the System name in the field spec.system
.
Sample system entity
apiVersion: backstage.io/v1alpha1
kind: System
metadata:
name: backstage
description: Tanzu Application Platform GUI System
spec:
owner: default-team
More information about system entities is available in Backstage documentation.
A Component describes a software component, or a "unit of software".
Component descriptor files require values for apiVersion
, kind
, metadata.name
, spec.type
,
spec.lifecycle
, and spec.owner
. Some useful optional fields are spec.system
and
spec.subcomponentOf
, both of which links a Component to an entity it is a part of.
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backstage-component
description: Tanzu Application Platform GUI Component
annotations:
'backstage.io/kubernetes-label-selector': 'app=backstage' #Identifies the Kubernetes objects that make up this component
'backstage.io/techdocs-ref': dir:. #TechDocs label
spec:
type: service
lifecycle: alpha
owner: default-team
system: backstage
More information about component entities is available in Backstage documentation.
The following procedures cover updating software catalogs.
You can update your software catalog with new entities without re-deploying the entire tap-gui
package. To do so:
- Navigate to your Software Catalog page.
- Click the Register Entity on the top-right of the page.
- Link to an existing entity file to start tracking your entity by entering the full path.
- Import the entities and view them in your Software Catalog page.
To deregister an entity, follow these steps:
- Navigate to your Software Catalog page.
- Select the entity to deregister, such as component, group, or user.
- Click the three dots at the top-right of the page and then click Unregister....
-
Use static configuration to add or change catalog locations:
-
To update components, change the catalog location in either the
app_config
section oftap-gui-values.yaml
or the custom values file you used when installing. For example:catalog: locations: - type: url target: UPDATED-CATALOG-LOCATION
-
To register components, add the new catalog's location in either the
app_config
section oftap-gui-values.yaml
or the custom values file you used when installing. For example:catalog: locations: - type: url target: EXISTING-CATALOG-LOCATION - type: url target: EXTRA-CATALOG-LOCATION
When targeting GitHub, don't write the raw URL. Instead, use the URL that you see when you navigate to the file in the browser, otherwise the catalog processor is unable to properly set up the files.
For example:
- Raw URL:
https://raw.githubusercontent.com/user/repo/catalog.yaml
- Target URL:
https://github.com/user/repo/blob/main/catalog.yaml
For more information about static catalog configuration, see the Backstage documentation.
-
-
Update the package to include the catalog by running:
tanzu package installed update backstage \ --version PACKAGE-VERSION \ -f VALUES-FILE
-
Check the status of this update by running:
tanzu package installed list
To set up one of our demos, you can choose between a blank or a sample catalog.
The Yelb demo catalog in Github includes all the components that make up the Yelb system and the default Backstage components.
- Download the appropriate file for running the Yelb application itself from Github.
- Install the application on the Kubernetes cluster that you've used for Tanzu Application Platform. It's important to preserve the metadata labels on the Yelb application's objects.
- Save the Tanzu Application Platform GUI Yelb Catalog from the Tanzu Network's Tanzu Application Platform downloads under the Tap-GUI-Catalogs folder.
- Use the steps for
Adding an Additional Catalog Location to add the
catalog-info.yaml
.