forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbc0b36
commit b047629
Showing
84 changed files
with
26,506 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.PHONY: run | ||
run: | ||
yarn dev | ||
|
||
.PHONY: install | ||
install: | ||
pip3 install mkdocs-techdocs-core==1.0.2 | ||
yarn install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# [Backstage](https://backstage.io) | ||
|
||
This is your newly scaffolded Backstage App, Good Luck! | ||
|
||
To start the app, run: | ||
|
||
```sh | ||
make install | ||
make run | ||
``` | ||
|
||
Provide Github identity in http://localhost:3000/settings/auth-providers. | ||
|
||
This setup installs backstage plugins. The OTEL demo should be visible in backstage by default -- explore provided components, API and docs. In each component, we provide a simple overview including security, dependabot and GH codespaces. More info is available in the tabs. Components documentation is hosted in https://github.com/jmichalak9/opentelemetry.io. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
app: | ||
# Should be the same as backend.baseUrl when using the `app-backend` plugin. | ||
baseUrl: http://localhost:7007 | ||
|
||
backend: | ||
# Note that the baseUrl should be the URL that the browser and other clients | ||
# should use when communicating with the backend, i.e. it needs to be | ||
# reachable not just from within the backend host, but from all of your | ||
# callers. When its value is "http://localhost:7007", it's strictly private | ||
# and can't be reached by others. | ||
baseUrl: http://localhost:7007 | ||
# The listener can also be expressed as a single <host>:<port> string. In this case we bind to | ||
# all interfaces, the most permissive setting. The right value depends on your specific deployment. | ||
listen: ':7007' | ||
|
||
# config options: https://node-postgres.com/api/client | ||
database: | ||
client: pg | ||
connection: | ||
host: ${POSTGRES_HOST} | ||
port: ${POSTGRES_PORT} | ||
user: ${POSTGRES_USER} | ||
password: ${POSTGRES_PASSWORD} | ||
# https://node-postgres.com/features/ssl | ||
# you can set the sslmode configuration option via the `PGSSLMODE` environment variable | ||
# see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require) | ||
# ssl: | ||
# ca: # if you have a CA file and want to verify it you can uncomment this section | ||
# $file: <file-path>/ca/server.crt | ||
|
||
catalog: | ||
# Overrides the default list locations from app-config.yaml as these contain example data. | ||
# See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details | ||
# on how to get entities into the catalog. | ||
locations: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
app: | ||
title: Scaffolded Backstage App | ||
baseUrl: http://localhost:3000 | ||
|
||
organization: | ||
name: My Company | ||
|
||
backend: | ||
# Used for enabling authentication, secret is shared by all backend plugins | ||
# See https://backstage.io/docs/auth/service-to-service-auth for | ||
# information on the format | ||
# auth: | ||
# keys: | ||
# - secret: ${BACKEND_SECRET} | ||
baseUrl: http://localhost:7007 | ||
listen: | ||
port: 7007 | ||
# Uncomment the following host directive to bind to specific interfaces | ||
# host: 127.0.0.1 | ||
csp: | ||
connect-src: ["'self'", 'http:', 'https:'] | ||
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference | ||
# Default Helmet Content-Security-Policy values can be removed by setting the key to false | ||
cors: | ||
origin: http://localhost:3000 | ||
methods: [GET, HEAD, PATCH, POST, PUT, DELETE] | ||
credentials: true | ||
# This is for local development only, it is not recommended to use this in production | ||
# The production database configuration is stored in app-config.production.yaml | ||
database: | ||
client: better-sqlite3 | ||
connection: ':memory:' | ||
reading: | ||
allow: | ||
- host: 'opentelemetry.io' | ||
- host: 'raw.githubusercontent.com' | ||
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir | ||
|
||
integrations: | ||
github: | ||
- host: github.com | ||
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information | ||
# about setting up the GitHub integration here: https://backstage.io/docs/getting-started/configuration#setting-up-a-github-integration | ||
token: ${GITHUB_TOKEN} | ||
### Example for how to add your GitHub Enterprise instance using the API: | ||
# - host: ghe.example.net | ||
# apiBaseUrl: https://ghe.example.net/api/v3 | ||
# token: ${GHE_TOKEN} | ||
|
||
proxy: | ||
### Example for how to add a proxy endpoint for the frontend. | ||
### A typical reason to do this is to handle HTTPS and CORS for internal services. | ||
# endpoints: | ||
# '/test': | ||
# target: 'https://example.com' | ||
# changeOrigin: true | ||
|
||
# Reference documentation http://backstage.io/docs/features/techdocs/configuration | ||
# Note: After experimenting with basic setup, use CI/CD to generate docs | ||
# and an external cloud storage when deploying TechDocs for production use-case. | ||
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach | ||
techdocs: | ||
builder: 'local' # Alternatives - 'external' | ||
generator: | ||
runIn: 'docker' # Alternatives - 'local' | ||
publisher: | ||
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives. | ||
|
||
auth: | ||
# see https://backstage.io/docs/auth/ to learn about auth providers | ||
providers: {} | ||
|
||
scaffolder: | ||
# see https://backstage.io/docs/features/software-templates/configuration for software template options | ||
|
||
catalog: | ||
# import: | ||
# entityFilename: catalog-info.yaml | ||
# pullRequestBranchName: backstage-integration | ||
rules: | ||
- allow: [Component, System, API, Resource, Location, Group, User] | ||
locations: | ||
# Local example data, file locations are relative to the backend process, typically `packages/backend` | ||
- type: url | ||
target: https://github.com/jmichalak9/opentelemetry-demo/blob/main/backstage.yaml | ||
|
||
# # Local example template | ||
# - type: file | ||
# target: ../../examples/template/template.yaml | ||
# rules: | ||
# - allow: [Template] | ||
|
||
# # Local example organizational data | ||
# - type: file | ||
# target: ../../examples/org.yaml | ||
# rules: | ||
# - allow: [User, Group] | ||
|
||
## Uncomment these lines to add more example data | ||
# - type: url | ||
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml | ||
|
||
## Uncomment these lines to add an example org | ||
# - type: url | ||
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml | ||
# rules: | ||
# - allow: [User, Group] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": "1.22.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: backstage | ||
description: An example of a Backstage application. | ||
# Example for optional annotations | ||
# annotations: | ||
# github.com/project-slug: backstage/backstage | ||
# backstage.io/techdocs-ref: dir:. | ||
spec: | ||
type: website | ||
owner: [email protected] | ||
lifecycle: experimental | ||
--- | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: System | ||
metadata: | ||
name: opentelemetry-demo | ||
description: OTEL demo app | ||
spec: | ||
owner: user:guest | ||
--- | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: User | ||
metadata: | ||
name: guest | ||
spec: | ||
memberOf: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
declare const _default: React.ComponentType<{ | ||
children?: React.ReactNode; | ||
}>; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { AnyApiFactory } from '@backstage/core-plugin-api'; | ||
export declare const apis: AnyApiFactory[]; |
3 changes: 3 additions & 0 deletions
3
backstage/dist-types/packages/app/src/components/Root/LogoFull.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import React from 'react'; | ||
declare const LogoFull: () => React.JSX.Element; | ||
export default LogoFull; |
3 changes: 3 additions & 0 deletions
3
backstage/dist-types/packages/app/src/components/Root/LogoIcon.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import React from 'react'; | ||
declare const LogoIcon: () => React.JSX.Element; | ||
export default LogoIcon; |
2 changes: 2 additions & 0 deletions
2
backstage/dist-types/packages/app/src/components/Root/Root.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import React, { PropsWithChildren } from 'react'; | ||
export declare const Root: ({ children }: PropsWithChildren<{}>) => React.JSX.Element; |
1 change: 1 addition & 0 deletions
1
backstage/dist-types/packages/app/src/components/Root/index.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Root } from './Root'; |
2 changes: 2 additions & 0 deletions
2
backstage/dist-types/packages/app/src/components/catalog/EntityPage.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import React from 'react'; | ||
export declare const entityPage: React.JSX.Element; |
2 changes: 2 additions & 0 deletions
2
backstage/dist-types/packages/app/src/components/search/SearchPage.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import React from 'react'; | ||
export declare const searchPage: React.JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import '@backstage/cli/asset-types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import '@testing-library/jest-dom'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Router } from 'express'; | ||
import { PluginEnvironment } from '../types'; | ||
export default function createPlugin(env: PluginEnvironment): Promise<Router>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Router } from 'express'; | ||
import { PluginEnvironment } from '../types'; | ||
export default function createPlugin(env: PluginEnvironment): Promise<Router>; |
3 changes: 3 additions & 0 deletions
3
backstage/dist-types/packages/backend/src/plugins/catalog.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Router } from 'express'; | ||
import { PluginEnvironment } from '../types'; | ||
export default function createPlugin(env: PluginEnvironment): Promise<Router>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Router } from 'express'; | ||
import { PluginEnvironment } from '../types'; | ||
export default function createPlugin(env: PluginEnvironment): Promise<Router>; |
3 changes: 3 additions & 0 deletions
3
backstage/dist-types/packages/backend/src/plugins/scaffolder.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Router } from 'express'; | ||
import type { PluginEnvironment } from '../types'; | ||
export default function createPlugin(env: PluginEnvironment): Promise<Router>; |
3 changes: 3 additions & 0 deletions
3
backstage/dist-types/packages/backend/src/plugins/search.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { PluginEnvironment } from '../types'; | ||
import { Router } from 'express'; | ||
export default function createPlugin(env: PluginEnvironment): Promise<Router>; |
3 changes: 3 additions & 0 deletions
3
backstage/dist-types/packages/backend/src/plugins/techdocs.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Router } from 'express'; | ||
import { PluginEnvironment } from '../types'; | ||
export default function createPlugin(env: PluginEnvironment): Promise<Router>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Logger } from 'winston'; | ||
import { Config } from '@backstage/config'; | ||
import { PluginCacheManager, PluginDatabaseManager, PluginEndpointDiscovery, TokenManager, UrlReader } from '@backstage/backend-common'; | ||
import { PluginTaskScheduler } from '@backstage/backend-tasks'; | ||
import { PermissionEvaluator } from '@backstage/plugin-permission-common'; | ||
import { IdentityApi } from '@backstage/plugin-auth-node'; | ||
export type PluginEnvironment = { | ||
logger: Logger; | ||
database: PluginDatabaseManager; | ||
cache: PluginCacheManager; | ||
config: Config; | ||
reader: UrlReader; | ||
discovery: PluginEndpointDiscovery; | ||
tokenManager: TokenManager; | ||
scheduler: PluginTaskScheduler; | ||
permissions: PermissionEvaluator; | ||
identity: IdentityApi; | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: System | ||
metadata: | ||
name: examples | ||
spec: | ||
owner: guests | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: example-website | ||
spec: | ||
type: website | ||
lifecycle: experimental | ||
owner: guests | ||
system: examples | ||
providesApis: [example-grpc-api] | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: API | ||
metadata: | ||
name: example-grpc-api | ||
spec: | ||
type: grpc | ||
lifecycle: experimental | ||
owner: guests | ||
system: examples | ||
definition: | | ||
syntax = "proto3"; | ||
service Exampler { | ||
rpc Example (ExampleMessage) returns (ExampleMessage) {}; | ||
} | ||
message ExampleMessage { | ||
string example = 1; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-user | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: User | ||
metadata: | ||
name: guest | ||
spec: | ||
memberOf: [guests] | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-group | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Group | ||
metadata: | ||
name: guests | ||
spec: | ||
type: team | ||
children: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: ${{ values.name | dump }} | ||
spec: | ||
type: service | ||
owner: user:guest | ||
lifecycle: experimental |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log('Hello from ${{ values.name }}!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "${{ values.name }}", | ||
"private": true, | ||
"dependencies": {} | ||
} |
Oops, something went wrong.