Skip to content

Commit 2108815

Browse files
Chore/#1739 - Create mkdocs.yml for all the services which have documentation (#1741)
2 parents c32a58d + 3312f65 commit 2108815

65 files changed

Lines changed: 1454 additions & 0 deletions

Some content is hidden

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

catalog/systems/OnePlatform.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ metadata:
66
title: One Platform
77
namespace: devex
88
description: One Platform provides a single place for all internal applications and services, supports consistent User experience by providing standard platform for service hosting and data integration, efficient resource management, real time metrics availability, cross-team collaboration and unified documentation.
9+
annotations:
10+
github.com/project-slug: '1-Platform/one-platform'
11+
backstage.io/techdocs-ref: dir:.
912
tags:
1013
- digital-experience
1114
- javascript
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
id: code-of-conduct
3+
title: Code of Conduct
4+
sidebar_label: Code of Conduct
5+
---
6+
7+
## Our Pledge
8+
9+
In the interest of fostering an open and welcoming environment, we as
10+
contributors and maintainers pledge to making participation in our project and
11+
our community a harassment-free experience for everyone, regardless of age, body
12+
size, disability, ethnicity, sex characteristics, gender identity and expression,
13+
level of experience, education, socio-economic status, nationality, personal
14+
appearance, race, religion, or sexual identity and orientation.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to creating a positive environment
19+
include:
20+
21+
- Using welcoming and inclusive language
22+
- Being respectful of differing viewpoints and experiences
23+
- Gracefully accepting constructive criticism
24+
- Focusing on what is best for the community
25+
- Showing empathy towards other community members
26+
27+
Examples of unacceptable behavior by participants include:
28+
29+
- The use of sexualized language or imagery and unwelcome sexual attention or
30+
advances
31+
- Trolling, insulting/derogatory comments, and personal or political attacks
32+
- Public or private harassment
33+
- Publishing others' private information, such as a physical or electronic
34+
address, without explicit permission
35+
- Other conduct which could reasonably be considered inappropriate in a
36+
professional setting
37+
38+
## Our Responsibilities
39+
40+
Project maintainers are responsible for clarifying the standards of acceptable
41+
behavior and are expected to take appropriate and fair corrective action in
42+
response to any instances of unacceptable behavior.
43+
44+
Project maintainers have the right and responsibility to remove, edit, or
45+
reject comments, commits, code, wiki edits, issues, and other contributions
46+
that are not aligned to this Code of Conduct, or to ban temporarily or
47+
permanently any contributor for other behaviors that they deem inappropriate,
48+
threatening, offensive, or harmful.
49+
50+
## Scope
51+
52+
This Code of Conduct applies both within project spaces and in public spaces
53+
when an individual is representing the project or its community. Examples of
54+
representing a project or community include using an official project e-mail
55+
address, posting via an official social media account, or acting as an appointed
56+
representative at an online or offline event. Representation of a project may be
57+
further defined and clarified by project maintainers.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported by contacting the project team at one-platform@redhat.com. All
63+
complaints will be reviewed and investigated and will result in a response that
64+
is deemed necessary and appropriate to the circumstances. The project team is
65+
obligated to maintain confidentiality with regard to the reporter of an incident.
66+
Further details of specific enforcement policies may be posted separately.
67+
68+
Project maintainers who do not follow or enforce the Code of Conduct in good
69+
faith may face temporary or permanent repercussions as determined by other
70+
members of the project's leadership.
71+
72+
## Attribution
73+
74+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
75+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
76+
77+
[homepage]: https://www.contributor-covenant.org
78+
79+
For answers to common questions about this code of conduct, see
80+
<https://www.contributor-covenant.org/faq>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: how-to-contribute
3+
title: How to Contribute
4+
sidebar_label: How to Contribute
5+
---
6+
7+
First of all, thank you for your effort to improve OP Platform. This guide will help you regarding various aspects like putting issues, contributing a feature, etc.
8+
9+
## Code of Conduct
10+
11+
This project and everyone participating in it is governed by the [Code of Conduct](./code-of-conduct.md). By participating, you are expected to uphold this code. Please read the [full text](./code-of-conduct.md) so that you can read which actions may or may not be tolerated.
12+
13+
---
14+
15+
## Before Submitting a Pull Request
16+
17+
**Before submitting your pull request** make sure the following requirements are fulfilled:
18+
19+
- Fork the repository
20+
- Run `npm install` in the repository root
21+
- Create a branch from `master`
22+
- Add the required envs
23+
- Change necessary code for bug fix, a new feature
24+
- Check linting and format it
25+
- Make sure all are test passing
26+
27+
```bash
28+
npm run test
29+
```
30+
31+
## Reporting an issue
32+
33+
Before submitting an issue, you need to make sure:
34+
35+
- Kindly provide an adequate description and a clear title

catalog/systems/docs/index.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
id: overview
3+
title: What's One Platform
4+
sidebar_label: Overview
5+
slug: /
6+
---
7+
8+
One Platform provides a single place for all internal applications and services, supports consistent User experience by providing standard platform for service hosting and data integration, efficient resource management, real time metrics availability, cross-team collaboration and unified documentation.
9+
10+
## Why One Platform?
11+
12+
If we observe a few key challenges of any organization with regards to application platforms for developers, it is to provide consistent app development, deployment & delivery experience, and a single place to access information. This could be due to a lack of a shared services platform for developers and unawareness of similar app's availability (search) that invites major duplication of code and efforts.
13+
14+
The One Platform team was developing a solution to this problem since the start of this year. The goal was to build a shared services platform that helps developers to increase the development speed using easy to integrate microservices, in-built SPAs, and simplest components library and provide seamless app delivery. The intent is to provide a platform that connects users, developers, and stakeholders across the organization and allows them to exchange value by sharing apps.
15+
16+
Developers have good reasons to select many feasible platforms that provide good development and deploying experience and One Platform works with these platforms and respective tools to ease a developer's job even further. While One Platform provides integrations and microservices that save developers time and effort, developers can use saved time to strengthen the core functionality of their individual apps.
17+
18+
## One Platform Benefits?
19+
20+
One Platform has been built on one key Principle/Mantra i.e. Develop fast, Deliver faster
21+
22+
One Platform does not interfere in the Developer's business and provides flexibility to develop an app using their favorite framework, language, and tools. It provides on-demand integrations with internal tools and applications to easily access/share content(s). The following diagram shows where One Platform really comes into the picture.
23+
24+
![OP Overview](/img/getting-started/op-overview.jpeg)
25+
26+
The applications deployed in One Platform are,
27+
28+
1. Open to all, by choice
29+
2. Hosted apps under single domain i.e one.redhat.com/yourapp
30+
3. Easy to search (including app contents) using common search service
31+
4. Have access to Core microservices (we will discuss them in detail in the next part)
32+
- Authentication - Red Hat Single Sign-On enabled. (Subject to IT regulations)
33+
- Authorization - Rover integration to view & grant users access
34+
- Feedback - Collect feedback in 3 clicks, Generate ticket (Jira, GitLab) for improvements
35+
- Notifications - Inter SPA communication, Toasters, Banners, Subscriptions etc
36+
- Search - App & Content search utilizing inbuilt integration with Apache Solr
37+
5. Deployable within minutes using SPAship.
38+
6. Patternfly compliant and can easily utilize One Platform Component library
39+
40+
In the end, One Platform would like to change the developer's mindset through its services from **"I work on a product/process"** to
41+
42+
<center><b>"I connect users to an experience"</b></center>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
id: op-architecture
3+
title: One Platform Architecture
4+
sidebar_label: One Platform Architecture
5+
slug: /architecture
6+
---
7+
8+
One Platform entirely focuses on,
9+
10+
- Core interaction of native & non-native apps/microservices.
11+
- Generate maximum value to both developers and users.
12+
- Enhancing and provide consistent developer experience.
13+
14+
![OP Arch](/img/getting-started/op-arch.png)
15+
16+
OP Architecture majorly consist of two components
17+
18+
1. The SPA deployment base provided by SPASHIP
19+
20+
2. The Unified Core API Service provided by a Federated GraphQL
21+
22+
## Core Services
23+
24+
Core services provides the basic interactive for any application like Authentication, Feedback, Notification etc
25+
26+
Some of the core services provided by One Platform are:
27+
28+
### Authentication
29+
30+
One platform has different strategies for authentication. At the Client-side, internal auth is supported (auth.redhat.com) and at the API gateway, JWT token from Internal auth. The API key is supported. SPAs are authenticated default through SSI authentication support.
31+
32+
### SSI Components
33+
34+
One Platform provides global components, including a Navigation bar, Feedback action button, etc. These are provided as pluggable web components, published under `one-platform` namespace in npm. They provide flexibility and extensibility to the SSI.
35+
36+
### User Group
37+
38+
The simplest microservice is a wrapper over Rover that uses LDAP to authorize users. The plan is to give away complete ownership control to developers so the platform can stay out of the authorization business. User-group microservice plays the role of the middleware which talks to the organization's user data store. This is primarily integrated with LDAP and Rover. Also, it manages a minimal data store for faster data processing. This data store is updated daily with sync scripts. Native/Non-native microservices/SPAs can benefit from this for managing the user information.
39+
40+
### Feedback
41+
42+
The goal of feedback microservice is to let users submit feedback in 3 easy steps i.e. Select App, select Experience, and Describe a problem to help developers and the Platform team (in case of core services) build context for better decisions. The feedback services integrated with the ticketing system (Jira & GitLab) so developers can follow up with end-users and record satisfaction. This provides complete transparency as data is visible to all visitors and helps to increase the value of the applications.
43+
44+
### Notification
45+
46+
It is the core communication microservice of the platform for native(inbuilt) and non-native apps. It enables developers to select & configure the mode of communication for individual apps. The need for microservices to communicate with each other, many of which does not necessitate real-time communication, demanded the need of an engine that can help to notify the users of the event without bothering about the health and response of users. We kept it lightweight to ensure a quick response.
47+
48+
### Search
49+
50+
One Platform goal is to consolidate applications and make them searchable in real-time. It should be a single point of contact for end-users when they are looking for an app. The Search microservices would not only resolve app search problems however it would extend the search to app contents. This helps to design & develop an native app search.
51+
52+
### Developer Console
53+
54+
The developer's dashboard or the rather the control plane of One Platform. A single point to manage all your SPA's and there corresponding OP service utilization.
55+
56+
### API Gateway
57+
58+
The responsibility of the API gateway is to record “which service is communicating, with whom, and is it allowed to do so”. Access Control is implemented on top of the API Gateway which enables the authorization and permission model in the data flow. Also, it is a single source of truth for the entire one platform backend. Websocket support is also provided in the gateway.
59+
60+
The supported authorization models are:
61+
62+
- JWT Tokens from auth.redhat.com
63+
- API Key
64+
65+
## Hosted Services
66+
67+
There exist hosted services maintained by One Platform Team to enhance developer experience even furthur. Some of these are
68+
69+
### Lighthouse
70+
71+
Lighthouse is a Google Open Source Webpage Audit tool the measure's various parameters like SEO, PWA, Accessibility etc. One Platform has hosted the Lighthouse CI server for CI Testing and also an interactive, yet simple UI to get your SPA's Lighthouse progress.
72+
73+
### API Catalog
74+
75+
API Catalog is One Platform's effort to resolve API discoverability in an organization. In simple terms, it's a catalog to discover various API's provided by various team. It helps developers to manage, promote and share APIs with their users. Users can get various information regarding API like the owners or maintainers of it, various pre-prod and prod instances available, etc. API Catalog also provides toolsets to play around with the APIs.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
id: service-deployment-guideline
3+
title: OP Service Deployment Guideline
4+
slug: /deployments/service
5+
sidebar_label: Service Guideline
6+
---
7+
8+
This document shares the steps on how we can deploy the microservice on the kubernetes cluster in the openshift environment.
9+
10+
## Workflow
11+
12+
1. Once the PR/ MR is merged, run the github actions configured with the repository with proper tags.
13+
2. Github actions containerizes the code and pushes images to the Github Container Registry(GHCR).
14+
3. Once Image is published in GHCR, update the imagestreams of the respective microservice in OpenShift.
15+
4. Roll out the microservice deployment and restart the One Platform API Gateway if required.
16+
5. Now your changes are live now
17+
18+
## Building an Image
19+
20+
1. For building the image after PR navigate to GIthub Actions and select the action you want to perform. Trigger the run workflow button for the action which you have selected.
21+
2. Once the GitHub action is completed you will be able to see the new/updated image on the packages section of the One Platform repository.
22+
23+
![GH Workflow Trigger](/img/service-deploymeny-guide/step1.png)
24+
25+
3. Details of the new/updated image is available over the package page over the GitHub repository with the history of the update.
26+
27+
![GH Workflow Progress](/img/service-deploymeny-guide/step2.png)
28+
29+
4. Login to the Openshift Console and copy the login command with oc CLI.
30+
31+
```sh
32+
oc login --token=token-test --server=https://test.openshiftapps.com:6442
33+
```
34+
35+
![GH Workflow History](/img/service-deploymeny-guide/step3.png)
36+
37+
5. Switch to the project in openshift to update the imagestream.
38+
39+
```sh
40+
oc project <project-name>
41+
```
42+
43+
6. Update the imagestream with a new image.
44+
45+
```sh
46+
oc import-image <image-name>:<tagname>
47+
```
48+
49+
7. Under the imagestreams section of the openshift web ui you can see that the new image has rolled out.
50+
8. Navigate to respective Deployment config and redeploy the microservice to update what changes through web UI
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
id: spa-deployment-guidelines
3+
title: SPA Deployment Guidelines
4+
slug: /deployments/spa
5+
sidebar_label: SPA Guidelines
6+
---
7+
8+
## Guide
9+
10+
#### Please head over to [SPAship quickstart deployment guide](https://spaship.io/docs/guide/user-guide/Quickstart/)

catalog/systems/mkdocs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
site_name: 'One Platform'
2+
3+
nav:
4+
- What's One Platform: index.md
5+
- One Platform Architecture: op-architecture.md
6+
- OP Service Deployment Guideline: service-deployment-guideline.md
7+
- SPA Deployment Guideline: spa-deployment-guidelines.md
8+
- How to Contribute: how-to-contribute.md
9+
- Code Of Conduct: code-of-conduct.md
10+
11+
12+
plugins:
13+
- techdocs-core

packages/analytics-service/catalog-info.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ metadata:
88
description: Analytics microservice is used for providing analytics api information for SPAs deployed in One Platform by connecting with Sentry and Pendo.
99
annotations:
1010
github.com/project-slug: '1-Platform/one-platform'
11+
backstage.io/techdocs-ref: dir:.
1112
servicenow.com/appcode: ONEP-006
1213
tags:
1314
- microservice
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Analytics Microservice
2+
3+
Analytics microservice is used for providing analytics api information for SPAs deployed in One Platform by connecting with Sentry and Pendo
4+
5+
## Features
6+
7+
1. Total rate timeline
8+
2. Unique error rate timeline
9+
3. Total count of errors on an interval
10+
4. Total unique errors on an interval
11+
5. Error outcome based timeline - (Accepted errors, invalid errors etc)
12+
6. Api to connect analytics service with an existing project and an app or create a new one in one-platform set
13+
14+
## Local Development
15+
16+
### 1. Switch to the working directory
17+
18+
1. Switch to the working directory `cd analytics-service`
19+
2. Copy the `.env.example` to the `.env`
20+
3. Change the values as needed, keeping the unneeded values as undefined
21+
22+
### 2. Start Microservice
23+
24+
Install required modules by using `npm install`
25+
26+
Run `npm start` to run your microservice for dev env
27+
28+
To build the microservice, use `npm run build`.
29+
30+
## Using docker-compose (Recommended)
31+
32+
1. Follow the first 2 steps from above
33+
2. Then execute the following command to start a standalone instance of `analytics-service`
34+
35+
```bash
36+
docker-compose up -d analytics-service
37+
```
38+
39+
**Note:** Some features of the App Service might not work without the API Gateway.
40+
41+
3. To start the entire cluster of microservices, use the following command
42+
43+
```bash
44+
docker-compose up -d api-gateway
45+
```
46+
47+
## Runnninng Tests
48+
49+
```bash
50+
npm test
51+
```
52+
53+
## Contributors:
54+
55+
👤 **Akhil Mohan** [@akhilmhdh](https://github.com/akhilmhdh)

0 commit comments

Comments
 (0)