Set up and manage Enclaves¶
This page describes how to prepare the Control Hub to accept Enclaves, register an Enclave with the Hub, install the Enclave components with Helm, verify the result, and deactivate, reactivate, or delete Enclaves later. To make the Enclave eligible for workloads afterward, see Enclave placement and routing.
The following table lists the setup steps and where each one runs.
| Step | Action | Where it runs |
|---|---|---|
| 1 | Configure the Control Hub | Hub Helm values |
| 2 | Register the Enclave | Hub API or dr CLI |
| 3 | Configure the Enclave | Enclave Helm values |
| 4 | Define resource bundles and queues | Hub and Enclave |
| 5 | Install the Enclave | Enclave cluster |
| 6 | Verify the installation | Hub and Enclave |
Prerequisites¶
Before registering an Enclave, confirm the following:
- A working Control Hub with the Workload API enabled.
- A Kubernetes cluster and namespace for the Enclave, with an ingress controller and a domain.
- Network egress from the Enclave namespace to the Hub on port 443.
- Access to the Hub API, either with
curl(withDATAROBOT_ENDPOINTandDATAROBOT_API_TOKENexported) or with the DataRobot CLI. Thedr enclavecommands requireexport DATAROBOT_CLI_FEATURE_ENCLAVE=true. - A system administrator account or a user account with create access.
Settings that apply to the Hub, such as a private image registry or a restricted Pod Security Standard, apply to the Enclave in the same way. If the Enclave namespace enforces the restricted Pod Security Standard or OpenShift security context constraints, set lrs-operator.operator.config.enableRestrictedSecurityContext: true in the Enclave values file.
Configure the Control Hub¶
Add the following settings to the Hub values file, alongside the settings from Enable the Workload API, and run helm upgrade on the Hub before registering an Enclave.
core:
config_env_vars:
ENABLE_COMPUTE_ENCLAVE: true
ENABLE_WORKLOAD_API_CONTAINERS: true
ENABLE_WORKLOAD_API_AGENT: true # Needed wherever agents run, on the Hub or on an Enclave.
SESSION_COOKIE_DOMAIN: <cookie-parent-domain> # Common parent domain of the Hub and its Enclaves.
workload-api:
workloads:
enclaves:
enabled: true
ingress:
enabled: false
statusMonitor:
callbackBaseUrl: "https://<hub-domain>/api/v2"
includeWorkloadPrefix: true
drApi:
webServerUrl: "https://<hub-domain>"
covalent:
workloadTrafficSwitchEnabled: true # Switches traffic to a replacement only once it is ready.
ibs: # Needed for workloads built from source instead of an imageUri.
imageRegistry: "<registry-host>" # Registry the platform uses for custom model images.
imageRepository: "<repository-path>" # Repository in that registry. On ECR, create it first.
workload-monitor:
enabled: true
drAuth:
hydraUri: https://<hub-domain>
service-registration-controller:
grpcService:
name: service-registration-controller-grpc
ingress:
enabled: true
datarobot-otel-collector:
otelGateway:
relayDoor:
enabled: true
ingress:
enabled: true
These settings add two Ingress objects to the Hub. If a load balancer or reverse proxy outside the chart publishes ingress routes, add both Ingress routes to that load balancer or proxy.
Feature flags and entitlements¶
The preceding values set the following feature flags on the Hub:
| Flag | Turns on |
|---|---|
ENABLE_COMPUTE_ENCLAVE |
Linking Enclaves to Use Cases and Enclave placement. |
ENABLE_WORKLOAD_API_CONTAINERS |
The Workload API. See Feature flags and licensing. |
ENABLE_WORKLOAD_API_AGENT |
Agent workloads, wherever they run. This flag isn't specific to Enclaves. |
ENABLE_COMPUTE_ENCLAVE and ENABLE_WORKLOAD_API_AGENT each need both of the following. Either one alone leaves the feature off.
- The Hub value shown in the preceding values file, which makes the feature available on the installation.
- The entitlement, granted to each organization that uses the feature. Contact your DataRobot representative to get the entitlement.
Register the Enclave¶
Registering an Enclave records it on the Hub and issues the one-time secrets the Enclave installs with.
Grant create access¶
System administrators can register Enclaves without a grant. To let another user register one, a system administrator in the same organization grants that user create access:
curl -s -X PATCH "${DATAROBOT_ENDPOINT}/enclaves/access" \
-H "Authorization: Bearer ${DATAROBOT_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"permission": "create", "operation": "grant", "shareRecipientType": "user", "id": "<user-id>"}'
shareRecipientType can be user, group, or organization. To remove the grant, set operation to revoke.
dr enclave permission grant --permission create --user-id <user-id>
To grant a group or an organization, use --group <group-id> or --org <org-id>. To remove the grant, run dr enclave permission revoke.
Register with the Hub¶
Register the Enclave with a name and optional labels:
curl -s -X POST "${DATAROBOT_ENDPOINT}/enclaves" \
-H "Authorization: Bearer ${DATAROBOT_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name": "enclave-east-1", "labels": {"team": "research"}}' \
> enclave.json
ENCLAVE_ID=$(jq -r '.enclaveId' enclave.json)
dr enclave register --name enclave-east-1 --label team=research
The response contains the Enclave ID and its one-time installation secrets. The Hub doesn't store the secrets, so capture them before continuing. Create the bootstrap secret on the Enclave cluster from the installation secrets:
kubectl create secret generic drauth-service-registration-controller \
--namespace <enclave-namespace> \
--from-literal=hydraClientId=<hydra-client-id> \
--from-literal=hydraClientSecret=<hydra-client-secret> \
--from-literal=serviceUserId=<service-user-id> \
--from-literal=serviceUserTenantId=<service-user-tenant-id>
Keep the Enclave ID for the Enclave values file. The Enclave activates on its own after it is installed; there is no manual activation step.
Configure the Enclave¶
Create a separate values file, enclave-values.yaml, for the Enclave release. The dr-enclave tag selects the Enclave components, and dr-services: false skips the Control Hub ones. Replace each <placeholder>; <enclave-namespace> must match the namespace you install into.
# enclave-values.yaml
tags:
dr-services: false
dr-enclave: true
global:
domain: <enclave-domain>
ingressClassName: <ingress-class>
drAuth:
hydraUri: https://<hub-domain>
elasticsearch: { internal: false }
mongodb: { internal: false }
postgresql: { internal: false }
redis: { internal: false }
rabbitmq: { internal: false }
enclave-redis: { internal: true }
installCRDs: false
envFromSecrets: []
imageRegistry: <registry-host>
imageProject: <image-project>
imageCredentials:
createSecret: "True"
name: datarobot-image-pull-secret
registry: <registry-host>
username: <registry-username>
password: <registry-password>
opentelemetry:
enabled: true
exporterEndpoint: "http://datarobot-otel-collector-relay:4317"
databases: []
api-gateway:
enabled: true
gateways:
workloads:
create: true
gatewayClass: { create: true }
envoyProxy: { create: true }
service: { create: true }
clientTrafficPolicy: { create: true }
backendTrafficPolicy: { create: true }
workloadStatsTracing: { create: true }
api-gateway-ext:
enabled: true
drAuth: { hydraUri: https://<hub-domain> }
datarobot: { baseURL: https://<hub-domain> }
redis:
addresses: pcs-enclave-redis:26379
passwordSecret: { name: pcs-enclave-redis }
gatewayPolicy: { workloads: { enabled: true } }
extraEnvVars:
- { name: AUTH_SESSION_CACHE_TTL, value: "60m" }
- { name: AUTHZ_CACHE_TTL, value: "60m" }
- { name: AUTHZ_WORKLOAD_PATTERN, value: "/workloads/([^/]+)/?" }
service-registration-controller:
delegateMode: true
serviceNamePrefix: <enclave-name>
delegateAPI:
url: "grpcs://<hub-domain>:443"
workload-monitor:
enabled: true
drAuth: { hydraUri: https://<hub-domain> }
lrs-operator:
enabled: true
defaultResourceServiceAccount: { create: true, name: lrs-job-manager }
datarobot-otel-collector:
enabled: true
otelExporter: { enabled: false }
otelGateway: { enabled: false }
otelDaemonset:
enabled: true
gatewayEndpoint: http://datarobot-otel-collector-relay:4319
otelRelay:
enabled: true
door:
endpoint: https://<hub-domain>/otel/relay
tlsInsecure: false
drAuth: { hydraUri: https://<hub-domain> }
user-metrics-collector:
enabled: true
envs:
- { name: USER_METRICS_COLLECTOR_OTEL_COLLECTOR_URL, value: http://datarobot-otel-collector-relay:4319 }
- { name: USER_METRICS_COLLECTOR_SEND_METRICS, value: "true" }
hive-handler:
enabled: true
drAuth: { enabled: true }
beehive:
enclaveId: <enclave-id-from-registration>
covalent: { internalApiUrl: "https://<hub-domain>/covalent" }
apiGateway:
enabled: true
parentRefs:
- { name: gateway-public, namespace: <enclave-namespace> }
nginxIngress: { enabled: true }
telemetry:
enabled: true
otlpEndpoint: "datarobot-otel-collector-relay:4317"
workload:
route:
readinessCarveoutEnabled: true
timeoutSeconds: 60
lrs:
crossNamespaceRbac:
enabled: false # The workload namespace is the release namespace; true creates duplicate role bindings that fail on upgrade.
Define resource bundles and queues¶
A workload reaches an Enclave through a compute queue. The hive-handler component registers one queue for each entry in resourceConfig.queues when it starts.
Define the bundles on the Hub as described in Resource bundle configuration, and include "workload" in the use_cases list of each bundle. Then mirror the bundles on the Enclave:
- Every bundle ID the Hub offers for workloads needs a queue whose
resource_bundle_id_refmatches it exactly, character for character. Every queue must also match a Hub bundle ID. A mismatch in either direction fails scheduling withno ACTIVE enclave queue matches the requested resource bundle. - Replace
<gpu-bundle-id>in the following example with theidof a GPU bundle on the Hub.
The following example defines CPU queues and one GPU queue:
hive-handler:
resourceConfig:
mountPath: /etc/hive-handler
fileName: resource-config.json
config:
hardware:
- { name: "CPU", gpu_type: "", gpu_vendor: "", gpus_allowed: [0], vcpus: 16, memory_mb: 131072, gpu_memory_mb: 0 }
- name: "NVIDIA T4 (1 GPU)"
gpu_type: "nvidia-t4-x"
gpu_vendor: "nvidia"
gpus_allowed: [1]
vcpus: 8
memory_mb: 32768
gpu_memory_mb: 16384
queues:
- { resource_bundle_id_ref: "cpu.small", hardware_name: "CPU" }
- { resource_bundle_id_ref: "cpu.medium", hardware_name: "CPU" }
- { resource_bundle_id_ref: "cpu.large", hardware_name: "CPU" }
- { resource_bundle_id_ref: "<gpu-bundle-id>", hardware_name: "NVIDIA T4 (1 GPU)" }
node_groups:
- name: "gpu-t4-x"
gpu_type: "nvidia-t4-x"
gpu_count: 1
gpu_type_label: "nvidia"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- { key: "intent", operator: In, values: ["xT4GpuWorker"] }
tolerations:
- { key: "nvidia.com/gpu", operator: Equal, value: "true", effect: NoExecute }
lrs-operator:
operator:
config:
nodeGroups: |-
{
"labelToNodeGroupMap": { "datarobot-gpu-type=nvidia-t4-x": "gpu-t4-x" },
"nodeGroupsByName": {
"gpu-t4-x": { "taint": "nvidia.com/gpu=true:NoExecute", "affinityLabel": "intent=xT4GpuWorker" }
}
}
- For a CPU-only Enclave, omit the GPU hardware entry, its queue,
node_groups, and thelrs-operatornodeGroups. - For GPU placement, set
hardware.gpu_type,node_groups[].gpu_type, and thelabelToNodeGroupMapkey to the same label.
Install the Enclave¶
Install the datarobot-prime chart into the Enclave namespace with the enclave-values.yaml file:
helm upgrade --install dr-enclave \
--namespace <enclave-namespace> \
--create-namespace \
--values enclave-values.yaml \
--timeout 30m \
datarobot-prime-<version>.tgz
Always pass --namespace explicitly, as shown. Without --namespace, the Enclave still reports ACTIVE, but the Hub can't dispatch workloads to it and requests return HTTP 404.
Install for the first time¶
On the first install into an empty namespace, run the preceding command with --set api-gateway.gateways.workloads.workloadStatsTracing.create=false, then run it again without that flag. Later upgrades need only a single run.
Verify the installation¶
Confirm that every pod in the Enclave namespace is running, then confirm that the Hub reports the Enclave as ACTIVE:
curl -s "${DATAROBOT_ENDPOINT}/enclaves/${ENCLAVE_ID}" \
-H "Authorization: Bearer ${DATAROBOT_API_TOKEN}" | jq '{status, dispatch_url}'
dr enclave get "$ENCLAVE_ID"
ACTIVE confirms that the Enclave reached the Hub, not that workload traffic can reach the Enclave. To confirm end to end, complete the next steps.
Next steps¶
An ACTIVE Enclave doesn't receive workloads until it is linked to a Use Case and users have permission to deploy to it. The Use Case link and the deploy permission are required whether the scheduler chooses the Enclave or a workload is pinned to it. Complete the following steps on the Control Hub:
- Link the Enclave to a Use Case. An organization administrator links each Use Case whose workloads can run on the Enclave. A workload can run only on an Enclave linked to its Use Case, including when it is pinned.
- Grant deploy access (
CAN_DEPLOY) to the users, groups, or organizations that deploy to the Enclave. Grant theuserrole, the minimum role that can deploy, orowner. Without one of these roles, the scheduler skips the Enclave, and a workload pinned to it fails with an HTTP404error that namesCAN_DEPLOY. System administrators can always deploy. - (Optional) To let specific users or groups choose this Enclave instead of the scheduler, grant the pin permission. Pinning is intended for testing and debugging.
- Create a test workload to confirm that the Enclave runs and serves workloads.
Manage Enclaves¶
Deactivate an Enclave to take it out of scheduling without deleting it, for example during maintenance. A deactivated Enclave receives no new workloads until it is reactivated. Deleting an Enclave removes its record; reinstalling it requires a new registration. To list, deactivate, reactivate, or delete Enclaves, send the following requests or run the following commands:
curl -s "${DATAROBOT_ENDPOINT}/enclaves" -H "Authorization: Bearer ${DATAROBOT_API_TOKEN}"
curl -s -X POST "${DATAROBOT_ENDPOINT}/enclaves/${ENCLAVE_ID}/deactivate" -H "Authorization: Bearer ${DATAROBOT_API_TOKEN}"
curl -s -X POST "${DATAROBOT_ENDPOINT}/enclaves/${ENCLAVE_ID}/reactivate" -H "Authorization: Bearer ${DATAROBOT_API_TOKEN}"
curl -s -X DELETE "${DATAROBOT_ENDPOINT}/enclaves/${ENCLAVE_ID}" -H "Authorization: Bearer ${DATAROBOT_API_TOKEN}"
dr enclave list
dr enclave deactivate "$ENCLAVE_ID"
dr enclave reactivate "$ENCLAVE_ID"
dr enclave delete "$ENCLAVE_ID" --yes
Troubleshooting¶
The following table lists common installation problems and how to resolve them.
| Symptom | Resolution |
|---|---|
Registration returns 403 Forbidden. |
Confirm the user has create access, granted by an administrator in the same organization. |
The Enclave stays REGISTERED. |
Check that workload-monitor and lrs-operator are ready, that the bootstrap secret and hive-handler.beehive.enclaveId are correct, and that the Enclave can reach the Hub on port 443. |
The Enclave is ACTIVE but requests to workloads return HTTP 404. |
Make sure the --namespace passed to Helm matches every <enclave-namespace> in the values file. |
Workloads fail to schedule with no ACTIVE enclave queue matches the requested resource bundle. |
Add a queue whose resource_bundle_id_ref matches the bundle ID on the Hub exactly. |
| No logs, metrics, or traces arrive from the Enclave. | Check the relay settings in Configure the Control Hub and confirm that otelRelay.door.endpoint in the Enclave values file ends in /otel/relay. |
For anything not listed here, contact DataRobot Support or your installation team.