CICS - DevOps and CICS

Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. -

CICS - DevOps and CICS

In this chapter we take a look at how DevOps and CICS applications can form an enterprise-based end-to-end strategy.

8.1 Introduction to DevOps

DevOps is all about bringing the principles of Lean and Agile together as part of a continuous improvement process.
It’s an end to end process that’s iterative and never fully completed; it’s all about removing waste from the system and continuing to improve.

Combining Agile and DevOps practices makes it easier to build open and hybrid applications.
DevOps is the union of People, Process, and Tools to enable continuous integration and continuous delivery and we’ve seen an incredible adoption of DevOps over recent years.
However, even with the best tools, DevOps is just another buzzword if you don’t have the right culture. And the primary characteristic of DevOps culture is increased collaboration between the roles of development and operations.

8.2 DevOps on IBM Z with CICS applications

What does all this mean for Z and CICS applications?

Well, it really doesn’t matter what platform or environment you are building for -- it’s the same DevOps -- and you don’t get the improvement you need by having multiple different ways of working with artificial boundaries and silos in between.
You need an enterprise-based end to end strategy.

So a key point here is that there is no technical reason why traditional z/OS development, including CICS application development and delivery, cannot be part of an open distributed pipeline.
You can transform your z/OS and CICS environments to a true, modern DevOps practice by bridging the gap between mainframe and distributed by letting developers work in the mainframe and distributed worlds in the same way.

What we at IBM want to do is provide this pipeline as the automation framework for the DevOps transformation.
And our approach to a cross-platform delivery pipeline solution is to integrate a variety of open source and third-party tools along with enterprise tooling so that you can choose a pipeline that is right for your organization based on your business needs.

Some of the open source and third-party integrations we offer include Git, Jira, Jenkins, and SonarQube -- to name just a few (Figure 8-1).

All parts of the pipeline are important; you can’t just pick one area and say you’re DevOps enabled.
You should consider the entire pipeline – and maybe focus on different areas at different times – but the entire picture is key to set the scope for each part.

However, it’s equally true that you can’t do everything at once, so starting with deployment might be what many customers do as that lets them set up new environments with also makes testing easier.

The pipeline is not in one direction, it’s in the form of a circle with continual analysis and feedback at various points along the way.

It’s also important to note that this chart includes many solution options in many boxes that overlap with each other – this demonstrates that you have significant choice in how you determine the DevOps pipeline that is right for you.

There are a few key aspects to the DevOps pipeline that must be common, so let’s think more about these aspects – and how they specifically relate to CICS applications – in a bit more detail.

8.2.1 IDE and debug

There are a number of IDEs that can be used for mainframe application development, including the IBM Z Open Editor and Zowe, all based on developer choice.
Along with these leading-edge IDEs, productive application debugging technologies for CICS – such as IBM Debug for z/OS -- are also available, to provide a “round-trip” development experience.

8.2.2 Source code management (SCM)

These modern IDEs all have integrations with Git.
Outside of mainframe development, Git has become the defacto standard for source control in all areas of application development.

Now these integration capabilities enable developers to get the most out of a modern SCM like Git and assist with the standardization of true parallel development across the enterprise.

Ideally, there should be one SCM, so the resources can be shared – a single source of truth, a single place to integrate audit reports and automation, and you could use RTC or Git for your SCM. Customers usually choose one or the other not generally both.
However, the important thing to note is that CICS applications, regardless of language, can fully participate in Git ecosystems.

8.2.3 Build

There will be many different build solutions generally based on language, for example Maven or Gradle for CICS Java applications.
Or IBM Dependency Based Build for traditional CICS applications, for example in COBOL or PL/I.

Dependency Based Build, which includes a build took kit, allows you to build your CICS applications and analyze the dependences required for build.
DBB also includes Groovy for automation so it actually helps you to bring your CICS applications and mainframe processes into the world of open source so you can hook up your mainframe processes to CI/DC to open source tools like Jenkins.

The CICS team have introduced powerful new support for CICS Java developers in CICS Transaction Server V5.6, including supporting Maven and Gradle as two frameworks for building Java applications -- and the bundles that they are deployed through -- as well as adding libraries to Maven Central to make those DevOps CI/CD pipeline build chains much easier to create and manage.

With this new release of CICS, the development team also wanted to see if they could come up with a way that Java developers could run their CICS applications directly in their development environments, without having to deploy them at all.
Importantly, these applications should still be able to link to programs running in CICS.
And crucially, once they’ve finished developing them, these applications can be deployed unchanged to real CICS regions.

To address this, CICS introduced an extension to the existing JCICS API called JCICSX.
This is a subset of the JCICS API in terms of functionality but means that Java developers can now run their CICS Java applications locally on their laptops while they’re still developing them.

8.2.4 Pipeline automation

One of the open source integrations mentioned earlier is Jenkins - a CI/CD coordinator – that provides a single point for audit and a single place for integrations.

Jenkins is used as common tooling to embrace DevOps principles, enabling the management of CI and CD workflows that can encompass CICS applications.
This may be the same Jenkins master that is running your distributed workloads.

8.2.5 Unit testing

Automated testing is critical to making the DevOps pipeline possible for without automated testing you may just speed up the deployment but still have to wait on the overall process.

Continuous testing is a key part of DevOps and it means testing earlier in the life cycle, which results in reduced costs, shortened testing cycles, and continuous feedback on quality.
This process of shift-left testing, stresses integrating development and testing activities to ensure quality is built-in as early in the life cycle as possible.

It’s important that the first step of the testing is done in a clean and automated way – and very early on in the life cycle -- so you’re feeding in tested code into the rest of the lifecycle.
This process of shift-left testing ensures quality is built-in as early in the life cycle as possible.

IBM solutions such as IBM Z Open Unit Test provide an advanced and flexible tool for writing and executing automated unit tests of batch and CICS programs programs on IBM Z.
Stubbing capabilities for CICS programs are available, meaning developers don’t need to deploy to CICS during unit testing, thereby enabling environment independence.
utomated data capture and recording for batch and CICS programs allows for test scenarios to be Integrated into any CI/CD process.

8.2.6 Integration testing with Galasa

Galasa is a test automation framework that we’ve made available as an open source project.
Galasa originated after a number of times when the CICS development team were discussing how they did their DevOps pipeline within the CICS organization, and how they approach testing, especially the automated parts of testing in CICS.

Galasa allows you to write tests however you want – whether it’s using 3270 scripting or preparing a batch job for execution.
Or it could be using web tools, such as Selenium, integrated within the same test, and providing deep integration into Z.

Tests can be run locally on a workstation, but they are still connecting to the mainframe without having to change the test code.

Using Jenkins, a pipeline can be configured and request that Galasa runs a set of tests.
You can specify to run a specific test if there’s one you particularly want to run, or alternatively you could ask Galasa to run a set of tests based on information about the change set that was delivered.

8.2.7 Deployment

UrbanCode® Deploy is a tool for automating application deployments through your environments – from test to production.
It is designed to facilitate rapid feedback and continuous delivery in agile development while providing the audit trails, versioning, and approvals needed in production.

You can use IBM UrbanCode Deploy and the specific CICS TS plug-in to automate the deployment and undeployment of CICS resources.
Used in conjunction with other CICS tooling, UrbanCode Deploy can improve workflow efficiency and contribute to a continuous delivery environment.

The plug-in includes steps that can automate the actions such as the installation of CICS resources, pipeline scanning, the opening and closing of resources, and many more operations.

8.2.8 Analysis

Lastly, let’s consider the analysis phase within our DevOps pipeline.

Using discovery tools such as IBM Application Discovery, you can visualize application dependencies, automate the discovery effort with mainframe connectors and SCM integration, as well as identifying most essential test cases, redundant test cases and gain an understanding of code coverage.

Furthermore, a combination of IBM Application Discovery, integrated with other CICS analysis tools such as CICS Interdependency Analyzer, allows for 360 degree view of both static application of CICS application code, as well as a full runtime analysis picture (Figure 8-2).

This document was created or updated on December 17, 2020.

© Copyright IBM Corp.