0.1.2 • Published 2 years ago

@echolayer/plugin-backstage-provider v0.1.2

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

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

  1. Login to EchoLayer using your GitHub account
  2. Create an API Key at the EchoLayer API Key page
  3. Set your API Key as an environment variable, ECHOLAYER_API_KEY in the environment where you run Backstage

Installing EchoLayer Backend Plugin Provider

  1. Install the plugin
# In Backstage root directory
yarn add --cwd packages/backend @echolayer/plugin-backstage-provider
  1. 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";
  1. 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
}
  1. 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;
}
  1. 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.