Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds CICS Resource builder build capability to zAppbuild #351

Closed
wants to merge 10 commits into from

Conversation

odttlnt
Copy link

@odttlnt odttlnt commented May 4, 2023

This request extends the functionality of the build by allowing users to build CICS resource definitions in yaml format. The changes will allow the CICS yaml formatted file to be build by the CICS Resource builder tool. It will generate an artefact which will be in the legacy CSD format. This artefact can then be used in a DFHCSDUP job to apply the changes to the CICS region. The PR is a part of the Infrastructure as code effort.
The PR consists of CRB. groovy file for doing the build and its corresponding properties files CRB.properties. Plus related changes to the README

dennis-behm and others added 3 commits April 17, 2023 15:48
Moved the Reporting feature into in its own utilities file, and simplifying the query to check for impacted logical files across collections using DBB 2.0 APIs.
Added preview build option to leverage DBBs reportOnly capability
* Add file count and progress indicators to language scripts.

Signed-off-by: Marc Bauer <[email protected]>
@M-DLB
Copy link
Member

M-DLB commented May 5, 2023

@odttlnt - Can you please take the latest version of CRB.properties from our internal reference system?
Also you don't need to change the property files for the Mortgage Application.
Thank you!

@dennis-behm - Can you please have a look for the rest of the changes? Thanks!

Copy link
Member

@dennis-behm dennis-behm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution.

@odttlnt I have a few comments on this PR, please see them attached to the PR.

@odttlnt, @M-DLB, I am wondering, if the crb_resourceModelFile and crb_applicationConstraintsFile should be defined the build-conf directory of zAppBuild, rather then pointing to an "external" configuration location.

languages/CRB.groovy Show resolved Hide resolved
languages/CRB.groovy Show resolved Hide resolved

List<String> buildList = argMap.buildList

println("** Processing files mapped to ${this.class.getName()}.groovy script")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the next release of zAppBuild, the language script have a progress indicator. You can find it already in the develop branch contributed with 04e6118. Can we please have the same logic here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to show progress indicator

@@ -3,7 +3,7 @@
#
# Comma separated list of additional application property files to load
# Supports both relative path (to ${application}/application-conf/) and absolute path
applicationPropFiles=file.properties,BMS.properties,Cobol.properties,LinkEdit.properties,languageConfigurationMapping.properties
applicationPropFiles=file.properties,BMS.properties,Cobol.properties,LinkEdit.properties,languageConfigurationMapping.properties,CRB.properties
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned by @M-DLB , the MortgageApplication sample should not be updated, unless we are providing the YAML for it. (Actually, a nice idea for a future enhancement).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.


#
# CRB model yaml file
crb_resourceModelFile=/var/crb-1.0.3/resourcesModel.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave the references empty, so that users configure it, and put a sample into the description of the property?

#
# CRB model yaml file
# It defines the standards that must be used for resource definitions.
# https://www.ibm.com/docs/en/cics-resource-builder/1.0?topic=creating-resource-model
# sample: crb_resourceModelFile=/var/crb-1.0.3/resourcesModel.yml
crb_resourceModelFile=

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added for both Model file and Application constraints

odttlnt added 2 commits May 8, 2023 11:30
Signed-off-by: Sachin Naik <[email protected]>
Signed-off-by: Sachin Naik <[email protected]>
@odttlnt odttlnt requested a review from dennis-behm May 8, 2023 16:12
@M-DLB
Copy link
Member

M-DLB commented May 9, 2023

@dennis-behm The challenge is that crb_resourceModelFile and crb_applicationConstraintsFile are application-related (different for each application) but are provided by CICS admins, so they are not supposed to be pat of the application's Git repo. We thought providing an override with an absolute path would be the best way.

Copy link
Member

@dennis-behm dennis-behm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of additional comments.

@@ -7,6 +7,7 @@ dbb.scriptMapping = BMS.groovy :: **/*.bms
dbb.scriptMapping = Cobol.groovy :: **/*.cbl
dbb.scriptMapping = LinkEdit.groovy :: **/*.lnk
dbb.scriptMapping = PLI.groovy :: **/*.pli
dbb.scriptMapping = CRB.groovy :: **/*.yml, **/*.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the scriptMapping from the MortgageApplication sample.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

import groovy.transform.*

/*
The language script is for running the CICS tool (zrb) on CICS definitions in YML (yaml)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor comment.

The CICS tool is a confusing term for me. Instead of

The language script is for running the CICS tool (zrb) on CICS definitions in YML (yaml)
 format ... 

can we please rephrase it to:

This language script is invoking the 'CICS TS resource builder utility' for the CICS resource definitions defined in the YAML format.

The script processes CICS definition files stored in the git repository with suffix .yml or .yaml to produce a CSD formatted file.

The model file and the application constraints file, required by the CICS TS resource builder, are referenced via the crb.properties files. 

The script expects that the CICS TS resource builder is installed on the build machine in z/OS UNIX. The location of it is also referenced in the properties files.

The output of the process is a CSD formatted file, which is reported in the DBB Build report for further post-build processing such as packaging and deployment into a target environment.

Further information on the CICS TS resource builder utility and can be found at 
 https://www.ibm.com/docs/en/cics-resource-builder/1.0?topic=overview

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as requested

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as requested

@@ -0,0 +1,27 @@
# Language properties used by language/CRB.groovy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odttlnt @M-DLB ,
I see that these definitions are part of application-conf and build-conf. What would be the best location to manage these property definitions? Can we propose just one?

If necessary, we would need to split it up into central build config, like crb_zrbLocation in build-conf and application specifics into the application configuration dir.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the way we have it provides more flexibility to the user. The can provide some options which are applicable for the application only in application conf and vice versa.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be as is. Primarily because it provides more flexibility to the developer. They can mix and match the parameters and values

Signed-off-by: Sachin Naik <[email protected]>
@dennis-behm
Copy link
Member

Thank you for the updates @odttlnt . This PR is depending on #308 , because YAML files should not be scanned with the default DBB dependency scanner.

FYI - We had some un-signed commits on develop why I had to rebase the last 3 commits. The PR looks corrupted, but we will take care during the merge process and squash them into a new one.

@dennis-behm
Copy link
Member

Superseded by #391 - because this PR is based on an outdated version of zAppBuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants