Migrating from Anka on Intel to Anka on M1 Mac for iOS CI

In this blog, we will cover the key topics for migrating from Anka on Intel to Anka on M1/M2 Macs. Anka is an IaaC solution from Veertu to set up an agile Container like CI for iOS CI using macOS VMs. Anka for Intel uses Apple’s Hypervisor.Framework virtualization APIs of macOS. With ARM chip-based Apple mac hardware, Apple has also introduced a new Virtualization.Framework. Anka supports creating and running macOS VMs on all ARM chip-based Apple M1/M2 Mac hardware. Anka runs on M1 Minis, Mac Studio Max, Mac Studio Ultra, and all Macbook M2 models.

Anka version 2.x.x runs on Intel Mac hardware, and Anka version 3.x.x runs on ARM M1/M2 Mac hardware. We are working to very soon release a unified Anka package that will support both the Intel and ARM-based Mac hardware.

There is a lot of excitement around the new M1/M2 mac hardware, and initial user feedback indicates much faster compilation times inside Anka macOS VMs than the Intel Mac hardware.

Let’s look at the steps to plan Anka iOS CI Infrastructure migration from Intel to Anka.

Build and Test VM Templates

Anka enables users to create their iOS CI build and test environments as macOS Anka VMs and store and manage them in the Anka Registry (similar to working with container images).

Anka Mac VM images for Intel and M1/M2 are different and are not interoperable. Users should create Build and Test Vms from scratch for M1/M2 using Anka version 3.x.x.

  1. Install Anka version 3.x.x on M1/M2 hardware and execute license activation steps.
  2. Create base macOS VMs using anka create command – In the current Anka version 3.x.x, anka create results in a macOS Anka VM, which requires additional manual steps to complete macOS setup. We are working to provide a fully automated macOS Anka VM creation similar to the Anka Intel experience in the next major Anka release.
  3. Using Packer to create M1 Anka VM Templates – This is currently not supported due to the manual steps required to complete the macOS setup. The next release of Anka will support this feature.

Refer to creating Anka VMs for M1 hardware documentation for detailed steps.

Sizing VM Templates

With Anka on Intel, hardware users could take the total vcpu (physical cores*2) count and determine vcpu parameters for the VMs. For example, on Intel i7 6-core mac minis, users can run 2 Anka VMs concurrently, each with 6vcpu (12 vCPU running concurrently).

VM sizing is different for Anka M1 VMs.

  1. M1 minis have only 16GB RAM, which is suboptimal to run two concurrent iOS CI VMs. We recommend that users run only 1 Anka VM with 8vcpu and 12GB RAM and test the performance of their iOS CI jobs. They can further finetune the vcpu count from 8 to 6 to 4 to determine the best performing configuration.
  2. If the requirement is to run two concurrent Anka VMs, use the Mac Studio Max hardware.

Based on reports on actual job executions from our users, compilation job performance inside Anka M1 Mac Vms is 40-60% faster than execution inside Anka Intel Mac VMs. So, while you can run only one job in one Anka VM on M1 mini, the avg_time_spent_processingjob is much lower. So, faster build execution may neutralize the anticipated negative impact of 1 VM per maM1 Mac mini on jobtime_in_queue. We recommend that the user execute test runs to determine the optimal configuration for their CI needs – 1 Anka VM per node(M1 mini) or 2 Anka VMs per node (Mac Studio Max).

Anka Build Controller And Registry supports a mixed cluster.

Starting from version 1.20.0,  a single instance of Anka Build Controller/Registry supports both Intel and Anka VMs. There is no need to set up a separate instance of Controller and Registry for M1 hardware.

  1. Users can join M1 Anka nodes running Anka version 3.x.x or higher to their existing Anka Build Controller setup. The Controller includes logic to identify and run M1 images only on M1-based nodes.
  2. Users can push M1 VM images/templates to their existing Anka registry and manage all current Intel and new M1-based Anka VM templates in a single repository.

All existing CI plugins work AS IS and support a mixed cluster of Intel and M1 Mac hardware for iOS CI.

NOTE: Contact Veertu on slack or support email to discuss test licenses for M1.

AWS EC2 M1 Mac Anka Deployment

AWS provides EC2 M1 Mac (mac2.metal) instances which are M1 Mac mini hosts. You can deploy Anka on mac2.metal AWS instances. Use our community AMIs (anka-build-3.0.1.144-macos-12.5.1-arm64, anka-build-3.0.1.144-macos-12.4-arm64) to get started quickly. There are no Anka marketplace AMIs available for EC2 M1 Mac yet. We are working with AWS to make them available soon.

Anka Scan to scan security vulnerabilities in VM templates

As you plan your migration to M1, incorporate DevSecOps workflow in your iOS CI. Integrate the Anka Scan tool to monitor all files, apps, and packages in the Build VM templates for known security vulnerabilities.

Share this post

anka-or-1
Anka vs Orka in 2024
It has been several years since we made our first side by side comparison between Anka and Orka. A lot has changed, and we believe it’s important to make sure the information out there is accurate. We’ll be specifically addressing a newer...
Read More
networking-performancev1
Unlocking Superior macOS VM Network Performance: Introducing Anka's new networking mode for Apple Silicon
Large and complex enterprises using Anka have many different demands, and we have worked to continue to develop innovative technology to meet these demands. Enterprise infrastructure hardware is often on the cutting edge, and they need advanced capabilities...
Read More
gitlab-with-anka
Anka Cloud Gitlab Executor
Veertu’s Anka and the new Anka Cloud Gitlab Executor Veertu’s Anka is a suite of software tools built on the macOS virtualization platform. It enables the execution of single or multi-use macOS virtual machines (VMs) in a manner similar to Docker....
Read More
mac-scan-v1
Real-Time CVE Scanning of your macOS Build Systems
It’s common that an organization’s macOS build system will download thousands, sometimes tens of thousands of third-party dependencies every hour. When building and testing iOS applications, it typically downloads and installs third-party...
Read More
anka-on-silicon-v1
The ONLY Fully Automated Apple Silicon macOS VM Creation Solution
Starting in Anka 3.1 we announced that Anka is now able to fully automate the macOS installation processes, disabling SIP, and enabling VNC — all previously manual steps users had to perform inside o the VM. At the time of writing this article,...
Read More
anka_click
Scripting macOS UI User Actions With Anka Click
Starting in Anka 3.2, we’ve introduced a solution for scripting macOS UI user actions. You may ask, “Why would I want to do that?”. Well, often macOS configuration and applications do not have a CLI allowing you to perform certain actions...
Read More
mac-scan-fullscan-shells-v3
Real-time, continuous scan of file downloads on macOS for security vulnerabilities
Today, we are announcing the Beta availability of the Mac Scan solution. Mac Scan software runs on macOS systems (bare metal, virtual, EC2 Mac) and scans downloads in real time for security vulnerabilities. There are multiple scenarios why you would...
Read More
Screen Shot 2022-10-17 at 10.13
Anka 3.1- Fully automated VM macOS installation & The Behavior-Driven macOS UI Automation Framework
We are very happy to announce the General Availability of Anka 3.1 for Apple Silicon / ARM macs. In this release, we are taking our approach to iOS CI automation one step further by introducing a Behavior-Driven macOS UI Automation Framework in Anka,...
Read More
ami-scanner-featured-v2
World's first Security Vulnerability scanner for EC2 Mac AMIs
We are excited to announce the General Availability of the world’s first security vulnerability scanner for EC2 Mac AMIs. EC2 Mac AMI Scan scans Intel and Apple Silicon macOS EC2 AMIs, detects security vulnerabilities in third-party packages, dependencies,...
Read More
esxi-to-anka
It's time to migrate your iOS CI from ESXi Virtual Mac Infrastructure to native macOS Virtualization
When VMWare ESXi started officially supporting Apple macOS Virtualization on Mac hardware in late 2012, it opened the doors for the possibility of iOS development to move to a Linux-like, agile, scalable CI infrastructure. Soon enough, many iOS enterprise...
Read More