Onboarding Software to Backstage
Removing the example entities
In your Backstage app, you may have noticed some software entities already in the catalog. These are sample entities included so that starting up an app is not an empty experience the first time, but we can remove them in favor of your own software components.
These sample entities come from the app-config.yaml
file at the root of your Backstage app. By default, there are several locations under the catalog key:
catalog:
import:
entityFilename: catalog-info.yaml
pullRequestBranchName: backstage-integration
rules:
- allow: [Component, System, API, Resource, Location]
locations:
# Local example data, file locations are relative to the backend process, typically `packages/backend`
- type: file
target: ../../examples/entities.yaml
# Local example template
- type: file
target: ../../examples/template/template.yaml
rules:
- allow: [Template]
Here you can see the metadata concept more concretely. The catalog.locations
configuration is a list of locations (URLs or paths to files) that point to metadata files. You can set the type
field to either file
or url
. In case of a URL location, if you paste those URLs into your browser, you can see the metadata definitions themselves. Many of the example entities are a Location kind, which point in turn to other metadata files for the catalog to discover.
Listing locations explicitly in app-config.yaml
is convenient for demonstration purposes (or local development), but this isn’t an ideal setup for production; you don’t want every engineer in your organization to modify this configuration just to have their software tracked in the catalog.
So for now, delete the entire locations
block so that the catalog config looks like this:
catalog:
rules:
- allow: [Component, System, API, Resource, Location]
Save the file and reload your Backstage instance in your browser. You should see an empty catalog.