The images are built as separate layers on top of each other. Using Packer, we can create an image that has Xcode, fastlane, CocoaPods, and all the other essential tools for our build jobs while only taking the macOS installer downloaded from the App Store as input. Packer lets us automate the virtual machine creation process out of a bunch of confirmation files. To make that process easier, we used HashiCorp’s Packer. The first step we needed to do was to create an Anka virtual machine that we can clone for each build. Buildkite offers a simple, modern UI with the ability to easily create sophisticated pipelines. We decided to stay away from Jenkins since it’s too fiddly to set up and go for something more modern.Īfter trying different tools, Buildkite seemed to best fit our needs. The next challenge we faced was picking a frontend to schedule and manage our builds. Anka is a virtualization technology for macOS build on top of amework that offers a container-like interface and offers a simple command line interface to spin up and manage virtual machines. Unfortunately, Docker doesn’t support macOS containers, so we decided to use Veertu’s Anka. To help reduce flakiness and the eventual configuration/environmental drift, we decided from the get-go that builds need to run in an isolated environment, like Docker containers, rather than running them directly on the host machine. This tool does nightly runs that take many hours to complete, and while running it on CircleCI is possible, it wouldn't be cost effective. In addition to that, we have an internal tool we have developed to do a combination of functional and stress testing on the SDK. This is currently not possible on CircleCI, and while there are many services that let you do this, we preferred to utilize the extensive set of testing devices we already had at our office. This would help us find obscure UI and performance issues. While CircleCI works great for us, we wanted to run our UI tests on physical devices instead of just simulators. Challenges with our current infrastructure In this post, I’ll walk you through what motivated us to do it and the tools we used. As a result, we decided to set up our own CI infrastructure. If port forwarding rules are already set and you want to not have them fail the packer build, use packer build -force.ĭisplay_controller (string) The display controller to set (run anka modify VMNAME set display -help to see available options).While we’re big fans of CircleCI and use it for continuous integration for both our iOS and Android SDKs, but as our team grows, our needs have changed. Hw_uuid (String) (Anka 2 only) The Hardware UUID you wish to set (usually generated with uuidgen). This currently only supports debug and is only useful for VM creation failures. Log_level (String) The log level for Anka. Defaults to anka.īoot_delay (String) The time to wait before running packer provisioner commands, defaults to 7s. Can also be set with ANKA_DEFAULT_USER env var. Defaults to admin.Īnka_user (String) Sets the username for the vm. Can also be set with ANKA_DEFAULT_PASSWD env var. Defaults to false.Īnka_password (String) Sets the password for the vm. Use_anka_cp (Boolean) Use built in anka cp command. Stop_vm (Boolean) Whether or not to stop the vm after it has been created, defaults to false. We will automatically resize the internal disk for you by executing diskutil apfs resizeContainer disk0s2 0 inside of the VM Ram_size (String) The size in "+G" format, defaults to 4G.ĭisk_size (String) The size in "+G" format, defaults to 40G. This change gears us up for Anka 3.0 release when cpu_count will be vcpu_count. Vcpu_count (String) The number of vCPU cores, defaults to 2. Starting in 3.1.2: This can also be set to 'latest' or a specific macOS version in order to have Anka attempt downloading the installer for you ( vm_name will be set to anka-packer-base-$).Installer (String) The path to a macOS installer. Segmented below into two categories: required and optional parameters. There are many configuration options available for the builder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |