Skip to content

Instantly share code, notes, and snippets.

@drewstone
Last active March 13, 2025 17:26
Show Gist options
  • Save drewstone/1560a9b9f1a4387a1083be0ad0f44862 to your computer and use it in GitHub Desktop.
Save drewstone/1560a9b9f1a4387a1083be0ad0f44862 to your computer and use it in GitHub Desktop.
cargo t test_deploy_agent_tee
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.84s
Running unittests src/lib.rs (target/debug/deps/coinbase_agent_kit_blueprint-a2b16e0a2e838440)
running 1 test
INFO gadget: Creating agent with ID: 9702be38-56f2-4834-9266-52e829c93937
INFO gadget: Template files copied successfully to agent directory
INFO gadget: Created agent directory: /var/folders/wk/qcfly3h940s4cfmlpxbyf21w0000gn/T/.tmpDzngmK/9702be38-56f2-4834-9266-52e829c93937
INFO gadget: Created environment configuration
INFO gadget: Registered agent 9702be38-56f2-4834-9266-52e829c93937 with ports HTTP:3000, WS:3001
INFO gadget: Initializing TeeDeployer for public key retrieval
INFO gadget: Discovering available TEEPods...
INFO gadget: Creating VM configuration from Docker Compose "version: '3'\nservices:\n agent:\n container_name: coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n build:\n context: .\n ports:\n - \"3000:3000\"\n - \"3001:3001\"\n environment:\n - PORT=3000\n - WEBSOCKET_PORT=3001\n - CONTAINER_NAME=coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n - NODE_ENV=production\n - AGENT_MODE=http\n - MODEL=gpt-4o-mini\n - LOG_LEVEL=debug\n - OPENAI_API_KEY=${OPENAI_API_KEY}\n - CDP_API_KEY_NAME=${CDP_API_KEY_NAME}\n - CDP_API_KEY_PRIVATE_KEY=${CDP_API_KEY_PRIVATE_KEY}\n restart: unless-stopped\n"
INFO gadget: Requesting encryption public key with config VmConfig {
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
compose_manifest: ComposeManifest {
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
features: [],
docker_compose_file: "version: '3'\nservices:\n agent:\n image: null\n build:\n context: .\n dockerfile: null\n command: null\n environment:\n OPENAI_API_KEY: ${OPENAI_API_KEY}\n AGENT_MODE: http\n CDP_API_KEY_PRIVATE_KEY: ${CDP_API_KEY_PRIVATE_KEY}\n LOG_LEVEL: debug\n MODEL: gpt-4o-mini\n NODE_ENV: production\n CONTAINER_NAME: coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n CDP_API_KEY_NAME: ${CDP_API_KEY_NAME}\n PORT: '3000'\n WEBSOCKET_PORT: '3001'\n env_file: null\n volumes: null\n depends_on: null\n ports:\n - 3000:3000\n - 3001:3001\n networks: null\n requirements: null\n restart: unless-stopped\n user: null\n labels: null\n platform: null\nvolumes: {}\n",
},
vcpu: 2,
memory: 2048,
disk_size: 10,
teepod_id: 3,
image: "dstack-dev-0.3.5",
advanced_features: AdvancedFeatures {
tproxy: false,
kms: false,
public_sys_info: false,
public_logs: false,
docker_config: DockerConfig {
username: "",
password: "",
registry: None,
},
listed: false,
},
}
INFO gadget: Pubkey response: PubkeyResponse {
app_env_encrypt_pubkey: "96bd085a756baa03d46d329b1bcaefbfd22ae48a915813d85b622ed77c4c5d05",
app_id: "6e6d05b1048692ad6937421d987a4ff3df05d4c8",
app_id_salt: "b5467eb5-0f9a-45aa-8793-9993cb512092",
compose_manifest: ComposeManifest {
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
features: [],
docker_compose_file: "version: '3'\nservices:\n agent:\n image: null\n build:\n context: .\n dockerfile: null\n command: null\n environment:\n OPENAI_API_KEY: ${OPENAI_API_KEY}\n AGENT_MODE: http\n CDP_API_KEY_PRIVATE_KEY: ${CDP_API_KEY_PRIVATE_KEY}\n LOG_LEVEL: debug\n MODEL: gpt-4o-mini\n NODE_ENV: production\n CONTAINER_NAME: coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n CDP_API_KEY_NAME: ${CDP_API_KEY_NAME}\n PORT: '3000'\n WEBSOCKET_PORT: '3001'\n env_file: null\n volumes: null\n depends_on: null\n ports:\n - 3000:3000\n - 3001:3001\n networks: null\n requirements: null\n restart: unless-stopped\n user: null\n labels: null\n platform: null\nvolumes: {}\n",
},
disk_size: 10,
encrypted_env: "",
image: "dstack-dev-0.3.5",
listed: false,
memory: 2048,
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
ports: None,
teepod_id: 3,
user_id: None,
vcpu: 2,
}
INFO gadget: Successfully obtained TEE public key
INFO gadget: Deploying agent to TEE with Docker compose: "version: '3'\nservices:\n agent:\n container_name: coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n build:\n context: .\n ports:\n - \"3000:3000\"\n - \"3001:3001\"\n environment:\n - PORT=3000\n - WEBSOCKET_PORT=3001\n - CONTAINER_NAME=coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n - NODE_ENV=production\n - AGENT_MODE=http\n - MODEL=gpt-4o-mini\n - LOG_LEVEL=debug\n - OPENAI_API_KEY=${OPENAI_API_KEY}\n - CDP_API_KEY_NAME=${CDP_API_KEY_NAME}\n - CDP_API_KEY_PRIVATE_KEY=${CDP_API_KEY_PRIVATE_KEY}\n restart: unless-stopped\n"
INFO gadget: Initializing TeeDeployer for deployment
INFO gadget: Discovering available TEEPods...
INFO gadget: Creating VM configuration from Docker Compose
INFO gadget: Deploying agent to TEE with VM configuration: VmConfig {
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
compose_manifest: ComposeManifest {
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
features: [],
docker_compose_file: "version: '3'\nservices:\n agent:\n image: null\n build:\n context: .\n dockerfile: null\n command: null\n environment:\n CONTAINER_NAME: coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n OPENAI_API_KEY: ${OPENAI_API_KEY}\n CDP_API_KEY_PRIVATE_KEY: ${CDP_API_KEY_PRIVATE_KEY}\n NODE_ENV: production\n AGENT_MODE: http\n MODEL: gpt-4o-mini\n CDP_API_KEY_NAME: ${CDP_API_KEY_NAME}\n PORT: '3000'\n WEBSOCKET_PORT: '3001'\n LOG_LEVEL: debug\n env_file: null\n volumes: null\n depends_on: null\n ports:\n - 3000:3000\n - 3001:3001\n networks: null\n requirements: null\n restart: unless-stopped\n user: null\n labels: null\n platform: null\nvolumes: {}\n",
},
vcpu: 2,
memory: 2048,
disk_size: 10,
teepod_id: 3,
image: "dstack-dev-0.3.5",
advanced_features: AdvancedFeatures {
tproxy: false,
kms: false,
public_sys_info: false,
public_logs: false,
docker_config: DockerConfig {
username: "",
password: "",
registry: None,
},
listed: false,
},
}
INFO gadget: Requesting encryption public key...
INFO gadget: Deploying agent to TEE with pubkey response: PubkeyResponse {
app_env_encrypt_pubkey: "f05782ad5b18bb4dde39ada8a5b3def2b656031c44da452ea2c7aa19e3b7ce4b",
app_id: "c65f24036564e6e3044810b44c63b3336e5c4b09",
app_id_salt: "9c800a3f-d556-409a-97a9-c6716113dc9d",
compose_manifest: ComposeManifest {
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
features: [],
docker_compose_file: "version: '3'\nservices:\n agent:\n image: null\n build:\n context: .\n dockerfile: null\n command: null\n environment:\n CONTAINER_NAME: coinbase-agent-9702be38-56f2-4834-9266-52e829c93937\n OPENAI_API_KEY: ${OPENAI_API_KEY}\n CDP_API_KEY_PRIVATE_KEY: ${CDP_API_KEY_PRIVATE_KEY}\n NODE_ENV: production\n AGENT_MODE: http\n MODEL: gpt-4o-mini\n CDP_API_KEY_NAME: ${CDP_API_KEY_NAME}\n PORT: '3000'\n WEBSOCKET_PORT: '3001'\n LOG_LEVEL: debug\n env_file: null\n volumes: null\n depends_on: null\n ports:\n - 3000:3000\n - 3001:3001\n networks: null\n requirements: null\n restart: unless-stopped\n user: null\n labels: null\n platform: null\nvolumes: {}\n",
},
disk_size: 10,
encrypted_env: "",
image: "dstack-dev-0.3.5",
listed: false,
memory: 2048,
name: "coinbase-agent-9702be38-56f2-4834-9266-52e829c93937",
ports: None,
teepod_id: 3,
user_id: None,
vcpu: 2,
}
INFO gadget: Deploying agent to TEE with encrypted environment variables
INFO gadget: TEE deployment completed. Deployment: DeploymentResponse {
id: 2911,
status: "creating",
details: None,
}
INFO gadget: Health check attempt 1 of 30 for http://localhost:3000
INFO gadget: Sending health check request to: http://localhost:3000/health
WARN gadget: Connection error during health check: error sending request for url (http://localhost:3000/health): error trying to connect: tcp connect error: Connection refused (os error 61)
WARN gadget: Health check attempt 1 failed: Connection error during health check: error sending request for url (http://localhost:3000/health): error trying to connect: tcp connect error: Connection refused (os error 61)
INFO gadget: Waiting 1s before next attempt
INFO gadget: Health check attempt 2 of 30 for http://localhost:3000
INFO gadget: Sending health check request to: http://localhost:3000/health
WARN gadget: Connection error during health check: error sending request for url (http://localhost:3000/health): error trying to connect: tcp connect error: Connection refused (os error 61)
WARN gadget: Health check attempt 2 failed: Connection error during health check: error sending request for url (http://localhost:3000/health): error trying to connect: tcp connect error: Connection refused (os error 61)
INFO gadget: Waiting 1.5s before next attempt
INFO gadget: Health check attempt 3 of 30 for http://localhost:3000
INFO gadget: Sending health check request to: http://localhost:3000/health
WARN gadget: Connection error during health check: error sending request for url (http://localhost:3000/health): error trying to connect: tcp connect error: Connection refused (os error 61)
WARN gadget: Health check attempt 3 failed: Connection error during health check: error sending request for url (http://localhost:3000/health): error trying to connect: tcp connect error: Connection refused (os error 61)
INFO gadget: Waiting 2.25s before next attempt
^C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment