Skip to content

Commit b99061f

Browse files
Created basic backstage app using create-app
1 parent 463571a commit b99061f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+24498
-0
lines changed

.gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.DS_STORE
2+
node_modules
3+
scripts/flow/*/.flowconfig
4+
.flowconfig
5+
*~
6+
*.pyc
7+
.grunt
8+
_SpecRunner.html
9+
__benchmarks__
10+
build/
11+
remote-repo/
12+
coverage/
13+
.module-cache
14+
fixtures/dom/public/react-dom.js
15+
fixtures/dom/public/react.js
16+
test/the-files-to-test.generated.js
17+
*.log*
18+
chrome-user-data
19+
*.sublime-project
20+
*.sublime-workspace
21+
.idea
22+
*.iml
23+
.vscode
24+
*.swp
25+
*.swo
26+
27+
packages/react-devtools-core/dist
28+
packages/react-devtools-extensions/chrome/build
29+
packages/react-devtools-extensions/chrome/*.crx
30+
packages/react-devtools-extensions/chrome/*.pem
31+
packages/react-devtools-extensions/firefox/build
32+
packages/react-devtools-extensions/firefox/*.xpi
33+
packages/react-devtools-extensions/firefox/*.pem
34+
packages/react-devtools-extensions/shared/build
35+
packages/react-devtools-extensions/.tempUserDataDir
36+
packages/react-devtools-inline/dist
37+
packages/react-devtools-shell/dist
38+
packages/react-devtools-timeline/dist
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.git
2+
.yarn/cache
3+
.yarn/install-state.gz
4+
node_modules
5+
packages/*/src
6+
packages/*/node_modules
7+
plugins
8+
*.local.yaml
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
root: true,
3+
};

backstage-app/backstage101/.gitignore

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# macOS
2+
.DS_Store
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Coverage directory generated when running tests with coverage
13+
coverage
14+
15+
# Dependencies
16+
node_modules/
17+
18+
# Yarn 3 files
19+
.pnp.*
20+
.yarn/*
21+
!.yarn/patches
22+
!.yarn/plugins
23+
!.yarn/releases
24+
!.yarn/sdks
25+
!.yarn/versions
26+
27+
# Node version directives
28+
.nvmrc
29+
30+
# dotenv environment variables file
31+
.env
32+
.env.test
33+
34+
# Build output
35+
dist
36+
dist-types
37+
38+
# Temporary change files created by Vim
39+
*.swp
40+
41+
# MkDocs build output
42+
site
43+
44+
# Local configuration files
45+
*.local.yaml
46+
47+
# Sensitive credentials
48+
*-credentials.yaml
49+
50+
# vscode database functionality support files
51+
*.session.sql
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
dist-types
3+
coverage
4+
.vscode

backstage-app/backstage101/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# [Backstage](https://backstage.io)
2+
3+
This is your newly scaffolded Backstage App, Good Luck!
4+
5+
To start the app, run:
6+
7+
```sh
8+
yarn install
9+
yarn dev
10+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
app:
2+
# Should be the same as backend.baseUrl when using the `app-backend` plugin.
3+
baseUrl: http://localhost:7007
4+
5+
backend:
6+
# Note that the baseUrl should be the URL that the browser and other clients
7+
# should use when communicating with the backend, i.e. it needs to be
8+
# reachable not just from within the backend host, but from all of your
9+
# callers. When its value is "http://localhost:7007", it's strictly private
10+
# and can't be reached by others.
11+
baseUrl: http://localhost:7007
12+
# The listener can also be expressed as a single <host>:<port> string. In this case we bind to
13+
# all interfaces, the most permissive setting. The right value depends on your specific deployment.
14+
listen: ':7007'
15+
16+
# config options: https://node-postgres.com/api/client
17+
database:
18+
client: pg
19+
connection:
20+
host: ${POSTGRES_HOST}
21+
port: ${POSTGRES_PORT}
22+
user: ${POSTGRES_USER}
23+
password: ${POSTGRES_PASSWORD}
24+
# https://node-postgres.com/features/ssl
25+
# you can set the sslmode configuration option via the `PGSSLMODE` environment variable
26+
# see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
27+
# ssl:
28+
# ca: # if you have a CA file and want to verify it you can uncomment this section
29+
# $file: <file-path>/ca/server.crt
30+
31+
catalog:
32+
# Overrides the default list locations from app-config.yaml as these contain example data.
33+
# See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details
34+
# on how to get entities into the catalog.
35+
locations: []
+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
app:
2+
title: Scaffolded Backstage App
3+
baseUrl: http://localhost:3000
4+
5+
organization:
6+
name: My Company
7+
8+
backend:
9+
# Used for enabling authentication, secret is shared by all backend plugins
10+
# See https://backstage.io/docs/auth/service-to-service-auth for
11+
# information on the format
12+
# auth:
13+
# keys:
14+
# - secret: ${BACKEND_SECRET}
15+
baseUrl: http://localhost:7007
16+
listen:
17+
port: 7007
18+
# Uncomment the following host directive to bind to specific interfaces
19+
# host: 127.0.0.1
20+
csp:
21+
connect-src: ["'self'", 'http:', 'https:']
22+
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
23+
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
24+
cors:
25+
origin: http://localhost:3000
26+
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
27+
credentials: true
28+
# This is for local development only, it is not recommended to use this in production
29+
# The production database configuration is stored in app-config.production.yaml
30+
database:
31+
client: better-sqlite3
32+
connection: ':memory:'
33+
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
34+
35+
integrations:
36+
github:
37+
- host: github.com
38+
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
39+
# about setting up the GitHub integration here: https://backstage.io/docs/getting-started/configuration#setting-up-a-github-integration
40+
token: ${GITHUB_TOKEN}
41+
### Example for how to add your GitHub Enterprise instance using the API:
42+
# - host: ghe.example.net
43+
# apiBaseUrl: https://ghe.example.net/api/v3
44+
# token: ${GHE_TOKEN}
45+
46+
proxy:
47+
### Example for how to add a proxy endpoint for the frontend.
48+
### A typical reason to do this is to handle HTTPS and CORS for internal services.
49+
# '/test':
50+
# target: 'https://example.com'
51+
# changeOrigin: true
52+
53+
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
54+
# Note: After experimenting with basic setup, use CI/CD to generate docs
55+
# and an external cloud storage when deploying TechDocs for production use-case.
56+
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
57+
techdocs:
58+
builder: 'local' # Alternatives - 'external'
59+
generator:
60+
runIn: 'docker' # Alternatives - 'local'
61+
publisher:
62+
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
63+
64+
auth:
65+
# see https://backstage.io/docs/auth/ to learn about auth providers
66+
providers: {}
67+
68+
scaffolder:
69+
# see https://backstage.io/docs/features/software-templates/configuration for software template options
70+
71+
catalog:
72+
import:
73+
entityFilename: catalog-info.yaml
74+
pullRequestBranchName: backstage-integration
75+
rules:
76+
- allow: [Component, System, API, Resource, Location]
77+
locations:
78+
# Local example data, file locations are relative to the backend process, typically `packages/backend`
79+
- type: file
80+
target: ../../examples/entities.yaml
81+
82+
# Local example template
83+
- type: file
84+
target: ../../examples/template/template.yaml
85+
rules:
86+
- allow: [Template]
87+
88+
# Local example organizational data
89+
- type: file
90+
target: ../../examples/org.yaml
91+
rules:
92+
- allow: [User, Group]
93+
94+
## Uncomment these lines to add more example data
95+
# - type: url
96+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
97+
98+
## Uncomment these lines to add an example org
99+
# - type: url
100+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
101+
# rules:
102+
# - allow: [User, Group]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "1.15.0"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: backstage.io/v1alpha1
2+
kind: Component
3+
metadata:
4+
name: backstage101
5+
description: An example of a Backstage application.
6+
# Example for optional annotations
7+
# annotations:
8+
# github.com/project-slug: backstage/backstage
9+
# backstage.io/techdocs-ref: dir:.
10+
spec:
11+
type: website
12+
owner: john@example.com
13+
lifecycle: experimental
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system
3+
apiVersion: backstage.io/v1alpha1
4+
kind: System
5+
metadata:
6+
name: examples
7+
spec:
8+
owner: guests
9+
---
10+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component
11+
apiVersion: backstage.io/v1alpha1
12+
kind: Component
13+
metadata:
14+
name: example-website
15+
spec:
16+
type: website
17+
lifecycle: experimental
18+
owner: guests
19+
system: examples
20+
providesApis: [example-grpc-api]
21+
---
22+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api
23+
apiVersion: backstage.io/v1alpha1
24+
kind: API
25+
metadata:
26+
name: example-grpc-api
27+
spec:
28+
type: grpc
29+
lifecycle: experimental
30+
owner: guests
31+
system: examples
32+
definition: |
33+
syntax = "proto3";
34+
35+
service Exampler {
36+
rpc Example (ExampleMessage) returns (ExampleMessage) {};
37+
}
38+
39+
message ExampleMessage {
40+
string example = 1;
41+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-user
3+
apiVersion: backstage.io/v1alpha1
4+
kind: User
5+
metadata:
6+
name: guest
7+
spec:
8+
memberOf: [guests]
9+
---
10+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-group
11+
apiVersion: backstage.io/v1alpha1
12+
kind: Group
13+
metadata:
14+
name: guests
15+
spec:
16+
type: team
17+
children: []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: backstage.io/v1alpha1
2+
kind: Component
3+
metadata:
4+
name: ${{ values.name | dump }}
5+
spec:
6+
type: service
7+
owner: user:guest
8+
lifecycle: experimental
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('Hello from ${{ values.name }}!');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "${{ values.name }}",
3+
"private": true,
4+
"dependencies": {}
5+
}

0 commit comments

Comments
 (0)