Skip to content

Instantly share code, notes, and snippets.

@mikamboo
Created September 27, 2024 13:28
Show Gist options
  • Save mikamboo/60d8fef1a612758a46519b316d789b33 to your computer and use it in GitHub Desktop.
Save mikamboo/60d8fef1a612758a46519b316d789b33 to your computer and use it in GitHub Desktop.
Backstage Installation Guide on a Kind Cluster

Backstage Installation Guide on a Kind Cluster

This guide will walk you through the installation of Backstage, an open source Internal Developer Platform, on a local Kubernetes cluster managed by Kind. We will use the official Helm chart to simplify the deployment and customize the installation using environment variables.

Prerequisites

  • Kind: Make sure Kind is installed and configured on your system.
  • Helm: Install Helm to manage charts.
  • kubectl: The Kubernetes client to interact with your cluster.

Installation Steps

  1. Create a Kind Cluster with Ingress Support
cat <<EOF | kind create cluster --name backstage --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP
EOF
  1. Install nginx-ingress
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
  1. Add the Backstage Helm Repository
helm repo add backstage https://artifacthub.io/packages/helm/backstage
helm repo update
  1. Create the Configuration File values.yaml

Create a values.yaml file to customize the installation. Here's an example with some key environment variables:

ingress:
  enabled: true
  host: "backstage.local"

backstage:
  extraEnvVars:
    - name: NODE_ENV
      value: "development"
      # NODE_ENV variable is set to development in this example. It is required for the Guest Provider plugin to work.
    - name: APP_CONFIG_app_baseUrl
      value: "http://backstage.local"
    - name: APP_CONFIG_backend_baseUrl
      value: "http://backstage.local"
    - name: APP_CONFIG_backend_cors_origin
      value: "http://backstage.local"
Variable Description
NODE_ENV Specifies the execution environment.
APP_CONFIG_app_baseUrl Overrive app.baseUrl param, the base URL of your Backstage instance.
APP_CONFIG_backend_baseUrl Overrive backend.baseUrl param, the base URL of your Backstage instance.
APP_CONFIG_backend_cors_origin Overrive backend.cors.origin param, specifies the origin URL for CORS.
  1. Install Backstage
kubectl create namespace backstage
helm upgrade --install backstage -n backstage backstage/backstage -f values.yaml
  1. Accessing Backstage

Add the following entry to your /etc/hosts file to map the hostname to your local IP address:

echo "127.0.0.1  backstage.local" | sudo tee -a /etc/hosts

Once the installation is complete, you can access your Backstage instance by visiting the URL specified in values.yaml, typically htts://backstage.local.

Note: This guide provides a solid foundation for installing Backstage. For more advanced configuration and specific customizations, refer to the official Backstage documentation.

Additional Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment