Provisioning on MacStadium with Terraform
In the latest in a series of helpful posts for new MacStadium adopters, get tips for using HashiCorp's Terraform with each of MacStadium's virtualization platforms.
In an earlier blog post, we highlighted the different virtualization options available at MacStadium – Orka, VSphere and Anka – and discussed provisioning with Ansible. In this blog post, we'll cover Terraform and how it works with each virtualization platform.
MacStadium virtualization does not follow the “standard” method. Unlike other clouds (like AWS or GCP), MacStadium has no native virtualization layer. There are some very good commercial-off-the-shelf virtualization solutions and MacStadium utilizes these: Orchestration with Kubernetes on Apple (Orka), VMware (specifically with vSphere), and Anka. It should be noted that at the time of this blog post, Orka is still in beta but the support across the open source community for Kubernetes is huge. Given the level of excitement and support, this new method will be a popular virtualization choice for MacStadium customers moving forward.
HashiCorp’s Terraform offers a solution for VM provisioning and limited pipeline deployment. Terraform’s strength and fame comes from its architecture. The virtualization provider variable can be changed with a pointer. While some other things need to be adjusted for true multi-environment deployment, this provides a record low number of elements to change for deployment on any cloud provider.
Orka/Kubernetes: HashiCorp has a provider for Kubernetes (K8s), along with a nicely-detailed guide. Given the momentum of K8s, HashiCorp appears to be placing a priority on keeping the community tools and outreach going.
VSphere: HashiCorp maintains four different VMware providers:
Most advanced vSphere users find the Terraform system to be very performant. HashiCorp also actively addresses feature requests. (Ex: Not being able to provision resources from a cluster resource pool was fixed ~6 months ago.)
Anka: No provider written, and currently no plans to write one. (Please note that Packer, also by HashiCorp, does work well with Anka. Often Packer is used in conjunction with Ansible for this functionality in Anka.)