Skip to content

Commit

Permalink
Add BI Quick Start (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-vl authored Jan 19, 2025
1 parent d1c9e23 commit f4ffd08
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 4 deletions.
6 changes: 3 additions & 3 deletions big/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ In the downloaded package, you can find `docker-compose.yml` file with the follo
- **Data Emulator** is a NodeJS script that emulates production data. Also, it is needed to demonstrate variable functionality.
- **Prometheus** collects and stores performance metrics from the Business Engine.
- **JSON server** is an action example based on NodeJS. It accepts alert payload and saves it to the files when the Business Engine executes actions.
- **Business Engine** has a service account key to access Grafana HTTP APIs to extract necessary configurations. It evaluates alert rules and calls actions.
- **Business Engine** uses a service account key to access Grafana HTTP APIs to extract necessary configurations. It evaluates alert rules and calls actions.

Below is the `docker-compose.yml` file just for demonstration. You do not need to copy it. It is a part of the package you download from the GitHub repository.

Expand Down Expand Up @@ -77,10 +77,10 @@ http://localhost:3000

and login as 'admin' with 'admin' password.

3. Create a service account with the 'Admin' role.
3. Create a service account with the `Viewer` or `Editor` role. Editor role will allow to create annotations.

<Image
title="Create service account with the 'Admin' role."
title="Create service account with the required role."
src="/img/big/getting-started/sa.png"
/>

Expand Down
82 changes: 82 additions & 0 deletions big/quick-start/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import Code from "@theme/Code";
import Image from "@theme/Image";
import Youtube from "@theme/Youtube";

# Quick Start

Quick Start guide provides minimum number of steps to start Business Intelligence platform using existing Grafana LGTM stack.

:::tip Grafana 11

The Business Engine requires Grafana 11. The Business Intelligence platform will always be compatible with the most current Grafana version.
:::

## Docker Compose configuration

Create `docker-compose.yml` file with the following containers:

- **Timescale** database stores Business Engine configuration data. If you have existing Timescale database or Timescale Cloud instance you can use them to store Business Engine configuration.
- **Business Engine** uses a service account key to access Grafana HTTP APIs to extract necessary configurations. It evaluates alert rules and calls actions.

```yml
services:
timescale:
image: timescale/timescaledb:latest-pg14
restart: always
environment:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432

engine:
depends_on:
- timescale
image: ghcr.io/volkovlabs/business-engine:2.3.0
#env_file: .env
environment:
DATABASE_HOST: timescale
DATABASE_PORT: 5432
DATABASE_DB: postgres
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
GRAFANA_URL: https://MY-ACCOUNT.grafana.net
GRAFANA_TOKEN: SERVICE-ACCOUNT-TOKEN
ports:
- 3001:3001
- 3002:3002
```
## Start the platform
1. Login to your Grafana Cloud, OSS or Enterprise instance.
2. Create a service account with the `Viewer` or `Editor` role.
3. Update `GRAFANA_URL` and `GRAFANA_TOKEN` in the `docker-compose.yml` file

<Image
title="Update GRAFANA_TOKEN in the docker-compose.yml file."
src="/img/big/getting-started/token-yml.png"
/>

4. Start the Business Engine and Timescale database.

```
docker compose up -d
```
5. Download the Business Studio from [Release Notes](../release). Then, install and launch it.
6. Add Business Engine in Business Studio to configure Actions and Alert Rules.
<Image
title="Alert Rules configured in Business Engine running on localhost using Business Studio."
src="/img/big/business-studio/alerts.png"
/>
## Stop the platform
Stop and delete all Docker containers
```
docker compose --profile engine down
docker compose --profile actions down
docker compose --profile grafana down
```
6 changes: 5 additions & 1 deletion config/big_sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
const sidebars: SidebarsConfig = {
big: [
{
items: ["getting-started/index", "high-availability/index"],
items: [
"getting-started/index",
"quick-start/index",
"high-availability/index",
],
label: "Business Intelligence",
type: "category",
collapsible: false,
Expand Down
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
timescale:
image: timescale/timescaledb:latest-pg14
restart: always
environment:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432

engine:
depends_on:
- timescale
image: ghcr.io/volkovlabs/business-engine:2.3.0
#env_file: .env
environment:
DATABASE_HOST: timescale
DATABASE_PORT: 5432
DATABASE_DB: postgres
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
GRAFANA_URL: https://MY-ACCOUNT.grafana.net
GRAFANA_TOKEN: MY-SERVICE_TOKEN
ports:
- 3001:3001
- 3002:3002

0 comments on commit f4ffd08

Please sign in to comment.