Starting an Ephemeral VM Pipeline using macOS
As Dev and Ops teams combine to DevOps teams, ephemeral builds become a bigger pain point - don’t worry, we’ll walk you through the how-tos with Orka.
Many organizations have working products based on the static build concept, and that approach works just fine for some use cases. However, as Dev and Ops teams move toward a more combined DevOps practice, they’re faced with a major pain point: writing infrastructure to go into ephemeral builds.
Orka has many plugins that allow the use of standard CI tools such as Jenkins, Teamcity, BuildKite, and more (see a full list here). In the event a pipeline is not using a standard CI/CD tool, or the use case is different from normal CI/CD use cases, teams can code their own ephemeral-based architecture using the Orka CLI.
As teams move to virtual machines, they seek to ease a few pain points but find old practices don’t hold up well. For example, one of the old methods with bare metal build machines is a clean-up process to get rid of any artifacts that may interfere with new builds, often followed by a reboot. In VMware, this is replaced with a snapshot revert, and with Orka, this is achieved with a
vm delete command followed by
vm create, and as of Orka 1.2.0,
vm revert has been introduced as another option.
While these pain points can give teams new to infrastructure as code (IaC) pause, the important thing to remember is the workflow changes, but standards do not change. With Orka, the process to start with ephemeral VMs takes as little as two files, but the same general principles apply to VMware and any other system.
At MacStadium, we based our early quality control scripts, and our current Ansible benchmarking scripts, on two key files, an execution file, and basic parser file. This code was written with three conditions:
- Needs to run on any macOS or Linux OS system
- No VM customization beyond installing macOS and enabling SSH
- No extra dependencies could be used on the VM side; staff is allowed to use locally installed dependencies
For these reasons, the benchmarking team chose to use a
sh script with
AWK. Although it is an older language,
AWK conveniently runs on all macOS and Linux OS systems. These files are written against the CLI as opposed to API; this lets the staff do integration testing. However, your team might want to code against the API directly.
Our kick-off script is
run-bench.sh and uses six core VMs on Orka: