Skip to content

Commit 0bfad1f

Browse files
committed
Build fix and documentation updates.
1 parent a0fd74b commit 0bfad1f

File tree

4 files changed

+140
-19
lines changed

4 files changed

+140
-19
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PROTO_SRC_DIR := ./src/junjo/telemetry/junjo_server/proto
44
PROTO_OUT_DIR := ./src/junjo/telemetry/junjo_server/proto_gen
55

66
proto:
7-
uv run python -m grpc_tools.protoc \
7+
python -m grpc_tools.protoc \
88
-I$(PROTO_SRC_DIR) \
99
--python_out=$(PROTO_OUT_DIR) \
1010
--grpc_python_out=$(PROTO_OUT_DIR) \

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,28 @@ $ uv pip install -e ".[dev,graphviz]"
8686

8787
### Junjo Server
8888

89-
[Junjo Server](https://github.com/mdrideout/junjo-server) is an optional, free, open-source companion telemetry server that can ingest OpenTelemetry traces from Junjo, and visualize the workflow execution graph structures.
89+
[Junjo Server](https://github.com/mdrideout/junjo-server) is an optional, free, open-source companion telemetry visualization platform for debugging Junjo workflows.
9090

91-
The user interface makes it easy to observe and debug workflow executions. Step through every single state machine update to see how data changes throughout the workflow's lifecycle.
91+
**Quick Start:**
92+
93+
```bash
94+
# Create docker-compose.yml (see docs for full example)
95+
# Start services
96+
docker compose up -d
97+
98+
# Access UI at http://localhost:5153
99+
```
100+
101+
**Features:**
102+
- Interactive graph visualization with execution path tracking
103+
- State step debugging - see every state change in chronological order
104+
- LLM decision tracking and trace timeline
105+
- Multi-execution comparison
106+
- Built specifically for graph-based AI workflows
107+
108+
**Architecture:** Three-service Docker setup (backend, ingestion service, frontend) that runs on minimal resources (1GB RAM, shared vCPU).
109+
110+
See the [Junjo Server documentation](https://python-api.junjo.ai/junjo_server.html) for complete setup and configuration.
92111

93112
### Graphviz
94113

docs/junjo_server.rst

Lines changed: 117 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,93 @@ Junjo Server solves this by providing **complete execution transparency**.
4040

4141
*Interactive workflow graph showing execution path and state changes*
4242

43-
Installation
44-
============
45-
46-
Junjo Server runs as a Docker container:
43+
Installation & Setup
44+
====================
45+
46+
Junjo Server is composed of three Docker services that work together:
47+
48+
1. **Backend**: API server and data processing (SQLite + DuckDB)
49+
2. **Ingestion Service**: High-throughput OpenTelemetry data receiver (BadgerDB)
50+
3. **Frontend**: Web UI for visualization and debugging
51+
52+
Quick Start with Docker Compose
53+
--------------------------------
54+
55+
**Minimal Docker Compose Example:**
56+
57+
.. code-block:: yaml
58+
:caption: docker-compose.yml
59+
60+
services:
61+
junjo-server-backend:
62+
image: mdrideout/junjo-server-backend:latest
63+
ports:
64+
- "1323:1323" # HTTP API
65+
- "50053:50053" # Internal gRPC
66+
volumes:
67+
- ./.dbdata/sqlite:/dbdata/sqlite
68+
- ./.dbdata/duckdb:/dbdata/duckdb
69+
env_file: .env
70+
networks:
71+
- junjo-network
72+
73+
junjo-server-ingestion:
74+
image: mdrideout/junjo-server-ingestion-service:latest
75+
ports:
76+
- "50051:50051" # OTel data ingestion (your app connects here)
77+
- "50052:50052" # Internal gRPC
78+
volumes:
79+
- ./.dbdata/badgerdb:/dbdata/badgerdb
80+
env_file: .env
81+
networks:
82+
- junjo-network
83+
84+
junjo-server-frontend:
85+
image: mdrideout/junjo-server-frontend:latest
86+
ports:
87+
- "5153:80" # Web UI
88+
env_file: .env
89+
networks:
90+
- junjo-network
91+
depends_on:
92+
- junjo-server-backend
93+
- junjo-server-ingestion
94+
95+
networks:
96+
junjo-network:
97+
driver: bridge
98+
99+
**Start the services:**
47100

48101
.. code-block:: bash
49102
50-
# Pull and run Junjo Server
51-
docker run -p 50051:50051 -p 3000:3000 junjo/junjo-server:latest
103+
# Create .env file (see Configuration section below)
104+
cp .env.example .env
105+
106+
# Start all services
107+
docker compose up -d
108+
109+
# Access the UI
110+
open http://localhost:5153
111+
112+
Resource Requirements
113+
---------------------
52114

53-
Access the UI at http://localhost:3000
115+
Junjo Server is designed to run on minimal resources:
54116

55-
For production setup and advanced configuration, see the `Junjo Server repository <https://github.com/mdrideout/junjo-server>`_.
117+
- **CPU**: Single shared vCPU is sufficient
118+
- **RAM**: 1GB minimum
119+
- **Storage**: Uses SQLite, DuckDB, and BadgerDB (all embedded databases)
120+
121+
This makes it affordable to deploy on small cloud VMs.
56122

57123
Configuration
58124
=============
59125

60126
Step 1: Generate an API Key
61127
----------------------------
62128

63-
1. Open Junjo Server UI at http://localhost:3000
129+
1. Open Junjo Server UI at http://localhost:5153
64130
2. Navigate to Settings → API Keys
65131
3. Create a new API key
66132
4. Copy the key to your environment
@@ -107,8 +173,8 @@ Create an OpenTelemetry configuration file:
107173
108174
# Configure Junjo Server exporter
109175
junjo_exporter = JunjoServerOtelExporter(
110-
host="localhost",
111-
port="50051",
176+
host="localhost", # Junjo Server ingestion service host
177+
port="50051", # Port 50051 receives OpenTelemetry data
112178
api_key=api_key,
113179
insecure=True # Use False in production with TLS
114180
)
@@ -288,16 +354,43 @@ You can use Junjo Server alongside other platforms:
288354
289355
Platforms like Jaeger, Grafana, Honeycomb, etc. will receive all Junjo spans with their custom attributes, though they won't have Junjo Server's specialized workflow visualization.
290356

357+
Architecture Details
358+
====================
359+
360+
Junjo Server uses a three-service architecture for scalability and reliability:
361+
362+
.. code-block:: text
363+
364+
Your Application (Junjo Python Library)
365+
↓ (sends OTel spans via gRPC)
366+
Ingestion Service :50051
367+
↓ (writes to BadgerDB WAL)
368+
↓ (backend polls via internal gRPC :50052)
369+
Backend Service :1323
370+
↓ (stores in SQLite + DuckDB)
371+
↓ (serves HTTP API)
372+
Frontend :5153
373+
(web UI)
374+
375+
**Port Reference:**
376+
377+
- **50051**: Public gRPC - Your application sends telemetry here
378+
- **50052**: Internal gRPC - Backend reads from ingestion service
379+
- **50053**: Internal gRPC - Backend server communication
380+
- **1323**: Public HTTP - API server
381+
- **5153**: Public HTTP - Web UI
382+
291383
Troubleshooting
292384
===============
293385

294386
No data appearing in Junjo Server
295387
----------------------------------
296388

297389
- Verify API key is set correctly: ``echo $JUNJO_SERVER_API_KEY``
298-
- Check Junjo Server is running: http://localhost:3000
299-
- Ensure port 50051 is accessible
390+
- Check services are running: ``docker compose ps``
391+
- Ensure ingestion service is accessible on port 50051
300392
- Look for connection errors in your application logs
393+
- Check ingestion service logs: ``docker compose logs junjo-server-ingestion``
301394

302395
Missing LLM data
303396
----------------
@@ -310,8 +403,17 @@ Performance issues
310403
------------------
311404

312405
- Use sampling for high-volume workflows
313-
- Consider metric export interval adjustments
314-
- See Junjo Server docs for retention settings
406+
- The ingestion service uses BadgerDB as a write-ahead log for durability
407+
- Backend polls and indexes data asynchronously
408+
- See `Junjo Server repository <https://github.com/mdrideout/junjo-server>`_ for tuning options
409+
410+
Docker Compose not starting
411+
----------------------------
412+
413+
- Ensure Docker network exists: ``docker network create junjo-network``
414+
- Check environment variables are set in ``.env``
415+
- View logs: ``docker compose logs``
416+
- Try: ``docker compose down -v && docker compose up --build``
315417

316418
Next Steps
317419
==========

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "junjo"
7-
version = "0.60.0"
7+
version = "0.60.1"
88
description = "A graph workflow execution library for building agentic AI workflows."
99
readme = "README.md"
1010
requires-python = ">=3.11"

0 commit comments

Comments
 (0)