-
Notifications
You must be signed in to change notification settings - Fork 0
User Guide
This section provides an in-depth overview of the platform focusing on users accessing, navigating and interacting with the platform efficiently.
You can sign in using your code email or github account email.
Note
As this is an ongoing experimental project, you may need to refresh browser if page doesn't load properly.
CODE-IDP is the platform to automate deployment of node and flask applications, centralize software components(Microservices, Websites, Libraries, APIs, Data pipelines, ML models ) and publish technical documentation.
Current components defined can be found in the Catalog home
Before you can proceed, we need a few things from you:
- Your Github Repository
You need to provide the name of your repository: https://github.com/your-user-name/your-repo-name
- Your Database Credentials
You also need to provide your MongoDB database string: mongodb+srv://<your-user-name>:<your-password>@<your-cluster-name>.nhn6ohr.mongodb.net/
- Environment Variables
Your Mongo database string contains sensitive information, such as your password and your
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.
DB_URI=your_mongodb_connection_string
DB_NAME=your_database_name
For more on environment variables, and why they are important, check out this article.
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.
DB_URI="your_mongodb_connection_string"
DB_NAME="your_database_name"
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.
You need the following things to register a component
- A repository on GitHub or Gitlab
- A file name
catalog-info.yaml
in the root of the repository
Create the catalog-info.yaml
file and set the values of kind (Component
) name, description, type(service
), lifecycle and owner
apiVersion:backstage.io/v1alpha1
kind: Component
metadata:
name: name-of-service
description: Short description of your service
# If you want to view github workflow actions on backstage
github.com/project-slug: '<username>/<repository>'
# If you want backstage to generate your markdown docs to view in backstage
backstage.io/techdocs-ref: dir:
spec:
type: service
lifecycle: development or production or experimental
owner: name_of_team or individual # Use an underscore to separate words for your team name
- Register the component in Backstage
- Click Create and then go to Register an existing component
section, paste the URL of the
catalog-info.yaml
file in your repository (E.g. ``) - Click ANALYZE, review and confirm the import with the button IMPORT.
- Your component configuration will be imported.
!!! success Your component should be now available in the Catalog home.
You need the following things prepared to document a component:
- A registered component (You can also do both setups, registration of the component and the documentation together in one go).
- A file named
mkdocs.yml
in the root of the repository.
!!! example "mkdocs.yml file with techdocs configuration"
```yaml
site_name: Publish Documentation Example
docs_dir: docs
plugins:
- techdocs-core
```
You need to create the definition annotations:
inside the metadata:
section
of your component and add the key backstage.io/techdocs-ref
annotation in the
catalog-info.yaml
file.
!!! example "catalog-info.yaml file with techdocs information"
```yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
#...
annotations:
backstage.io/techdocs-ref: dir:.
#...
```
Create a directory called docs
, define a file called index.md
or readme.md
,
this will be the main page of your documentation.
Inside this docs
directory you should be able to use Markdown files
*.md
to define your documentation.
Documentation is formatted mainly using MkDocs syntax, also with Material for MkDocs features and some specific features added to Backstage as plugins.