0.1.2 • Published 2 years ago
@echolayer/plugin-backstage-provider v0.1.2
EchoLayer Backstage Plugin
Welcome to the EchoLayer Backstage plugin! From here, you'll learn how to install our module and configure our plugin in your Backstage instance.
Backstage Configuration
You'll need to configure a proxy to echolayer.com and place the echolayer.com cards and pages in your Backstage files.
Create an EchoLayer API Key
- Login to EchoLayer using your GitHub account
- Create an API Key at the EchoLayer API Key page
- Set your API Key as an environment variable,
ECHOLAYER_API_KEY
in the environment where you run Backstage
Installing EchoLayer Backend Plugin Provider
- Install the plugin
# In Backstage root directory
yarn add --cwd packages/backend @echolayer/plugin-backstage-provider
- In the
catalog.ts
file in the following location in Backstage:packages/backend/src/plugins/catalog.ts
, import our provider:
import { Router } from 'express';
import { PluginEnvironment } from '../types';
// Add our provider:
import { EchoLayerProvider } from "@echolayer/plugin-backstage-provider";
- In the
catalog.ts
file, instantiate the class and add it as an entity provider:
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
const echolayer = new EchoLayerProvider('echolayer', env.config);
builder.addEntityProvider(echolayer);
// ...snip
}
- In the
catalog.ts
file, schedule echolayer to run:
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
// ...snip
const echolayer = new EchoLayerProvider('echolayer', env.config);
// ...snip
await env.scheduler.scheduleTask({
id: "run_echolayer_provider",
fn: async () => {
await echolayer.run();
},
frequency: { minutes: 1 },
timeout: { minutes: 10 }
});
return router;
}
- Update your
app-config.yaml
to include the following:
echolayer:
apiKey: <your api key>
License
This plugin is licensed under the Apache 2.0 License.
The EchoLayer name and brand are copyright Codex Build Inc. 2023. They are excluded from the Apache 2.0 license.