Running a macOS cloud on mac mini cluster for iOS CI

It’s been twelve years since the introduction of the first Mac mini. During these twelve years, there have been multiple updates and new models introduced with the last one in 2014. In 2011 the Mac Mini was updated with the power of i5 and i7 processors, and users started using it for the first time in a server capacity, namely as chat, web, mail servers. Then, 2012 Mac mini had exciting updates and demonstrated significant improvement in benchmarks from 2011. 2012 model is still very widely used since it was the last model with a quad-core processor.

When iOS development took off, Mac mini became the hardware of choice for app development because of it’s small form factor and the power it packs in this form. First, it was individuals developing iOS apps, then as the complexity of apps increased, the size of iOS development teams also increased. Teams started implementing DevOps and continuous integration and testing to keep up with the increased frequency of commits. Mac mini was again hardware choice for CI because teams could stack a bunch of these and get a build/test cluster going.

What’s happening now is that there is no end in sight for the richness of features you see in the mobile applications. “iOS First” philosophy still holds healthy for the majority of mobile application development. As a result, iOS development teams are finding themselves having to build more agile and flexible build and test infrastructure that can scale with the exponentially increasing number of UI regression tests, commit frequency, shorter update cycles and a gradually growing matrix of iOS device types.

In this blog, we will describe how you can configure your existing iOS build/test Mac mini hardware into a macOS cloud and operate CI in a docker like fashion.

  • Instant start (quick boot) multiple macOS VMs on-demand from a suspended state to run jobs in parallel.
  • Eliminate the complexity of SAN and other challenges associated with management of traditional virtualization platforms.
  • My example setup consists of 2 dual-core Mac minis(which are hosted in Macstadium). My CI system is Jenkins and I am using the Kickstarter open source iOS project to demonstrate build/test job example. If your CI tool is not Jenkins but some other on-prem tool like TeamCity or hosted tool like Buildkite or Gitlab, contact us to get more details on integration. We are working to release more pre-packaged integrations with other CI tools.

    Start by signing up for Anka Build 30 day trial software at www.veertu.com. You will receive an email with links to download the following Anka Build modules.

    Anka Build package – Mac application package which you will install on your Mac minis. Anka Build package is the virtualization hypervisor (lightweight 41MB package).

    Anka Controller – This is the Anka Build macOS cloud management module packaged as an ubuntu docker container.

    Anka Registry – This is similar to docker registry and is used to store and manage the macOS VMs and versions you build for your CI jobs.

    Anka Build Jenkins Plugin – This is the pre-built plugin available for download from Jenkins plugin center to easily integrate with Anka Build macOS cloud.

    Once you have installed all the above components, you should see the following:

    Anka Build macOS cloud configured in your Jenkins master instance

    Anka Build Jenkins Plugin



    Anka Build macOS cloud of 2 Mac minis(Data accessed through controller REST API)

    Anka Build Controller Node list



    Anka Build macOS cloud access to VM templates in Anka Registry

    Anka Build Controller Registry access REST API



    Anka Build Registry displaying versions of a VM template

    Anka Build Controller Registry VM Template Describe REST API



    Starting multiple iOS jobs to execute on the macOS CI cloud in Jenkins



    Three VMs are launched from VM template and instantly started on a cluster of 2 Mac mini nodes

    Quick boot/Instant Start for macOS VMs

    Anka Build Controller display VM list REST API output



    Displaying access through VNC to VMs launched on the Mac mini macOS cloud

    macOS VMs



    Highlights
  • Scale the macOS cloud by joining new Mac minis with Anka Build package installed to the Controller.
  • Use anka run to fully automate bootstrap/pre-configuration of build/test macOS VM templates. Check anka run documentation here.
  • Configure macOS cloud on on-premise or hosted Mac minis.