Commit Graph

23 Commits

Author SHA1 Message Date
douxu c20b36373a feat: add MongoDB K8s deployment manifests and expand deploy guide
- add mongodb StatefulSet, Service, PVC, and Secret manifests for Minikube
  - restructure deploy.md MongoDB section into Docker (1.1) and K8s (1.2) paths
  - add connection verification, cleanup, and teardown sections to deploy guide
  - document local go build/run workflow (section 5.2-5.4)
  - reference eventrt-certs-secret.sh helper and Pod readiness waits
  - fix MongoDB password env var name in docs (INITDB_ROOT_PASSWORD)
  - set imagePullPolicy IfNotPresent on rabbitmq deployment for local images
2026-06-11 16:20:39 +08:00
douxu 4c57c37c26 refactor: sync logger improvements from modelrt to eventrt
- add LokiConfig struct and Loki field to LoggerConfig for dev direct-push
  - replace getEncoder/getLogWriter with mode-aware encoder and getWriteSyncer
    (colored console in dev, JSON in container; stdout instead of stderr)
  - add containerFields() to inject K8s pod/namespace/node as global log fields
  - add loki_syncer.go: async batched push to Loki with 512-entry channel
  - introduce makeLogFieldsSkip/getLoggerCallerInfoSkip for wrapper call-frame support
  - expose ErrorSkip/WarnSkip/InfoSkip facade functions for skip-frame logging
  - add loki.endpoint placeholder to eventrt-configmap.yaml for self-documentation
2026-06-08 13:58:48 +08:00
douxu 04d81cedce chore: update k8s deploy config for local Minikube dev environment
- add eventrt-certs-secret.sh helper script for creating cert secret
  - update configmap: use K8s service DNS names for mongodb and jaeger
  - switch deploy_env to development and image to local eventrt:v1
  - add explicit command entrypoint to deployment manifest
  - update mongodb credentials to match local dev setup
2026-06-05 16:38:48 +08:00
douxu 582a64ad20 docs: expand eventRT image deploy guide and bump Go to 1.26
- add three-stage build table (builder/certs/runtime) to section 3.1
  - add --build-arg USER_ID option for custom non-root UID
  - add method 2: load pre-built local image (e.g. eventrt:v1) into Minikube
  - add smoke test subsection 3.1.1 with size/inspect/run checks
  - bump base image from golang:1.25-alpine to golang:1.26-alpine
  - remove bundled config.example.yaml from image (config should be mounted at runtime)
2026-06-02 10:28:31 +08:00
douxu c7dec53ded docs: expand deploy guide to cover full project setup
- add MongoDB Docker deployment steps with init and auth setup
  - restructure RabbitMQ section with step-by-step cert generation and K8s deploy
  - add EventRT Kubernetes deployment section (build, secrets, configmap, checks)
  - document SSH tunnel setup for Mac local dev (MongoDB, RabbitMQ, OTel, Jaeger)
  - add config.yaml parameter reference table for local development
  - add troubleshooting section for cert checks, TLS handshake, and MongoDB connectivity
2026-05-29 14:20:02 +08:00
douxu 2a1929a180 feat: add Kubernetes deployment manifests and hardened Dockerfile
- add multi-stage scratch-based Dockerfile with non-root user and mTLS cert support
  - add K8s Deployment, Service, ConfigMap, and Secret manifests with security hardening
  - bind MONGODB_PASSWORD and SERVICE_SECRET_KEY from environment variables via viper
  - restructure deploy/ directory and remove unused modelrt.cnf
  - bump Go version to 1.26.3 and add event-flow-analysis doc
2026-05-29 11:09:03 +08:00
douxu 715183994c fix: remove status mutation side effect in PublishEventToUI
- stop overwriting record.Status inside the publish function
  - status should be managed by the caller, not the publisher
2026-05-11 17:35:43 +08:00
douxu 2f7cd5a8fc feat: add event lifecycle API and UI fanout publishing - extract event status, MQ exchange/queue, and DB name constants to constants/event.go - add bson tags and IsPersisted flag to EventRecord for proper MongoDB serialization
- publish persisted alarm events to UI consumers via RabbitMQ fanout exchange                                                 - add GET /events/:event_uuid handler to query a single event from MongoDB
  - add PATCH confirm/close handlers with atomic FindOneAndUpdate status transitions                                            - register /events routes in main.go
2026-05-08 15:43:54 +08:00
douxu 44ded93411 feat: add OpenTelemetry distributed tracing to eventRT - add OtelConfig to EventRTConfig and configs/config.yaml - add middleware/trace.go with InitTracerProvider (W3C TraceContext) and StartTrace gin middleware
- migrate logger to read traceID/spanID from OTel span context instead of ctx string keys
  - extract upstream W3C trace context from AMQP headers in processAlarmEventMessage to chain spans across modelRT→eventRT
  - add per-message span in processAlarmEventMessage for end-to-end trace visibility
2026-05-07 16:32:53 +08:00
douxu e0863eb04a add code of rabbitmq message ack action 2026-03-03 17:09:31 +08:00
douxu 609511c7cd optimize code of receipt event 2026-03-02 17:00:56 +08:00
douxu d239f9bd85 add code of receipt event and store into mongodb 2026-02-27 16:36:40 +08:00
douxu f333a830a1 optimize file name of modelrt cert config with rabbitmq 2026-02-12 17:10:32 +08:00
jessequ a3e5892379 updated README.md 2026-02-11 18:12:56 +08:00
jessequ b2a8180f64 updated README.md 2026-02-11 18:11:31 +08:00
douxu 8930f3a20e optimize code and add md file of deploy rabbitMQ server with eventRT 2026-02-11 16:41:08 +08:00
douxu 722e8a9c0f optimize code of rabbitmq connection 2026-02-06 17:55:30 +08:00
douxu fff5dd9218 optimize code of rabbitmq deploy 2026-02-05 17:04:46 +08:00
douxu 23bc2dab9f add rabbitmq deploy files 2026-02-04 17:43:52 +08:00
douxu 5653fb0719 optimze of rabbitmq and mongodb code 2026-01-30 17:43:16 +08:00
douxu c7bc0d033b add drone config 2026-01-29 16:56:21 +08:00
douxu 9380717b75 add code of db or mq init 2026-01-29 16:54:00 +08:00
douxu 9e11ad75be Initial commit 2025-11-18 17:47:27 +08:00