diff --git a/ref-implementation/backstage-templates/entities/basic-remote/mkdocs.yml b/ref-implementation/backstage-templates/entities/basic-remote/mkdocs.yml new file mode 100644 index 0000000..c8ae223 --- /dev/null +++ b/ref-implementation/backstage-templates/entities/basic-remote/mkdocs.yml @@ -0,0 +1,6 @@ +site_name: 'Argo Spark Example' +nav: + - Home: index.md + - idpBuilder: idpbuilder.md +plugins: + - techdocs-core diff --git a/ref-implementation/backstage-templates/entities/basic-remote/skeleton/catalog-info.yaml b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/catalog-info.yaml new file mode 100644 index 0000000..8893792 --- /dev/null +++ b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/catalog-info.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: ${{values.name | dump}} + description: This is a basic example application + annotations: + backstage.io/techdocs-ref: dir:. + backstage.io/kubernetes-label-selector: 'entity-id=${{values.name}}' + backstage.io/kubernetes-namespace: default + argocd/app-name: ${{values.name | dump}} + links: + - url: https://cnoe.localtest.me:8443/gitea + title: Repo URL + icon: github +spec: + owner: guest + lifecycle: experimental + type: service + system: ${{values.name | dump}} +--- +apiVersion: backstage.io/v1alpha1 +kind: System +metadata: + name: ${{values.name | dump}} + description: An example system for demonstration purposes + annotations: + backstage.io/techdocs-ref: dir:. + links: + - url: https://github.com/cnoe-io/stacks/tree/main/ref-implementation + title: CNOE Repo + icon: github +spec: + owner: guest + lifecycle: experimental + type: service diff --git a/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/idpbuilder.md b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/idpbuilder.md new file mode 100644 index 0000000..3ec74fb --- /dev/null +++ b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/idpbuilder.md @@ -0,0 +1,46 @@ +[![Codespell][codespell-badge]][codespell-link] +[![E2E][e2e-badge]][e2e-link] +[![Go Report Card][report-badge]][report-link] +[![Commit Activity][commit-activity-badge]][commit-activity-link] + +# IDP Builder + +Internal development platform binary launcher. + +> **WORK IN PROGRESS**: This tool is in a pre-release stage and is under active development. + +## About + +Spin up a complete internal developer platform using industry standard technologies like Kubernetes, Argo, and backstage with only Docker required as a dependency. + +This can be useful in several ways: +* Create a single binary which can demonstrate an IDP reference implementation. +* Use within CI to perform integration testing. +* Use as a local development environment for platform engineers. + +## Getting Started + +Checkout our [documentation website](https://cnoe.io/docs/reference-implementation/installations/idpbuilder) for getting started with idpbuilder. + +## Community + +- If you have questions or concerns about this tool, please feel free to reach out to us on the [CNCF Slack Channel](https://cloud-native.slack.com/archives/C05TN9WFN5S). +- You can also join our community meetings to meet the team and ask any questions. Checkout [this calendar](https://calendar.google.com/calendar/embed?src=064a2adfce866ccb02e61663a09f99147f22f06374e7a8994066bdc81e066986%40group.calendar.google.com&ctz=America%2FLos_Angeles) for more information. + +## Contribution + +Checkout the [contribution doc](./CONTRIBUTING.md) for contribution guidelines and more information on how to set up your local environment. + + + +[codespell-badge]: https://github.com/cnoe-io/idpbuilder/actions/workflows/codespell.yaml/badge.svg +[codespell-link]: https://github.com/cnoe-io/idpbuilder/actions/workflows/codespell.yaml + +[e2e-badge]: https://github.com/cnoe-io/idpbuilder/actions/workflows/e2e.yaml/badge.svg +[e2e-link]: https://github.com/cnoe-io/idpbuilder/actions/workflows/e2e.yaml + +[report-badge]: https://goreportcard.com/badge/github.com/cnoe-io/idpbuilder +[report-link]: https://goreportcard.com/report/github.com/cnoe-io/idpbuilder + +[commit-activity-badge]: https://img.shields.io/github/commit-activity/m/cnoe-io/idpbuilder +[commit-activity-link]: https://github.com/cnoe-io/idpbuilder/pulse diff --git a/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/images/cnoe-logo.png b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/images/cnoe-logo.png new file mode 100644 index 0000000..63b8f22 Binary files /dev/null and b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/images/cnoe-logo.png differ diff --git a/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/index.md b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/index.md new file mode 100644 index 0000000..f5cedaf --- /dev/null +++ b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/docs/index.md @@ -0,0 +1,11 @@ +![cnoe logo](./images/cnoe-logo.png) + +# Example Basic Application + +Thanks for trying out this demo! In this example, we deployed a simple guestbook application to a remote cluster using Backstage. + +### idpbuilder + +Checkout idpbuilder website: https://cnoe.io/docs/reference-implementation/installations/idpbuilder + +Checkout idpbuilder repository: https://github.com/cnoe-io/idpbuilder diff --git a/ref-implementation/backstage-templates/entities/basic-remote/skeleton/manifests/argocd-app.yaml b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/manifests/argocd-app.yaml new file mode 100644 index 0000000..6a73603 --- /dev/null +++ b/ref-implementation/backstage-templates/entities/basic-remote/skeleton/manifests/argocd-app.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ${{values.name | dump}} + namespace: argocd + labels: + example: basic +spec: + project: default + source: + repoURL: https://github.com/argoproj/argocd-example-apps.git + targetRevision: HEAD + path: guestbook + destination: + name: workshop + namespace: guestbook + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/ref-implementation/backstage-templates/entities/basic-remote/template.yaml b/ref-implementation/backstage-templates/entities/basic-remote/template.yaml new file mode 100644 index 0000000..85829d0 --- /dev/null +++ b/ref-implementation/backstage-templates/entities/basic-remote/template.yaml @@ -0,0 +1,53 @@ +apiVersion: scaffolder.backstage.io/v1beta3 +kind: Template +metadata: + description: Creates a Basic Kubernetes Deployment + name: basic-remote + title: Create a Basic Deployment in a Remote Cluster +spec: + owner: guest + type: service + parameters: + - title: Configuration Options + required: + - name + properties: + name: + type: string + description: name of this application + + steps: + - id: template + name: Generating component + action: fetch:template + input: + url: ./skeleton + values: + name: ${{parameters.name}} + + - id: publish + name: Publishing to a gitea git repository + action: publish:gitea + input: + description: This is an example app + # Hard coded value for this demo purposes only. + repoUrl: cnoe.localtest.me:8443/gitea?repo=${{parameters.name}} + defaultBranch: main + - id: create-argocd-app + name: Create ArgoCD App + action: cnoe:kubernetes:apply + input: + manifestPath: manifests/argocd-app.yaml + namespaced: true + clusterName: local + - id: register + name: Register + action: catalog:register + input: + repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }} + catalogInfoPath: 'catalog-info.yaml' + output: + links: + - title: Open in catalog + icon: catalog + entityRef: ${{ steps['register'].output.entityRef }} diff --git a/ref-implementation/backstage-templates/entities/catalog-info.yaml b/ref-implementation/backstage-templates/entities/catalog-info.yaml index 5dd49eb..6b3f7d2 100644 --- a/ref-implementation/backstage-templates/entities/catalog-info.yaml +++ b/ref-implementation/backstage-templates/entities/catalog-info.yaml @@ -8,3 +8,4 @@ spec: - ./basic/template.yaml - ./argo-workflows/template.yaml - ./app-with-bucket/template.yaml + - ./basic-remote/template.yaml diff --git a/ref-implementation/backstage/manifests/install.yaml b/ref-implementation/backstage/manifests/install.yaml index 56aacdb..773b4db 100644 --- a/ref-implementation/backstage/manifests/install.yaml +++ b/ref-implementation/backstage/manifests/install.yaml @@ -18,6 +18,7 @@ rules: - argoproj.io resources: - workflows + - applications verbs: - create ---