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

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.


— 

Should managing AWS instances not be possible for your team, we have several hosting providers available. They will manage all of your nodes, the Build Cloud Controller & Registry, perform updates, and help fix any problems that might arise.

Share this post

Share on facebook
Share on twitter
Share on whatsapp
Share on linkedin
Share on email