Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/rust-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,32 @@ jobs:
with:
toolchain: stable

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Run tests
run: make test

test-e2e:
name: E2E Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run E2E tests
run: make test-e2e
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ help:
@echo " make build - Build Python package (debug mode)"
@echo " make install - Install Python package locally"
@echo " make dev - Install in development mode with hot reload"
@echo " make test - Run unit and integration tests"
@echo " make test-e2e - Run end-to-end tests with Docker"
@echo " make test - Run unit and integration tests (fast, no Docker)"
@echo " make test-e2e - Run end-to-end tests with Docker (slow)"
@echo " make daemon-build - Build daemon binary (debug)"
@echo " make daemon-release - Build daemon binary (release)"
@echo " make docker-build - Build Docker image for daemon"
Expand All @@ -34,8 +34,8 @@ test: lint $(PYTEST) dev
@echo "Running Rust tests (server protocol)..."
cargo test --package sandbox-server --lib
@echo ""
@echo "Running Python tests..."
$(PYTEST) python/tests/
@echo "Running Python tests (excluding e2e)..."
$(PYTEST) python/tests/ -m "not e2e"

daemon-build:
cargo build --package sandd
Expand All @@ -53,22 +53,22 @@ clean:

test-e2e: $(PYTEST) dev
@echo "Building Docker images..."
docker compose -f docker-compose.e2e.yml build
docker compose -f hack/docker/docker-compose.e2e.yml build
@echo ""
@echo "Running E2E tests with Docker..."
$(PYTEST) python/tests/test_e2e.py -v -s
$(PYTEST) python/tests/ -m e2e -v -s
@echo ""
@echo "Cleaning up containers..."
docker compose -f docker-compose.e2e.yml down
docker compose -f hack/docker/docker-compose.e2e.yml down

docker-build:
docker compose -f docker-compose.e2e.yml build
docker compose -f hack/docker/docker-compose.e2e.yml build

docker-up:
docker compose -f docker-compose.e2e.yml up -d
docker compose -f hack/docker/docker-compose.e2e.yml up -d

docker-down:
docker compose -f docker-compose.e2e.yml down
docker compose -f hack/docker/docker-compose.e2e.yml down

.PHONY: lint
lint: $(RUFF)
Expand Down
46 changes: 42 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,24 @@ make install

### Daemon Binary (Worker)

Install from crates.io:
#### Quick Install

```bash
# Direct mode (no tunnel)
curl -fsSL https://get.sandd.dev/install.sh | sudo bash

# Tunnel mode (with Tailscale)
curl -fsSL https://get.sandd.dev/install.sh | sudo bash -s -- --tunnel
```

#### Alternative Methods

**Install from crates.io:**
```bash
cargo install sandd
```

Or build from source:
**Build from source:**
```bash
git clone https://github.com/InftyAI/SandD
cd SandD
Expand All @@ -90,24 +102,50 @@ make daemon-release

## Quick Start

### Direct Mode (Development)

**Start controller:**

```python
from sandd import Server

server = Server("0.0.0.0", 8765)
server = Server() # Direct mode (default)
server.wait_for_daemon("worker-1", timeout=30)

result = server.exec("worker-1", "hostname")
print(result.stdout)
```

**Start worker:**
**Start daemon:**

```bash
# Direct mode
sandd --server-url ws://controller-ip:8765/ws --daemon-id worker-1

# Tunnel mode
sandd --server-url ws://10.200.0.1:8765/ws \
--daemon-id worker-1 \
--tunnel \
--tunnel-authkey YOUR_KEY \
--tunnel-server http://headscale:8080
```

### Tunnel Mode (Production)

For secure multi-cloud deployments with mesh VPN:

```python
from sandd import Server

config = TunnelConfig(
authkey="YOUR_KEY",
server="http://headscale:8080",
)
server = Server(connect="tunnel", tunnel_config=config) # Secure tunnel mode
```

See [Tunnel Mode Guide](./docs/TUNNEL.md) for setup instructions.

## Documentation

- [Quick Start Guide](./docs/QUICKSTART.md)
Expand Down
Loading
Loading