Version: v1.0.35
Deploy AWS Spot Instances with Bacalhau compute nodes in seconds
curl -sSL https://tada.wang/install.sh | bash -s -- create
Deploy AWS Spot instances running Bacalhau compute nodes with these simple commands:
curl -sSL https://tada.wang/install.sh | bash -s -- setup
Creates configuration files
curl -sSL https://tada.wang/install.sh | bash -s -- create
Launches spot instances
uvx
(Python package runner) - no Docker installation needed on your machine!
curl -sSL https://tada.wang/install.sh | bash -s -- setup
This creates a config.yaml
file in your current directory with sensible defaults.
nano config.yaml
Edit the configuration file with your SSH key paths and preferences.
curl -sSL https://tada.wang/install.sh | bash -s -- create
Launches your spot instances across multiple regions.
setup
- Initial configuration setupcreate
- Create and deploy spot instanceslist
- List running instances with statusdestroy
- Destroy all spot instanceshelp
- Show detailed help message# List all running instances
curl -sSL https://tada.wang/install.sh | bash -s -- list
# Destroy all instances
curl -sSL https://tada.wang/install.sh | bash -s -- destroy
# Get help
curl -sSL https://tada.wang/install.sh | bash -s -- help
The config.yaml
file controls all aspects of your deployment:
aws:
total_instances: 6
username: ubuntu
public_ssh_key_path: ~/.ssh/id_ed25519.pub
private_ssh_key_path: ~/.ssh/id_ed25519
instance_storage_gb: 20
tags:
Project: MyProject
Environment: Development
regions:
- us-west-2:
machine_type: t3.medium
image: auto
- us-east-1:
machine_type: t3.medium
image: auto
The tool automatically detects your AWS credentials in this order:
AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
~/.aws/credentials
, ~/.aws/config
# AWS SSO (Recommended)
aws sso login
# Environment Variables
export AWS_ACCESS_KEY_ID=your-key
export AWS_SECRET_ACCESS_KEY=your-secret
# AWS CLI
aws configure
Spot Deployer automatically configures Bacalhau compute nodes on each instance. To connect to your orchestrator:
Create these files in your project directory before deployment:
mkdir -p files
echo "nats://your-orchestrator.example.com:4222" > files/orchestrator_endpoint
echo "your-secret-token-here" > files/orchestrator_token
# Check your nodes
bacalhau node list
# Test with a job
bacalhau docker run ubuntu echo "Hello from spot instance!"
Solution: Configure AWS authentication first
# Try AWS SSO
aws sso login
# Or set environment variables
export AWS_ACCESS_KEY_ID=your-key
export AWS_SECRET_ACCESS_KEY=your-secret
# Then retry
curl -sSL https://tada.wang/install.sh | bash -s -- create
Solution: Create SSH keys or update config paths
# Generate new SSH keys
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
# Or update config.yaml with correct paths
nano config.yaml
Solution: Spot instances unavailable, try different regions/types
# Edit config.yaml to add more regions or change instance types
regions:
- us-west-2:
machine_type: t3.small # Try smaller instances
- us-east-1:
machine_type: t3.small
- eu-west-1:
machine_type: t3.small
Skip the installer and run directly:
# Run directly from GitHub
uvx --from git+https://github.com/bacalhau-project/aws-spot-deployer spot-deployer create
# Install globally
uvx install --from git+https://github.com/bacalhau-project/aws-spot-deployer spot-deployer
spot-deployer list
# Clone and use locally
git clone https://github.com/bacalhau-project/aws-spot-deployer.git
cd aws-spot-deployer
# Use local wrapper (detects AWS credentials automatically)
./spot create
# Or run directly with uv
uv run python -m spot_deployer create
# Use specific version
curl -sSL https://tada.wang/install.sh | bash -s -- create --version v1.2.0
# Use latest development version
curl -sSL https://tada.wang/install.sh | bash -s -- create --version main
# See what would be deployed without actually doing it
curl -sSL https://tada.wang/install.sh | bash -s -- create --dry-run