Skip to content

Exoskeleton Provisioning

Understand and use the exoskeleton to automatically provision Postgres, NATS, and RustFS resources for a tentacle.

  • Exoskeleton services enabled on the target cluster (see Exoskeleton Setup)
  • tntc CLI configured with MCP access

Use the MCP enclave_info tool or CLI to see what backing services are available for the enclave:

Terminal window
# The agent checks enclave_info (exo_services field) before designing a tentacle
# Available services vary per cluster

Add tentacular-* prefixed dependencies to your contract. No host, port, or auth needed — the exoskeleton fills these in:

contract:
version: "1"
dependencies:
# Exoskeleton-managed (auto-provisioned)
tentacular-postgres: # Scoped database schema and role
tentacular-nats: # Scoped subjects and credentials
tentacular-rustfs: # Scoped S3-compatible object storage
# Manual (you provide host/port/auth)
github-api:
protocol: https
host: api.github.com
port: 443
auth:
type: bearer-token
secret: github.token
Terminal window
tntc deploy

During deployment, the exoskeleton:

  1. Computes a deterministic identity from (namespace, workflow-name)
  2. Runs registrars for each declared tentacular-* dependency
  3. Enriches the contract — fills in host/port/database/user fields
  4. Injects credentials — builds a K8s Secret with per-service credentials
import type { Context } from "tentacular";
export default async function run(ctx: Context, input: unknown) {
// Postgres — credentials and connection details are auto-injected
const pg = ctx.dependency("tentacular-postgres");
// pg.host, pg.port, pg.secret contain the provisioned values
// NATS — scoped subjects and auth
const nats = ctx.dependency("tentacular-nats");
// RustFS — S3-compatible with scoped prefix
const rustfs = ctx.dependency("tentacular-rustfs");
}
ServiceResourcesScope
PostgresRole + schemaPer-tentacle: role named from identity, schema owned by role
NATSAuthorization entryPer-tentacle: scoped subject prefix, publish/subscribe permissions
RustFSIAM user + policyPer-tentacle: user with access to scoped S3 prefix only
SPIREClusterSPIFFEIDPer-tentacle: SPIFFE identity for mTLS
  • tntc status my-tentacle --detail shows the deployment with exoskeleton dependencies
  • Tentacle can connect to provisioned services without manual credential management
  • tntc run my-tentacle succeeds when using backing services
FailureCauseResolution
exoskeleton: postgres not enabledPostgres not installed on clusterCheck enclave_info (exo_services) and install if needed
Connection refused to backing serviceService endpoint changedRe-check exoskeleton installation
Permission denied on PostgresRole misconfiguredUndeploy and redeploy to re-run registrars
Stale credentialsService credentials rotatedUndeploy and redeploy to re-run registrars

By default, undeploying a tentacle retains exoskeleton data (Postgres schemas, NATS entries, RustFS objects). To destroy data:

Terminal window
tntc undeploy my-tentacle --force

The --force flag triggers unregistrars that drop schemas (CASCADE), remove NATS auth entries, and delete RustFS objects.