Skip to content

Commit 1624398

Browse files
committed
add catalog-info for idp
1 parent fd70c9d commit 1624398

File tree

6 files changed

+137
-13
lines changed

6 files changed

+137
-13
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ e2e-test-report/
5656
pg_values.yaml
5757

5858
*secret.yaml
59+
60+
61+
key/

app-config.yaml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
app:
2-
title: CUAS Hub
2+
title: CODE-IDP Hub
33
baseUrl: http://localhost:3000
44

55
organization:
6-
name: CUAS
6+
name: CODE-IDP
77

88
backend:
99
baseUrl: http://localhost:7007
@@ -22,26 +22,42 @@ backend:
2222
port: ${POSTGRES_PORT}
2323
user: ${POSTGRES_USER}
2424
password: ${POSTGRES_PASSWORD}
25+
cache:
26+
store: memory
2527

2628
integrations:
2729
github:
2830
- host: github.com
2931
token: ${GITHUB_TOKEN}
3032

33+
gitlab:
34+
- host: gitlab.com
35+
token: ${GITLAB_TOKEN}
36+
3137
techdocs:
32-
builder: 'local' # Alternatives - 'external'
33-
generator:
34-
runIn: 'docker' # Alternatives - 'local'
35-
publisher:
36-
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
38+
builder: 'external'
39+
publisher:
40+
type: googleGcs
41+
googleGcs:
42+
bucketName: ${IDP_BUCKET_NAME}
43+
credentials:
44+
$file: ${IDP_CREDENTIALS_FILE}
45+
region: ${DOCS_STORAGE_REGION}
3746

47+
##scaffolder:
48+
3849
catalog:
3950
import:
4051
entityFilename: catalog-info.yaml
4152
pullRequestBranchName: backstage-integration
4253
rules:
4354
- allow: [Component, System, API, User, Group, Resource, Location, Domain]
44-
locations: []
55+
locations:
56+
57+
- type: file
58+
target: ../../packages/backend/src/templates/initiate-deployment.yaml
59+
rules:
60+
- allow: [Template]
4561

4662
auth:
4763
environment: development
@@ -54,5 +70,8 @@ auth:
5470
resolvers:
5571
- resolver: emailLocalPartMatchingUserEntityName
5672
domain: code.berlin
57-
73+
github:
74+
development:
75+
clientId: ${GITHUB_CLIENT_ID}
76+
clientSecret: ${GITHUB_CLIENT_SECRET}
5877

catalog-info.yaml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,40 @@
1+
---
12
apiVersion: backstage.io/v1alpha1
23
kind: Component
34
metadata:
4-
name: demo-app
5-
description: An example of a Backstage application.
5+
name: code-idp
6+
description: CODE-IDP is the platform to automate the deployment process for the projects using nodejs and flask frameworks.
7+
It also enables users to store, view and discover information about projects in CODE.
68
# Example for optional annotations
79
# annotations:
810
# github.com/project-slug: backstage/backstage
911
# backstage.io/techdocs-ref: dir:.
1012
spec:
1113
type: website
12-
13-
lifecycle: experimental
14+
owner: code_idp_team
15+
lifecycle: production
16+
17+
---
18+
apiVersion: backstage.io/v1alpha1
19+
kind: Component
20+
metadata:
21+
name: idp-hosted-projects
22+
description: The IDP Hosted Projects component is a collection of flask and nodejs projects that are hosted on google cloud using the automated deployment.
23+
spec:
24+
type: service
25+
owner: code_idp_team
26+
lifecycle: production
27+
28+
---
29+
apiVersion: backstage.io/v1alpha1
30+
kind: Group
31+
metadata:
32+
name: code_idp_team
33+
description: The CODE-IDP team is responsible for the development and maintenance of the Internal Developer Platform.
34+
spec:
35+
type: team
36+
profile:
37+
displayName: Infrastructure Team
38+
39+
children: []
40+
members: [Yvette]

docs/how-to-deploy-your-app.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# How to deploy your Nodejs and Flask Applications
2+
3+
Before you can proceed, we need a few things from you:
4+
5+
1. **Your Github Repository**
6+
7+
You need to provide the name of your repository: `https://github.com/your-user-name/your-repo-name`
8+
9+
10+
2. **Your Database Credentials**
11+
12+
You also need to provide your MongoDB database string: `mongodb+srv://<your-user-name>:<your-password>@<your-cluster-name>.nhn6ohr.mongodb.net/`
13+
14+
15+
3. **Environment Variables**
16+
17+
Your Mongo database string contains sensitive information, such as your password and your
18+
You should make a habit of storing sensitive information, such as the database string, which, among other things, includes your password, in environment variables. A not so gentle **reminder**: Ensure your `.env` file is added to your `.gitignore` to prevent it from being uploaded to version control systems like Git.
19+
20+
```
21+
DB_URI=your_mongodb_connection_string
22+
DB_NAME=your_database_name
23+
```
24+
For more on environment variables, and why they are important, check out [this article](https://www.dreamhost.com/blog/environment-variables/).
25+
26+
If your connection string contains special characters, as your password most likely will, you need to put it in quotation marks in your `.env`file.
27+
28+
```
29+
DB_URI="your_mongodb_connection_string"
30+
DB_NAME="your_database_name"
31+
```
32+
33+
While you could leave out quotation marks for anything that does not contain special characters, you should use them anyway, just to avoid unnecessary error messages later on.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,42 @@
11
# How to register a component and define service dependency and RTO
22

3+
## Register a new service(component)
4+
5+
You need the following things to register a component
6+
7+
* A repository on GitHub or Gitlab
8+
* A file name `catalog-info.yaml` in the root of the repository
9+
10+
### Define your `catalog-info.yaml` file
11+
12+
Create the `catalog-info.yaml` file and set the values of kind (`Component`) name, description, type(`service`), lifecycle and owner
13+
14+
```yml
15+
apiVersion:backstage.io/v1alpha1
16+
kind: Component
17+
metadata:
18+
name: name-of-service
19+
description: Short description of your service
20+
spec:
21+
type: service
22+
lifecycle: development or production
23+
owner: name_of_team or individual # Use an underscore to separate words for your team name
24+
```
25+
26+
A minimal repository with an example can be found here:
27+
:TODO: Add example repo
28+
29+
30+
### Register the component in Backstage
31+
32+
1. Click Create and then go to [Register an existing component]()
33+
section, paste the URL of the `catalog.yml` file in your repository
34+
(E.g. ``)
35+
1. Click **ANALYZE**, review and confirm the import with the button **IMPORT**.
36+
2. Your component configuration will be imported.
37+
38+
39+
!!! success
40+
Your component should be now available in the [Catalog home](https://).
41+
42+

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Getting Started with CODE-IDP
2+

0 commit comments

Comments
 (0)