janus-idp / backstage-showcase

This repo is moving to https://github.com/redhat-developer/red-hat-developer-hub
https://janus-idp.io
Apache License 2.0
113 stars 151 forks source link

Service Catalog Import #443

Closed gorkem closed 2 months ago

gorkem commented 1 year ago

Goal

To help users bring their existing entities to Backstage Software Catalog, we should offer assistance in two forms. Firstly, users should be able to perform bulk imports from an existing entity model, probably first converting to entity YAMLs. Alternately, Janus can discover entities by scraping git repositories and configuration as code formats such as kustomize, terraform, docker-compose etc.

Acceptance Criteria

  1. The import feature should be accessible to users from the Backstage Software Catalog interface.
  2. Users should be able to choose between bulk importing from an existing entity model or discovering entities by scraping git repositories and configuration as code formats.
  3. The bulk import feature should allow users to select multiple entities at once for import.
  4. The import feature should support various entity types, including but not limited to Kubernetes resources, Terraform modules, Docker Compose files, and Helm charts.
  5. The import process should verify that the entities being imported are valid and meet the expected schema.
  6. The import process should not overwrite any existing entities in the catalog, but should instead update them if necessary.
  7. The import process should provide clear feedback to the user on the progress of the import and any errors encountered during the process.
  8. The imported entities should be searchable within the Backstage Software Catalog.
  9. The import process should be efficient and not put undue strain on the system.
kadel commented 1 year ago

As discussed, there is currently a problem with authorization. If GitHub integration is configured using Github App, the authorized user should be able to import only repositories to which the user has permission. There is currently no auth system that provides this level of permissions.

We are going to break this down into multiple stages.

Stage 1

This will be similar to the Backstage catalog-import plugin but done using Software Template. Using the template will give users the ability to customize the import flow to fit their needs.

Stage 2 once the RBAC is ready we will extend the template with some kind of repository selector. This will allow us to do an actual bulk import.

Stage 3 extending the flow with the ability to automatically generate catalog-info.yaml based on the information detected from the git repository.

pittar commented 1 year ago

I'm tracking this ticket, since I'm certain it will be important to a number of development teams that I work with. Most already have anywhere from a small handful to dozens of apps running in their k8s clusters, so having a way to import those into the Backstage catalog will be an important feature for any team that isn't starting with a green field.

christophe-f commented 1 year ago

You can already import an existing app in the catalog. Not only a green field app. If done via the source code repo, the existing apps will appear in the Kubernetes plugin (and Topology plugin). Then we can provide more features to move from one CI tool to another, or migrate workloads to another platform, etc.

rhdh-bot commented 2 months ago

This issue has been closed due to the fact that the Janus community is being sunset.

For future plugin issues, please use https://github.com/backstage/community-plugins/issues

For future showcase issues, please use https://issues.redhat.com/browse/RHIDP

For more information on the sunset, see:

https://janus-idp.io/blog/2024/07/05/future-of-janus-community https://issues.redhat.com/browse/RHIDP-3690 https://issues.redhat.com/browse/RHIDP-1018