Configuring Catalogue Ingestion
The SKE integration for Kratix will automatically populate the Backstage Software Catalog with Components and Templates for Kratix promises.
This document covers the steps to configure Backstage to be able to read its catalog from the store Kratix writes these entities to.
Catalog Discovery
For Backstage to have its catalog automatically populated from Kratix Promises, you need to configure your instance to read its catalog from the same state store that Kratix is configured to write Backstage Entities to (as configured in Creating the Entity State Store).
You can follow the official Backstage documentation for details about how to configure the integration according to your state store:
- For S3-Compatible buckets, check this page.
- For Git repositories, the configuration depends on the provider. For GitLab, for example, check this page.
The following steps will guide you through the process of configuring Backstage to read its catalog from either an S3-compatible bucket or a Gitlab repo.
- S3
- GitLab
Configure the Integration
Configure your Backstage to fetch the catalog from the s3 endpoint.
Following the AWS S3 Locations documentation, open the app-config.yaml file and, under the integrations key, add the awsS3 configuration as follows:
integrations:
awsS3:
- endpoint: "http://YOUR_S3_ENDPOINT"
s3ForcePathStyle: true
accessKeyId: ${AWS_ACCESS_KEY_ID}
secretAccessKey: ${AWS_SECRET_ACCESS_KEY}
Configure the Discovery
Next, configure the AWS S3 Catalog Discovery. First, open the app-config.yaml and add the following under the catalog key:
catalog:
rules:
- allow: [Component, Template] # Make sure to allow at least "component" and "template" entities
providers:
awsS3:
kratix-s3:
bucketName: kratix
prefix: backstage/
region: us-east-2
schedule:
frequency: { seconds: 10 }
timeout: { seconds: 30 }
Refer to the AWS S3 Discovery documentation for all of the configuration options.
As the AWS provider is not one of the default Backstage providers, you will need to install the AWS Catalog plugin.
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-aws
Once you've done that, you'll also need to register the package in packages/backend/src/index.ts:
backend.add(import('@backstage/plugin-catalog-backend-module-aws'));
Configure the Integration
Configure your Backstage to fetch the catalog from the GitLab repository that Kratix writes to.
Following the GitLab Locations documentation, open the app-config.yaml file and, under the integrations key, add the gitlab configuration as follows:
integrations:
gitlab:
- host: YOUR_GITLAB_HOST
token: ${GITLAB_TOKEN}
Configure the Discovery
Next, configure the GitLab Catalog Discovery. Open the app-config.yaml and add the following under the catalog key:
catalog:
rules:
- allow: [Component, Template] # Make sure to allow at least "component" and "template" entities
providers:
gitlab:
kratix-gitlab:
host: YOUR_GITLAB_HOST
group: YOUR_GROUP/YOUR_REPO
branch: main
entityFilename: 'catalog.yaml'
paths: ['backstage/']
schedule:
frequency: { seconds: 10 }
timeout: { seconds: 30 }
Refer to the GitLab Discovery documentation for all of the configuration options.
As the GitLab provider is not one of the default Backstage providers, you will need to install the GitLab Catalog plugin.
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-gitlab
Once you've done that, you'll also need to register the package in packages/backend/src/index.ts:
backend.add(import('@backstage/plugin-catalog-backend-module-gitlab'));
Next
Backstage is now configured to read its catalog from the same state store that Kratix writes entity data to. At the moment, that's a one-way communication.
In the next guide you will configure the SKE Backstage plugins.
