Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOpsSchool!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Backstage: The Ultimate Internal Developer Portal – Comprehensive Tutorial

Here is a detailed, professional-quality tutorial on Backstage. This guide is comprehensive but clear, designed for everyone from beginners to experienced platform engineers. It covers all the requested topics, includes practical examples, and is structured for real-world use.



1. Introduction

What is Backstage?

Backstage is an open-source developer portal framework, originally created by Spotify, that helps organizations build a unified portal for all their engineering tools, services, documentation, and data. Think of it as an internal “app store” for all things engineering, letting teams easily find, manage, and collaborate on software assets.

Why Do Organizations Use Backstage?

  • Centralizes scattered tools: Replaces dozens of links and UIs with a single entry point.
  • Boosts developer productivity: Developers spend less time hunting for docs, APIs, and tools.
  • Improves onboarding: New hires can quickly discover and understand internal tools and standards.
  • Enables platform thinking: Empowers teams to build a company-wide developer platform.

Key Features & Benefits

FeatureBenefit
Software CatalogUnified listing of all software, APIs, docs, and owners
PluginsExtensible for any tool or data source
TechDocsBuilt-in technical documentation engine
AuthenticationEnterprise-ready access control
Custom BrandingMake the portal “feel” like your own company
Open-Source EcosystemLarge community, many plugins, actively developed

2. Core Concepts

Software Catalog

  • What: Centralized, searchable registry of all your software (microservices, libraries, websites, etc).
  • Why: Makes ownership, documentation, and standards discoverable.

Plugins

  • What: Modular features that extend Backstage (e.g., CI/CD, monitoring, docs, Kubernetes dashboards).
  • Why: Lets you tailor the portal to your organization’s needs.

Entities, Components, Systems

  • Entity: Anything tracked in the catalog (e.g., service, website, API).
  • Component: A software part (microservice, library, data pipeline).
  • System: A group of related components that form a product or platform.

TechDocs

  • What: Built-in solution to generate and display technical docs (from Markdown) right in Backstage.
  • Why: Makes it easy for teams to maintain up-to-date docs, close to their code.

3. Architecture Overview

How Backstage Works

  • Front-End: React-based web UI, customizable with your branding and plugins.
  • Back-End: Node.js/Express server handling APIs, integrations, catalog, and plugin logic.
  • Plugins: Both frontend and backend can be extended by adding plugins.
Backstage Architecture Diagram

Deployment Options

  • Self-Hosted: Run on your own Kubernetes, VM, or cloud platform.
  • Managed (e.g., Roadie): Third-party vendors offer Backstage as a service.

4. Installation & Setup

Prerequisites

  • Node.js (v16+ recommended)
  • Yarn
  • Git
  • Docker (optional, for some plugins)

Step-by-Step Local Installation

  1. Install prerequisites: node -v # Should show 16.x or higher yarn -v git --version
  2. Create a new Backstage app:npx @backstage/create-app@latest
    • Enter your app name (e.g., company-portal)
    • cd company-portal
  3. Run Backstage locally:yarn install yarn dev

Initial Configuration


5. Authentication & Authorization

Enterprise Identity Integration

Backstage supports multiple providers out of the box:

  • Google OAuth
  • Okta
  • LDAP/SAML
  • GitHub/GitLab

Example: Google OAuth

  1. Create a Google Cloud Project, enable OAuth, and set up credentials.
  2. Add to app-config.yaml: auth: providers: google: development: clientId: ${GOOGLE_CLIENT_ID} clientSecret: ${GOOGLE_CLIENT_SECRET}
  3. Restart the app, login screen should show Google.

Managing User Access

  • Use Backstage’s built-in RBAC.
  • You can restrict who can see which services, edit docs, run pipelines, etc.

6. Configuring the Software Catalog

Onboarding Services and Tools

Backstage catalogs your assets via YAML entity definitions.

Sample service YAML (catalog-info.yaml):

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: my-service
  description: My sample microservice
  tags:
    - nodejs
    - api
spec:
  type: service
  owner: team-platform
  lifecycle: production
  • Place this in your repo root, or register via the Catalog UI.

Best Practices

  • Use consistent naming and owner fields.
  • Tag everything (language, team, lifecycle).
  • Automate registration with CI if possible.

Using the Catalog UI

  • Access “Create” in the sidebar to add new entities.
  • Search, filter, and view relationships between systems, components, and APIs.

7. Adding and Using Plugins

Popular Plugins

  • TechDocs: Native docs for each service.
  • CI/CD: Jenkins, GitHub Actions, GitLab, Azure Pipelines integrations.
  • Kubernetes: View Pod health, logs, and resources.
  • GitHub, PagerDuty, Sentry, etc.

Install Example – TechDocs:

yarn add --cwd packages/app @backstage/plugin-techdocs
yarn add --cwd packages/backend @backstage/plugin-techdocs-backend

How to Create a Custom Plugin

  1. Run: yarn backstage-cli create-plugin
  2. Follow prompts; scaffolded files appear in /plugins.
  3. Develop your plugin logic (see Plugin Authoring Guide).

Plugin Use Cases

  • Internal dashboards (alerts, builds, deployments)
  • Launching scripts or automations
  • Embedding status pages or incident management

8. Managing Documentation with TechDocs

How to Document Software in Backstage

  1. In your service repo, add a docs/ folder with Markdown files (index.md as the entrypoint).
  2. Reference the docs location in your catalog-info.yaml: spec: type: service owner: team-xyz lifecycle: production documentation: location: ./docs
  3. Build docs locally with TechDocs CLI: npx @techdocs/cli build

Setting Up and Using TechDocs Plugin

  • See TechDocs setup.
  • TechDocs can use MkDocs, support diagrams, embed images, etc.

Tips for Docs Organization

  • Keep docs near your code.
  • Use diagrams (Mermaid, SVG).
  • Set up a team-wide docs review process.

9. CI/CD and Developer Experience

Integrating with CI/CD Tools

  • Plugins available for Jenkins, GitHub Actions, GitLab, CircleCI, etc.
  • Can display build status, deployment history, pipeline logs in the portal.

Example: Jenkins Plugin

How Backstage Improves Developer Workflows

  • One-stop shop for starting new projects, checking builds, reading docs.
  • Self-service: engineers can onboard services, request resources, track ownership.

10. Customizing Backstage

Branding and UI Customization

  • Change logo, theme, sidebar via configuration.
  • Example: edit packages/app/src/themes for custom color schemes.

Writing Custom Extensions

  • Develop plugins as described above.
  • Can add custom pages, widgets, or API endpoints.

11. Deployment to Production

Recommended Patterns

EnvironmentMethodNotes
KubernetesHelm chart, KustomizeMost popular for scaling/HA
AWSECS, EKS, or EC2Use ALB, S3 for static assets
VMPM2, systemd, Docker ComposeGood for simple setups or POCs

Best Practices

  • Store configs securely (secrets manager, env vars).
  • Use load balancers for HA.
  • Monitor with Prometheus, Datadog, etc.

12. Best Practices & Common Pitfalls

Tips for Success

  • Start simple: just catalog and docs.
  • Automate catalog entry generation with CI.
  • Get team buy-in by solving real pain points (onboarding, finding owners).
  • Contribute back to open-source; stay up-to-date.

Common Pitfalls

  • Over-customizing too early.
  • Forgetting RBAC and security.
  • Not investing in documentation quality.
  • Ignoring upgrades/maintenance.

13. Case Studies & Examples

Success Stories

  • Spotify:
    Invented Backstage to tame hundreds of microservices. Saw 70% faster onboarding, improved developer happiness.
  • Netflix:
    Uses Backstage for developer self-service and standardized documentation.
  • American Airlines:
    Improved discoverability and collaboration across teams.

Example Architecture

[Developers] ---> [Backstage Portal]
        |                 |
   [Docs, Build, Alerts, APIs] (via Plugins)
        |
[CI/CD Tools, Cloud APIs, Kubernetes]
        |
    [Cloud Infra, Monitoring, Data]

14. Resources


15. FAQ & Troubleshooting

QuestionAnswer
Can I use Backstage with Azure?Yes, via Azure AD, AKS, Azure Pipelines plugins.
Is Backstage secure?Enterprise auth, RBAC, secrets best practices recommended.
Can I extend Backstage?Yes, via plugins and custom extensions.
What about upgrades?Stay updated with releases, follow migration guides.
Any good starter templates?Yes, Backstage Software Templates.

16. Table: Backstage Key Components Overview

ComponentDescriptionConfig Location
Software CatalogAll software assets, owners, docscatalog-info.yaml, UI
TechDocsMarkdown-powered docs in the portaldocs/, TechDocs plugin
PluginsExtend Backstage with more featuresInstall via Yarn, config
AuthSecure login and permissionsapp-config.yaml
UI/ThemesBranding, look and feelpackages/app/src/themes

You now have a complete, actionable guide to understanding, installing, and using Backstage for your internal developer platform.

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x