Metadata-Version: 2.4
Name: orb-py
Version: 1.8.5
Summary: Open Resource Broker (ORB) — dynamic cloud resource provisioning via CLI and REST API
Author-email: Open Resource Broker Maintainers <open-resource-broker-maintainers@lists.finos.org>
Maintainer-email: Open Resource Broker Maintainers <open-resource-broker-maintainers@lists.finos.org>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/finos/open-resource-broker
Project-URL: Documentation, https://finos.github.io/open-resource-broker/
Project-URL: Repository, https://github.com/finos/open-resource-broker
Project-URL: Bug Reports, https://github.com/finos/open-resource-broker/issues
Keywords: aws,ec2,hostfactory,symphony,hpc,cluster,cloud,infrastructure
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Clustering
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSE.spdx
License-File: NOTICE
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: urllib3>=2.6.3
Requires-Dist: PyJWT>=2.8.0
Requires-Dist: cryptography>=46.0.5
Requires-Dist: filelock>=3.20.1
Requires-Dist: requests>=2.31.0
Requires-Dist: PyYAML>=6.0.0
Requires-Dist: jsonschema>=4.17.0
Requires-Dist: boto3>=1.42.21
Requires-Dist: botocore>=1.42.21
Requires-Dist: psutil>=5.9.0
Provides-Extra: sql
Requires-Dist: alembic>=1.13; extra == "sql"
Provides-Extra: aws
Requires-Dist: boto3>=1.42.21; extra == "aws"
Requires-Dist: botocore>=1.42.21; extra == "aws"
Provides-Extra: k8s
Requires-Dist: kubernetes; extra == "k8s"
Provides-Extra: all-providers
Requires-Dist: orb-py[aws]; extra == "all-providers"
Requires-Dist: orb-py[k8s]; extra == "all-providers"
Provides-Extra: k8s-legacy
Requires-Dist: kubernetes; extra == "k8s-legacy"
Requires-Dist: boto3>=1.42.21; extra == "k8s-legacy"
Requires-Dist: jinja2>=3.1.0; extra == "k8s-legacy"
Requires-Dist: typing-extensions; extra == "k8s-legacy"
Requires-Dist: watchdog; extra == "k8s-legacy"
Requires-Dist: rich>=13.3.0; extra == "k8s-legacy"
Requires-Dist: pydantic>=2.0.0; extra == "k8s-legacy"
Requires-Dist: pydantic-settings>=2.0.0; extra == "k8s-legacy"
Requires-Dist: tenacity; extra == "k8s-legacy"
Requires-Dist: prometheus-client>=0.17.0; extra == "k8s-legacy"
Requires-Dist: sqlalchemy>=2.0.0; extra == "k8s-legacy"
Requires-Dist: pg8000; extra == "k8s-legacy"
Requires-Dist: alembic; extra == "k8s-legacy"
Requires-Dist: fastapi>=0.128.0; extra == "k8s-legacy"
Requires-Dist: uvicorn>=0.24.0; extra == "k8s-legacy"
Provides-Extra: ui
Requires-Dist: reflex<0.10,>=0.9; extra == "ui"
Provides-Extra: cli
Requires-Dist: rich>=13.3.0; extra == "cli"
Requires-Dist: rich-argparse>=1.0.0; extra == "cli"
Provides-Extra: api
Requires-Dist: fastapi>=0.128.0; extra == "api"
Requires-Dist: starlette>=0.49.1; extra == "api"
Requires-Dist: uvicorn>=0.24.0; extra == "api"
Requires-Dist: jinja2>=3.1.0; extra == "api"
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.20.0; extra == "otel"
Provides-Extra: monitoring
Requires-Dist: orb-py[otel]; extra == "monitoring"
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "monitoring"
Requires-Dist: opentelemetry-exporter-prometheus<1.0,>=0.64b0; extra == "monitoring"
Requires-Dist: opentelemetry-instrumentation-fastapi<1.0,>=0.41b0; extra == "monitoring"
Requires-Dist: opentelemetry-instrumentation-sqlalchemy<1.0,>=0.41b0; extra == "monitoring"
Requires-Dist: opentelemetry-instrumentation-click<1.0,>=0.64b0; extra == "monitoring"
Requires-Dist: opentelemetry-instrumentation-system-metrics<1.0,>=0.64b0; extra == "monitoring"
Requires-Dist: opentelemetry-instrumentation-logging<1.0,>=0.64b0; extra == "monitoring"
Requires-Dist: prometheus-client>=0.17.0; extra == "monitoring"
Requires-Dist: psutil>=5.9.0; extra == "monitoring"
Provides-Extra: monitoring-aws
Requires-Dist: orb-py[aws,monitoring]; extra == "monitoring-aws"
Requires-Dist: opentelemetry-instrumentation-botocore<1.0,>=0.64b0; extra == "monitoring-aws"
Provides-Extra: all
Requires-Dist: orb-py[all-providers,api,cli,monitoring,monitoring-aws,sql,ui]; extra == "all"
Provides-Extra: test-aws
Requires-Dist: orb-py[aws]; extra == "test-aws"
Requires-Dist: moto[autoscaling,dynamodb,ec2,ec2instanceconnect,iam,sns,sqs,ssm,sts]<6.0.0,>=5.1.19; extra == "test-aws"
Requires-Dist: responses<1.0.0,>=0.24.0; extra == "test-aws"
Requires-Dist: requests-mock<2.0.0,>=1.11.0; extra == "test-aws"
Provides-Extra: test-k8s
Requires-Dist: orb-py[k8s]; extra == "test-k8s"
Requires-Dist: kmock>=0.7; extra == "test-k8s"
Provides-Extra: dev
Requires-Dist: orb-py[all]; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: pathspec>=0.11.0; extra == "dev"
Requires-Dist: pyright<2.0.0,>=1.1.408; extra == "dev"
Requires-Dist: types-PyYAML<7.0.0,>=6.0.12.12; extra == "dev"
Requires-Dist: types-python-dateutil<3.0.0,>=2.8.19.14; extra == "dev"
Requires-Dist: kubernetes-stubs-elephant-fork<37.0.0,>=36.0.2; extra == "dev"
Requires-Dist: tomli<3.0.0,>=2.0.0; extra == "dev"
Requires-Dist: import-linter<3.0.0,>=2.0; extra == "dev"
Requires-Dist: pytest<10.0.0,>=7.4.3; extra == "dev"
Requires-Dist: pytest-cov<8.0.0,>=4.1.0; extra == "dev"
Requires-Dist: pytest-env<2.0.0,>=1.1.1; extra == "dev"
Requires-Dist: pytest-mock<4.0.0,>=3.12.0; extra == "dev"
Requires-Dist: pytest-asyncio<2.0.0,>=0.21.1; extra == "dev"
Requires-Dist: pytest-timeout<3.0.0,>=2.2.0; extra == "dev"
Requires-Dist: pytest-xdist<4.0.0,>=3.3.1; extra == "dev"
Requires-Dist: pytest-html<5.0.0,>=4.1.1; extra == "dev"
Requires-Dist: pytest-benchmark<6.0.0,>=5.1.0; extra == "dev"
Requires-Dist: coverage<8.0.0,>=7.3.2; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Requires-Dist: moto[all]<6.0.0,>=5.1.19; extra == "dev"
Requires-Dist: responses<1.0.0,>=0.24.0; extra == "dev"
Requires-Dist: requests-mock<2.0.0,>=1.11.0; extra == "dev"
Requires-Dist: joserfc>=1.6.1; extra == "dev"
Requires-Dist: werkzeug>=3.1.6; extra == "dev"
Requires-Dist: nltk>=3.9.3; extra == "dev"
Requires-Dist: gitpython>=3.1.52; extra == "dev"
Requires-Dist: watchdog; extra == "dev"
Requires-Dist: tenacity; extra == "dev"
Requires-Dist: pg8000; extra == "dev"
Requires-Dist: kmock>=0.7; extra == "dev"
Requires-Dist: mkdocs<2.0.0,>=1.5.0; extra == "dev"
Requires-Dist: mkdocs-material<10.0.0,>=9.1.0; extra == "dev"
Requires-Dist: mkdocstrings<2.0.0,>=0.22.0; extra == "dev"
Requires-Dist: mkdocstrings-python<3.0.0,>=1.1.0; extra == "dev"
Requires-Dist: mkdocs-gen-files<1.0.0,>=0.5.0; extra == "dev"
Requires-Dist: mkdocs-literate-nav<1.0.0,>=0.6.0; extra == "dev"
Requires-Dist: mkdocs-section-index<1.0.0,>=0.3.0; extra == "dev"
Requires-Dist: mike<3.0.0,>=1.1.0; extra == "dev"
Requires-Dist: bandit<2.0.0,>=1.7.5; extra == "dev"
Requires-Dist: bandit-sarif-formatter<2.0.0,>=1.1.1; extra == "dev"
Requires-Dist: safety<4.0.0,>=3.7.0; extra == "dev"
Requires-Dist: pip-audit<3.0.0,>=2.6.1; extra == "dev"
Requires-Dist: cyclonedx-bom<8.0.0,>=4.0.0; extra == "dev"
Requires-Dist: peewee>=3.18.3; extra == "dev"
Requires-Dist: marshmallow>=4.1.2; extra == "dev"
Requires-Dist: lxml>=6.1.0; extra == "dev"
Requires-Dist: build<2.0.0,>=1.0.3; extra == "dev"
Requires-Dist: wheel<1.0.0,>=0.41.3; extra == "dev"
Requires-Dist: virtualenv>=20.26.6; extra == "dev"
Requires-Dist: pre-commit<5.0.0,>=3.5.0; extra == "dev"
Requires-Dist: bump2version<2.0.0,>=1.0.1; extra == "dev"
Requires-Dist: python-semantic-release<11.0.0,>=10.0.0; extra == "dev"
Requires-Dist: line-profiler<6.0.0,>=4.1.1; extra == "dev"
Requires-Dist: memory-profiler<1.0.0,>=0.61.0; extra == "dev"
Requires-Dist: py-spy<1.0.0,>=0.3.14; extra == "dev"
Requires-Dist: py-cpuinfo<10.0.0,>=9.0.0; extra == "dev"
Requires-Dist: ipdb<1.0.0,>=0.13.13; extra == "dev"
Requires-Dist: ipython<9.0.0,>=8.16.1; extra == "dev"
Requires-Dist: radon<7.0.0,>=6.0.1; extra == "dev"
Requires-Dist: pip-tools<8.0.0,>=7.3.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: git-changelog<3.0.0,>=2.6.0; extra == "dev"
Dynamic: license-file

[![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/incubating)

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/finos/open-resource-broker/main/docs/assets/orb-logo-horizontal-dark.svg">
    <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/finos/open-resource-broker/main/docs/assets/orb-logo-horizontal.svg">
    <img alt="Open Resource Broker" src="https://raw.githubusercontent.com/finos/open-resource-broker/main/docs/assets/orb-logo-horizontal.svg" width="520">
  </picture>
</p>

<p align="center">
  <strong>Unified API for orchestrating and provisioning compute capacity</strong>
</p>

<p align="center">
  <a href="LICENSE"><img src="https://img.shields.io/github/license/finos/open-resource-broker" alt="License"></a>
  <a href="https://pypi.org/project/orb-py/"><img src="https://img.shields.io/pypi/v/orb-py" alt="PyPI Version"></a>
  <a href="https://github.com/finos/open-resource-broker/releases"><img src="https://img.shields.io/github/v/release/finos/open-resource-broker" alt="Latest Release"></a>
  <a href="https://pypi.org/project/orb-py/"><img src="https://img.shields.io/pypi/pyversions/orb-py" alt="Python Versions"></a>
  <a href="https://deepwiki.com/finos/open-resource-broker"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
  <br>
  <a href="https://github.com/finos/open-resource-broker/actions/workflows/ci-tests.yml"><img src="https://github.com/finos/open-resource-broker/actions/workflows/ci-tests.yml/badge.svg" alt="Unit Tests"></a>
  <a href="https://github.com/finos/open-resource-broker/actions/workflows/ci-quality.yml"><img src="https://github.com/finos/open-resource-broker/actions/workflows/ci-quality.yml/badge.svg" alt="Quality Checks"></a>
  <a href="https://github.com/finos/open-resource-broker/actions/workflows/security-code.yml"><img src="https://github.com/finos/open-resource-broker/actions/workflows/security-code.yml/badge.svg" alt="Security Scanning"></a>
  <a href="https://github.com/finos/open-resource-broker/actions/workflows/docs.yml"><img src="https://github.com/finos/open-resource-broker/actions/workflows/docs.yml/badge.svg" alt="Documentation"></a>
  <br>
  <a href="https://codecov.io/gh/finos/open-resource-broker"><img src="https://codecov.io/gh/finos/open-resource-broker/graph/badge.svg" alt="Coverage"></a>
  <a href="https://scorecard.dev/viewer/?uri=github.com/finos/open-resource-broker"><img src="https://api.securityscorecards.dev/projects/github.com/finos/open-resource-broker/badge" alt="OpenSSF Scorecard"></a>
  <a href="https://www.bestpractices.dev/projects/13611"><img src="https://www.bestpractices.dev/projects/13611/badge" alt="OpenSSF Best Practices"></a>
</p>

---

Open Resource Broker (ORB) is a unified API for orchestrating and provisioning compute capacity programmatically. Define what you need in a template, request it, track it, return it — through a CLI, REST API, MCP server, or native SDKs in six languages (Python, Go, TypeScript, Java, Kotlin, .NET).

Built for AWS today (EC2, Auto Scaling Groups, SpotFleet, EC2Fleet, Lambda MicroVMs), with an extensible provider system for adding new cloud backends.

**Provider support:**
- **AWS** — EC2 RunInstances, EC2Fleet, SpotFleet, Auto Scaling Groups, Lambda MicroVMs
- **Kubernetes** — Pod, Deployment, StatefulSet, Job (`pip install "orb-py[k8s]"`; see [Kubernetes provider docs](docs/root/providers/k8s/index.md))
- **Custom** — extensible via [provider registry](docs/root/developer_guide/architecture.md) and the [`orb.providers` entry-point group](docs/root/providers/k8s/plugin-authoring.md)

**Scheduler support:**
- **HostFactory** — runs as an [IBM Spectrum Symphony provider plugin](#hostfactory-integration)
- **Standalone** — direct usage without an external scheduler

![ORB](./ORB.gif)

## Quick Start

```bash
pip install orb-py
orb init
orb templates generate
```

### 1. Pick a template

```bash
orb templates list
```

### 2. Request machines

```bash
orb machines request <template-id> 3
```

### 3. Check status

```bash
orb requests status <request-id>
```

### 4. Return machines when done

```bash
orb machines return <machine-id-1> <machine-id-2> ...
```

### 5. Check the return status

`machines return` prints a return-request id; check it the same way as step 3:

```bash
orb requests status <return-request-id>
```

## Setup

Get ORB installed and configured for your environment.

<details>
<summary>Installation</summary>

### Standard install (core only — no provider)

```bash
pip install orb-py
```

ORB boots cleanly with no provider registered.  Any command that needs a provider
will return a clear "no provider configured" error rather than an ImportError.

### Per-provider install

```bash
pip install "orb-py[aws]"          # AWS provider (boto3 + botocore)
pip install "orb-py[k8s]"   # Kubernetes provider (kubernetes SDK)
pip install "orb-py[aws,cli]"      # AWS provider + colored CLI output
pip install "orb-py[aws,api]"      # AWS provider + REST API server
pip install "orb-py[monitoring-aws]"  # AWS provider + full monitoring stack
pip install "orb-py[all]"          # All providers + all features
```

### Provider extras matrix

| Use case | Install command |
|----------|----------------|
| Core only (no provider) | `pip install orb-py` |
| AWS operator | `pip install "orb-py[aws]"` |
| Kubernetes operator | `pip install "orb-py[k8s]"` |
| AWS + Kubernetes | `pip install "orb-py[aws,k8s]"` |
| AWS + colored CLI | `pip install "orb-py[aws,cli]"` |
| AWS + REST API | `pip install "orb-py[aws,api]"` |
| AWS + monitoring | `pip install "orb-py[monitoring-aws]"` |
| Full (all providers + features) | `pip install "orb-py[all]"` |

### With colored CLI output

```bash
pip install "orb-py[cli]"
```

### With REST API server

```bash
pip install "orb-py[api]"
```

### With monitoring and observability

```bash
pip install "orb-py[monitoring]"
```

### Full install (all extras)

```bash
pip install "orb-py[all]"
```

Requires Python 3.10+.

</details>

<details>
<summary>Configuration</summary>

`orb init` creates a `config.json` in a location based on your install type (virtualenv, user install, system install, or development checkout). Override with:

```bash
export ORB_CONFIG_DIR=/path/to/config
```

| Variable | Description |
|---|---|
| `ORB_ROOT_DIR` | Set base directory for all subdirs (config, work, logs, health, scripts) |
| `ORB_CONFIG_DIR` | Override config directory path (takes precedence over `ORB_ROOT_DIR`) |
| `ORB_WORK_DIR` | Override work directory path (takes precedence over `ORB_ROOT_DIR`) |
| `ORB_LOG_DIR` | Override logs directory path (takes precedence over `ORB_ROOT_DIR`) |
| `ORB_HEALTH_DIR` | Override health directory path (takes precedence over `ORB_ROOT_DIR`) |
| `ORB_LOG_LEVEL` | Logging level: `DEBUG`, `INFO`, `WARNING`, `ERROR` |

See the [Configuration Guide](docs/root/user_guide/configuration.md) for path resolution details, environment variables, and REST API server setup.

</details>

<details>
<summary>AWS Provider Setup</summary>

ORB uses boto3's standard credential chain — any method that works with the AWS CLI works with ORB.

```bash
# Verify your credentials are active
aws sts get-caller-identity
```

**Supported credential methods:** AWS CLI profiles, environment variables (`AWS_ACCESS_KEY_ID`/`AWS_SECRET_ACCESS_KEY`), IAM instance profiles, SSO (`aws sso login`), and credential process.

### Supported resource types

| Type | Description |
|---|---|
| `RunInstances` | Direct EC2 instance provisioning |
| `EC2Fleet` | Fleet provisioning with mixed instance types |
| `SpotFleet` | Cost-optimized spot instance fleets |
| `AutoScalingGroup` | Managed scaling groups |
| `MicroVM` | Isolated Lambda MicroVM sandboxes for untrusted code |

See the [AWS Provider Guide](docs/root/user_guide/configuration.md) for required IAM permissions and SpotFleet service-linked role setup. See the [MicroVM Provider Guide](docs/root/providers/aws/microvm.md) for Lambda MicroVM setup.

</details>

<details>
<summary>Kubernetes Provider Setup</summary>

ORB uses the standard Kubernetes client credential chain — any context that works with `kubectl` works with ORB. Running in-cluster, it auto-detects the mounted service account; running outside, it reads your `KUBECONFIG` and current context.

```bash
# Verify your context is active
kubectl config current-context
```

**Supported credential methods:** `KUBECONFIG` contexts, the default `~/.kube/config`, and in-cluster service accounts (auto-detected). See [provider discovery](docs/root/providers/k8s/discovery.md) for the detection order.

### Supported resource types

| Type | Description |
|---|---|
| `Pod` | Single-pod provisioning |
| `Deployment` | Replica-managed stateless workloads |
| `StatefulSet` | Stable-identity stateful workloads |
| `Job` | Run-to-completion batch workloads |

Install with `pip install "orb-py[k8s]"`. Minimum RBAC is in [`docs/root/providers/k8s/rbac.yaml`](docs/root/providers/k8s/rbac.yaml); see the [Kubernetes Provider Guide](docs/root/providers/k8s/index.md) for full setup.

</details>

## Interfaces

ORB provides multiple ways to interact with your infrastructure — a CLI, a REST API, an MCP server, and native SDKs in six languages.

<details>
<summary>CLI Reference</summary>

All available commands and flags.

| Command | Description |
|---|---|
| `orb init` | Initialize config and discover AWS infrastructure |
| `orb init --non-interactive` | Initialize without interactive prompts |
| `orb templates generate` | Generate example templates for your provider |
| `orb templates list` | List available templates |
| `orb templates list --format table` | Table view |
| `orb templates show <template-id>` | Show a single template |
| `orb templates validate --file <file>` | Validate a template file |
| `orb machines request <template-id> <n>` | Request n machines |
| `orb machines list` | List active machines |
| `orb machines return <machine-id> [...]` | Return one or more machines |
| `orb requests status <request-id>` | Check request status |
| `orb requests list` | List all requests |
| `orb infrastructure show` | Show configured infrastructure |
| `orb infrastructure discover` | Scan AWS for VPCs, subnets, security groups |
| `orb infrastructure validate` | Verify infrastructure still exists in AWS |
| `orb config show` | Show current configuration |
| `orb config validate` | Validate configuration |
| `orb providers list` | List configured providers |
| `orb system health` | System health check |
| `orb system health --detailed` | Detailed health check |

Request status values: `pending`, `in_progress`, `completed`, `failed`, `cancelled`, `partial`, `timeout`.

See the [CLI Reference](docs/root/cli/cli-reference.md) for the full flag reference.

</details>

<details>
<summary>REST API</summary>

Example API calls. Requires `pip install "orb-py[api]"` and `orb server start` (add `--foreground` for an in-shell variant).

```bash
# Get available templates
curl -X GET "http://localhost:8000/api/v1/templates"

# Create machine request
curl -X POST "http://localhost:8000/api/v1/requests" \
  -H "Content-Type: application/json" \
  -d '{"templateId": "my-template", "maxNumber": 5}'

# Check request status
curl -X GET "http://localhost:8000/api/v1/requests/req-12345"
```

</details>

<details>
<summary>SDKs (Python, Go, TypeScript, Java, Kotlin, .NET)</summary>

Native client libraries in six languages. Python is async-first and in-process; the other five drive a managed `orb` server over a local socket, so they share one OpenAPI contract and behave identically.

| Language | Install | Entry point |
|---|---|---|
| Python | `pip install orb-py` | `orb.ORBClient` |
| Go | `go get github.com/finos/open-resource-broker/sdk/go` | `orb.Client` |
| TypeScript / Node | `npm install @finos/open-resource-broker` | `OrbClient` |
| Java | `org.finos.openresourcebroker:open-resource-broker-java` | `OrbClient` |
| Kotlin | `org.finos.openresourcebroker:open-resource-broker-kotlin` | `OrbClient` |
| .NET / C# | `dotnet add package FINOS.OpenResourceBroker` | `OrbClient` |

```python
from orb import ORBClient as orb

async with orb(provider="aws") as sdk:
    templates = await sdk.list_templates(active_only=True)
    request = await sdk.request_machines(
        template_id=templates["templates"][0]["template_id"],
        count=3,
    )
    status = await sdk.get_request_status(request_id=request["request_id"])
```

See the [SDK documentation](docs/root/sdk/index.md) for per-language install and usage guides, the [Python SDK Quickstart](docs/root/sdk/quickstart.md), and [Generate Your Own SDK](docs/root/sdk/generating-sdks.md).

</details>

<details>
<summary>MCP Server (AI Assistant Integration)</summary>

ORB provides a Model Context Protocol (MCP) server for AI assistant integration:

```bash
# Start MCP server in stdio mode (for AI assistants)
orb mcp serve --stdio

# Start as TCP server (for development/testing)
orb mcp serve --port 3000 --host localhost
```

**Available MCP Tools:**
- Provider Management: `check_provider_health`, `list_providers`, `get_provider_config`
- Template Operations: `list_templates`, `get_template`, `validate_template`
- Infrastructure Requests: `request_machines`, `get_request_status`, `return_machines`

**Available MCP Resources:**
- `templates://` — Available compute templates
- `requests://` — Provisioning requests
- `machines://` — Compute instances
- `providers://` — Cloud providers

**Claude Desktop Configuration:**
```json
{
  "mcpServers": {
    "open-resource-broker": {
      "command": "orb",
      "args": ["mcp", "serve", "--stdio"]
    }
  }
}
```

</details>

## Integrations

Connect ORB to schedulers and container platforms.

<details>
<summary>HostFactory Integration</summary>

ORB integrates with IBM Spectrum Symphony as a HostFactory provider plugin, providing full API compatibility through shell scripts:

| Script | Description |
|---|---|
| `getAvailableTemplates.sh` | List available compute templates |
| `requestMachines.sh` | Request new compute instances |
| `getRequestStatus.sh` | Poll request status |
| `requestReturnMachines.sh` | Return instances |
| `getReturnRequests.sh` | Check return request status |

Scripts are available for both Linux (bash) and Windows (bat). They are generated automatically by `orb init` and placed in your config directory.

**Key features:**
- Full HostFactory API compatibility
- Automatic CPU and RAM attribute generation from AWS instance types
- Native HostFactory output format (camelCase JSON)
- Drop-in replacement for existing provider plugins

Example template output:

```json
{
  "templates": [
    {
      "templateId": "t3-medium-template",
      "maxNumber": 5,
      "attributes": {
        "type": ["String", "X86_64"],
        "ncpus": ["Numeric", "2"],
        "nram": ["Numeric", "4096"]
      }
    }
  ]
}
```

See the [HostFactory Guide](docs/root/hostfactory/integration_guide.md) for full integration details.

</details>

<details>
<summary>Docker Deployment</summary>

Run ORB as a containerized service.

```bash
git clone https://github.com/finos/open-resource-broker.git
cd open-resource-broker
cp .env.example .env
# Edit .env with your configuration
docker-compose up -d
curl http://localhost:8000/health
```

</details>

<details>
<summary>Symphony HostFactory on Kubernetes (legacy)</summary>

The `k8s-legacy` module is a Symphony HostFactory custom provider plugin for Kubernetes, predating the modern multi-cloud ORB architecture.  It is now bundled with `orb-py` as an optional install extra rather than as a separate PyPI package.

Install with:

```bash
pip install "orb-py[k8s-legacy]"
```

Confirm the install by listing available templates:

```bash
orb k8s-legacy get-available-templates
```

The plugin is in maintenance mode.  A modern Kubernetes provider with native ORB integration is in development; existing deployments remain fully supported.

- **Upgrading from `open-resource-broker`?** See the [migration guide](docs/root/operational/from-open-resource-broker.md).
- **Deploying the Symphony HF plugin?** See the [k8s-legacy deployment guide](k8s-legacy/README.md).

</details>

## Project

Architecture, development, and documentation.

<details>
<summary>Architecture</summary>

ORB is built on Clean Architecture with Domain-Driven Design (DDD) and CQRS:

- **Domain layer** — pure business logic, no infrastructure dependencies
- **Application layer** — command/query handlers using abstract ports
- **Infrastructure layer** — AWS adapters, DI container, storage strategies
- **Interface layer** — CLI, REST API, MCP server

The **provider system** uses a Strategy/Registry pattern — each cloud provider (AWS, future providers) registers its own strategy, handlers, and template format. The **scheduler system** uses the same pattern — HostFactory and Default schedulers are interchangeable strategies behind a common port.

See the [Architecture Guide](docs/root/developer_guide/architecture.md) for details.

</details>

<details>
<summary>Development</summary>

Set up a local development environment.

```bash
git clone https://github.com/finos/open-resource-broker.git
cd open-resource-broker
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
```

Run the test suite:

```bash
make test
```

Lint and format:

```bash
make lint
make format
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for the full development guide.

</details>

<details>
<summary>Documentation & CI</summary>

- [Quick Start](docs/root/getting_started/quick_start.md)
- [CLI Reference](docs/root/cli/cli-reference.md)
- [Configuration Guide](docs/root/user_guide/configuration.md)
- [Template Management](docs/root/user_guide/templates.md)
- [Troubleshooting](docs/root/user_guide/troubleshooting.md)
- [Architecture](docs/root/developer_guide/architecture.md)
- [API Reference](docs/root/api/readme.md)
- [Deployment](docs/root/deployment/readme.md)
- [DeepWiki](https://deepwiki.com/finos/open-resource-broker) — AI-generated codebase documentation

Full docs: [finos.github.io/open-resource-broker](https://finos.github.io/open-resource-broker/)

</details>

---

## License

Apache License 2.0 — see [LICENSE](LICENSE).

## Security

See [SECURITY.md](SECURITY.md) for responsible disclosure procedures.
