12. Day-2 operations
After your first deploy, these commands cover most ongoing work.
Manual job control
Requires a prior deploy (workers have current runner.py and update_seq).
maand job status api
maand job status api --allocations 10.0.0.1
maand job stop api --allocations 10.0.0.2
maand job start api --allocations 10.0.0.2
maand job restart api --health_check
maand job run api --target reload
These invoke runner.py → make <target> on workers over SSH.
Reference: job.md.
Ad-hoc remote commands
maand run_command "uptime"
maand run_command "df -h /opt/worker" --workers 10.0.0.1
maand run_command "docker ps" --labels web --concurrency 2
Working directory on workers: /opt/worker/<bucket_id>/.
Reference: run-command.md.
Drain for maintenance
- Edit
workspace/disabled.json maand buildmaand deploy— stops disabled allocations, does not restart them
Re-enable: remove entry, build, deploy.
Guide: disable-and-drain.md.
Remove jobs or workers
- Delete from
workspace/(remove job dir or host fromworkers.json) maand build— marks allocationsremovedmaand deploy— stop, remove deployed files; keepsdata/andlogs/maand gc— purge catalog rows and delete worker runtime trees
Guide: day-2-ops.md.
Upgrades and rollouts
# edit manifest version or job files
maand build
maand deploy --dry-run
maand deploy --jobs api
Rolling behavior: rolling-deploy.md.
Worker OS reboot: worker-reboot.md.
Debugging checklist
| Symptom | Check |
|---|---|
| Deploy skipped everything | maand deploy --dry-run, maand cat deployments |
| One allocation failed | debugging-deploy.md |
| SSH errors | ssh -i secrets/worker.key user@host, maand.conf |
| Stale manual job cmd | maand deploy to refresh update_seq |
| App unhealthy | maand health_check --jobs <job> --verbose |
Guide: debugging-deploy.md.
Inspect state (quick reference)
maand info
maand cat workers
maand cat jobs
maand cat allocations
maand cat deployments
maand cat certs --jobs api
maand cat kv --jobs api
You have completed the tour
| Next step | Document |
|---|---|
| Hands-on practice | quickstart.md |
| Full glossary | concepts.md |
| Feature checklist | overview.md |
| All CLI flags | commands.md |
| Deep hooks | hooks-tutorial.md |