Logo

dev-resources.site

for different kinds of informations.

Update the Backstage catalog instantly without touching any YAML

Published at
10/22/2024
Categories
backstage
internaldeveloperportal
yaml
Author
sam_blausten_ad9891c7a528
Author
25 person written this
sam_blausten_ad9891c7a528
open
Update the Backstage catalog instantly without touching any YAML

Updating an entity in the Backstage catalog generally means manually updating a YAML file in a repository somewhere and getting it merged to the main branch.

For many, this manual process can feel like a series of hurdles—switching contexts, waiting for pull request reviews, and depending on other team members or systems.

This friction increases significantly when you scale across hundreds or thousands of repositories. For example, changing a group name might require chasing after numerous teams to raise and merge PRs, turning what should be a simple update into a months-long process.

Having to edit YAML makes keeping your catalog up-to-date a challenge, let alone enriching it with additional data or plugins like PagerDuty.

How long does it take to add a PagerDuty plugin?

Lets use the PagerDuty plugin as an example. Suppose you want to add PagerDuty monitoring to a Backstage entity representing a backend service. All you need to do is add an annotation to the YAML file with the relevant service ID.

The quickest way to edit the YAML file might seem simple: open GitHub, click the pencil icon on the About card, and start editing.

About Card

Manual Process in GitHub

GitHub web editor

Once inside GitHub’s web editor, you can make the change, commit it to a new branch, and open a pull request.

Sounds straightforward, right? But here’s where it gets tricky. To add the PagerDuty plugin, you need the correct service ID, which requires logging into PagerDuty, searching for the service that matches your entity, and then copying the ID from the browser’s address bar (since it’s not easily accessible in the UI).

In GitHub’s case, we can edit this immediately, commit it to a new branch and open a pull request rather quickly all in the web editor.

PagerDuty annotation

But to find the correct Service ID we must first go to PagerDuty. Hopefully we can log in and access the available services, and then search for the correct one using the names in the Component YAML.

PagerDuty service search

Now, after locating the ID (in the address bar) and adding it to the YAML file, you still need to commit the changes, submit a PR, and wait for it to be reviewed and merged. Depending on the team’s review cadence, this could take days or longer.

Open PR

Multiply this by hundreds of teams and thousands of repositories, and the process becomes incredibly slow and frustrating. Minor updates can take weeks or months to implement at scale.

A Better Way: Entity Updates with Roadie

At Roadie we’ve built UI based tools that allow you to set things like PagerDuty annotations with a few clicks. Instead of seeing a missing annotation card you’ll be able to select from a list of PagerDuty services and update the entity immediately, all from the same page in the UI.

PagerDuty Annotation Card

Select from existing services

Working PagerDuty plugin

Bulk updates via UI

But what if you need to update multiple entities at once? Roadie also provides a bulk editor that allows you to make updates across many entities using a simple table format. This dramatically reduces the manual effort required to keep your catalog accurate and up-to-date.

Bulk annotation editor

Behind the Scenes: How It Works

Our UI-based editors are powered by a backend feature we call Fragments. Fragments are partial entity data stored in a database table and merged into the existing entities in the catalog by a processor. These fragments can be updated through our UI or via API.

Overview of Backend flow

Leverage external APIs to make things easier

The custom UI we’ve seen earlier in this post also leverages external API’s to provide a dropdown of available options.

In this example we’ve used PagerDuty’s API to fetch a list of services using the API token already added to Backstage to make your PagerDuty plugin work. This call is made via the Backstage proxy which is set up to point to PagerDuty using your API Token on the backend.

Script bulk changes via API

However, sometimes bulk editing of metadata in the catalog is best scripted, and in this scenario, Roadie users make use of our Fragments API to make changes to entities, such as changing the ownership of a group’s entities when the group gets absorbed into another group, or updating any relationship references to a user entity when that individual leaves and someone else takes their role.

We’re not the only ones who’ve done something like this - companies like Twilio and others have built similar fragment functionality so that they can script updates to there catalog via API and free up platform teams to help keep the catalog data rich and accurate.

Reach out to us on Discord or our website’s chat messenger if you want to hear more about this and other improvements Roadie has made to the Backstage experience.

backstage Article's
30 articles in total
Favicon
New Backstage Plugin: Manage and Deploy IaC from Your Internal Developer Portal
Favicon
Understanding the Backstage System Model
Favicon
Backstage Consulting & Enterprise Support
Favicon
Platform Engineering : découvrez la puissance de Backstage.io
Favicon
The New Way To Use OPA With Backstage
Favicon
Migrating to Backstage’s New Backend: A Step-By-Step Guide
Favicon
Update the Backstage catalog instantly without touching any YAML
Favicon
The Ultimate Guide to Backstage Software Catalog Completeness
Favicon
Easier Relationship Mapping in the Backstage Catalog
Favicon
Using the Open Policy Agent with Backstage!
Favicon
Adopting Backstage - Documentation and Support
Favicon
How to Define Engineering Standards (with Backstage)
Favicon
Improving Backstage performance (by up to 48x)
Favicon
Scaling Backstage
Favicon
🎵 Desplegando infraestructura en AWS desde Backstage 🎵
Favicon
The Lifecycle of a JavaScript File in the Browser: Request, Load, Execute1
Favicon
How to easily start Backstage
Favicon
APIMatic SDKs in Backstage Developer Portal
Favicon
Enable Developers on SAP BTP with Terraform, GitHub Actions and Backstage
Favicon
Kubernetes will rise, and Java will change – what else can we expect in 2024?
Favicon
Backstage, App template e Crossplane no Amazon EKS [Lab Session]
Favicon
Creating Infra Using Backstage Templates, Terraform and GitHub actions.
Favicon
Port vs Backstage - Choosing Your Internal Developer Portal
Favicon
PagerDuty Community Update, December 7 2023
Favicon
Introducing the Harness SRM Backstage Plugin
Favicon
Got Monorepos Instead of Microservices? This is How Harness IDP Has Got You Covered
Favicon
How to use Self-Service Onboarding in Harness Internal Developer Portal
Favicon
Road to BackstageCon 2023: A Sneak Peek into an Exciting Lineup & A Recap of 2022!
Favicon
PagerDuty Community Update, November 10 2023
Favicon
Starting Platform Engineering Journey with Backstage

Featured ones: