diff --git a/backstage-resources/entities/demo.yaml b/backstage-resources/entities/demo.yaml new file mode 100644 index 00000000..bce3828c --- /dev/null +++ b/backstage-resources/entities/demo.yaml @@ -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 \ No newline at end of file diff --git a/backstage-resources/entities/demo/argocd-info.yaml b/backstage-resources/entities/demo/argocd-info.yaml new file mode 100644 index 00000000..58f978d5 --- /dev/null +++ b/backstage-resources/entities/demo/argocd-info.yaml @@ -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 diff --git a/backstage-resources/entities/demo/backstage-info.yaml b/backstage-resources/entities/demo/backstage-info.yaml new file mode 100644 index 00000000..6922149b --- /dev/null +++ b/backstage-resources/entities/demo/backstage-info.yaml @@ -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 diff --git a/backstage-resources/entities/demo/k8s-monitoring.yaml b/backstage-resources/entities/demo/k8s-monitoring.yaml new file mode 100644 index 00000000..12acccc0 --- /dev/null +++ b/backstage-resources/entities/demo/k8s-monitoring.yaml @@ -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 \ No newline at end of file diff --git a/backstage-resources/entities/demo/keycloak-info.yaml b/backstage-resources/entities/demo/keycloak-info.yaml new file mode 100644 index 00000000..f61f501d --- /dev/null +++ b/backstage-resources/entities/demo/keycloak-info.yaml @@ -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 \ No newline at end of file diff --git a/backstage-resources/entities/demo/kubecost-info.yaml b/backstage-resources/entities/demo/kubecost-info.yaml new file mode 100644 index 00000000..b0d3e60d --- /dev/null +++ b/backstage-resources/entities/demo/kubecost-info.yaml @@ -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 \ No newline at end of file diff --git a/backstage-resources/entities/demo/kubevirt-manager-info.yaml b/backstage-resources/entities/demo/kubevirt-manager-info.yaml new file mode 100644 index 00000000..370dc86c --- /dev/null +++ b/backstage-resources/entities/demo/kubevirt-manager-info.yaml @@ -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 \ No newline at end of file diff --git a/backstage-resources/entities/demo/showcase-templates.yaml b/backstage-resources/entities/demo/showcase-templates.yaml new file mode 100644 index 00000000..f5b280b5 --- /dev/null +++ b/backstage-resources/entities/demo/showcase-templates.yaml @@ -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 diff --git a/backstage-resources/entities/demo/user-info.yaml b/backstage-resources/entities/demo/user-info.yaml new file mode 100644 index 00000000..54a139a7 --- /dev/null +++ b/backstage-resources/entities/demo/user-info.yaml @@ -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 +--- \ No newline at end of file diff --git a/install-platform.sh b/install-platform.sh index 23a3ae29..bba0e0e7 100755 --- a/install-platform.sh +++ b/install-platform.sh @@ -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 diff --git a/platform-apps/charts/backstage/values-demo-metalstack.yaml b/platform-apps/charts/backstage/values-demo-metalstack.yaml index 95b3483a..3c00c2b7 100644 --- a/platform-apps/charts/backstage/values-demo-metalstack.yaml +++ b/platform-apps/charts/backstage/values-demo-metalstack.yaml @@ -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: