Setting up Software Templates
Anatomy of a Software Template
There are two elements of a Software Template - a template.yaml definition file and a skeleton directory containing all the necessary files and directories.
template.yaml file is where all metadata about the template is defined like its name, inputs to ask from the user, steps involved in templating, location to the skeleton files and directories, etc.
For a Software Template to be registered in Backstage, the location of
template.yaml needs to be tracked by the Software Catalog. After creating your Backstage instance using @backstage/create-app script, you might find some of the default templates already added via
app-config.yaml, like this:
catalog: locations: # Backstage example templates - type: url target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml rules: - allow: [Template]
Explore existing templates
Go to https://github.com/backstage/software-templates to find the Software Templates hub where the community has submitted different types of templates. This can be useful when writing your own software templates for your organization.