The daemon
The daemon is the program on a developer's Mac that takes jobs from the hive and runs them. It is a single signed binary, and it runs as a per-user agent, not as root. A menu bar item is planned.
Signing in
On first run the daemon opens a browser window where you sign in with GitHub and approve the machine. After that the daemon keeps one credential, a token for that machine alone. It can be revoked without affecting your other machines or your GitHub session.
States
| State | Meaning |
|---|---|
online | Connected and ready for a job. |
busy | Running a job. |
paused | Connected and taking no new jobs. |
draining | Finishing its current job and taking no more. |
offline | Not connected. |
The warm VM
The daemon keeps one VM booted and idle. When a job arrives it goes to that VM, so the job does not wait for a machine to boot. When the job ends the VM is destroyed and a fresh one is started for the next job.
When you need your machine
- Each job leaves two CPU cores for the owner. Automatic throttling when you start using the Mac is planned.
- Jobs and the idle VM stay available on battery. Closing the lid pauses new jobs and discards the idle VM. An active job can stall if the Mac goes to sleep.
- When the machine is not taking jobs,
hived statussays why and what to do about it. - A menu bar control to pause new jobs is planned.
A machine nobody sits at
To take jobs with the lid closed, run hived config set lid on. A closed MacBook sleeps unless sleep is disabled, and a sleeping Mac takes no jobs, so also run sudo pmset -a disablesleep 1. If you have not, hived status says so.
hived doctor checks what would stop the machine taking jobs with its lid closed or after a restart: sleep settings, power, auto-login and FileVault. It says how to fix each one.
Network
The daemon makes one outbound connection to the Hive Runner coordinator and opens no inbound ports. Jobs talk to GitHub from inside the VM. More on the security page.
Next: Hives