What is Backstage
Backstage is Spotify’s open-source platform for building developer portals. It is designed as the “developer’s home base” for all development-related things. It provides a single place for developers to find the tools, inventory, services, and documentation they need to build and maintain their software.
We started our journey with Backstage about two years ago. The main strength we have found has been its catalog abilities. It promotes a single source of truth for all the services and tools used in the organization. On the other hand, the most impressive tool that we have found is the software templates.
Backstage Templates
Software Templates in Backstage is a tool that can help you standardize processes by creating a form that, when submitted, runs actions and/or makes API calls for a desired outcome. It takes a skeleton code template, injects variables, and can publish the template to some locations like GitHub or GitLab.
Software templates are created using YAML and consist of three main parts:
- The steps that contain parameters where you set the inputs that will be picked by the user when they run the template.
- The actions where you do some things with information collected by the steps.
- the output, where you give some information to your customer about the tasks done by the template.
Backstage provides built-in support for Actions and Parameters.
Parameters are inserted in steps in react-jsonschema-form format. After the form is filled, the data is gathered from all the steps and passed on to the Actions. Backstage provides default actions, which you can view in https://your-backstage-url/create/actions. As you add more built-in actions to your project, the list that it shows will grow.
Templating for GitHub
Now that you have a small intro to Backstage templates, its structure and how it flows. Let’s talk about how we solved our problem with working with GitHub.