Day 22: Building Templates and Catalogs with Backstage
Welcome to Day 22 of the Zero to Platform Engineer in 30 Days challenge! ๐ Today, weโre diving into Backstage, the leading Internal Developer Platform (IDP) tool, to build service templates and a software catalog for streamlined developer workflows.
Why Use Backstage for Service Templates and Catalogs?
Backstage, originally developed by Spotify, helps platform teams:
- Standardize service creation with templates.
 - Provide a single source of truth for all microservices.
 - Improve developer self-service capabilities.
 - Reduce onboarding time by automating infrastructure setup.
 
๐ Companies like Spotify, American Airlines, and Expedia use Backstage to improve DevEx.
๐ฏ Key Features of Backstage:
- Software Catalog โ Organizes services, APIs, and dependencies.
 - Service Templates โ Automates project scaffolding and best practices.
 - Plugins & Extensibility โ Integrates with Kubernetes, ArgoCD, GitHub Actions, etc.
 
๐ก Backstage simplifies service discovery and deployment for engineering teams!
Hands-On: Setting Up Backstage
Step 1: Install Backstage Locally
- Install Node.js and Yarn:
 
npm install -g yarn
- Create a new Backstage app:
 
npx @backstage/create-app@latest
cd my-backstage-app
- Start Backstage:
 
yarn dev
- Open Backstage in your browser: http://localhost:3000
 
Step 2: Adding Services to the Software Catalog
- Navigate to Create Component in Backstage.
 - Register an existing GitHub repository.
 - Define catalog-info.yaml in the repo:
 
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: zero-to-platform
  annotations:
    github.com/project-slug: parraletz/zero-to-platform-engineer
spec:
  type: service
  owner: engineering
  lifecycle: production
- Push changes and Backstage will automatically detect the service.
 
Step 3: Creating a Service Template
Service templates allow teams to quickly scaffold new projects with best practices.
- Create a 
template.yamlfile: 
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  name: nodejs-service
  title: Node.js Service Template
  description: Scaffolds a Node.js microservice
spec:
  owner: platform-team
  type: service
  steps:
    - action: fetch:template
      input:
        url: ./skeleton
        values:
          name: ${{ parameters.name }}
  output:
    serviceUrl: https://github.com/parraletz/${{ parameters.name }}
- Define the skeleton project inside the 
skeletondirectory: 
mkdir skeleton
cd skeleton
# Create a package.json file
npm init -y
3.Add the template to Backstage.
๐ Now, developers can create standardized services in a few clicks!
How Templates Improve Developer Experience (DevEx)
**Before Templates:
- Developers manually set up services.
 - Different projects have inconsistent configurations.
 - Onboarding a new developer takes days.
 
With Backstage Templates:
- Developers can spin up new services instantly.
 - Enforces best practices across all projects.
 - Onboarding takes minutes instead of day
 
Activity for Today
- Set up Backstage locally and explore the UI.
 - Register a service in the Software Catalog.
 - Create a Service Template for a microservice.
 
Whatโs Next?
Tomorrow, weโll cover secrets management using AWS Secrets Manager and HashiCorp Vault.
๐ Check it out here: Zero to Platform Engineer Repository
Feel free to clone the repo, experiment with the code, and even contribute if youโd like! ๐
Follow the Series!
๐ Donโt miss a single step in your journey to becoming a Platform Engineer! ๐
This post is just the beginning. Hereโs what weโve covered so far and whatโs coming up next:
- Day 0: Introduction - Whatโs Platform Engineering?
 - Day 1: Introduction to the CNCF Landscape
 - Day 2: Day 2: Containers and Docker - The Building Blocks of Cloud Native
 - Day 3: Containers and Kubernetes - The Building Blocks of Cloud Native
 - Day 4: Deployments and Scaling in Kubernetes - Letโs Get Practical
 - Day 5: Kubernetes Services โ Connecting Your Applications
 - Day 6: ConfigMaps and Secrets โ Managing Configurations in Kubernetes
 - Day 7: Recap and Hands-On Challenges for Week 1
 - Day 8: Introduction to Infrastructure as Code (IaC)
 - Day 9: Advanced Terraform โ Managing Kubernetes Resources
 - Day 10: Managing Kubernetes with Helm and Terraform
 - Day 11: Introduction to GitOps with ArgoCD
 - Day 12: Advanced GitOps with Argo Rollouts
 
๐ Bookmark this blog and check back every day for new posts in the series. ๐ฃ Share your progress on social media with the hashtag #ZeroToPlatformEngineer to connect with other readers!