Skip to content

Commit

Permalink
Microservice README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ardem committed Sep 26, 2024
1 parent e996a2c commit e8e421a
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 95 deletions.
24 changes: 23 additions & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,32 @@
<a href="https://docs.ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/documentation-docs.ylem.co-black)</a>
<a href="https://join.slack.com/t/ylem-co/shared_invite/zt-2nawzl6h0-qqJ0j7Vx_AEHfnB45xJg2Q" target="_blank">![Static Badge](https://img.shields.io/badge/community-join%20Slack-black)</a>

It combines two functionalities
Ylem API Microservice combines two functionalities:
1. OAuth-server that allows issuing OAuth tokens for customers' applications and provides an API for the UI to be used for it.
2. API gateway responsible for checking OAuth authorization token validity, checking for allowed scopes, and proxying the request to backend APIs.

# Usage

## Build an app

``` bash
$ go build
```

## Run database migrations

``` bash
$ ./ylem_api db migrations migrate
```

## Start application server

``` bash
$ ./ylem_api server serve
```

It is now available inside the Ylem network on http://ylem_api:7339 or from the host machine on http://127.0.0.1:7339

## Run tests

``` bash
Expand Down
45 changes: 30 additions & 15 deletions backend/integrations/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# Ylem integrations
Service responsible for external and internal integrations
# YLEM INTEGRATIONS MICROSERVICE

# Installation & running
![Static Badge](https://img.shields.io/badge/Go-1.21-black)
<a href="https://github.com/ylem-co/ylem?tab=Apache-2.0-1-ov-file">![Static Badge](https://img.shields.io/badge/license-Apache%202.0-black)</a>
<a href="https://ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/website-ylem.co-black)</a>
<a href="https://docs.ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/documentation-docs.ylem.co-black)</a>
<a href="https://join.slack.com/t/ylem-co/shared_invite/zt-2nawzl6h0-qqJ0j7Vx_AEHfnB45xJg2Q" target="_blank">![Static Badge](https://img.shields.io/badge/community-join%20Slack-black)</a>

## With Docker
Ylem Integrations Microservice is responsible for integrating with APIs, data storages, queue managers, and other external data sources and destinations. It also provides and API for the integration with Ylem UI.

# Usage

## Build an app

``` bash
$ docker-compose up
$ go build
```

## Run data migrations
## Run database migrations

``` bash
$ make migrate
$ ./ylem_integrations db migrations migrate
```

# Usage

## Build an app
## Start application server

``` bash
$ make
$ ./ylem_integrations server serve
```

It is now available inside the Ylem network on http://ylem_integrations:7339 or from the host machine on http://127.0.0.1:7339

## Run tests

``` bash
Expand All @@ -35,7 +42,7 @@ $ go test ./tests/... -v -vet=off
$ go test ./tests/... -coverpkg=./...
```

Or if you want an advanced coverage report
## Run tests with an advanced coverage report

``` bash
$ go test ./tests/... -coverpkg=./... -coverprofile cover.out
Expand All @@ -44,10 +51,18 @@ $ go tool cover -html cover.out -o cover.html

And then open cover.html

## Run server
# Linter

## Install Golang linter on MacOS

``` bash
$ make run
$ brew install golangci-lint
$ brew upgrade golangci-lint
```

It is available on http://localhost:7337
## Check the code with it

``` bash
$ golangci-lint run
```
More information is in the official documentation: https://golangci-lint.run/
51 changes: 13 additions & 38 deletions backend/pipelines/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Ylem pipelines
Pipeline management service.
# YLEM PIPELINES MICROSERVICE

# Installation & running
![Static Badge](https://img.shields.io/badge/Go-1.21-black)
<a href="https://github.com/ylem-co/ylem?tab=Apache-2.0-1-ov-file">![Static Badge](https://img.shields.io/badge/license-Apache%202.0-black)</a>
<a href="https://ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/website-ylem.co-black)</a>
<a href="https://docs.ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/documentation-docs.ylem.co-black)</a>
<a href="https://join.slack.com/t/ylem-co/shared_invite/zt-2nawzl6h0-qqJ0j7Vx_AEHfnB45xJg2Q" target="_blank">![Static Badge](https://img.shields.io/badge/community-join%20Slack-black)</a>

## With Docker

``` bash
$ docker-compose up
```
Ylem Pipelines Microservice provides functionality for managing pipelines and tasks and an API for integration with Ylem UI.

# Usage

Expand All @@ -17,24 +16,20 @@ $ docker-compose up
$ go build
```

## Run data migrations

``` bash
$ migrate -path /go/src/ylem_pipelines/db/migration -database "mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@(${DATABASE_HOST}:${DATABASE_PORT})/${DATABASE_NAME}" -verbose up
```

**OR**
## Run database migrations

``` bash
$ ./ylem_pipelines db migrations migrate
```

## Load fixtures
## Start application server

``` bash
$ ./ylem_pipelines db fixtures load
$ ./ylem_pipelines server serve
```

It is now available inside the Ylem network on http://ylem_pipelines:7336 or from the host machine on http://127.0.0.1:7336

## Run tests

``` bash
Expand All @@ -47,7 +42,7 @@ $ go test ./tests/... -v -vet=off
$ go test ./tests/... -coverpkg=./...
```

Or if you want an advanced coverage report
## Run tests with an advanced coverage report

``` bash
$ go test ./tests/... -coverpkg=./... -coverprofile cover.out
Expand All @@ -56,26 +51,6 @@ $ go tool cover -html cover.out -o cover.html

And then open cover.html

## Run server

``` bash
$ ./ylem_pipelines server serve
```

It is available on http://localhost:7336

## Run schedule generator

``` bash
$ ./ylem_pipelines schedulegen start
```

## Run schedule publisher

``` bash
$ ./ylem_pipelines schedulepub start
```

# Linter

## Install Golang linter on MacOS
Expand Down
40 changes: 22 additions & 18 deletions backend/statistics/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Ylem statistics
Statistics service
# YLEM STATISTICS MICROSERVICE

# Installation & running
![Static Badge](https://img.shields.io/badge/Go-1.21-black)
<a href="https://github.com/ylem-co/ylem?tab=Apache-2.0-1-ov-file">![Static Badge](https://img.shields.io/badge/license-Apache%202.0-black)</a>
<a href="https://ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/website-ylem.co-black)</a>
<a href="https://docs.ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/documentation-docs.ylem.co-black)</a>
<a href="https://join.slack.com/t/ylem-co/shared_invite/zt-2nawzl6h0-qqJ0j7Vx_AEHfnB45xJg2Q" target="_blank">![Static Badge](https://img.shields.io/badge/community-join%20Slack-black)</a>

## With Docker

``` bash
$ docker-compose up
```
Ylem Statistics Microservice stores and aggregates statistical information about pipeline and task runs and provides an API for integration with Ylem UI dashboards.

# Usage

Expand All @@ -17,6 +16,20 @@ $ docker-compose up
$ go build
```

## Run database migrations

``` bash
$ ./ylem_statistics db migrations migrate
```

## Start application server

``` bash
$ ./ylem_statistics server serve
```

It is now available inside the Ylem network on http://ylem_statistics:7332 or from the host machine on http://127.0.0.1:7332

## Run tests

``` bash
Expand All @@ -29,7 +42,7 @@ $ go test ./tests/... -v -vet=off
$ go test ./tests/... -coverpkg=./...
```

Or if you want an advanced coverage report
## Run tests with an advanced coverage report

``` bash
$ go test ./tests/... -coverpkg=./... -coverprofile cover.out
Expand All @@ -38,14 +51,6 @@ $ go tool cover -html cover.out -o cover.html

And then open cover.html

## Run server

``` bash
$ ./ylem_statistics
```

It is available on http://localhost:7335

# Linter

## Install Golang linter on MacOS
Expand All @@ -61,4 +66,3 @@ $ brew upgrade golangci-lint
$ golangci-lint run
```
More information is in the official documentation: https://golangci-lint.run/

4 changes: 2 additions & 2 deletions backend/users/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# YLEM USER MICROSERVICE
# YLEM USERS MICROSERVICE

![Static Badge](https://img.shields.io/badge/Go-1.21-black)
<a href="https://github.com/ylem-co/ylem?tab=Apache-2.0-1-ov-file">![Static Badge](https://img.shields.io/badge/license-Apache%202.0-black)</a>
<a href="https://ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/website-ylem.co-black)</a>
<a href="https://docs.ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/documentation-docs.ylem.co-black)</a>
<a href="https://join.slack.com/t/ylem-co/shared_invite/zt-2nawzl6h0-qqJ0j7Vx_AEHfnB45xJg2Q" target="_blank">![Static Badge](https://img.shields.io/badge/community-join%20Slack-black)</a>

Ylem User Microservice is responsible for storing user data, performing authorization, and providing an API for the UI.
Ylem Users Microservice is responsible for storing user data, performing authorization, and providing an API for the UI.

# Usage

Expand Down
24 changes: 15 additions & 9 deletions processor/python_processor/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Ylem Python code processor
# YLEM PYTHON CODE PROCESSOR

## Description
Python code processor is an API for evaluating Python expressions.
![Static Badge](https://img.shields.io/badge/Go-1.21-black)
<a href="https://github.com/ylem-co/ylem?tab=Apache-2.0-1-ov-file">![Static Badge](https://img.shields.io/badge/license-Apache%202.0-black)</a>
<a href="https://ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/website-ylem.co-black)</a>
<a href="https://docs.ylem.co" target="_blank">![Static Badge](https://img.shields.io/badge/documentation-docs.ylem.co-black)</a>
<a href="https://join.slack.com/t/ylem-co/shared_invite/zt-2nawzl6h0-qqJ0j7Vx_AEHfnB45xJg2Q" target="_blank">![Static Badge](https://img.shields.io/badge/community-join%20Slack-black)</a>

It executes arbitrary Python code and returns the results.
Python code processor is an API for evaluating Python expressions from the "Code" pipeline task. It executes arbitrary Python code and returns the results.

## Endpoints
It is available inside the Ylem network on http://ylem_python_processor:7338 or from the host machine on http://127.0.0.1:7338.

### POST /eval
#### Request body:
# Endpoints

## POST /eval

### Request body:

```js
{
Expand All @@ -17,10 +23,10 @@ It executes arbitrary Python code and returns the results.
}
```

#### Response body:
### Response body:
```js
{
"statusCode": 200,
"body": "{\"value\": 2}" // execution result
}
```
```
Loading

0 comments on commit e8e421a

Please sign in to comment.