refua-deploy 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- refua_deploy-0.6.0/LICENSE +21 -0
- refua_deploy-0.6.0/PKG-INFO +271 -0
- refua_deploy-0.6.0/README.md +245 -0
- refua_deploy-0.6.0/pyproject.toml +67 -0
- refua_deploy-0.6.0/src/refua_deploy/__init__.py +5 -0
- refua_deploy-0.6.0/src/refua_deploy/autodetect.py +489 -0
- refua_deploy-0.6.0/src/refua_deploy/bootstrap.py +203 -0
- refua_deploy-0.6.0/src/refua_deploy/cli.py +225 -0
- refua_deploy-0.6.0/src/refua_deploy/config.py +670 -0
- refua_deploy-0.6.0/src/refua_deploy/integration.py +118 -0
- refua_deploy-0.6.0/src/refua_deploy/models.py +156 -0
- refua_deploy-0.6.0/src/refua_deploy/planner.py +124 -0
- refua_deploy-0.6.0/src/refua_deploy/renderers.py +717 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JJ Ben-Joseph
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: refua-deploy
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: Deployment automation for Refua campaign workloads across private and public clouds.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: drug discovery,machine learning,deployment,orchestration,kubernetes,refua
|
|
8
|
+
Author: JJ Ben-Joseph
|
|
9
|
+
Author-email: jj@tensorspace.ai
|
|
10
|
+
Requires-Python: >=3.11,<3.14
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
20
|
+
Requires-Dist: pyyaml (>=6.0.1)
|
|
21
|
+
Project-URL: Documentation, https://github.com/agentcures/refua#readme
|
|
22
|
+
Project-URL: Homepage, https://agentcures.com/
|
|
23
|
+
Project-URL: Repository, https://github.com/agentcures/refua
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# refua-deploy
|
|
27
|
+
|
|
28
|
+
`refua-deploy` generates deployment bundles for running Refua campaigns across public and private clouds.
|
|
29
|
+
|
|
30
|
+
It integrates with sibling projects in this workspace:
|
|
31
|
+
|
|
32
|
+
- `ClawCures`
|
|
33
|
+
- `refua-mcp`
|
|
34
|
+
|
|
35
|
+
When these projects are present, `refua-deploy` auto-detects their versions and uses matching default image tags.
|
|
36
|
+
|
|
37
|
+
## Super Simple
|
|
38
|
+
|
|
39
|
+
If you just want it working with sensible defaults:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
cd refua-deploy
|
|
43
|
+
poetry install
|
|
44
|
+
poetry run refua-deploy init --output deploy.yaml --name refua-prod --visibility public --provider aws
|
|
45
|
+
poetry run refua-deploy render --config deploy.yaml --output-dir dist
|
|
46
|
+
bash dist/bootstrap/cluster-bootstrap.sh
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
What this does automatically:
|
|
50
|
+
|
|
51
|
+
- Picks Kubernetes as orchestrator for public cloud.
|
|
52
|
+
- Enables network auto-discovery and fills ingress/host/origin defaults.
|
|
53
|
+
- Enables cluster bootstrap artifact generation.
|
|
54
|
+
- Enables GPU `auto` mode by default.
|
|
55
|
+
- Detects local `ClawCures` and `refua-mcp` versions for image tags.
|
|
56
|
+
|
|
57
|
+
## Goals
|
|
58
|
+
|
|
59
|
+
- Minimal required inputs.
|
|
60
|
+
- Automatic network defaults.
|
|
61
|
+
- Automatic cluster bootstrap artifacts.
|
|
62
|
+
- GPU support that is transparent by default.
|
|
63
|
+
|
|
64
|
+
## Features
|
|
65
|
+
|
|
66
|
+
- Validated deployment config for:
|
|
67
|
+
- Public cloud providers: `aws`, `gcp`, `azure`, `oci`, `digitalocean`, `linode`, `vultr`, `hetzner`, `ibm`, `alibaba`, `scaleway`, `exoscale`
|
|
68
|
+
- Private cloud providers: `onprem`, `openstack`, `vmware`, `baremetal`, `proxmox`, `nutanix`
|
|
69
|
+
- Runtime target selection:
|
|
70
|
+
- `kubernetes` renderer
|
|
71
|
+
- `compose` renderer
|
|
72
|
+
- Automatic network inference:
|
|
73
|
+
- Ingress host from explicit config, env, or inferred metadata defaults
|
|
74
|
+
- Allowed hosts/origins inferred when omitted
|
|
75
|
+
- Automatic bootstrap artifacts (Kubernetes targets):
|
|
76
|
+
- `bootstrap/cluster-bootstrap.sh`
|
|
77
|
+
- `bootstrap/metadata.auto.json`
|
|
78
|
+
- `bootstrap/network.auto.env`
|
|
79
|
+
- Kubernetes bundle renderer:
|
|
80
|
+
- Namespace
|
|
81
|
+
- ConfigMap
|
|
82
|
+
- Secret templates
|
|
83
|
+
- Campaign output PVC
|
|
84
|
+
- `refua-mcp` Deployment + Service
|
|
85
|
+
- `ClawCures` CronJob
|
|
86
|
+
- Optional Ingress
|
|
87
|
+
- Optional NetworkPolicy
|
|
88
|
+
- `kustomization.yaml`
|
|
89
|
+
- Compose bundle renderer:
|
|
90
|
+
- `refua_mcp` service
|
|
91
|
+
- `campaign_runner` service
|
|
92
|
+
- `.env.template`
|
|
93
|
+
- GPU-aware deployment controls:
|
|
94
|
+
- `gpu.mode=auto` (default): GPU-friendly scheduling/runtime hints with CPU fallback.
|
|
95
|
+
- `gpu.mode=required`: hard GPU requests/limits for Kubernetes and `gpus: all` for Compose.
|
|
96
|
+
- `gpu.mode=off`: disables GPU behavior.
|
|
97
|
+
- Plan output (`plan.json`) for CI/CD review and approvals.
|
|
98
|
+
|
|
99
|
+
## Install
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cd refua-deploy
|
|
103
|
+
poetry install
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Quick Start
|
|
107
|
+
|
|
108
|
+
Generate a starter config with maximum automation:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
poetry run refua-deploy init \
|
|
112
|
+
--output deploy/public.yaml \
|
|
113
|
+
--name refua-oncology-prod \
|
|
114
|
+
--visibility public \
|
|
115
|
+
--provider aws \
|
|
116
|
+
--orchestrator kubernetes \
|
|
117
|
+
--provisioning-level auto \
|
|
118
|
+
--gpu-mode auto \
|
|
119
|
+
--gpu-vendor nvidia
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Validate and preview plan:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
poetry run refua-deploy plan \
|
|
126
|
+
--config deploy/public.yaml \
|
|
127
|
+
--output deploy/plan.json
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Render artifacts:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
poetry run refua-deploy render \
|
|
134
|
+
--config deploy/public.yaml \
|
|
135
|
+
--output-dir dist/public
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Run generated bootstrap script:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
bash dist/public/bootstrap/cluster-bootstrap.sh
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Private cloud with compose:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
poetry run refua-deploy init \
|
|
148
|
+
--output deploy/private.yaml \
|
|
149
|
+
--visibility private \
|
|
150
|
+
--provider onprem \
|
|
151
|
+
--orchestrator compose
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Private cloud with Kubernetes (for example k3s/rke2):
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
poetry run refua-deploy init \
|
|
158
|
+
--output deploy/private-k8s.yaml \
|
|
159
|
+
--visibility private \
|
|
160
|
+
--provider vmware \
|
|
161
|
+
--orchestrator kubernetes
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Metadata Auto-Discovery
|
|
165
|
+
|
|
166
|
+
`refua-deploy` can infer network/cluster context from:
|
|
167
|
+
|
|
168
|
+
- Explicit config values (highest priority)
|
|
169
|
+
- Environment variables
|
|
170
|
+
- Cloud metadata endpoints (when enabled)
|
|
171
|
+
|
|
172
|
+
Control flag:
|
|
173
|
+
|
|
174
|
+
- `REFUA_DEPLOY_ENABLE_METADATA_HTTP=0` disables HTTP metadata probing.
|
|
175
|
+
|
|
176
|
+
Useful environment overrides:
|
|
177
|
+
|
|
178
|
+
- `REFUA_INGRESS_HOST`
|
|
179
|
+
- `REFUA_PUBLIC_IP`
|
|
180
|
+
- `REFUA_PRIVATE_IP`
|
|
181
|
+
- `REFUA_AWS_VPC_ID`
|
|
182
|
+
- `REFUA_AWS_SUBNET_IDS`
|
|
183
|
+
- `REFUA_GCP_NETWORK`
|
|
184
|
+
- `REFUA_GCP_SUBNETWORK`
|
|
185
|
+
- `REFUA_AZURE_RESOURCE_GROUP`
|
|
186
|
+
|
|
187
|
+
## Config Schema
|
|
188
|
+
|
|
189
|
+
Top-level keys:
|
|
190
|
+
|
|
191
|
+
- `name`
|
|
192
|
+
- `cloud.visibility`
|
|
193
|
+
- `cloud.provider`
|
|
194
|
+
- `openclaw.base_url` (required)
|
|
195
|
+
- `runtime`:
|
|
196
|
+
- `namespace`
|
|
197
|
+
- `orchestrator` (`kubernetes` or `compose`)
|
|
198
|
+
- `campaign`
|
|
199
|
+
- `mcp`
|
|
200
|
+
- `kubernetes`:
|
|
201
|
+
- `distribution` (`eks`, `gke`, `aks`, `oke`, `doks`, `lke`, `vke`, `hke`, `iks`, `ack`, `ske`, `k3s`, `rke2`, `openshift`, `talos`, `kubeadm`, `generic`)
|
|
202
|
+
- `service_type` (`ClusterIP`, `NodePort`, `LoadBalancer`)
|
|
203
|
+
- `ingress_class`
|
|
204
|
+
- `storage_class`
|
|
205
|
+
- `create_network_policy`
|
|
206
|
+
- `namespace_annotations`
|
|
207
|
+
- `gpu`:
|
|
208
|
+
- `mode` (`off`, `auto`, `required`)
|
|
209
|
+
- `vendor` (`nvidia`, `amd`, `intel`)
|
|
210
|
+
- `count`
|
|
211
|
+
- `resource_name`
|
|
212
|
+
- `mcp_enabled`
|
|
213
|
+
- `campaign_enabled`
|
|
214
|
+
- `node_selector`
|
|
215
|
+
- `toleration_key`
|
|
216
|
+
- `automation`:
|
|
217
|
+
- `auto_discover_network`
|
|
218
|
+
- `bootstrap_cluster`
|
|
219
|
+
- `provisioning_level` (`manual`, `assisted`, `auto`)
|
|
220
|
+
- `cluster_name`
|
|
221
|
+
- `kubernetes_version`
|
|
222
|
+
- `node_count`
|
|
223
|
+
- `node_instance_type`
|
|
224
|
+
- `node_disk_gb`
|
|
225
|
+
- `network`
|
|
226
|
+
- `security`
|
|
227
|
+
- `storage`
|
|
228
|
+
|
|
229
|
+
Examples:
|
|
230
|
+
|
|
231
|
+
- `examples/public_aws.yaml`
|
|
232
|
+
- `examples/private_onprem.yaml`
|
|
233
|
+
|
|
234
|
+
## Integration Details
|
|
235
|
+
|
|
236
|
+
Generated artifacts follow existing Refua runtime contracts:
|
|
237
|
+
|
|
238
|
+
- Campaign env vars:
|
|
239
|
+
- `REFUA_CAMPAIGN_OPENCLAW_BASE_URL`
|
|
240
|
+
- `REFUA_CAMPAIGN_OPENCLAW_MODEL`
|
|
241
|
+
- `REFUA_CAMPAIGN_TIMEOUT_SECONDS`
|
|
242
|
+
- `OPENCLAW_GATEWAY_TOKEN`
|
|
243
|
+
- MCP runtime env vars:
|
|
244
|
+
- `REFUA_MCP_TRANSPORT`
|
|
245
|
+
- `REFUA_MCP_HOST`
|
|
246
|
+
- `REFUA_MCP_PORT`
|
|
247
|
+
- `REFUA_MCP_ALLOWED_HOSTS`
|
|
248
|
+
- `REFUA_MCP_ALLOWED_ORIGINS`
|
|
249
|
+
- `REFUA_MCP_AUTH_TOKENS`
|
|
250
|
+
- GPU runtime env vars:
|
|
251
|
+
- `REFUA_GPU_MODE`
|
|
252
|
+
- `REFUA_GPU_VENDOR`
|
|
253
|
+
- `REFUA_GPU_COUNT`
|
|
254
|
+
- vendor hints like `CUDA_VISIBLE_DEVICES`, `NVIDIA_VISIBLE_DEVICES` where relevant
|
|
255
|
+
|
|
256
|
+
## Development
|
|
257
|
+
|
|
258
|
+
Run checks:
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
poetry run ruff check src tests
|
|
262
|
+
poetry run mypy src
|
|
263
|
+
poetry run pytest
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Build package:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
poetry build
|
|
270
|
+
```
|
|
271
|
+
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# refua-deploy
|
|
2
|
+
|
|
3
|
+
`refua-deploy` generates deployment bundles for running Refua campaigns across public and private clouds.
|
|
4
|
+
|
|
5
|
+
It integrates with sibling projects in this workspace:
|
|
6
|
+
|
|
7
|
+
- `ClawCures`
|
|
8
|
+
- `refua-mcp`
|
|
9
|
+
|
|
10
|
+
When these projects are present, `refua-deploy` auto-detects their versions and uses matching default image tags.
|
|
11
|
+
|
|
12
|
+
## Super Simple
|
|
13
|
+
|
|
14
|
+
If you just want it working with sensible defaults:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cd refua-deploy
|
|
18
|
+
poetry install
|
|
19
|
+
poetry run refua-deploy init --output deploy.yaml --name refua-prod --visibility public --provider aws
|
|
20
|
+
poetry run refua-deploy render --config deploy.yaml --output-dir dist
|
|
21
|
+
bash dist/bootstrap/cluster-bootstrap.sh
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
What this does automatically:
|
|
25
|
+
|
|
26
|
+
- Picks Kubernetes as orchestrator for public cloud.
|
|
27
|
+
- Enables network auto-discovery and fills ingress/host/origin defaults.
|
|
28
|
+
- Enables cluster bootstrap artifact generation.
|
|
29
|
+
- Enables GPU `auto` mode by default.
|
|
30
|
+
- Detects local `ClawCures` and `refua-mcp` versions for image tags.
|
|
31
|
+
|
|
32
|
+
## Goals
|
|
33
|
+
|
|
34
|
+
- Minimal required inputs.
|
|
35
|
+
- Automatic network defaults.
|
|
36
|
+
- Automatic cluster bootstrap artifacts.
|
|
37
|
+
- GPU support that is transparent by default.
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- Validated deployment config for:
|
|
42
|
+
- Public cloud providers: `aws`, `gcp`, `azure`, `oci`, `digitalocean`, `linode`, `vultr`, `hetzner`, `ibm`, `alibaba`, `scaleway`, `exoscale`
|
|
43
|
+
- Private cloud providers: `onprem`, `openstack`, `vmware`, `baremetal`, `proxmox`, `nutanix`
|
|
44
|
+
- Runtime target selection:
|
|
45
|
+
- `kubernetes` renderer
|
|
46
|
+
- `compose` renderer
|
|
47
|
+
- Automatic network inference:
|
|
48
|
+
- Ingress host from explicit config, env, or inferred metadata defaults
|
|
49
|
+
- Allowed hosts/origins inferred when omitted
|
|
50
|
+
- Automatic bootstrap artifacts (Kubernetes targets):
|
|
51
|
+
- `bootstrap/cluster-bootstrap.sh`
|
|
52
|
+
- `bootstrap/metadata.auto.json`
|
|
53
|
+
- `bootstrap/network.auto.env`
|
|
54
|
+
- Kubernetes bundle renderer:
|
|
55
|
+
- Namespace
|
|
56
|
+
- ConfigMap
|
|
57
|
+
- Secret templates
|
|
58
|
+
- Campaign output PVC
|
|
59
|
+
- `refua-mcp` Deployment + Service
|
|
60
|
+
- `ClawCures` CronJob
|
|
61
|
+
- Optional Ingress
|
|
62
|
+
- Optional NetworkPolicy
|
|
63
|
+
- `kustomization.yaml`
|
|
64
|
+
- Compose bundle renderer:
|
|
65
|
+
- `refua_mcp` service
|
|
66
|
+
- `campaign_runner` service
|
|
67
|
+
- `.env.template`
|
|
68
|
+
- GPU-aware deployment controls:
|
|
69
|
+
- `gpu.mode=auto` (default): GPU-friendly scheduling/runtime hints with CPU fallback.
|
|
70
|
+
- `gpu.mode=required`: hard GPU requests/limits for Kubernetes and `gpus: all` for Compose.
|
|
71
|
+
- `gpu.mode=off`: disables GPU behavior.
|
|
72
|
+
- Plan output (`plan.json`) for CI/CD review and approvals.
|
|
73
|
+
|
|
74
|
+
## Install
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
cd refua-deploy
|
|
78
|
+
poetry install
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Quick Start
|
|
82
|
+
|
|
83
|
+
Generate a starter config with maximum automation:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
poetry run refua-deploy init \
|
|
87
|
+
--output deploy/public.yaml \
|
|
88
|
+
--name refua-oncology-prod \
|
|
89
|
+
--visibility public \
|
|
90
|
+
--provider aws \
|
|
91
|
+
--orchestrator kubernetes \
|
|
92
|
+
--provisioning-level auto \
|
|
93
|
+
--gpu-mode auto \
|
|
94
|
+
--gpu-vendor nvidia
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Validate and preview plan:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
poetry run refua-deploy plan \
|
|
101
|
+
--config deploy/public.yaml \
|
|
102
|
+
--output deploy/plan.json
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Render artifacts:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
poetry run refua-deploy render \
|
|
109
|
+
--config deploy/public.yaml \
|
|
110
|
+
--output-dir dist/public
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Run generated bootstrap script:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
bash dist/public/bootstrap/cluster-bootstrap.sh
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Private cloud with compose:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
poetry run refua-deploy init \
|
|
123
|
+
--output deploy/private.yaml \
|
|
124
|
+
--visibility private \
|
|
125
|
+
--provider onprem \
|
|
126
|
+
--orchestrator compose
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Private cloud with Kubernetes (for example k3s/rke2):
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
poetry run refua-deploy init \
|
|
133
|
+
--output deploy/private-k8s.yaml \
|
|
134
|
+
--visibility private \
|
|
135
|
+
--provider vmware \
|
|
136
|
+
--orchestrator kubernetes
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Metadata Auto-Discovery
|
|
140
|
+
|
|
141
|
+
`refua-deploy` can infer network/cluster context from:
|
|
142
|
+
|
|
143
|
+
- Explicit config values (highest priority)
|
|
144
|
+
- Environment variables
|
|
145
|
+
- Cloud metadata endpoints (when enabled)
|
|
146
|
+
|
|
147
|
+
Control flag:
|
|
148
|
+
|
|
149
|
+
- `REFUA_DEPLOY_ENABLE_METADATA_HTTP=0` disables HTTP metadata probing.
|
|
150
|
+
|
|
151
|
+
Useful environment overrides:
|
|
152
|
+
|
|
153
|
+
- `REFUA_INGRESS_HOST`
|
|
154
|
+
- `REFUA_PUBLIC_IP`
|
|
155
|
+
- `REFUA_PRIVATE_IP`
|
|
156
|
+
- `REFUA_AWS_VPC_ID`
|
|
157
|
+
- `REFUA_AWS_SUBNET_IDS`
|
|
158
|
+
- `REFUA_GCP_NETWORK`
|
|
159
|
+
- `REFUA_GCP_SUBNETWORK`
|
|
160
|
+
- `REFUA_AZURE_RESOURCE_GROUP`
|
|
161
|
+
|
|
162
|
+
## Config Schema
|
|
163
|
+
|
|
164
|
+
Top-level keys:
|
|
165
|
+
|
|
166
|
+
- `name`
|
|
167
|
+
- `cloud.visibility`
|
|
168
|
+
- `cloud.provider`
|
|
169
|
+
- `openclaw.base_url` (required)
|
|
170
|
+
- `runtime`:
|
|
171
|
+
- `namespace`
|
|
172
|
+
- `orchestrator` (`kubernetes` or `compose`)
|
|
173
|
+
- `campaign`
|
|
174
|
+
- `mcp`
|
|
175
|
+
- `kubernetes`:
|
|
176
|
+
- `distribution` (`eks`, `gke`, `aks`, `oke`, `doks`, `lke`, `vke`, `hke`, `iks`, `ack`, `ske`, `k3s`, `rke2`, `openshift`, `talos`, `kubeadm`, `generic`)
|
|
177
|
+
- `service_type` (`ClusterIP`, `NodePort`, `LoadBalancer`)
|
|
178
|
+
- `ingress_class`
|
|
179
|
+
- `storage_class`
|
|
180
|
+
- `create_network_policy`
|
|
181
|
+
- `namespace_annotations`
|
|
182
|
+
- `gpu`:
|
|
183
|
+
- `mode` (`off`, `auto`, `required`)
|
|
184
|
+
- `vendor` (`nvidia`, `amd`, `intel`)
|
|
185
|
+
- `count`
|
|
186
|
+
- `resource_name`
|
|
187
|
+
- `mcp_enabled`
|
|
188
|
+
- `campaign_enabled`
|
|
189
|
+
- `node_selector`
|
|
190
|
+
- `toleration_key`
|
|
191
|
+
- `automation`:
|
|
192
|
+
- `auto_discover_network`
|
|
193
|
+
- `bootstrap_cluster`
|
|
194
|
+
- `provisioning_level` (`manual`, `assisted`, `auto`)
|
|
195
|
+
- `cluster_name`
|
|
196
|
+
- `kubernetes_version`
|
|
197
|
+
- `node_count`
|
|
198
|
+
- `node_instance_type`
|
|
199
|
+
- `node_disk_gb`
|
|
200
|
+
- `network`
|
|
201
|
+
- `security`
|
|
202
|
+
- `storage`
|
|
203
|
+
|
|
204
|
+
Examples:
|
|
205
|
+
|
|
206
|
+
- `examples/public_aws.yaml`
|
|
207
|
+
- `examples/private_onprem.yaml`
|
|
208
|
+
|
|
209
|
+
## Integration Details
|
|
210
|
+
|
|
211
|
+
Generated artifacts follow existing Refua runtime contracts:
|
|
212
|
+
|
|
213
|
+
- Campaign env vars:
|
|
214
|
+
- `REFUA_CAMPAIGN_OPENCLAW_BASE_URL`
|
|
215
|
+
- `REFUA_CAMPAIGN_OPENCLAW_MODEL`
|
|
216
|
+
- `REFUA_CAMPAIGN_TIMEOUT_SECONDS`
|
|
217
|
+
- `OPENCLAW_GATEWAY_TOKEN`
|
|
218
|
+
- MCP runtime env vars:
|
|
219
|
+
- `REFUA_MCP_TRANSPORT`
|
|
220
|
+
- `REFUA_MCP_HOST`
|
|
221
|
+
- `REFUA_MCP_PORT`
|
|
222
|
+
- `REFUA_MCP_ALLOWED_HOSTS`
|
|
223
|
+
- `REFUA_MCP_ALLOWED_ORIGINS`
|
|
224
|
+
- `REFUA_MCP_AUTH_TOKENS`
|
|
225
|
+
- GPU runtime env vars:
|
|
226
|
+
- `REFUA_GPU_MODE`
|
|
227
|
+
- `REFUA_GPU_VENDOR`
|
|
228
|
+
- `REFUA_GPU_COUNT`
|
|
229
|
+
- vendor hints like `CUDA_VISIBLE_DEVICES`, `NVIDIA_VISIBLE_DEVICES` where relevant
|
|
230
|
+
|
|
231
|
+
## Development
|
|
232
|
+
|
|
233
|
+
Run checks:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
poetry run ruff check src tests
|
|
237
|
+
poetry run mypy src
|
|
238
|
+
poetry run pytest
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Build package:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
poetry build
|
|
245
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["poetry-core>=1.9.0"]
|
|
3
|
+
build-backend = "poetry.core.masonry.api"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "refua-deploy"
|
|
7
|
+
version = "0.6.0"
|
|
8
|
+
description = "Deployment automation for Refua campaign workloads across private and public clouds."
|
|
9
|
+
requires-python = ">=3.11,<3.14"
|
|
10
|
+
authors = [{ name = "JJ Ben-Joseph", email = "jj@tensorspace.ai" }]
|
|
11
|
+
license = "MIT"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
keywords = [
|
|
14
|
+
"drug discovery",
|
|
15
|
+
"machine learning",
|
|
16
|
+
"deployment",
|
|
17
|
+
"orchestration",
|
|
18
|
+
"kubernetes",
|
|
19
|
+
"refua",
|
|
20
|
+
]
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Development Status :: 3 - Alpha",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
30
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
31
|
+
]
|
|
32
|
+
dependencies = ["pyyaml>=6.0.1"]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Homepage = "https://agentcures.com/"
|
|
36
|
+
Repository = "https://github.com/agentcures/refua"
|
|
37
|
+
Documentation = "https://github.com/agentcures/refua#readme"
|
|
38
|
+
|
|
39
|
+
[project.scripts]
|
|
40
|
+
refua-deploy = "refua_deploy.cli:main"
|
|
41
|
+
|
|
42
|
+
[tool.poetry]
|
|
43
|
+
packages = [{ include = "refua_deploy", from = "src" }]
|
|
44
|
+
|
|
45
|
+
[tool.poetry.group.dev.dependencies]
|
|
46
|
+
pytest = ">=8.0.0"
|
|
47
|
+
ruff = ">=0.6.0"
|
|
48
|
+
mypy = ">=1.11.0"
|
|
49
|
+
types-pyyaml = ">=6.0.12.20250915"
|
|
50
|
+
|
|
51
|
+
[tool.pytest.ini_options]
|
|
52
|
+
pythonpath = ["src"]
|
|
53
|
+
testpaths = ["tests"]
|
|
54
|
+
|
|
55
|
+
[tool.ruff]
|
|
56
|
+
line-length = 100
|
|
57
|
+
target-version = "py311"
|
|
58
|
+
|
|
59
|
+
[tool.ruff.lint]
|
|
60
|
+
select = ["E", "F", "I", "UP", "B"]
|
|
61
|
+
|
|
62
|
+
[tool.mypy]
|
|
63
|
+
python_version = "3.11"
|
|
64
|
+
warn_unused_ignores = true
|
|
65
|
+
disallow_untyped_defs = true
|
|
66
|
+
check_untyped_defs = true
|
|
67
|
+
strict_optional = true
|