Development environment
This chapter describes the development processes and tools that are commonly used when applying the development and operations (DevOps) methodology. It includes a description of the new features in CICS Transaction Server V5.3 that support DevOps-style continuous delivery.
Here are some of the tools that are covered in the chapter:
Integrated development environments (IDEs), such as Rational Developer for z Systems, CICS Explorer, and the CICS Configuration Manager plug-in
Source control management (SCM) systems
Testing systems, including personal build processes and unit testing from the IDE
The goal is to create an integrated DevOps pipeline in which developers can develop in parallel, get rapid feedback on their work, deliver updates continuously, and maintain stable deployment environments. You can use such a pipeline to achieve quickly benefits from the DevOps methodology.
This chapter covers the following topics:
2.1 Integrated development environments
An IDE is software program that is used for developing applications. IDEs support different types of coding languages and build engines and usually allow the addition of plug-ins to support additional features:
Source code management (SCM)
Build and deploy
Database connectivity
CICS application development is supported on various IDEs, for example:
Rational Developer for z System
CICS Explorer (the CICS systems management tool)
CICS Configuration Manager (CM) (the CICS resource definition change tool)
This book uses CICS Explorer to demonstrate how the development process can be linked to the new DevOps deployment features in CICS Transaction Server V5.3. Learning about CICS Explorer can be beneficial even if you still develop your z/OS applications under TSO/E.
2.1.1 Rational Developer for z Systems
Rational Developer for z Systems is an Eclipse-based IDE that provides different toolsets for developing IBM z/OS applications. Rational Developer for z Systems is unique in that it offers development tools for PL/I, COBOL, Java, C++, and assembly language, along with real-time syntax validations.
Rational Developer for z Systems also includes connectivity to z/OS systems (through
IBM z/OS Explorer), CICS Transaction Server (through CICS Explorer), and to DB2 and
IBM IMS™ products. Because Rational Developer for z Systems is an Eclipse-based IDE, you can add features and plug-ins to Rational Developer for z Systems either manually or with the provided installation manager.
Rational Developer for z Systems is typically used to develop z/OS applications with the supported tools for PL/I and COBOL development. The user can compile, debug, and run programs whether online or batch.
Rational Developer for z Systems is installed by using IBM Installation Manager. You can use IBM Installation Manager to install and manage different IBM software from a single program. Software can be installed as a stand-alone instance, which is known as a product, or can be installed into existing products, where compatible. This installation into the same product permits greater integration between products, such as adding team collaboration features into text editors.
2.1.2 CICS Explorer
CICS Explorer is an Eclipse-based tool for managing CICS systems. In CICS Explorer, the user can manage all CICS resources, from regions to resource definitions, in one centralized place, with various wizards and resource editors that can help. You can also manage CICS bundles, cloud applications, and platforms, and integrate your CICS environment with an SCM system by using an Eclipse plug-in.
You can also develop Java EE, web, and JCICS applications by using the CICS Explorer SDK plug-in. The CICS Explorer SDK plug-in also supports WebSphere Application Server Liberty profile, which you can use as your target platform for application development.
There are many options for installing IBM Explorer for z/OS and CICS Explorer. The preferred method is to use IBM Installation Manager, which you can use to create a product or extend an existing product that was installed by IBM Installation Manager. Alternatively, you can extend an existing Eclipse installation by using Eclipse's built-in p2 installation process, or you can simply download CICS Explorer as a compressed file and extract it.
 
Note: Mixing installation methods can result in installation problems. If you first use
IBM Installation Manager to install a product, use only IBM Installation Manager to extend it. Likewise, if you first download a product as a compressed file and extract it, use only Eclipse's built-in p2 installation process to extend it.
For more information about each of these installation options, see the z/OS Explorer and CICS Explorer downloads documentation, found at:
Another major ability of CICS Explorer is to use variables for attributes that are defined in many kinds of definitions (CICS Transaction Server resource definition, XML files, and other files). You can create a general resource definition that is applied to all of your different environments. The value of the attribute is replaced based on the properties files within the target directory. Using the IBM CICS Transaction Server build toolkit (CICS build toolkit), you can replace all the attribute variables with appropriate values, depending on the environment to which this resource is deployed. Here are the different ways to create and use variables substitution:
Creating variable for CICS Transaction Server resource definition with the embedded wizard
Complete the following steps:
a. Within the tabular view of any resource definition, you can right-click any of the fields and select Export value to variable (see Figure 2-1).
Figure 2-1 Export value to variable example
b. In the next window, enter the wanted variable name and value and click Finish. If there are related projects (for example, application binding project), you can specify different values for different projects. In this example, we change the name of the JVM server to OSGIJVMS for the current bundle, PLATJVMS for the project with the multi-region platform, and PLATJVMS for the project with the single region PLATFORM (see Figure 2-2).
Figure 2-2 Extract value to variable
c. The variables.properties files should be created in each project that was selected in the previous step. The file should look like what is shown in Figure 2-3.
Figure 2-3 variables.properties file
d. Finally, instead of a hardcoded value in the field that you choose, the new variable appears with a dollar sign and brackets surrounding it (${IPDB.JVM_Server}) (see Figure 2-4 on page 15).
Figure 2-4 Variable instead of a hardcoded value in the definition
Creating the variables.properties file manually
If your file does not have a tabular view like a CICS Transaction Server resource definition (for example, XML files), or you do not want to use the wizard, you can manually create a text file that is called variables.properties in the containing project, and use the variable in any file you like.
For example, say that you have a CICS bundle project with a warbundle file inside it. The warbundle file is an XML file in which one of its attributes is jvmserver. Complete the following steps:
a. Create a file that is called variables.properties within the projects and enter this line:
"jvm.server.name=GENALIBS"
b. Open the warbundle file and change the value of the jvmserver attribute to ${jvm.server.name}. The file should look like what is shown in Figure 2-5.
Figure 2-5 Replace a value with a variable manually
You can also combine variables with hardcoded values, or concatenate as many variables as you want. For example, if you create one variable with the name application.initials and a value of LG, and another variable with the name sub.application and the value CUS (meaning customer), then the following examples are possible uses of these variables:
${application.initials}ICUS01 is resolved as LGICUS01.
${application.initials}I${sub.application}01 is resolved as LGICUS01.
${application.initials}${sub.application} is resolved as LGCUS.
2.1.3 IBM CICS Configuration Manager
IBM CICS Configuration Manager for z/OS (CICS CM for z/OS) provides mechanisms to deploy and manipulate easily CICS resource definitions in a controlled and auditable manner. In particular, managers of CICS systems can prepare source and target region combinations, which are known as migration paths, to define the transition of resource definitions through various environments. Managers can establish transformation rules for CICS resource definitions, which enable automatic changes to resource definition attributes based on the requirements of the target environment. CICS CM includes features for standards enforcement and security controls, which makes it possible to delegate CICS resource changes directly to application programmers while still maintaining centralized control. This allows rapid deployment of the resource definitions, within the identified systems security constraints.
Using the CICS CM plug-in for CICS Explorer, developers build and start what are known as change packages. With these packages, the developer defines CICS resource definition changes that are required by the current application release, including new, altered, and deleted resource definitions. With the package defined, it can progress through a continuous delivery pipeline along the dependent code changes.
The CICS CM plug-in for CICS Explorer can be installed through IBM Installation Manager or the Eclipse's p2 installation process in the same way as CICS Explorer.
2.2 Source control management systems
At a minimum, SCM systems provide backup and version management of source code and related assets. Different SCMs work differently, with some requiring files to be locked, edited, and only unlocked after a change is made, and others permit editing by many users and then resolve any conflicts when the changes are integrated (the latter method allowing for faster, more concurrent development). Some SCMs also provide their own build infrastructure or integrate tightly with build tools, creating a complete application development solution.
The benefits of SCM systems vary depending on the system that is used:
Share source code changes with other team members
Notify team members when changes are made to certain source code components
Create snapshots for application builds or releases
Work on the same codebase independently of other developers and merge the changes together at the end
For the examples that are provided in this book, we use IBM Rational Team Concert as our SCM tool to manage source code changes.
Rational Team Concert uses a centralized repository model. It offers command-line, Eclipse, and Microsoft Visual Studio IDE clients for developing code. It permits concurrent editing and encourages backups of undelivered changes in personal on-server repositories known as repository workspaces. Rational Team Concert has tight integration between its own SCM system, continuous integration (CI) server, and build engines. Alternatively, it can integrate with external CI servers, such as Jenkins CI. Rational Team Concert also provides project planning and defect tracking capabilities that integrate with its SCM system, providing a direct audit trail between code changes and the related work item.
To provide direct SCM support in CICS Explorer, the Rational Team Concert client for Eclipse can either be installed into the same instance as CICS Explorer through IBM Installation Manager or Eclipse's p2 installation process in the same way as CICS Explorer.
2.3 Testing systems
One of the primary principles of DevOps is to amplify feedback loops. This activity can occur at the start of development by using testing techniques that allow the developer to understand quickly the impact of changes and verify the behavior of code with test frameworks and systems.
Eclipse and products that are based on Eclipse (such as Rational Developer for z Systems and CICS Explorer) contain the toolset known as Java Development Tools. These tools provide integration for running JUnit tests to unit test Java code (Figure 2-6) and promote test-driven development (TDD). Additionally, many libraries support test methodologies, such as behavior-driven development (BDD), and techniques such as mocking and stubbing for Java code. In CICS, this is applicable for code that is run on Liberty or OSGi JVM servers.
Figure 2-6 Testing with the integrated JUnit support in Eclipse-based IDEs
When working with COBOL code, unit testing can be achieved through the Rational Developer for z Systems Unit Test feature, or the Rational Development and Test Environment for z Systems feature, both of which emulate z/OS to replicate a system and allow testing of code before it gets to a real z/OS system.
Some tests might rely on a server-side infrastructure setup or must be run on the server. Ideally, this testing can be achieved through automation for quick and consistent setups, after which personal builds (such as can be run through Rational Team Concert) allow for in-progress code to be tested before integration, by producing personal copies of the application.
When code is delivered to the main codebase, it is important that the same tests are run on each build, so that the developer and team are immediately alerted about issues, so that they can be fixed immediately. Then, further tests such as load tests or production data tests (which might be prohibitively expensive or too slow to be of value in personal builds) can also be run. Continuous integration servers such as Rational Team Concert can run all these tests at every build or when required.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset