Benefits of running Anka on AWS EC2 Mac Instances

Recently, the AWS Compute Blog wrote an excellent introduction to “Getting Started with Anka on EC2 Mac Instances“. In the blog, they covered allocating an EC2 Mac Dedicated Host; launching a mac1.metal instance on it; installing and configured Anka for “type-2 virtualization and orchestration”; and finally, successfully launching and running commands inside a macOS virtual machine. However, in this blog, we’d like to elaborate on a few of the benefits of running Anka on AWS EC2 Mac Instances.

With Anka, you can maximize the resource utilization provided by the instance and ensure clean build/test environments for your CI/CD pipelines.”

Getting Started with Anka on EC2 Mac Instances

EC2 mac1.metal instances are powerful tools to use for macOS CI/CD. They take away the hassle of maintaining and managing Apple infrastructure for CI while also enabling quick short-term scaling to handle increased demand. With Anka running on these EC2 mac instances, you can transform your static CI agents into on-demand and ephemeral agents, maximizing resource utilization.

It’s usually the case that CI/CD jobs are not always running 24/7, and having instances sit around can be costly. Anka on EC2 allows you to maintain fewer EC2 instances as you can run multiple ephemeral Anka VMs at a time, allowing you to double your macOS and iOS build/test fleet. This is on top of the on-demand sandboxed environments, ensuring a clean build/test environment for each pipeline and job — it’s a perfect match!

GPU-Metal Support

“You can automate macOS virtual machine creation and setup using industry standard infrastructure-as-code tools, store and distribute virtual machine templates and tags with your specific dependencies using the Anka Registry, and automatically request virtual machines for your CI/CD jobs using plugins — even develop custom integrations with Anka’s REST APIs.”

Getting Started with Anka on EC2 Mac Instances

Without Anka VMs, you have to prepare and then clean up the ec2-user environment for each run and can even then, usually, only safely run a single job on an instance at a time. The DevOps effort necessary to create Anka VM Templates/Tags and then push them to a centralized registry is less than creating custom preparation and cleanup logic.

If you’re curious about how to automate the creation of Anka VM Templates and Tags, here are some options and examples:

You can find information about how Anka VM Templates and Tags work on our documentation site.

Another massive benefit of using Anka on AWS is intranet transfer speeds for Node and Registry communications. Switching between the project-specific dependencies/VMs requires, initially, that you pull the layers you need from the Anka Build Cloud Registry. If those layers happen to be several GBs or more, you’re looking at slight delays to your CI/CD builds/tests starting. Pulling and pushing VM Templates and Tags within the AWS network is blazing fast.

“All of this means faster, consistent builds and convenient, distributed testing, without having to procure, maintain, and manage physical computers specifically for Apple application development.”

Getting Started with Anka on EC2 Mac Instances


Already have an AWS account and want to easily create everything you need to play around with Anka Virtualization and/or the Anka Build Cloud? We have a set of scripts you can use to do just that! You can find them under our Getting Started repo’s AWS folder. There are two scripts available:

prepare-build-cloud.bash

  • Running this script will create everything necessary inside of AWS to run an Anka Build Cloud. This includes a security group, elastic IP, etc.

prepare-anka-node.bash

  • Running this script will create everything necessary inside of AWS to run a mac1.metal instance and then install Anka inside. You’ll be prompted for the Anka license to use if the ANKA_LICENSE env variable is not set.

Both scripts can be run locally from your macOS hardware with an existing AWS credential. To obtain a trial Anka license, visit our website.

DevOps teams love automation, speed, and easy-to-maintain solutions. Anka is a perfect solution for DevOps teams. Two of our favorite DevOps practices are “shifting left” and self-service. Both of these are why we created Anka Flow, a version of the Anka Virtualization software developers can install on their laptops to run and even create Anka VMs. Once VMs are prepared, developers can either push their new VM Template/Tag to the Registry or update a script in their project repo that, when updated, triggers a CI/CD job that does the creation and pushing to the centralized Registry so your AWS EC2 macOS instances can use it. This sort of Anka VM per project/repo preparation script and automation allows developers to create their own VM Templates/Tags whenever a new dependency is needed or changes, without involving DevOps teams, and makes Anka Flow a great way for them to test that the script not only installs what they want in the VM but also successfully runs the project code they have locally without requiring CI/CD.

We’re excited about the future of both products. As time goes on we’ll continue to see emerging use-cases and benefits of this powerful combination.


 

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
ankam1v2
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...
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