Skip to content

It is Time to Talk Terraform

How Terraform and Ansible are your new best buddies for z/OS efficiency

In the PopUp labs, we like nothing better than to explore new ways to do things smarter and faster. Blending innovations from distributed to mainframe, open source to vendor-driven, we pride ourselves on using a best-of-breed approach to mainframe efficiency.

A recent addition to the mix is Terraform. We discussed its possible usage and value at length. This miniseries captures the key aspects of that conversation that unfolded, as we developed a further efficiency improvement in our PopUp on-demand z/OS environments. Let’s imagine a mainframe shop discussing their woes with us, and hear the discussion unfold…

“Sorry, there are no available LPARs, you’ll have to wait…”

The frequent scenario for complex mainframe shops is teams struggling to get z/OS environments for their work. Over 80% of respondents to our survey last year said environment access was a concern. And even if there is capacity for a dev/test environment, the ability to provision z/OS environments lies with the sysprogs and generally requires raising tickets and waiting.

The impact of not having a dev/test environment is huge – delays in daily work, no ability to do dev/test, nowhere to try out new tools or ways of working. In some cases, releases are cancelled as there is insufficient time or environments for testing. Unsurprisingly, organizations are striving for greater operational efficiency across platforms and implementing platform engineering to improve productivity.

“What if there was another way?”

Instead of hoping for spare LPAR capacity, organizations are now using on-demand mainframe environments, either running on IFL processors on Z or off-host on x86 servers. These provide fully-configured IBM Z (z/OS) environments which are ready to use for development, testing, training, delivery, and more. Using on-demand z/OS environments helps organizations accelerate delivery while reducing the cost, risk, and complexity of mainframe change.

“I want a self-service z/OS environment please… and my ten colleagues do, too”

While on-demand Z environments are a huge benefit, managing them and providing self-service usage of them is another administrative burden that must be minimized. Manually creating, configuring and managing 10 z/OS environments as and when they are requested is, ordinarily, time-consuming at best.

Users overcome this problem using automation to manage their environments, enabling them to stand up and tear down environments quickly and repeatably. This process uses the concept called “infrastructure-as-code”. Infrastructure-as-code (IaC) automates the provisioning and management of IT infrastructure (a z/OS environment required for a test cycle, for example) using configuration files which describe every aspect of the desired infrastructure.

Automation enables infrastructure (in our case, z/OS environments) to be treated like software – we can develop, version control and test the scripts and config files, in the same way that we do when we build software.

As outlined by IBM, the benefits of IaC include

  • Faster time to production
  • Improved consistency
  • Accelerated development
  • Protection against knowledge loss
  • Lower costs

“Tell me how you use Terraform”

One of the most popular tools which provides IaC capabilities is Terraform. Terraform has been very widely adopted and is relied upon daily to provide environments to developers and testers globally.

Terraform provides a unified infrastructure lifecycle management interface and a single workflow for provisioning infrastructure components for multiple clouds (AWS, Azure and Google Cloud), networks, private data centers and SaaS environments. With Terraform, users can create, update and destroy infrastructure.

Source: “What is Terraform?”

Terraform is standard practice in cloud deployments and on-prem, including z/OS.

“So, just one click, and here’s your z/OS environment?”

Correct. With the PopUp Mainframe product, we are harnessing Terraform’s efficiency to provide instantly available z/OS administration and provisioning. Terraform integrates with PopUp Mainframe and enables full “infrastructure-as-code” with z/OS. PopUp provides the z/OS and Terraform takes care of the infrastructure underneath (which could be LinuxONE, Linux on Z, or off-host).

Using Terraform means that all the infrastructure configuration, including networking, storage, security, access control, and more, is taken care of. In just one click, a new z/OS environment is ready to go.

“Where’s my application and data?”

Great question. After all, the value of a z/OS environment is what is running on it. And our answer uses Ansible.

Ansible is a powerful tool which enables us to manage applications and configuration and execute tasks. Terraform and Ansible are a perfect match. In essence, Terraform creates the environment (z/OS) then Ansible installs the application and configures it. Think of it as Terraform building the house, and Ansible decorating the rooms. And you get to choose the carpets.

Together, Terraform and Ansible provide a comprehensive, automatic end-to-end solution for z/OS environments and applications.

We mentioned platform engineering earlier. The foundation of a platform engineering solution is the ability to provide your teams with on-demand environments, and with that comes the requirement to spin up and tear down environments using automation and infrastructure-as-code. It provides many benefits to software engineering teams, and our view is that is true for z/OS just as much as distributed systems.

“So now we can finish the dev project faster?”

With a self-service z/OS instance available whenever you need it, the opportunities are endless. Teams are finding benefits with flexibility of their teams, better workload management, and accelerated deliveries. In part 2, we will outline how we use Terraform and Ansible in the PopUp dev team to innovate and share some tips for those on their infrastructure-as-code journey for z/OS.