Delivery of Mac cloud virtual machines for MacOS and iOS CI just got easier.
MacStadium engineers have put together some examples of Ansible scripts to deliver your CI building environment. You can find them and detailed README at MacStadium's Github.
Ansible is a configuration tool that acts as a kind of hub to scan all kinds of actions with any kind of software. It is written in "Ansible", a YAML-based language that includes human readability, so it does not take a huge level of technical skill to use.
It also requires Python (Python2.7 or Python3.5 + should do the trick) to be installed on the controller. You can perform Ansible against groups with target nodes or on the control machine itself (in this case, the controller will configure itself).
Scripting processes are systematically broken down into smaller, more manageable and modular, sections called Modules. There are many modules out there. If you can't find the module you need, Ansible lets you write a custom with Python or PowerShell for Windows modules. Several modules can be combined into one role. Multiple roles can be combined to include a Playbook ̵
For our purposes, we have put together an Xcode Installation and an OSX CI Build role, and we have packed them into a Playbook of the same name which is a fully operational example and is ready to either dropped into a CI workflow, or it can easily be expanded to suit your needs.
In particular, these roles will speed up and facilitate the installation of Xcode, Homebrew, Node.js 10 LTS, Java 8, Fastlane and CocoaPods.
Our sample scripts allow you to deliver a single VM from which you can create a VM template that is quickly and easily cloned quickly and easily. They must be run on the target machine via SSH. They are written to target "localhost", although this behavior can easily be changed to fit your particular workflow.
An interesting mode of use that will serve MacStadium customers well is the integration of Ansible with VMware, the virtualization platform running the VMs themselves. Ansible has the built-in ability to speak to VMware's vCenter API, providing a human-readable interface for creating, modifying, and deleting VMs through an API exposed from the Mac cloud environment.
This automatic portrait summary of the World Cup via Ansible can be mixed with the delivery of the World Cup as described above, so you end up with a simple, complete description of your workflow that has all the ease of use of a YAML based language.
To learn more about Ansible and its far-reaching possibilities, check out Ansibel's documents.