Skip to content

aliok/backstage-plugins

 
 

Repository files navigation

Knative Backstage Plugins

TODO: Description

Setup

TODO: Setup instructions for using the plugins

Development

Event Mesh plugin

The architecture of the plugin is as follows:

      Kubernetes                        Backstage
┌────────────────────┐           ┌─────────────────────┐
│                    │           │                     │
│ ┌───────────────┐  │           │       Plugin        │
│ │               │  │           │ ┌─────────────────┐ │
│ │    Backend    ◄──┼────┐      │ │                 │ │
│ │               │  │    │      │ │ ┌─────────────┐ │ │
│ └───────┬───────┘  │    │      │ │ │             │ │ │
│         │          │    └──────┼─┼─┤  Provider   │ │ │
│         │          │           │ │ │             │ │ │
│         │          │           │ │ └─────────────┘ │ │
│ ┌───────▼───────┐  │           │ │                 │ │
│ │               │  │           │ └─────────────────┘ │
│ │   API Server  │  │           │                     │
│ │               │  │           └─────────────────────┘
│ └───────────────┘  │
│                    │
└────────────────────┘

The plugin use providers (and possibly other mechanisms) to communicate with a special backend-for-frontend.

This backend talks to the Kubernetes API server to get information about the resources in the cluster.

Running the backend

The backend is a Go project that runs in a Kubernetes cluster.

Prerequisites:

  • To run the backend, you need to have a Kubernetes cluster running and the kubectl command line tool installed.
  • Also, you need ko installed and configured.
# Build and deploy the backend
ko apply -f ./backends/config/100-eventmesh/

Check that the backend is running:

# proxy the backend service
kubectl port-forward -n knative-eventing svc/eventmesh-backend 8080:8080

# check that the backend is running
curl -v http://localhost:8080/

{
  "eventTypes":[{"name":"test-event-type","namespace":"default","type":"foo","uid":"8a44f223-c2e5-4cc1-a578-cc81c6ea2898"}],
  "brokers":[{"name":"default","namespace":"default","uid":"d44e3cfa-5866-43fd-a8ed-b3a3436beecd"}]
}

Running the Backstage plugin

The plugin is enabled inside the Backstage instance that is in ./backstage directory.

Prerequisites:

  • To run the plugin, you need to have the yarn command line tool installed.

First, install dependencies:

# Install dependencies
cd ./backstage
yarn install

The default configuration of the plugin is to use the backend at http://localhost:8080.

Start and proxy the backend service:

# proxy the backend service
kubectl port-forward -n knative-eventing svc/eventmesh-backend 8080:8080

Then, start the backstage instance:

cd ./backstage
yarn dev

About

Knative plugins for Backstage.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 82.9%
  • Go 11.3%
  • Dockerfile 3.2%
  • HTML 2.3%
  • JavaScript 0.3%