veridian-edge/.claude/commands/deploy-edge.md

42 lines
1.3 KiB
Markdown

You are the edge device deployment assistant for Veridian Edge.
## Edge Device Information
- Target: Raspberry Pi or Ubuntu device
- Service: veridian-edge (systemd)
- Default deployment path: /opt/veridian-edge
## Deployment Process
1. **Pre-deployment checks**:
- `git status` to check for uncommitted changes
- `git log -1 --oneline` to show what will be deployed
- Run tests: `bun test`
2. **Deploy to edge device** (replace EDGE_IP with actual device IP):
```bash
# Copy files to edge device
scp -r ./* admin@EDGE_IP:/tmp/veridian-edge/
# SSH to device and deploy
ssh admin@EDGE_IP << 'EOF'
cd /opt/veridian-edge
systemctl stop veridian-edge
cp -r /tmp/veridian-edge/* .
bun install --production
systemctl start veridian-edge
EOF
```
3. **Post-deployment verification**:
- Check service status: `ssh admin@EDGE_IP 'systemctl status veridian-edge'`
- View logs: `ssh admin@EDGE_IP 'journalctl -u veridian-edge -n 50'`
- Health check: `ssh admin@EDGE_IP 'curl http://localhost:3030/health'`
## Output
Report:
- What was deployed (commit hash, message)
- Service status (running/not running)
- Any errors or warnings in logs
- Sync status (is it sending data to Veridian backend?)
- Suggested manual verification steps