Deploy a Backstage portal instance in an OpenShift cluster. One instance is
installed in a dedicated namespace named bs1
by default.
After deployment edit configMap backstage-app-config
to dynamically
reconfigure the portal; or change it in the
deploy/app-config.yaml file here and run deploy.sh
to reconfigure. NOTE: delete the current pod so the modified configMap is
loaded.
For example, try uncommenting one of the commented URL locations in the initial configMap, then deleting the pod, then refreshing Backstage.
- EDB Postgres - openshift-services/postgres
- Create a Secret named
github-token
with keyGITHUB_TOKEN
with value set to a GitHub Token with repo and workflow permissions. - Create a Secret name
argocd-token
with keyARGOCD_AUTH_TOKEN
set to an admin token for ArgoCD
- Install dependencies
- Clone this repo and change dir: `git clone https://github.com/joshgav/backstage-on-openshift.git
- Set env vars in
.env
file or viaexport
- Run
REBUILD_IMAGE=1 ./deploy/deploy.sh
to build and push the image and deploy the system
- The resolved URL is echoed at the end of
deploy.sh
(which can be run anytime)
-
Visit your instance at https://backstage-bs1.${openshift_ingress_domain}, where
openshift_ingress_domain
is found viaoc get ingresses.config.openshift.io cluster -ojson | jq -r .spec.domain
-
Reconfigure and deploy with
deploy/deploy.sh
(it's idempotent) -
Rebuild, reconfigure and deploy with
REBUILD_IMAGE=1 deploy/deploy.sh
-
Follow logs:
kubectl logs --follow deployment/backstage
-
Troubleshoot the image:
kubectl run -it --image quay.io/${QUAY_USER_NAME}/bs1-backstage:latest --rm bs-test -- bash
Delete the namespace backstage
(kubectl delete namespace backstage
) and start over.
- On the first deployment the Backstage pod is ready before the database cluster so it crashloops a few times and then stabilizes.
- This project uses app-config file in
deploy
only - not the ones in the root directory. - If you have OpenTelemetry in your cluster uncomment the
base/instrumentation.yaml
file to add OpenTelemetry injection to the namespace and the Backstage deployment. - You must use the latest LTS version of Node.js. Jump to it if you use nvm with
nvm use --lts --latest
. - Try importing Janus' templates in the
/catalog-import
page from https://github.com/janus-idp/software-templates/blob/main/showcase-templates.yaml. They're included in this repo's defaultapp-config.yaml
file. - To get an ArgoCD auth token, run patch-argocd.sh, then
login with the admin account using the secret from namespace
openshift-gitops
, secret nameopenshift-gitops-cluster
. Navigate to the Settings section and request a token valid for365d
.