Logo

Starting an Ephemeral VM Pipeline using macOS

By John Cabaniss|

June 09, 2020

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:

Share this article

Logo

Orka, Orka Workspace and Orka Pulse are trademarks of MacStadium, Inc. Apple, Mac, Mac mini, Mac Pro, Mac Studio, and macOS are trademarks of Apple Inc. The names and logos of third-party products and companies shown on the website are the property of their respective owners and may also be trademarked.

©2023 MacStadium, Inc. is a U.S. corporation headquartered at 3525 Piedmont Road, NE, Building 7, Suite 700, Atlanta, GA 30305. MacStadium, Ltd. is registered in Ireland, company no. 562354.