This is the backend plugin for Frontend Plugin
yarn --cwd packages/backend add @telereso/backstage-plugin-custom-entities-backend
In the new backend system add the following changes to packages/backend/src/index.ts
import { createBackend } from '@backstage/backend-defaults';
const backend = createBackend();
+// Custom Entities
+backend.add(import('@telereso/backstage-plugin-custom-entities-backend'));
backend.start();
The plugin has its own configuration in app-config.yaml
Local
customEntities:
providers:
local:
dir: ../../../../examples
name: custom-entities.yaml
Production
customEntities:
providers:
googleGcs:
bucket: <your-bucket>
folder: backstage/catalog
name: custom-entities.yaml
There are 2 options, one for local and the other one for production,
In local the custom-entities.yaml
will be stored under example
directory of root project
In production the plugin uses Google Cloud Storage You can check backstage integration with GCS
use bucket
, folder
and name
to customize how the file is stored in the bucket
Other providers will be introduced in the future, most likely will include database integration
Locally you can add the following location
catalog:
locations:
# Local example data, file locations are relative to the backend process, typically `packages/backend`
- type: file
target: ../../examples/custom-entities.yaml
In production add the following changes in app-config.produciton.yaml
backend:
baseUrl: "https://${BACKEND_HOST}"
auth:
keys:
- secret: ${BACKEND_SECRET}
+ csp:
+ script-src:
+ - "'self'"
+ - "'unsafe-eval'" # this is required for scaffolder usage, and ajv validation.
+ - 'https://cdn.jsdelivr.net'
+ reading:
+ allow:
+ - host: "${BACKEND_HOST}"
catalog:
locations:
+ - type: url
+ target: "https://${BACKEND_HOST}/api/custom-entities/v1/entities.yaml"
+ rules:
+ - allow: [ User, Group, Component, System, API, Resource, Location ]
Make sure that BACKEND_HOST
is same as backend.baseUrl
host