Skip to content

Quick start

sofeikov edited this page Jun 10, 2024 · 5 revisions

Here is how to get started:

ezrules is composed of two parts: ezrule manager and ezrule executor. The former is responsible for the UI for rule management that analysts can use to modify and maintain rules. The latter is a standalone rule execution enviroment that handles processing of events(e.g. transactions).

The below tutorial shows how to get started locally and on a on-premise k8s cluster. For both cases you will need a postgres database running and availbale to the both manager and executor.

The following need to be installed in order to get through the tutorial

  1. docker
  2. pipenv

Local setup

Go the project folder. First, get an test database running:

./scripts/run_postgres_locally.sh

This will pull postgres16 image and run it in a container.

Next, install the dependancies with pipenv install and activate the new enviroment with pipenv shell.

In separate ternminal windows, run the manager and an executor instance, but before that, export the following env variables:

export DB_ENDPOINT=postgresql://postgres:root@localhost:5432/postgres
export APP_SECRET=123
python -m flask --app backend.ezruleapp:app run --port 8888 --no-debugger --no-reload

and the executor

python -m flask --app backend.ezrulevalapp:app run --port 9999 --no-debugger --no-reload

Running things with proper WSGI

K8s cluster

Clone this wiki locally