|
1 |
| -<h1 align="center">Maestro</h1> |
2 |
| -<p align="center">Organize geographically distributed data stored in Song and Score, with a single, configurable index.</p> |
3 |
| -<p align="center"> |
4 |
| - <a href="https://github.com/overture-stack/maestro"> |
5 |
| - <img alt="Under Development" |
6 |
| - title="Under Development" |
7 |
| - src="http://www.overture.bio/img/progress-horizontal-RC.svg" width="320" /> |
8 |
| - </a> |
9 |
| -</p> |
10 |
| - |
11 |
| -[](https://maestro-overture.readthedocs.io/en/latest/?badge=latest) |
12 |
| -[](http://slack.overture.bio) |
| 1 | + |
| 2 | +[<img hspace="5" src="https://img.shields.io/badge/chat--with--developers-overture--slack-blue?style=for-the-badge">](http://slack.overture.bio) |
13 | 3 |
|
14 | 4 | ## Documentation:
|
15 |
| -Documentation is hosted on : |
| 5 | + |
| 6 | +Documentation is hosted on: |
| 7 | + |
16 | 8 | - github pages: https://overture-stack.github.io/maestro/
|
17 |
| -- read the docs: https://maestro-overture.readthedocs.io/en/latest/ (using mkdocs https://docs.readthedocs.io/en/stable/intro/getting-started-with-mkdocs.html) |
| 9 | +- Overture docs: https://docs.overture.bio/docs/core-software/maestro/overview/ |
18 | 10 |
|
19 | 11 | ## Introduction
|
20 |
| -Meastro was created to enable genomic researchers to enhance their Overture SONGs by building indexes, elastic search |
21 |
| -by default, that makes searching Analyses and Studies much more powerful and easier. |
22 | 12 |
|
23 |
| -## TLDR; |
24 |
| -Skip down to the How to section it has the steps to get started. |
| 13 | +Maestro was created to enable genomic researchers to enhance their Overture SONG/Lyric by building indexes using Elasticsearch (by default), which makes searching Analyses and Studies much easier. |
25 | 14 |
|
26 | 15 | ### Features:
|
27 |
| -- Supports indexing from multiple metadata repositories (SONG). |
| 16 | + |
| 17 | +- Supports indexing from multiple metadata repositories (SONG/Lyric). |
28 | 18 | - Multiple indexing requests: analysis, study, full repository.
|
29 | 19 | - Event driven indexing.
|
30 |
| - - Integration with SONG to index published analysis and delete suppressed / unpublished analyses |
| 20 | + - Integration with SONG/Lyric to index published analysis and delete suppressed / unpublished analyses |
31 | 21 | - Ability to Exclude analysis based on different Ids: Study, Analysis, Donor, Sample Or file.
|
32 | 22 | - Slack web hook integration
|
33 | 23 |
|
34 |
| -### Design Goals: |
35 |
| -- Reactive |
36 |
| - - Event driven |
37 |
| - - Elastic |
38 |
| - - Resiliency & Fault tolerance |
39 |
| -- Failure audit |
40 |
| - - Dead letters queue for faulty messages to be retried later and reviewed. |
41 |
| - - Human readable Error log |
42 |
| -- Runtime configurability |
43 |
| -- Extendable: separate domain from infrastructure & configuration |
44 |
| - |
45 | 24 | ## Technologies & libraries:
|
46 |
| -- Java 11 - OpenJDK 11 |
47 |
| -- Maven 3 (YOU NEED MAVEN 3.5+, if you don't want to use the wrapper or your IDE points to older version) |
48 |
| -- lombok |
49 |
| -- Spring boot 2 |
50 |
| - - Spring webflux & project reactor |
51 |
| - - Spring retry |
52 |
| - - Spring Cloud |
53 |
| - - Streams (for Kafak integration) |
54 |
| - - config client |
55 |
| - - Spring boot admin + client |
| 25 | + |
| 26 | +- Node.js v22 or greater |
| 27 | +- PNPM package manager |
56 | 28 | - Elasticsearch 7+
|
57 | 29 | - Apache Kafka
|
58 |
| -- resilience4j: |
59 |
| - - retry module |
60 |
| -- vavr |
61 | 30 | - Testing libraries:
|
62 |
| - - Junit 5 |
63 |
| - - Mockito 2 |
64 |
| - - testcontainers |
65 |
| - - Spring cloud contract wiremock |
| 31 | + - Mocha |
| 32 | + - Chai |
| 33 | + - Testcontainers |
66 | 34 |
|
67 | 35 | ## Structure
|
68 |
| -The project is following the ports/adapters architecture, where the domain is completely isolated from external infrastructure |
69 |
| -and frameworks. |
70 |
| -- Two maven modules: |
71 |
| - - maestro domain |
72 |
| - - the core features and framework independent logic that is portable and contains the main indexing, rules, notifications |
73 |
| - logic as specified by the business features. Has packages like: |
74 |
| - - entities : contains POJOs and entities |
75 |
| - - api: the logic that fulfills the business features |
76 |
| - - ports: contains the interfaces needed by the api to communicate with anything outside the indexing context. |
77 |
| - |
78 |
| - - maestro app: |
79 |
| - - The main runnable (spring boot app) |
80 |
| - - Contains the infrastructure and adapters (ports implementations) that is needed to connect the domain |
81 |
| - with the outside world like elastic search, song web clients, configuration files etc. |
82 |
| - It also has the Spring framework configurations here to keep technologies outside of the domain. |
83 |
| - |
| 36 | + |
| 37 | +The project is organized as a monorepo workspace, where each application and package is located in its own dedicated folder: |
| 38 | + |
| 39 | +``` |
| 40 | +apps/ |
| 41 | +├─ server/ |
| 42 | +packages/ |
| 43 | +├─ common/ |
| 44 | +├─ indexer-client/ |
| 45 | +├─ maestro-provider/ |
| 46 | +├─ repository/ |
| 47 | +
|
| 48 | +``` |
| 49 | + |
| 50 | +- **Maestro Server:** The main runnable Express Server. Exposes a set of HTTP API routes that serve as the interface between the Maestro provider and external systems. |
| 51 | + |
| 52 | +- **Maestro Common:** Designed to centralize common utilities, reusable functions, and TypeScript type definitions. |
| 53 | + |
| 54 | +- **Maestro Indexer Client:** Abstracts communication with Elasticsearch clients, supporting both version 7 and 8. |
| 55 | + |
| 56 | +- **Maestro Provider:** The core features and provider independent logic that is portable and contains the main indexing, rules, notifications logic as specified by the business features. |
| 57 | + |
| 58 | +- **Maestro Repository:** Designed to manage interactions with data source repositories. It serves as the central interface for retrieving data from various repositories, such as **SONG** and **Lyric**, ensuring a streamlined and consistent approach to data access. |
| 59 | + |
84 | 60 | # Dependencies:
|
| 61 | + |
85 | 62 | To Successfully run Maestro (as is) you need the following services to be deployed and configure it to use them:
|
| 63 | + |
86 | 64 | - [Elasticsearch](https://www.elastic.co/products/elasticsearch)
|
87 | 65 | - [Apache Kafka](https://kafka.apache.org/)
|
88 | 66 | - [SONG](https://github.com/overture-stack/SONG)
|
| 67 | +- [Lyric](https://github.com/overture-stack/lyric) |
89 | 68 |
|
90 |
| -you can check the sample docker compose files under `./run/docker-compose` for containerized versions of elastic & kafka. |
91 |
| -for SONG please check the SONG github repo [here](https://github.com/overture-stack/SONG/tree/develop/dev) |
92 |
| -on how to run it with docker. Or you can run it as jar. |
| 69 | +You can check the sample Docker compose files under `./apps/server/docker-compose-es7.dev.yml` for containerized versions of Elasticsearch 7 & Kafka. |
| 70 | +For SONG please check the SONG github repo [here](https://github.com/overture-stack/SONG/tree/develop/dev) on how to run it with docker. Or you can run it as jar. |
93 | 71 |
|
94 | 72 | ## How to:
|
95 |
| -- Swagger API access: |
96 |
| - - localhost:11235/api-docs |
97 | 73 |
|
98 |
| -Note: if you don't/can't use the Makefile, look inside it for the shell commands and replicate them. |
99 |
| -- Compile: `make` |
| 74 | +- Swagger API access: |
| 75 | + - http://localhost:11235/api-docs |
| 76 | + |
| 77 | +> Note: can't use `Make`? replicate the shell commands found within the Makefile. |
| 78 | +
|
| 79 | +- Compile: `make` |
100 | 80 | - Test: `make test`
|
101 |
| -- Package: `make package` |
102 | 81 | - Run:
|
103 |
| - - Source: |
104 |
| - - Development: |
105 |
| - 1. `make docker-start-dev` starts the infrastructure containers |
106 |
| - - kafka |
107 |
| - - elastic search |
108 |
| - - other helper tools if you want like kafka rest proxy |
109 |
| - 2. `make run` OR start maestro (Maestro.java) from the IDE/cmd as a java application |
110 |
| - - Docker: |
111 |
| - - Repository: https://hub.docker.com/r/overture/maestro |
112 |
| - - `make docker-start` starts maestro from a docker image along with all needed infrastructure |
113 |
| - - helm: |
114 |
| - - Repository: https://overture-stack.github.io/charts-server/ |
115 |
| - - see : https://github.com/overture-stack/helm-charts for instructions and the maestro folder for examples |
116 |
| - |
| 82 | + - Source: |
| 83 | + - Development: |
| 84 | + 1. `make docker-start-dev` starts the infrastructure containers |
| 85 | + - Kafka |
| 86 | + - Elasticsearch |
| 87 | + - other helper tools you may want, like a Kafka RESTful proxy |
| 88 | + 2. `make start` to start application |
| 89 | + |
| 90 | +## Running scripts |
| 91 | + |
| 92 | +This project contains the following scripts for managing the build, testing, and development processes. You can run any of these scripts using the following command: `pnpm run <script-name>` |
| 93 | + |
| 94 | +| Script Name | Description | |
| 95 | +| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | |
| 96 | +| `build:all` | Builds the entire project for all environments (development, production, etc.) | |
| 97 | +| `lint` | Runs ESLint to lint all files in the current directory (and subdirectories). It checks for code quality issues, potential errors, and style violations according to the project's ESLint configuration | |
| 98 | +| `lint:fix` | Runs ESLint to lint all files in the current directory (and subdirectories), and automatically fixes issues that can be resolved (e.g., formatting, missing semicolons). | |
| 99 | +| `test:all` | Runs all tests (unit and integration tests). | |
| 100 | +| `test:all:coverage` | Runs all tests (unit and integration tests) and generates a coverage report. | |
| 101 | +| `test:unit` | Runs unit tests only. | |
| 102 | +| `test:unit:coverage` | Runs unit tests only and generates a coverage report. | |
| 103 | +| `test:integration` | Runs integration tests only. | |
| 104 | +| `test:integration:coverage` | Runs integration tests only and generates a coverage report. | |
| 105 | +| `start:dev` | Starts the development server with live-reloading and debugging enabled. | |
| 106 | +| `start:prod` | Starts the production server optimized for performance and stability (The application must be built beforehand). | |
0 commit comments