Skip to content

Commit

Permalink
add demo backstage resources and make the branch where they get retri…
Browse files Browse the repository at this point in the history
…eved configurable

Signed-off-by: Johannes Kleinlercher <[email protected]>
  • Loading branch information
jkleinlercher committed Dec 1, 2024
1 parent 0dfa0c1 commit 9d3ea5a
Show file tree
Hide file tree
Showing 11 changed files with 153 additions and 5 deletions.
17 changes: 17 additions & 0 deletions backstage-resources/entities/demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# locations
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: demo-location
description: A collection of all Backstage entities for official kubriX demo
spec:
targets:
- ./demo/argocd-info.yaml
- ./demo/backstage-info.yaml
- ./demo/keycloak-info.yaml
- ./demo/k8s-monitoring.yaml
- ./demo/kubecost-info.yaml
- ./demo/kubevirt-manager-info.yaml
- ./demo/user-info.yaml
- ./demo/showcase-templates.yaml
18 changes: 18 additions & 0 deletions backstage-resources/entities/demo/argocd-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: argocd
title: ArgoCD
description: Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. We use ArgoCD for ...
links:
- url: https://argocd.demo.kubrix.cloud
title: Instance of ArgoCD
icon: web
- url: https://argo-cd.readthedocs.io/en/stable/
title: Documentation
icon: web
spec:
type: cd-provider
lifecycle: production
owner: sx-cnp-oss
system: sx-cnp-oss
28 changes: 28 additions & 0 deletions backstage-resources/entities/demo/backstage-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: kubrix-backstage
title: kubriX platform Showcase
description: |
This is the kubriX paltform Showcase for our official demo instance
links:
- title: Website
url: https://kubriX.io
- title: kubriX platform Showcase
url: https://backstage.demo.kubrix.cloud
annotations:
github.com/project-slug: suxess-it/kubriX
backstage.io/kubernetes-label-selector: 'app.kubernetes.io/instance=sx-backstage'
argocd/app-name: "sx-backstage"
backstage.io/techdocs-ref: url:https://github.com/suxess-it/kubriX/tree/main/backstage-resources
backstage.io/kubernetes-namespace: backstage
backstage.io/kubernetes-id: sx-backstage
backstage.io/adr-location: https://github.com/suxess-it/kubriX/tree/main/backstage-resources/adr
grafana/dashboard-selector: "(tags @> 'suXess')"
grafana/overview-dashboard: "https://grafana.demo.kubrix.cloud/d/k8s_views_ns/kubernetes-views-namespaces?orgId=1&from=now-1h&to=now&var-datasource=default&var-cluster=kubrix-demo&var-namespace=backstage&var-resolution=30s&var-created_by=$__all&refresh=30s"
spec:
type: service
owner: sx-cnp-oss
lifecycle: production
dependsOn:
- resource:argocd
18 changes: 18 additions & 0 deletions backstage-resources/entities/demo/k8s-monitoring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: k8s-monitoring
title: k8s-monitoring
description: Helm-Chart with integrated Alloy to scrape metrics, logs and traces for Mimir, Loki and Tempo
links:
- url: https://grafana.demo.kubrix.cloud
title: Grafana Instance for kubriX
icon: web
- url: https://github.com/grafana/k8s-monitoring-helm
title: Official Documentation
icon: web
spec:
type: observability
lifecycle: production
owner: sx-cnp-oss
system: sx-cnp-oss
18 changes: 18 additions & 0 deletions backstage-resources/entities/demo/keycloak-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: keycloak
title: KeyCloak
description: Keycloak is an open source software product to allow single sign-on with identity and access management aimed at modern applications and services. We use keycloack in this showcase.
links:
- url: https://keycloak.demo.kubrix.cloud
title: sx-cnp-oss Keycloak
icon: web
- url: https://www.keycloak.org/documentation
title: Documentation
icon: web
spec:
type: identity-provider
lifecycle: production
owner: sx-cnp-oss
system: sx-cnp-oss
18 changes: 18 additions & 0 deletions backstage-resources/entities/demo/kubecost-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: kubecost
title: Kubecost
description: Kubecost
links:
- url: https://kubecost.demo.kubrix.cloud
title: Kubecost Instance of sx-cnp-oss
icon: web
- url: https://docs.kubecost.com
title: Official Documentation
icon: web
spec:
type: cost-provider
lifecycle: production
owner: sx-cnp-oss
system: sx-cnp-oss
18 changes: 18 additions & 0 deletions backstage-resources/entities/demo/kubevirt-manager-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: kubevirt-manager
title: kubevirt-manager
description: kubevirt Manager UI
links:
- url: https://kubevirt-manager.demo.kubrix.cloud
title: sx-cnp-oss Instance of kubevirt-manager
icon: web
- url: https://kubevirt-manager.io/
title: Official Documentation
icon: web
spec:
type: virtualization
lifecycle: production
owner: sx-cnp-oss
system: sx-cnp-oss
9 changes: 9 additions & 0 deletions backstage-resources/entities/demo/showcase-templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: software-templates-uibklab
description: A collection of Backstage templates for uibklab
spec:
type: url
targets:
- https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/templates/scaffolder-templates/sx-virt-template/template.yaml
3 changes: 3 additions & 0 deletions backstage-resources/entities/demo/user-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# required user for demo environment https://github.com/suxess-it/sx-cnp-oss/issues/87
# until user management set up properly
---
3 changes: 2 additions & 1 deletion install-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ if [[ $( echo $argocd_apps | grep sx-backstage ) ]] ; then
--from-literal=GITHUB_TOKEN=${KUBRIX_BACKSTAGE_GITHUB_TOKEN} \
--from-literal=K8S_SA_TOKEN=${K8S_SA_TOKEN} \
--from-literal=ARGOCD_AUTH_TOKEN=${ARGOCD_AUTH_TOKEN} \
--from-literal=GRAFANA_TOKEN=${GRAFANA_TOKEN}
--from-literal=GRAFANA_TOKEN=${GRAFANA_TOKEN} \
--from-literal=BACKSTAGE_CATALOG_BRANCH=${KUBRIX_REPO_BRANCH}
fi

# in codespaces we need additional crossplane resources for keycloak
Expand Down
8 changes: 4 additions & 4 deletions platform-apps/charts/backstage/values-demo-metalstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ backstage:
- allow: [Component, System, API, Resource, Location, Template, Domain, User, Group ]
locations:
- type: url
target: https://github.com/suxess-it/team1-demo-app1/blob/main/catalog-info.yaml
target: https://github.com/suxess-it/team1-demo-app1/blob/${BACKSTAGE_CATALOG_BRANCH}/catalog-info.yaml
- type: url
target: https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/templates/showcase-templates.yaml
target: https://github.com/suxess-it/sx-cnp-oss/blob/${BACKSTAGE_CATALOG_BRANCH}/backstage-resources/templates/showcase-templates.yaml
rules:
- allow: [Template]
- type: url
target: https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/entities/all.yaml
target: https://github.com/suxess-it/sx-cnp-oss/blob/${BACKSTAGE_CATALOG_BRANCH}/backstage-resources/entities/all.yaml
- type: url
target: https://github.com/suxess-it/sx-cnp-oss/blob/main/backstage-resources/entities/uibklab.yaml
target: https://github.com/suxess-it/sx-cnp-oss/blob/${BACKSTAGE_CATALOG_BRANCH}/backstage-resources/entities/demo.yaml
providers:
keycloakOrg:
default:
Expand Down

0 comments on commit 9d3ea5a

Please sign in to comment.