Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flower monitoring dashboard for Celery #5648

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fides/fides.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ task_retry_backoff = 1
subject_identity_verification_required = false
task_retry_count = 0
task_retry_delay = 1
use_dsr_3_0 = false
use_dsr_3_0 = true

[admin_ui]
enabled = true

[celery]
event_queue_prefix = "fides_worker"
task_default_queue = "fides"
task_always_eager = true
task_always_eager = false

[notifications]
notification_service_type = "mailgun"
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ services:
target: /usr/local/etc/redis
read_only: False

flower:
image: mher/flower:2.0
command: celery flower --broker=redis://:redispassword@redis:6379/0
ports:
- "5555:5555"
depends_on:
- redis
- worker
environment:
- FLOWER_BASIC_AUTH=admin:adminpassword # Optional: basic auth protection
- CELERY_BROKER_URL=redis://:redispassword@redis:6379/0
- CELERY_RESULT_BACKEND=redis://:redispassword@redis:6379/0

volumes:
postgres: null

Expand Down
10 changes: 10 additions & 0 deletions noxfiles/dev_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def dev(session: Session) -> None:
- pc = Build and run the Privacy Center
- remote_debug = Run with remote debugging enabled (see docker-compose.remote-debug.yml)
- worker = Run a Fides worker
- flower = Run Flower monitoring dashboard for Celery
- child = Run a Fides child node
- <datastore(s)> = Run a test datastore (e.g. 'mssql', 'mongodb')

Expand All @@ -64,6 +65,15 @@ def dev(session: Session) -> None:
if "worker" in session.posargs:
session.run("docker", "compose", "up", "--wait", "worker", external=True)

if "flower" in session.posargs:
# Only start Flower if worker is also enabled
if "worker" in session.posargs:
session.run("docker", "compose", "up", "-d", "flower", external=True)
else:
session.error(
"Flower requires the worker service. Please add 'worker' to your arguments."
)

datastores = [
datastore for datastore in session.posargs if datastore in ALL_DATASTORES
] or None
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fastapi[all]==0.111.0
fastapi-pagination[sqlalchemy]==0.12.25
fideslog==1.2.10
firebase-admin==5.3.0
flower==2.0.1
GitPython==3.1.41
httpx==0.23.1
hvac==0.11.2
Expand Down
Loading