Deployment automation for Refua campaign workloads across private and public clouds.
Project description
refua-deploy
refua-deploy generates deployment bundles for running Refua campaigns across public and private clouds.
It integrates with the Refua ecosystem packages:
refuarefua-datarefua-clinicalrefua-preclinicalrefua-regulatoryrefua-benchrefua-wetlabrefua-notebookrefua-mcpClawCuresrefua-studiorefua-deploy
When these projects are present, refua-deploy auto-detects their versions and can install the full Refua ecosystem (including refua-studio).
Guidebook
New to deploying the agent and Studio? See the step-by-step guidebook: GUIDEBOOK.md.
Super Simple
If you just want it working with sensible defaults:
cd refua-deploy
poetry install
poetry run refua-deploy install-ecosystem
poetry run refua-deploy init --output deploy.yaml --name refua-prod --visibility public --provider aws
poetry run refua-deploy render --config deploy.yaml --output-dir dist
bash dist/bootstrap/cluster-bootstrap.sh
What this does automatically:
- Picks Kubernetes as orchestrator for public cloud.
- Enables network auto-discovery and fills ingress/host/origin defaults.
- Enables cluster bootstrap artifact generation.
- Enables GPU
automode by default. - Installs the full Refua ecosystem from PyPI (including Studio).
- Detects local
ClawCuresandrefua-mcpversions for image tags.
Goals
- Minimal required inputs.
- Automatic network defaults.
- Automatic cluster bootstrap artifacts.
- GPU support that is transparent by default.
Features
- Validated deployment config for:
- Public cloud providers:
aws,gcp,azure,oci,digitalocean,linode,vultr,hetzner,ibm,alibaba,scaleway,exoscale - Private cloud providers:
onprem,openstack,vmware,baremetal,proxmox,nutanix
- Public cloud providers:
- Runtime target selection:
kubernetesrenderercomposerenderersingle-machinelightweight renderer
- Automatic network inference:
- Ingress host from explicit config, env, or inferred metadata defaults
- Allowed hosts/origins inferred when omitted
- Automatic bootstrap artifacts (Kubernetes targets):
bootstrap/cluster-bootstrap.shbootstrap/metadata.auto.jsonbootstrap/network.auto.env
- Kubernetes bundle renderer:
- Namespace
- ConfigMap
- Secret templates
- Campaign output PVC
ClawCuresCronJob- Optional
refua-mcpDeployment + Service (runtime.mcp.mode=service) - Optional Ingress
- Optional NetworkPolicy
kustomization.yaml
- Compose bundle renderer:
campaign_runnerservice (runsClawCureswith in-process MCP execution).env.template
- Single-machine lightweight renderer:
single-machine/install-ecosystem.shsingle-machine/.env.templatesingle-machine/run-mcp.shsingle-machine/run-campaign.shsingle-machine/run-studio.sh
- Full ecosystem installer:
install-ecosystemcommand installs the Refua ecosystem from PyPI in dependency-safe order
- GPU-aware deployment controls:
gpu.mode=auto(default): GPU-friendly scheduling/runtime hints with CPU fallback.gpu.mode=required: hard GPU requests/limits for Kubernetes andgpus: allfor Compose.gpu.mode=off: disables GPU behavior.
- Plan output (
plan.json) for CI/CD review and approvals. - Runtime lifecycle commands:
apply(render + apply manifests / compose up)status(kubectl or compose status, plus single-machine artifact status)destroy(kubectl delete / compose down)doctor(preflight diagnostics for toolchain + rendered artifacts)
Install
cd refua-deploy
poetry install
Install the full Refua ecosystem (including Studio):
poetry run refua-deploy install-ecosystem
Quick Start
Generate a starter config with maximum automation:
poetry run refua-deploy init \
--output deploy/public.yaml \
--name refua-oncology-prod \
--visibility public \
--provider aws \
--orchestrator kubernetes \
--provisioning-level auto \
--gpu-mode auto \
--gpu-vendor nvidia
Validate and preview plan:
poetry run refua-deploy plan \
--config deploy/public.yaml \
--output deploy/plan.json
Render artifacts:
poetry run refua-deploy render \
--config deploy/public.yaml \
--output-dir dist/public
Apply rendered runtime:
poetry run refua-deploy apply \
--config deploy/public.yaml \
--output-dir dist/public
Check runtime status:
poetry run refua-deploy status \
--config deploy/public.yaml \
--output-dir dist/public
Run deployment diagnostics:
poetry run refua-deploy doctor \
--config deploy/public.yaml \
--output-dir dist/public
Run generated bootstrap script:
bash dist/public/bootstrap/cluster-bootstrap.sh
Private cloud with compose:
poetry run refua-deploy init \
--output deploy/private.yaml \
--visibility private \
--provider onprem \
--orchestrator compose
Private cloud with Kubernetes (for example k3s/rke2):
poetry run refua-deploy init \
--output deploy/private-k8s.yaml \
--visibility private \
--provider vmware \
--orchestrator kubernetes
Single-machine lightweight bundle:
poetry run refua-deploy init \
--output deploy/single-machine.yaml \
--visibility private \
--provider onprem \
--orchestrator single-machine
poetry run refua-deploy render \
--config deploy/single-machine.yaml \
--output-dir dist/single-machine
Metadata Auto-Discovery
refua-deploy can infer network/cluster context from:
- Explicit config values (highest priority)
- Environment variables
- Cloud metadata endpoints (when enabled)
Control flag:
REFUA_DEPLOY_ENABLE_METADATA_HTTP=0disables HTTP metadata probing.
Useful environment overrides:
REFUA_INGRESS_HOSTREFUA_PUBLIC_IPREFUA_PRIVATE_IPREFUA_AWS_VPC_IDREFUA_AWS_SUBNET_IDSREFUA_GCP_NETWORKREFUA_GCP_SUBNETWORKREFUA_AZURE_RESOURCE_GROUP
Config Schema
Top-level keys:
namecloud.visibilitycloud.provideropenclaw.base_url(required)runtime:namespaceorchestrator(kubernetes,compose, orsingle-machine)campaignmcpmode(inprocessdefault, orservice)
kubernetes:distribution(eks,gke,aks,oke,doks,lke,vke,hke,iks,ack,ske,k3s,rke2,openshift,talos,kubeadm,generic)service_type(ClusterIP,NodePort,LoadBalancer)ingress_classstorage_classcreate_network_policynamespace_annotations
gpu:mode(off,auto,required)vendor(nvidia,amd,intel)countresource_namemcp_enabledcampaign_enablednode_selectortoleration_key
automation:auto_discover_networkbootstrap_clusterprovisioning_level(manual,assisted,auto)cluster_namekubernetes_versionnode_countnode_instance_typenode_disk_gb
networksecuritystorage
Examples:
examples/public_aws.yamlexamples/private_onprem.yaml
Integration Details
Generated artifacts follow existing Refua runtime contracts:
- Campaign env vars:
REFUA_CAMPAIGN_OPENCLAW_BASE_URLREFUA_CAMPAIGN_OPENCLAW_MODELREFUA_CAMPAIGN_TIMEOUT_SECONDSOPENCLAW_GATEWAY_TOKEN
- MCP runtime env vars (Kubernetes
refua-mcpdeployment):REFUA_MCP_TRANSPORTREFUA_MCP_HOSTREFUA_MCP_PORTREFUA_MCP_ALLOWED_HOSTSREFUA_MCP_ALLOWED_ORIGINSREFUA_MCP_AUTH_TOKENS
- Studio auth env vars (single-machine
.env.template+run-studio.sh):REFUA_STUDIO_AUTH_TOKENSREFUA_STUDIO_OPERATOR_TOKENSREFUA_STUDIO_ADMIN_TOKENS
- GPU runtime env vars:
REFUA_GPU_MODEREFUA_GPU_VENDORREFUA_GPU_COUNT- vendor hints like
CUDA_VISIBLE_DEVICES,NVIDIA_VISIBLE_DEVICESwhere relevant
Development
Run checks:
poetry run ruff check src tests
poetry run mypy src
poetry run pytest
Build package:
poetry build
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file refua_deploy-0.7.1.tar.gz.
File metadata
- Download URL: refua_deploy-0.7.1.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e3767e704b0c7619c0f12c761691ff0693e3e1bdcaf2e08f6fbf743e7aa62ca
|
|
| MD5 |
f4e98317dbb2d29e2e0e7b114d7556c0
|
|
| BLAKE2b-256 |
c5053be931e46c9b28c2d04cfd80cbb2c3b407ef6d8345b522345e89218da06c
|
File details
Details for the file refua_deploy-0.7.1-py3-none-any.whl.
File metadata
- Download URL: refua_deploy-0.7.1-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee96cc1fbcd005c08969606e86d1562ae0e4d14d5b9c08e6f0f9438d12344fe3
|
|
| MD5 |
2d472303621d2020a7e5d3fee8e5cc47
|
|
| BLAKE2b-256 |
b762c3b8a0e416a2e6f85e5329a0b60dd65e8624cc97127a3f147d519a96310d
|