Skip to main content

ONEX Infrastructure - Service integration and database infrastructure tools

Project description

ONEX Infrastructure

License: MIT Python 3.12+ Code style: ruff Type checked: mypy Pre-commit Framework: Infrastructure

Production infrastructure services for the ONEX execution layer. Handlers, adapters, and runtime services for PostgreSQL, Kafka, Consul, Vault, and Redis.

What is This?

This repository provides the infrastructure layer for ONEX-based systems. While omnibase_core defines the execution protocol and node archetypes, this package provides:

  • Handlers for external services (database, HTTP, messaging)
  • Adapters wrapping infrastructure clients
  • Event bus abstractions for Kafka/Redpanda
  • Runtime services deployable via Docker

Built on omnibase-core ^0.8.0 and omnibase-spi ^0.5.0.

Quick Start

# Clone the repository
git clone https://github.com/OmniNode-ai/omnibase_infra.git
cd omnibase_infra

# Start the runtime with Docker
cd docker
cp .env.example .env
# Edit .env - set POSTGRES_PASSWORD, VAULT_TOKEN, REDIS_PASSWORD

docker compose -f docker-compose.runtime.yml --profile main up -d --build

# Verify it's running
curl http://localhost:8085/health

Docker Services

The runtime deploys as containerized services connecting to your infrastructure:

Service Profile Port Description
runtime-main main 8085 Core kernel - request/response handling
runtime-effects effects 8086 External service I/O (DB, HTTP, messaging)
runtime-worker workers Scalable compute workers (default: 2 replicas)

Profiles:

# Core only
docker compose -f docker-compose.runtime.yml --profile main up -d

# Core + effects
docker compose -f docker-compose.runtime.yml --profile effects up -d

# Core + workers (parallel compute)
docker compose -f docker-compose.runtime.yml --profile workers up -d

# Everything
docker compose -f docker-compose.runtime.yml --profile all up -d

Infrastructure Dependencies

The runtime connects to external services (not included in compose):

Service Purpose Default Host Environment Variable
PostgreSQL Persistence localhost:5432 POSTGRES_HOST, POSTGRES_PORT
Kafka/Redpanda Event bus localhost:9092 KAFKA_BOOTSTRAP_SERVERS
Consul Service discovery localhost:8500 CONSUL_HOST, CONSUL_PORT
Vault Secrets management localhost:8200 VAULT_ADDR
Redis/Valkey Caching localhost:6379 REDIS_HOST, REDIS_PORT

Configure via .env file - see docker/README.md for details.

Documentation

I want to... Go to...
Get started quickly Quick Start Guide
Understand the architecture Architecture Overview
Deploy with Docker Docker Guide
See a complete example Registration Walkthrough
Write a contract Contract Reference
Find implementation patterns Pattern Documentation
Read coding standards CLAUDE.md

Full documentation: docs/index.md

Repository Structure

src/omnibase_infra/
├── handlers/          # Request/message handlers
├── event_bus/         # Kafka/Redpanda abstractions
├── clients/           # Service clients
├── models/            # Pydantic models
├── nodes/             # ONEX nodes (Effect, Compute, Reducer, Orchestrator)
├── errors/            # Error hierarchy
├── mixins/            # Reusable behaviors
└── enums/             # Centralized enums

Development

# Install dependencies
poetry install

# Run tests
poetry run pytest

# Type checking
poetry run mypy src/omnibase_infra/

# Format code
poetry run ruff format .
poetry run ruff check --fix .

Pre-commit Hooks Setup

Run once after cloning:

poetry run pre-commit install
poetry run pre-commit install --hook-type pre-push

Contributing

See CONTRIBUTING.md for commit conventions and PR guidelines.

License

MIT License - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omnibase_infra-0.2.2.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omnibase_infra-0.2.2-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file omnibase_infra-0.2.2.tar.gz.

File metadata

  • Download URL: omnibase_infra-0.2.2.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Darwin/24.6.0

File hashes

Hashes for omnibase_infra-0.2.2.tar.gz
Algorithm Hash digest
SHA256 60f752ee73ba9a4dfd4ecb5e3d5b0b82064b14dd98995adb9bf50b9f7d1c3e30
MD5 8520fa069467f841b3c17d872d72a050
BLAKE2b-256 5aec12c61803089f2e57ec9b6142b632f9506653cd334b1b611deab4d1ff1d0b

See more details on using hashes here.

File details

Details for the file omnibase_infra-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: omnibase_infra-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Darwin/24.6.0

File hashes

Hashes for omnibase_infra-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33977339faeb933f65232d4ca815f4f5818ab2e219e7adb8e2dceba73dfe6347
MD5 c7d43a542345704fe31c2948c4c0b3ea
BLAKE2b-256 316fde2fa8ac4e23a383d34ba7aaf2f4736456cca961cc6ca1045c5faa271ae8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page