Overview
SoraNova lets you deploy two main types of applications:- Standard applications: These can include a backend API, a frontend, or both, and are exposed via endpoints.
- Daemon jobs: Background services that run on every node in your cluster (e.g., log shippers, monitoring agents).
Example 1: Deploying a Custom Application (Frontend + Backend)
Suppose you have two container images:- A backend API (
my-backend:latest
) - A frontend web app (
my-frontend:latest
)
my-app.hcl
:
TheTo deploy:${service.backend}
variable injects the backend’s endpoint URL into the frontend container as theBACKEND_URL
environment variable.
Example 2: Deploying a Daemon Application
Daemon applications are background applications that run on every node in your SoraNova cluster. They are ideal for log shippers, monitoring agents, or any persistent process that should be present on all nodes. Below is a sample configuration for deploying Vector as a log shipper daemon. This will collect logs from/var/log
and Docker, and can be configured to push them to an external HTTP endpoint.
Example 3: Deploying a GPU-Accelerated Custom Application (Frontend + Backend)
Suppose you have:- A custom ML backend image (
my-gpu-backend:latest
) - A custom frontend image (
my-frontend:latest
)
my-gpu-app.hcl
:
Note: Your custom images must implement their respective health check endpoints that returns a 200 status code when the service is healthy. This endpoint is used by the orchestration platform to determine when your service is up and ready to receive traffic. TheTo deploy:${service.gpu-backend.api.url}
variable injects the backend’s endpoint URL into the frontend container as theBACKEND_URL
environment variable.
Example 4: Deploying a GPU-Accelerated Daemon (Echo Server Example)
You can run any GPU-enabled daemon on every node that meets your GPU requirements. For example, here’s how to deploy a simple echo server as a GPU daemon. You can replace the image with your own. First, pull and push the image to your SoraNova registry:gpu-echo-daemon.hcl
:
You can replace echo-server:latest
with any image you want. The daemon will run on all nodes with a GPU that meets the specified requirements. When new machines are provisioned, they will automatically start running this daemon if they have the required resources.
To deploy:
Key Points
- Standard applications: Use the
service
block for frontend/backend workloads. Use${service.<name>}
to inject service URLs. - Daemon applications run on every node: Use them for log collection, monitoring, or any background process.
- Resource allocation: Use the
resources
block to control CPU and memory usage. - GPU allocation: Use the
device
block to specify GPU requirements. You can target specific GPU models or specify memory requirements. - GPU sharing: Use
sharing_strategy = "mps"
to enable CUDA MPS for multi-process sharing on the same GPU.
Deploying
-
Save your configuration to a file (e.g.,
my-app.hcl
orvector-daemon.hcl
). -
Deploy it using the SoraNova CLI:
- Your application or daemon will now run in your cluster.
🎉 That’s it! You now know how to deploy both standard applications and daemon applications on your SoraNova cluster.