A macOS GitLab Runner Pool with Orchard and Tart VMs
··1480 words·7 mins
The previous post was about Windows jobs on throw-away VMs. macOS is the same wish with harder constraints:
macOS may only legally run on Apple hardware, so you cannot just launch a VM from a cloud image on any host. On AWS, that hardware is an EC2 Mac, which is a dedicated host. You pay for the host, not for the instance, and a host cannot be released before 24 hours after it was allocated. A shell executor on a Mac is the easy approach, and it is how most people start. Every job then runs as the same user, in the same filesystem, with the same keychain. State leaks between jobs, and so do secrets. The setup in this post gets one clean VM per job on a small number of Macs, without giving up much of the simplicity.