Deployment
Ship BlazeRules as an embedded library, pick the right SIMD backend per platform, and optionally run the agent and dashboard via the Helm chart.
BlazeRules deploys as an embedded library inside an application process; the core does not provide a daemon or REST API. Deployment consists of selecting the correct build for the target CPU and linking it into the host service. The optional agent and dashboard are separate executables. This page also covers the Helm chart under charts/.
Process ownershipThe core library has no independent service surface to expose, scale, or secure. It is deployed with the application that embeds it. The agent and dashboard are optional operational tools.
Build a release
Deploy Release builds. The repository includes CMake presets for common production targets; select the preset matching the target CPU:
| Preset | Target | SIMD |
|---|---|---|
macos-arm64-release | Apple Silicon (M-series) | NEON |
linux-arm64-release-neon | ARM64 Linux (e.g. AWS Graviton) | NEON |
linux-x86_64-release-dispatch | x86_64 Linux, runtime dispatch | AVX2 + scalar, selected at runtime |
linux-release-avx2 | x86_64 Linux pinned to AVX2 | AVX2 |
linux-x86_64-release-avx512 | x86_64 Linux with AVX-512 kernels | AVX-512 (opt-in) |
cloud-portable-release | Unknown/mixed cloud CPUs | Runtime dispatch, portable |
windows-x64-release-dispatch | Windows x64, runtime dispatch | AVX2 + scalar, selected at runtime |
cmake --preset linux-x86_64-release-dispatch
cmake --build --preset linux-x86_64-release-dispatch -j
Don't ship-march=nativebuilds
BLAZERULES_NATIVE_TUNEand thelinux-release-nativepreset tune for the build machine's CPU. They are great for local benchmarking and unsafe for portable deployment — a binary tuned for one microarchitecture can fault or underperform on another. For fleets with mixed CPUs, use a*-dispatchorcloud-portable-releasebuild, which compiles ISA-specific kernels separately and selects one at runtime.
Choose a SIMD backend per platform
The dispatch presets pick a backend automatically. Override only with a measured reason (see Configuration Reference).
| Platform | Recommended | Notes |
|---|---|---|
| AWS Graviton / Apple Silicon | NEON | The native backend on ARM64; simd_backend() reports neon. |
| Cloud x86_64 (known CPU) | AVX2 | The default x86_64 kernel; broadly available and stable under sustained load. |
| Cloud x86_64 (unknown/mixed) | Runtime dispatch | Use cloud-portable-release and let the engine select per host. |
| x86_64 with AVX-512 | AVX-512 | Full builds compile AVX-512 kernels and select them only when CPU/OS support is present. Measure — some server CPUs throttle under wide vectors. |
AWS credentials
Rules, lookups, and ONNX models may use exact-object s3://bucket/key URIs through the AWS CLI cache path. Supply credentials through the environment, not YAML:
export BLAZERULES_AWS_PROFILE=production
export BLAZERULES_AWS_REGION=us-east-1
export BLAZERULES_AWS_ENDPOINT_URL=https://s3.us-east-1.amazonaws.comIn Kubernetes, mount these from a Secret (or use IRSA / the node's role) — never bake them into the chart values or a config map.
Agent and dashboard
Two executables ship for operational convenience in full builds (Configuration Reference).
blazerules_agent— a multi-input ingest process. It reads a top-levelinstances:block from its own agent config file (passed via--config, e.g.agent.yaml— this is separate fromrules.yaml, which holds the rules), pulling fromhttp,file_tail, orstdininputs and writing decisions to anndjsonorstdoutoutput. In the chart it runs as a DaemonSet:blazerules_agent --config /etc/blazerules/agent.yaml. The agent'shttpinput (POST /v1/logs) is unauthenticated — bind it to a trusted network or front it with an authenticating reverse proxy.blazerules_dashboard— a local read-only UI that renders decision and dead-letter logs. Run it directly with--host,--port,--decision-log,--dead-letter-log, and--rules:
./cmake-build-release/blazerules_dashboard \
--host 127.0.0.1 --port 9470 \
--decision-log /var/log/blazerules/decisions.ndjson \
--dead-letter-log /var/log/blazerules/dead_letters.ndjson \
--rules rules.yaml
The dashboard is read-only and unauthenticated — never expose it publiclyThe dashboard has no authentication. Bind it to
127.0.0.1for local use, or keep it cluster-internal behind access controls. The Helm chart defaults the dashboardhostto0.0.0.0and its Service toClusterIP. Wider exposure requires authentication and ingress controls. Do not attach a public LoadBalancer or Ingress without an authentication layer.
Containerizing the binaries
The repository does not include a Dockerfile. The Helm chart expects an image named blazerules:latest, configurable through image.repository and image.tag, with binaries at /usr/local/bin/blazerules, /usr/local/bin/blazerules_agent, and /usr/local/bin/blazerules_dashboard. Build a release with the appropriate preset, copy the executables into those paths, and publish the image to a registry.
Deploy with Helm
The chart at charts/blazerules (Chart 0.5.3, appVersion 0.5.3) renders an agent DaemonSet, a dashboard Deployment and Service, a rules ConfigMap, and a ServiceAccount. The dashboard Deployment and agent DaemonSet define hardened securityContext settings, and a NetworkPolicy restricts inbound dashboard traffic.
helm install blazerules ./charts/blazerules \
--set image.repository=your-registry/blazerules \
--set image.tag=0.5.3Key values (defaults shown):
image:
repository: blazerules
tag: latest
agent:
enabled: true
mode: daemonset
batchSize: 2048
flushMs: 1000
input: {type: file_tail, path: /var/log/containers/blazerules.log}
output: {type: ndjson, path: /var/log/blazerules/decisions.ndjson}
dashboard:
enabled: true
port: 9470
host: 0.0.0.0
service: {type: ClusterIP}
decisionLogPath: /var/log/blazerules/decisions.ndjson
deadLetterLogPath: /var/log/blazerules/dead_letters.ndjson
metricsUrl: ""
persistence:
enabled: false
size: 10GiThe agent writes the decision log; the dashboard reads it (plus the dead-letter log) — wire both to the same paths, which the defaults above already do. The dead-letter log is populated when the agent runs with ingest_error_mode = IngestErrorMode.SKIP_TO_DEAD_LETTER. The chart's dashboard.metricsUrl is empty by default; when set, it should point to a Prometheus exposition endpoint such as http://127.0.0.1:9464/metrics.
Persistence is off by defaultWith
persistence.enabled: false, decision and dead-letter logs use an ephemeral volume and are lost on pod restart. Enable persistence and configure astorageClasswhen logs must be retained for audit or backtesting.
Related documentation
Updated about 2 months ago