Skip to content

Commit 82bb455

Browse files
committed
chore: Baseline on Backstage 1.30.0
1 parent dd61460 commit 82bb455

35 files changed

+416
-24962
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ node_modules/
2424
!.yarn/sdks
2525
!.yarn/versions
2626

27+
# Node version directives
28+
.nvmrc
29+
2730
# dotenv environment variables file
2831
.env
2932
.env.test

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ dist-types
33
coverage
44
.vscode
55
.github
6-
docker-compose.yml
6+
compose.yml
77
CODE_OF_CONDUCT.md
88
MAINTAINERS.md

app-config.production.yaml

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,55 @@
11
app:
2-
baseUrl: ${BACKSTAGE_BASE_URL}
2+
# Should be the same as backend.baseUrl when using the `app-backend` plugin.
3+
baseUrl: http://localhost:7007
34

45
backend:
5-
auth:
6-
keys:
7-
- secret: ${BACKSTAGE_BACKEND_SECRET}
8-
baseUrl: ${BACKSTAGE_BASE_URL}
9-
cors:
10-
origin: ${BACKSTAGE_BASE_URL}
11-
listen:
12-
port: 7007
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/apis/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
1330

1431
auth:
15-
autologout:
16-
enabled: true
17-
environment: production
1832
providers:
19-
github:
20-
production:
21-
clientId: ${GITHUB_AUTH_PROVIDER_CLIENT_ID}
22-
clientSecret: ${GITHUB_AUTH_PROVIDER_CLIENT_SECRET}
33+
guest: {}
2334

2435
catalog:
25-
locations: []
36+
# Overrides the default list locations from app-config.yaml as these contain example data.
37+
# See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details
38+
# on how to get entities into the catalog.
39+
locations:
40+
# Local example data, replace this with your production config, these are intended for demo use only.
41+
# File locations are relative to the backend process, typically in a deployed context, such as in a Docker container, this will be the root
42+
- type: file
43+
target: ./examples/entities.yaml
44+
45+
# Local example template
46+
- type: file
47+
target: ./examples/template/template.yaml
48+
rules:
49+
- allow: [Template]
50+
51+
# Local example organizational data
52+
- type: file
53+
target: ./examples/org.yaml
54+
rules:
55+
- allow: [User, Group]

app-config.yaml

Lines changed: 63 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,55 @@
11
app:
2-
title: Kadras Developer Portal
2+
title: Scaffolded Backstage App
33
baseUrl: http://localhost:3000
44

55
organization:
6-
name: Kadras
6+
name: My Company
77

88
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}
915
baseUrl: http://localhost:7007
1016
listen:
1117
port: 7007
18+
# Uncomment the following host directive to bind to specific interfaces
19+
# host: 127.0.0.1
1220
csp:
13-
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
1421
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
1524
cors:
1625
origin: http://localhost:3000
1726
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
1827
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
1930
database:
20-
client: pg
21-
connection:
22-
host: ${POSTGRES_HOST}
23-
port: ${POSTGRES_PORT}
24-
user: ${POSTGRES_USER}
25-
password: ${POSTGRES_PASSWORD}
26-
# https://node-postgres.com/features/ssl
27-
# you can set the sslmode configuration option via the `PGSSLMODE` environment variable
28-
# see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
29-
# ssl:
30-
# ca: # if you have a CA file and want to verify it you can uncomment this section
31-
# $file: <file-path>/ca/server.crt
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
3234

3335
integrations:
3436
github:
3537
- 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/integrations/github/locations#configuration
3640
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+
# endpoints:
50+
# '/test':
51+
# target: 'https://example.com'
52+
# changeOrigin: true
3753

3854
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
3955
# Note: After experimenting with basic setup, use CI/CD to generate docs
@@ -47,20 +63,13 @@ techdocs:
4763
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
4864

4965
auth:
50-
autologout:
51-
enabled: false
52-
environment: development
66+
# see https://backstage.io/docs/auth/ to learn about auth providers
5367
providers:
54-
github:
55-
development:
56-
clientId: ${GITHUB_AUTH_PROVIDER_CLIENT_ID}
57-
clientSecret: ${GITHUB_AUTH_PROVIDER_CLIENT_SECRET}
68+
# See https://backstage.io/docs/auth/guest/provider
69+
guest: {}
5870

5971
scaffolder:
60-
defaultAuthor:
61-
name: Kadras Developer Portal
62-
63-
defaultCommitMessage: 'Initial commit'
72+
# see https://backstage.io/docs/features/software-templates/configuration for software template options
6473

6574
catalog:
6675
import:
@@ -69,16 +78,36 @@ catalog:
6978
rules:
7079
- allow: [Component, System, API, Resource, Location]
7180
locations:
81+
# Local example data, file locations are relative to the backend process, typically `packages/backend`
82+
- type: file
83+
target: ../../examples/entities.yaml
84+
85+
# Local example template
86+
- type: file
87+
target: ../../examples/template/template.yaml
88+
rules:
89+
- allow: [Template]
90+
91+
# Local example organizational data
92+
- type: file
93+
target: ../../examples/org.yaml
94+
rules:
95+
- allow: [User, Group]
96+
7297
## Uncomment these lines to add more example data
7398
# - type: url
7499
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
75100

76-
- type: url
77-
target: https://github.com/ThomasVitale/symphony-for-dev-and-platform/blob/main/platform/catalog/organization/catalog-info.yml
78-
rules:
79-
- allow: [User, Group, Location]
101+
## Uncomment these lines to add an example org
102+
# - type: url
103+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
104+
# rules:
105+
# - allow: [User, Group]
80106

81-
- type: url
82-
target: https://github.com/ThomasVitale/symphony-for-dev-and-platform/blob/main/platform/catalog/templates/catalog-info.yml
83-
rules:
84-
- allow: [Template, Location]
107+
kubernetes:
108+
# see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options
109+
110+
# see https://backstage.io/docs/permissions/getting-started for more on the permission framework
111+
permission:
112+
# setting this to `false` will disable permissions
113+
enabled: true

backstage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.23.4"
2+
"version": "1.30.0"
33
}

docker-compose.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/entities.yaml

Lines changed: 41 additions & 0 deletions
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+
};

examples/org.yaml

Lines changed: 17 additions & 0 deletions
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: []
Lines changed: 8 additions & 0 deletions
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

0 commit comments

Comments
 (0)