1. Docs

Compute Spawn

A Compute Spawn is the actual server or computer that is connected to Daestro and ready to run your jobs. While a Compute Environment is the template for a server, a Compute Spawn is the real thing—a live machine waiting for work.

There are two types of Compute Spawns:

  1. Cloud: A server in the cloud (like on AWS or DigitalOcean) that Daestro automatically creates and terminates for you based on the demands of your Job Queue. You don’t have to manage these yourself.
  2. Self-hosted: Your own computer (like a laptop, desktop, or a server you own) that you manually connect to Daestro.

The Lifecycle of a Compute Spawn

A Compute Spawn goes through several states in its life, such as:

  • Requested: Daestro is asking a cloud provider to create a new server.
  • Idle: The server is online and waiting for a job.
  • Busy: The server is currently running a job.
  • Terminating: The server is being shut down.
  • Unreachable: Daestro has lost contact with the agent on the server.

How to Create a Self-hosted Compute Spawn

You don’t need to do anything to create a cloud Compute Spawn—Daestro handles that automatically. However, to connect your own machine, you need to create a self-hosted Compute Spawn by running the Daestro Agent.

The Daestro Agent is a small program that securely connects your computer to the Daestro platform. Here’s how to set it up:

Step 1: Get Your Agent Auth Token

First, you need a unique token to authorize your machine.

  1. Go to the Compute Environment page.
  2. Open the self-hosted Compute Environment you want to use.
  3. In the “Compute Spawn” section, click on New Compute.
  4. Select the Job Queue you want this machine to work for.
  5. An Agent Auth Token will be generated for you. Copy this token.

Step 2: Run the Daestro Agent using Docker

The easiest way to run the agent is with Docker. Open a terminal on the machine you want to connect and run the following command.

Important: Replace <AGENT_AUTH_TOKEN> with the token you just copied.

docker run --name daestro-agent 
  -e DAESTRO_AUTH_TOKEN="<AGENT_AUTH_TOKEN>" 
  -v /var/run/docker.sock:/var/run/docker.sock 
  -v daestro_agent_data:/var/lib/daestro-agent 
  --network host 
  daestro/daestro-agent:latest

Once you run this command, your machine will connect to Daestro and appear as a new Compute Spawn, ready to pick up jobs from its assigned queue.