Sunday 22 May 2022

Mainframes and Ansible


There’s a lot of talk, a lot of presentations, and a lot of articles published about mainframe modernization. Many of those articles and presentations are by companies that simply want to ‘help’ mainframe sites migrate all their applications onto the cloud. But that isn’t the only mainframe modernization that mainframe users are considering. One of the biggest drivers at the moment is mainframe automation. And one way of doing that is to use Ansible.

Ansible is now available from IBM following its takeover of Red Hat in 2019. In fact, Ansible was written by Michael DeHaan and Red Hat acquired it in 2015. As I’m sure you know, Ansible is an open-source software provisioning, configuration management, and application-deployment tool. Modern automation on mainframes using Ansible is important because it provides a way to integrate z/OS into an enterprise automation strategy in a consistent way. With Ansible, it’s easy to onboard new systems programmers, DBAs, and developers. And, with Ansible, infrastructure and provisioning changes are all managed as code.

The Ansible Engine runs Ansible Playbooks. Playbooks are YAML files that store lists of tasks for repeated executions on managed nodes. Each Playbook maps (associates) a group of hosts to a set of roles. Each role is represented by calls to Ansible tasks.

Ansible Tower is a REST API, web service, and web-based interface (application) designed to make Ansible more accessible to people with a wide range of IT skillsets. It is a hub for automation tasks. Tower is a commercial product supported by Red Hat,  but derived from AWX upstream project, which is open source.

There is plenty of Red Hat Ansible certified content for IBM Z. Certified content collections accelerate the use of Ansible with IBM Z and enable:

  •  Improved efficiency via the simplification and standardization of complex IT deployments and enterprise automation strategies.
  • The visibility of z/OS automation. It’s possible to know what’s being automated, when, and by whom.
  •  Increased productivity simply, with certified collections that codify system-specific knowledge and complexity.

Mainframe sites use Ansible to build and provision middleware, to roll out fix packs to thousands of servers, and for self-service provisioning of portals. They also use Ansible for middleware configuration as well as network and security configuration. For security, it can be used for the SSL certification renewal process, password resets, and to create new users. Ansible can integrate infrastructure provisioning and Z application deployment into a CI/CD pipeline. It can orchestrate and replace existing siloed in-house automation. And it can integrate existing automation into the overall workflow. Lastly, it can collect audit and security configuration details, system status, and health checks.

The IMS collection is available from Ansible Galaxy. Simply search for ibm_zos_ims to find the IMS collection. There is also plenty of documentation available, especially for each of the modules available.

At a recent meeting of the Virtual IMS user group, Haley Fung, IBM Product Manager for IMS and Ansible for Z, discussed some examples of using Ansible with IMS. She said that a developer can use Ansible to compile and issue IMS commands to refresh an IMS transaction for testing from their preferred development tool, such as VS Code, after they change their COBOL application code.

A second example is that a DevOps engineer can build a playbook to generate a new PSB to update the program view for an application change, and drive the IMS online change in a CI/CD pipeline.

Another example is a system administrator, who can create a reporting tool to query the status of IMS transactions or programs, and send out notifications to report issues.

A database administrator could issue IMS commands to take an IMS database offline for processing and put it back online when complete. Or a DBA could populate a new catalog. Or, a DBA could orchestrate new automation to update the IMS catalog and integrate existing ACBLIB and Managed ACB directory automation to ensure that they are in sync.

A DBA could use DBRC commands to examine information captured in the RECON datasets, such as image copies that have been captured over the month, to determine which image copy to recover from.

The last example Haley gave was a DBA who might also need to issue a command to register a new database with RECON or run clean-up or maintenance tasks with the RECON datasets from time-to-time.

Haley went on to say that IMS users can try the Ansible IBM Z Trial. This is a free guided virtual demo environment, providing users with the ability to run and review Ansible playbooks automating tasks on z/OS.

They can then request the Ansible Automation Platform free trial. This includes: a single self-supported 60- day subscription for Red Hat Ansible Automation Platform for Red Hat Enterprise Linux; access to Red Hat’s customer portal with documentation, videos, discussions, and more; and it can support up to 100 Ansible managed nodes.

For those of you who like this kind of arcane information, the term 'ansible' was coined by Ursula K Le Guin in her 1966 novel Rocannon's World. In the book, it refers to instantaneous communication systems.

Ansible seems to be a great way to automate mainframe tasks, and also provides a easy way for non-mainframe specialists to work on mainframes.

No comments: