From e7f677b07cf97a71b2cf86011cde1deb246392f7 Mon Sep 17 00:00:00 2001 From: Patrick Bashizi Date: Fri, 30 Jan 2026 16:21:05 +0100 Subject: [PATCH 1/2] fix(engine): update context path to /api and expose port 5601 --- README.md | 2 +- docker-compose.dev.yml | 2 +- docker-compose.prod.yml | 6 ++--- docker-compose.test.yml | 2 +- docker/prometheus.yml | 2 +- docs/architecture/overview.md | 34 ++++++++++++------------ docs/archive/docker-deployment-plan.md | 6 ++--- docs/operations/docker-deployment.md | 12 ++++----- docs/operations/sample-data-generator.md | 6 ++--- release/docker-compose.release.yml | 8 +++--- release/quickstart.sh | 2 +- scripts/build-and-run-dev.sh | 2 +- scripts/build-dev.sh | 2 +- scripts/generate_traffic.sh | 2 +- scripts/prod-build.sh | 2 +- scripts/start-prod.sh | 2 +- scripts/test-health.sh | 2 +- src/main/resources/application.yaml | 2 +- src/test/http/task.http | 4 +-- 19 files changed, 51 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 0ccd8e3..c988aa9 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Rebuilds and restarts only the engine service to apply code changes. ``` **Services:** -- **Abada Engine**: [http://localhost:5601/abada/api](http://localhost:5601/abada/api) +- **Abada Engine**: [http://localhost:5601/api](http://localhost:5601/api) - **Abada Tenda** (Task UI): [http://localhost:5602](http://localhost:5602) - **Abada Orun** (Monitoring UI): [http://localhost:5603](http://localhost:5603) - **Grafana**: [http://localhost:3000](http://localhost:3000) (admin/admin123) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 8223b46..114de58 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -29,7 +29,7 @@ services: - abada-network restart: unless-stopped healthcheck: - test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/abada/api/actuator/health" ] + test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/api/actuator/health" ] interval: 30s timeout: 10s retries: 3 diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 64b8f92..8768bf8 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -54,7 +54,7 @@ services: - abada-network restart: always healthcheck: - test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/abada/api/actuator/health" ] + test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/api/actuator/health" ] interval: 30s timeout: 10s retries: 3 @@ -65,9 +65,9 @@ services: condition: service_started labels: - "traefik.enable=true" - - "traefik.http.routers.abada.rule=PathPrefix(`/abada`)" + - "traefik.http.routers.abada.rule=PathPrefix(`/api`)" - "traefik.http.services.abada.loadbalancer.server.port=5601" - - "traefik.http.services.abada.loadbalancer.healthcheck.path=/abada/api/actuator/health" + - "traefik.http.services.abada.loadbalancer.healthcheck.path=/api/actuator/health" - "traefik.http.services.abada.loadbalancer.healthcheck.interval=30s" volumes: diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 4d5bab6..3aa5e7f 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -20,7 +20,7 @@ services: - abada-network restart: "no" # No restart for tests healthcheck: - test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/abada/api/actuator/health" ] + test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/api/actuator/health" ] interval: 10s timeout: 5s retries: 3 diff --git a/docker/prometheus.yml b/docker/prometheus.yml index ffd933f..553a9b9 100644 --- a/docker/prometheus.yml +++ b/docker/prometheus.yml @@ -26,7 +26,7 @@ scrape_configs: - job_name: 'abada-engine' static_configs: - targets: ['abada-engine:5601'] - metrics_path: /abada/api/actuator/prometheus + metrics_path: /api/actuator/prometheus scrape_interval: 15s scrape_timeout: 10s diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index 191d6ae..1a5cf4f 100755 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -231,17 +231,17 @@ DELETE /v1/processes/instances/{instanceId} #### Task Management ``` -GET /abada/api/tasks -POST /abada/api/tasks/{id}/claim -POST /abada/api/tasks/{id}/complete -POST /abada/api/tasks/{id}/fail +GET /api/tasks +POST /api/tasks/{id}/claim +POST /api/tasks/{id}/complete +POST /api/tasks/{id}/fail ``` #### Event Management ``` -POST /abada/api/events/messages -POST /abada/api/events/signals +POST /api/events/messages +POST /api/events/signals ``` ## Deployment Architecture @@ -337,8 +337,8 @@ services: **Access URLs:** -- Engine: -- H2 Console: +- Engine: +- H2 Console: - Grafana: - Jaeger: @@ -530,7 +530,7 @@ scrape_configs: - job_name: 'abada-engine' static_configs: - targets: ['abada-engine:5601'] - metrics_path: /abada/api/actuator/prometheus + metrics_path: /api/actuator/prometheus scrape_interval: 15s ``` @@ -651,7 +651,7 @@ CREATE TABLE task_instance ( ```yaml labels: - - "traefik.http.services.abada.loadbalancer.healthcheck.path=/abada/api/actuator/health" + - "traefik.http.services.abada.loadbalancer.healthcheck.path=/api/actuator/health" - "traefik.http.services.abada.loadbalancer.healthcheck.interval=30s" ``` @@ -907,7 +907,7 @@ groups: docker stats abada-engine # Check JVM heap usage -curl http://localhost:5601/abada/api/actuator/metrics/jvm.memory.used +curl http://localhost:5601/api/actuator/metrics/jvm.memory.used ``` **Solutions:** @@ -931,7 +931,7 @@ curl http://localhost:5601/abada/api/actuator/metrics/jvm.memory.used docker compose exec postgres pg_isready -U abada # Check connection pool metrics -curl http://localhost:5601/abada/api/actuator/metrics/hikaricp.connections.active +curl http://localhost:5601/api/actuator/metrics/hikaricp.connections.active ``` **Solutions:** @@ -985,10 +985,10 @@ docker compose exec postgres psql -U abada -d abada_engine ```bash # Check service health -curl http://localhost:5601/abada/api/actuator/health +curl http://localhost:5601/api/actuator/health # Check metrics -curl http://localhost:5601/abada/api/actuator/prometheus +curl http://localhost:5601/api/actuator/prometheus # Check traces curl http://localhost:16686/api/services @@ -1033,7 +1033,7 @@ docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d 4. **Access Services:** -- Engine: +- Engine: - Grafana: - Jaeger: @@ -1144,7 +1144,7 @@ docker compose -f docker-compose.yml -f docker-compose.prod.yml ps ```bash # Check all services are healthy -curl http://localhost/abada/api/actuator/health +curl http://localhost/api/actuator/health curl http://localhost:3000/api/health curl http://localhost:16686/api/services ``` @@ -1226,6 +1226,6 @@ This architecture and deployment guide provides comprehensive information for de For additional support or questions, refer to: - Project documentation in `/docs` -- API documentation at `/abada/api/docs` +- API documentation at `/api/docs` - Monitoring dashboards in Grafana - Issue tracking in the project repository diff --git a/docs/archive/docker-deployment-plan.md b/docs/archive/docker-deployment-plan.md index 323ba10..bf3c1d4 100755 --- a/docs/archive/docker-deployment-plan.md +++ b/docs/archive/docker-deployment-plan.md @@ -98,7 +98,7 @@ File: `docker/prometheus.yml` Scrape targets: - OTEL Collector metrics: `otel-collector:8889` -- Abada Engine actuator: `abada-engine:5601/abada/api/actuator/prometheus` +- Abada Engine actuator: `abada-engine:5601/api/actuator/prometheus` - Prometheus self-monitoring Retention: 15 days default, configurable @@ -182,7 +182,7 @@ labels: - "traefik.enable=true" - "traefik.http.routers.abada.rule=PathPrefix(`/abada`)" - "traefik.http.services.abada.loadbalancer.server.port=5601" - - "traefik.http.services.abada.loadbalancer.healthcheck.path=/abada/api/actuator/health" + - "traefik.http.services.abada.loadbalancer.healthcheck.path=/api/actuator/health" ``` ### Database Connection Pooling @@ -193,7 +193,7 @@ Each engine instance maintains its own connection pool (HikariCP). PostgreSQL co ### Health Checks All services have health checks: -- Abada Engine: `/abada/api/actuator/health` +- Abada Engine: `/api/actuator/health` - PostgreSQL: `pg_isready` - OTEL Collector: internal health extension - Prometheus/Grafana/Jaeger: HTTP endpoints diff --git a/docs/operations/docker-deployment.md b/docs/operations/docker-deployment.md index 6232c69..3a96178 100755 --- a/docs/operations/docker-deployment.md +++ b/docs/operations/docker-deployment.md @@ -86,10 +86,10 @@ docker compose -f docker-compose.yml -f docker-compose.dev.yml up **Access URLs:** -- Abada Engine: +- Abada Engine: - Abada Tenda: - Abada Orun: -- H2 Console: +- H2 Console: - Grafana: (admin/admin123) - Jaeger: - Prometheus: @@ -112,7 +112,7 @@ docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d **Access URLs:** -- Abada Engine: (via Traefik) +- Abada Engine: (via Traefik) - Traefik Dashboard: - Grafana: - Jaeger: @@ -165,7 +165,7 @@ If you prefer to start it manually: ### Access URLs -- **Abada Engine**: (via Traefik) +- **Abada Engine**: (via Traefik) - **Abada Tenda**: - **Abada Orun**: - **Grafana**: @@ -224,7 +224,7 @@ Pre-configured dashboards available in Grafana: Production environment uses Traefik for load balancing: - **Strategy**: Round-robin -- **Health Checks**: `/abada/api/actuator/health` +- **Health Checks**: `/api/actuator/health` - **Path**: `/abada` prefix - **Sticky Sessions**: Disabled (stateless design) @@ -397,7 +397,7 @@ docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d docker-compose ps # Check specific service health -curl http://localhost:5601/abada/api/actuator/health +curl http://localhost:5601/api/actuator/health ``` ## Support diff --git a/docs/operations/sample-data-generator.md b/docs/operations/sample-data-generator.md index ae0d6bb..d795ad6 100644 --- a/docs/operations/sample-data-generator.md +++ b/docs/operations/sample-data-generator.md @@ -313,7 +313,7 @@ services: - abada-network restart: unless-stopped healthcheck: - test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/abada/api/actuator/health" ] + test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5601/api/actuator/health" ] interval: 30s timeout: 10s retries: 3 @@ -386,11 +386,11 @@ docker logs abada-engine | grep "Sample Data" # Sample Data Generation Complete # Verify via API -curl http://localhost:5601/abada/api/v1/processes/instances +curl http://localhost:5601/api/v1/processes/instances # Check tasks curl -H "X-User: alice" -H "X-Groups: customers" \ - http://localhost:5601/abada/api/v1/tasks + http://localhost:5601/api/v1/tasks ``` ## Important Notes diff --git a/release/docker-compose.release.yml b/release/docker-compose.release.yml index 58cb8e7..5d0a9b8 100644 --- a/release/docker-compose.release.yml +++ b/release/docker-compose.release.yml @@ -41,17 +41,19 @@ services: - --no-verbose - --tries=1 - --spider - - http://localhost:5601/abada/api/actuator/health + - http://localhost:5601/api/actuator/health timeout: 10s interval: 30s retries: 3 image: bashizip/abada-engine:0.8.4-alpha labels: traefik.enable: "true" - traefik.http.routers.abada.rule: PathPrefix(`/abada`) + traefik.http.routers.abada.rule: PathPrefix(`/api`) traefik.http.services.abada.loadbalancer.healthcheck.interval: 30s - traefik.http.services.abada.loadbalancer.healthcheck.path: /abada/api/actuator/health + traefik.http.services.abada.loadbalancer.healthcheck.path: /api/actuator/health traefik.http.services.abada.loadbalancer.server.port: "5601" + ports: + - "5601:5601" networks: abada-network: null pull_policy: always diff --git a/release/quickstart.sh b/release/quickstart.sh index ca3029a..7be1a02 100755 --- a/release/quickstart.sh +++ b/release/quickstart.sh @@ -72,7 +72,7 @@ start_platform() { if [ $? -eq 0 ]; then echo "" print_step "Platform available at:" - echo -e " - ${BLUE}Engine ${NC}: http://localhost/abada/api" + echo -e " - ${BLUE}Engine ${NC}: http://localhost:5601/api/" echo -e " - ${BLUE}Tenda ${NC}: http://localhost:5602" echo -e " - ${BLUE}Orun ${NC}: http://localhost:5603" echo -e " - ${BLUE}Grafana ${NC}: http://localhost:3000" diff --git a/scripts/build-and-run-dev.sh b/scripts/build-and-run-dev.sh index df885ab..0628ad5 100755 --- a/scripts/build-and-run-dev.sh +++ b/scripts/build-and-run-dev.sh @@ -56,7 +56,7 @@ sleep 10 echo -e "\n${GREEN}✓ Stack is up!${NC}" echo -e "${BLUE}Services:${NC}" -echo -e "- Abada Engine: http://localhost:5601/abada/api" +echo -e "- Abada Engine: http://localhost:5601/api" echo -e "- Abada Tenda: http://localhost:5602" echo -e "- Abada Orun: http://localhost:5603" echo -e "- Grafana: http://localhost:3000 (admin/admin123)" diff --git a/scripts/build-dev.sh b/scripts/build-dev.sh index 380b3b2..68e57c9 100755 --- a/scripts/build-dev.sh +++ b/scripts/build-dev.sh @@ -27,7 +27,7 @@ echo -e "\n${YELLOW}Step 4: Waiting for application to start...${NC}" sleep 10 echo -e "\n${GREEN}✓ Build complete!${NC}" -echo -e "${BLUE}Application is starting at http://localhost:5601/abada/api${NC}" +echo -e "${BLUE}Application is starting at http://localhost:5601/api${NC}" echo -e "${BLUE}Jaeger UI: http://localhost:16686${NC}" echo -e "${BLUE}Grafana: http://localhost:3000${NC}" echo -e "\n${YELLOW}To view logs:${NC} docker logs -f abada-engine" diff --git a/scripts/generate_traffic.sh b/scripts/generate_traffic.sh index af1a8aa..bd79f22 100755 --- a/scripts/generate_traffic.sh +++ b/scripts/generate_traffic.sh @@ -5,7 +5,7 @@ GREEN='\033[0;32m' BLUE='\033[0;34m' NC='\033[0m' # No Color -BASE_URL="http://localhost:5601/abada/api" +BASE_URL="http://localhost:5601/api" ITERATIONS=20 echo -e "${BLUE}Starting traffic generation for Jaeger troubleshooting...${NC}" diff --git a/scripts/prod-build.sh b/scripts/prod-build.sh index f727b00..3c82707 100755 --- a/scripts/prod-build.sh +++ b/scripts/prod-build.sh @@ -31,7 +31,7 @@ if [ "$BUILD_ONLY" = "false" ]; then docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d echo -e "\n${GREEN}✓ Production stack started!${NC}" - echo -e "${BLUE}Application: http://localhost/abada/api (via Traefik)${NC}" + echo -e "${BLUE}Application: http://localhost/api (via Traefik)${NC}" echo -e "${BLUE}Jaeger UI: http://localhost:16686${NC}" echo -e "${BLUE}Grafana: http://localhost:3000${NC}" echo -e "\n${YELLOW}To view logs:${NC} docker-compose -f docker-compose.yml -f docker-compose.prod.yml logs -f" diff --git a/scripts/start-prod.sh b/scripts/start-prod.sh index e958eb5..b4f80a2 100755 --- a/scripts/start-prod.sh +++ b/scripts/start-prod.sh @@ -31,7 +31,7 @@ docker-compose -f docker-compose.yml -f docker-compose.prod.yml ps echo -e "\n${GREEN}✓ Production stack started!${NC}" echo -e "\n${BLUE}Service URLs:${NC}" -echo -e " Application: ${YELLOW}http://localhost/abada/api${NC} (via Traefik load balancer)" +echo -e " Application: ${YELLOW}http://localhost/api${NC} (via Traefik load balancer)" echo -e " Jaeger UI: ${YELLOW}http://localhost:16686${NC}" echo -e " Grafana: ${YELLOW}http://localhost:3000${NC} (admin/admin)" echo -e " Prometheus: ${YELLOW}http://localhost:9090${NC}" diff --git a/scripts/test-health.sh b/scripts/test-health.sh index 56d18e5..a5a44fe 100755 --- a/scripts/test-health.sh +++ b/scripts/test-health.sh @@ -2,7 +2,7 @@ # Check health of key services echo "Checking Abada Engine Health..." -curl -s http://localhost:5601/abada/api/actuator/health | jq . || echo "Engine not reachable" +curl -s http://localhost:5601/api/actuator/health | jq . || echo "Engine not reachable" echo -e "\n\nChecking Abada Tenda Health..." curl -I -s http://localhost:5602 || echo "Tenda not reachable" diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 369d1de..471126e 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -8,7 +8,7 @@ spring: server: port: ${SERVER_PORT:5601} # Uses 5601 unless overridden by env var servlet: - context-path: /abada/api + context-path: /api # Logging Configuration logging: diff --git a/src/test/http/task.http b/src/test/http/task.http index 91f8735..7f61a6d 100644 --- a/src/test/http/task.http +++ b/src/test/http/task.http @@ -1,12 +1,12 @@ ### Send POST request with json body -POST http://localhost:5601/abada/api/v1/tasks/claim?taskId=eea72b83-e1f8-4707-ad6c-f679ca6bb5bb +POST http://localhost:5601/api/v1/tasks/claim?taskId=eea72b83-e1f8-4707-ad6c-f679ca6bb5bb Content-Type: application/json X-User: alice X-Groups: customers ### Send Get request with json body -GET http://localhost:5601/abada/api/v1/tasks/ +GET http://localhost:5601/api/v1/tasks/ Content-Type: application/json X-User: alice X-Groups: customers \ No newline at end of file From 7e5ba369cb08f58925feebfebd9bd83441be4ff2 Mon Sep 17 00:00:00 2001 From: Patrick Bashizi Date: Fri, 30 Jan 2026 17:19:54 +0100 Subject: [PATCH 2/2] fix(release): reduce replicas to 1 to avoid port conflict on 5601 --- release/docker-compose.release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/docker-compose.release.yml b/release/docker-compose.release.yml index 5d0a9b8..bc2f5c9 100644 --- a/release/docker-compose.release.yml +++ b/release/docker-compose.release.yml @@ -12,7 +12,7 @@ services: condition: service_healthy required: true deploy: - replicas: 3 + replicas: 1 resources: limits: cpus: 1