Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions WaziDeploy/zDeploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ The core configuration sets parameters for the Wazi Deploy specific building blo
│ • pds_spec.yml │ │ │
│ • cics_config.yml │ ┌─────────▼─────────┐ ┌──────────▼────────┐
│ • db2_config.yml │ │ default_* vars │ │ app_* vars │
│ • jcl_verify.yml │ │ /python/ or │ │ /application- │
│ • shell_cmds.yml │ │ /ansible/ │ │ overrides/ │
│ │ │ │ │ │
│ Templates: │ │ Environment │ │ Application │
│ • cics_csd.jcl.j2 │ │ Defaults: │ │ Overrides: │
│ • jcl_expert.jcl.j2│ │ • HLQ │ │ • app_db2_* │
└─────────────────────┘ │ • USS paths │ │ • app_cics_* │
│ • CICS subsys │ │ • app_jcl_* │
│ • DB2 subsys │ │ • app_jobcard │
│ • Job cards │ │ │
│ • zos_connect.yaml │ │ /python/ or │ │ /application- │
│ • jcl_verify.yml │ │ /ansible/ │ │ overrides/ │
│ • shell_cmds.yml │ │ │ │ │
│ │ │ Environment │ │ Application │
│ Templates: │ │ Defaults: │ │ Overrides: │
│ • cics_csd.jcl.j2 │ │ • HLQ │ │ • app_db2_* │
│ • jcl_expert.jcl.j2│ │ • USS paths │ │ • app_cics_* │
│ • zos_connect_app_ │ │ • CICS subsys │ │ • app_jcl_* │
│ config.xml.j2 │ │ • DB2 subsys │ │ • app_jobcard │
│ │ │ • Job cards │ │ • app_zos_ │
└─────────────────────┘ │ • z/OS Connect │ │ connect_* │
│ server │ │ │
└───────────────────┘ └───────────────────┘
```

Expand Down
61 changes: 41 additions & 20 deletions WaziDeploy/zDeploy/deployment-configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,43 @@ Plan tags control which activities are executed during deployment:

| Activity Name | Description |
|----------------------|---------------------------------------------------------------------------------------------------|
| CONFIG | Loads all deployment configuration variables, including application, middleware, and common/global |
| LOAD_CONFIG | Loads all deployment configuration variables, including global, application, middleware, and common settings |
| PACKAGE | Expands the deployment package into the working directory |
| DB2 | Handles DBRM modules: deletion, update (copy to temp), and DB2 bind operations |
| CICS_REGION | Applies CICS Resource Builder configurations (CSD updates) to the target CICS region |
| DBRMS | Handles DBRM modules: deletion, update (copy to temp), and DB2 bind operations (package and plan) |
| DEPLOY_MODULES | Deploys application artifacts (LOAD, DBRM, CICSLOAD, MAPLOAD, JCL) into target PDS libraries |
| ROLLBACK_MODULES | Restores artifacts from backup PDS libraries and supports DB2 bind rollback for the rollback scenario |
| VERIFICATION | Verifies deployed JCLs using the JCL Expert tool |
| CICS | Activates CICS artifacts online via CMCI |
| ROLLBACK_MODULES | Restores artifacts from backup PDS libraries and supports DB2 bind rollback for the rollback scenario |
| VERIFICATION | Verifies deployed JCLs using the JCL Expert tool (optional, conditional on environment setting) |
| CICS_ACTIVATION | Activates CICS artifacts (CICSLOAD, MAPLOAD) online via CMCI program updates |
| DEPLOY_ZOS_CONNECT | Deploys z/OS Connect artifacts (war files) and configuration files to USS |

#### Detailed Activity Descriptions

**CONFIG**
**LOAD_CONFIG**

Loads all required configuration variables for the deployment. This includes:
- Application-specific variables (environment dependent) from [../environment-configuration/](../environment-configuration/)
- Middleware variables (e.g., DB2, CICS) from [global](global/)
- Common/global variables (e.g., type mappings, dataset specs) from [global](global/)
Loads all required configuration variables for the deployment in the following order:
1. Global initialization settings from [global/global_initialization.yml](global/global_initialization.yml)
2. Application-specific variables (environment dependent) from [../environment-configuration/](../environment-configuration/)
3. Middleware variables (e.g., DB2, CICS) from [global](global/)
4. Common/global variables (e.g., type mappings, dataset specs) from [global](global/)

This step ensures all subsequent activities have the necessary context and settings.

**PACKAGE**

Expands the deployment package into the working directory, preparing the artifacts for further processing and deployment.

**DB2**
**CICS_REGION**

Applies CICS Resource Builder configurations to the target CICS region. This activity processes CSD (CICS System Definition) artifacts by submitting batch JCL to update CICS resource definitions.

**DBRMS**

This activity is dedicated to handling DBRM modules. It is always processed first, before deploying application executables. The steps include:
- Deleting obsolete DBRMs (with backup)
- Updating DBRMs by copying them into a temporary PDS library (configured via `type_dbrm_temp` in [types_pattern_mapping.yml](global/types_pattern_mapping.yml))
- Performing DB2 bind operations (package and plan) using the temporary dataset
- Performing DB2 bind package operations using the temporary dataset
- Performing DB2 bind plan operations using the temporary dataset

The temporary dataset approach (`{{ hlq }}.TMP.DBRM`) ensures that:
- DB2 bind operations can access DBRMs without conflicts
Expand All @@ -83,19 +91,28 @@ Deploys application artifacts (LOAD, DBRM, CICSLOAD, MAPLOAD, JCL) into their re

**ROLLBACK_MODULES**

Restores artifacts from backup PDS libraries in case a rollback is required. Also supports DB2 bind rollback operations for DBRM modules. This is dedicated to the rollback scenarios.
Restores artifacts from backup PDS libraries in case a rollback is required. This activity includes:
- Restoring members from backup datasets for all artifact types
- Performing DB2 bind package and plan operations for restored DBRM modules

This is dedicated to the rollback scenarios and only executes when the `restore` plan tag is provided.

**VERIFICATION**

Verifies the correctness of deployed JCLs using the JCL Expert tool. This step scans and validates JCL members, ensuring compliance and quality before activation.
Verifies the correctness of deployed JCLs using the JCL Expert tool. This step scans and validates JCL members, ensuring compliance and quality before activation. This activity is optional and only runs when `environment.run_jcl_expert` is set to true. It uses a loop to process each JCL member individually.

**CICS_ACTIVATION**

Handles the online activation of CICS artifacts (CICSLOAD, MAPLOAD) using the CMCI interface. This activity refreshes CICS programs and maps via CMCI program update operations (NEWCOPY). This step ensures that updated modules are activated in the CICS region and is also used during restore operations.

**CICS**
**DEPLOY_ZOS_CONNECT**

Handles the online activation of CICS artifacts (CICSLOAD, MAPLOAD) using the CMCI interface. This activity includes:
- CSD (CICS System Definition) updates via batch JCL submission
- Program updates (NEWCOPY) via CMCI for CICSLOAD and MAPLOAD modules
Handles IBM z/OS Connect artifacts deployment. This activity includes:
- Restoring war files to Unix System Services (USS) with backup and restore capabilities
- Processing and deploying z/OS Connect configuration files with variable substitution using templates
- Refreshing z/OS Connect server configuration and applications via system modify commands

This step ensures that updated modules are activated in the CICS region.
This activity supports both initial deployment and rollback scenarios for z/OS Connect applications.

## Templates

Expand All @@ -105,15 +122,19 @@ The [templates/](templates/) directory contains Jinja2 templates used for genera
|-----------------------------------|----------------------------------------------------------------|
| `cics_csd_dfhcsdup.jcl.j2` | CICS CSD update JCL template using DFHCSDUP utility |
| `jcl_expert_validation.jcl.j2` | JCL Expert validation template for verifying deployed JCLs |
| `zos_connect_app_config.xml.j2` | z/OS Connect application configuration template with variable substitution |

These templates are referenced in the configuration files and populated with environment-specific variables during deployment.

## Configuration Files

See the [global/](global/) directory for detailed information about:
- Global initialization settings
- CICS configuration settings
- DB2 configuration settings
- z/OS Connect configuration settings
- Type pattern mappings
- PDS specifications
- JCL verification rules
- Shell command templates
- Shell command templates
- Other default settings
84 changes: 70 additions & 14 deletions WaziDeploy/zDeploy/deployment-configuration/deployment-method.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ activities:
states:
- UNDEFINED
steps:
- name: UPDATE
is_artifact: true
properties:
- key: template
value: job_submit
- key: var_job_submit
value: csd_update_template
- name: UPDATE
is_artifact: true
properties:
- key: template
value: job_submit
- key: var_job_submit
value: csd_update_template

# activity to process DBRMs always first
# * A tag is used to be able to run these actions only and skip others
# * A tag is used to be able to run these actions only and skip others
# in it's own run
# * member_copy is configured to move the DBRM into a temp library first
- name: DBRMS
description: |
This activity is dedicated to DBRM bind modules and will process DBRM members of the package first using dedicated PDS libraries
This activity is dedicated to DBRM bind modules and will process DBRM members of the package first using dedicated PDS libraries
short_name: DBRMS
actions:
# Manage deletions of DBRMS
Expand Down Expand Up @@ -210,7 +210,7 @@ activities:
short_name: ROLLBACK_MODULES
description: |
This action is applicable when when restoring files from the backup
datasets. It is only executed when plan_tags 'restore' is provided.
datasets. It is only executed when plan_tags 'restore' is provided.
actions:
- name: RESTORE
description: |
Expand All @@ -223,7 +223,7 @@ activities:
# Invoke Bind operations
- name: BIND
types:
- name: "DBRM"
- name: "DBRM"
description: |
This action runs Db2 Bind package and plan for restored DBRM members
steps:
Expand All @@ -233,14 +233,14 @@ activities:
This step performs the DB2 Bind package operations for restored DBRM members
properties:
- key: template
value: db2_bind_package
value: db2_bind_package
- name: BIND_PLAN
short_name: BIND_PLAN
description: |
This step performs the DB2 Bind plan operations for restored DBRM members
properties:
- key: template
value: db2_bind_plan
value: db2_bind_plan
types:
- name: "LOAD"
- name: "DBRM"
Expand Down Expand Up @@ -269,7 +269,7 @@ activities:
steps:
- name: SCAN_JCL
short_name: SCAN_JCL
description: |
description: |
This step loops over all JCL members and performs an JCL Expert scan
is_artifact: True
types:
Expand Down Expand Up @@ -313,3 +313,59 @@ activities:
- key: "template"
value: "cics_cmci_prog_update"
is_artifact: True

- name: DEPLOY_ZOS_CONNECT
short_name: DEPLOY_ZOS_CONNECT
description: |
This activity deals with IBM z/OS Connect artifacts
actions:
- name: RESTORE_TO_USS
description: |
Restores the war file to Unix System Services
types:
- name: "war"
tags:
- zosconnect_copy
is_artifact: True
steps:
- name: USS_ARCHIVE
- name: USS_COPY
- name: USS_RESTORE
plan_tags:
- restore
- never
- name: CONFIG_FILES
description: |
Process and deploy z/OS Connect configuration files with variable substitution
steps:
- name: CREATE
properties:
- key: "template"
value: "template"
- key: "var_template_name"
value: "template_name_zosconnect_config"
loop:
loop_query: "wd_query[[ current_plan_step.artifacts[].name ]]"
loop_var: "api_name"
types:
- name: "war"
tags:
- zosconnect_config
is_artifact: True

- name: ZOS_CONNECT_SERVER
description: |
Refresh z/OS Connect config and applications via a modify command
steps:
- name: REFRESH_CONFIG #"Refresh z/OS Config"
properties:
- key: "template"
value: "system_command"
- key: "var_system_command"
value: "system_command_refresh_config"
- name: REFRESH_APP #"Refresh z/OS Applications"
properties:
- key: "template"
value: "system_command"
- key: "var_system_command"
value: "system_command_refresh_apps"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ include_middleware_cfg:
files_list:
- "{{ deploy_cfg_home }}/deployment-configuration/global/cics_config.yml"
- "{{ deploy_cfg_home }}/deployment-configuration/global/db2_config.yml"
- "{{ deploy_cfg_home }}/deployment-configuration/global/zos_connect.yml"
files_must_exist: true

# reference to global deployment configurations and capabilities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ types:
directory_backup: "{{ uss_root }}/sh/back/"
dest_mode: 0777
artifact_mode: 0755
- type: "WAR"
pattern: .*\.WAR$
uss:
dest: '{{zos_connect_root}}/apps'
backup_dest: '{{zos_connect_root}}/backup/apps'
mode: 0755
mode: 0777
is_binary: True

type_dbrm_temp:
- type: "DBRM"
Expand Down
33 changes: 33 additions & 0 deletions WaziDeploy/zDeploy/deployment-configuration/global/zos_connect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#################################################################################
# This file configures the z/OS Connect actions for the deployment
#################################################################################

zos_connect_sys_def:
root: "{{ app_zos_connect_root if app_zos_connect_root is defined and app_zos_connect_root else default_zos_connect_root }}"
job_name: "{{ app_zos_connect_job_name if app_zos_connect_job_name is defined and app_zos_connect_job_name else default_zos_connect_job_name }}"

template_name_zosconnect_config:
src: '{{ deploy_cfg_home }}/deployment-configuration/templates/zos_connect_app_config.xml.j2'
dest: '{{ zos_connect_sys_def.root }}/configDropins/overrides/{{api_name}}.xml'
mode: 0755
delegate: False


# System commands for z/OS Connect server management
system_command_start_server:
cmd: 'S {{ zos_connect_sys_def.job_name }}'
verbose: false
wait_time_s: 5
wait: true

system_command_refresh_config:
cmd: 'MODIFY {{ zos_connect_sys_def.job_name }},REFRESH,CONFIG'
verbose: false
wait_time_s: 3
wait: true

system_command_refresh_apps:
cmd: 'MODIFY {{ zos_connect_sys_def.job_name }},REFRESH,APPS'
verbose: false
wait_time_s: 3
wait: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<server>
<webApplication id="{{ api_name }}" location="${server.config.dir}/apps/{{ api_name }}.war" name="{{ api_name }}" contextRoot="/{{ api_name }}"/>
</server>
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ The `EOLEB7-Integration.yml` file defines application-level configuration settin
| app_cmci_scheme | CICS schema http/https |
| app_cmci_host | CICS CMCI host |
| app_cmci_port | CICS CMCI port |
| app_zos_connect_root | z/OS Connect server USS root directory path |
| app_zos_connect_job_name | z/OS Connect server job name for management commands |
| app_jcl_text_subs_patterns | List of JCL text substitution patterns for JCL text substitutions, such as replacing `@PGMLIB` with the value of `{{ hlq }}`. |

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ default_env_cics_csd: "CICSGUSR.CICS.CICS01.DFHCSD"
default_cmci_insecure: False
default_cmci_cert: ""
default_cmci_key: ""

# Db2
default_db2_sdsnload: "DBC0CFG.DB2.V12.SDSNLOAD"
default_pkg_jobcard: "BINDPKG JOB 'WD-PKGBIND',MSGLEVEL=(1,1),MSGCLASS=R,NOTIFY=&SYSUID"
Expand All @@ -42,6 +43,10 @@ default_db2_subsys: "DBC1"
default_db2_plan_pklist: "*.CBSAPK.*"
default_db2_action: "REPLACE"

# z/OS Connect
default_zos_connect_root: "/var/zosconnect/servers/acceptance/wazideploy-cics"
default_zos_connect_job_name: "BAQSERV1"

# load shared configuration
include_global_config:
files_list:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ default_db2_subsys: "DBC1"
default_db2_plan_pklist: "*.CBSAPK.*"
default_db2_action: "REPLACE"

# z/OS Connect
default_zos_connect_root: "/var/zosconnect/servers/integration/wazideploy-cics"
default_zos_connect_job_name: "BAQSERV2"

# load shared configuration
include_global_config:
files_list:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ default_db2_subsys: "DBC1"
default_db2_plan_pklist: "*.CBSAPK.*"
default_db2_action: "REPLACE"

# z/OS Connect
default_zos_connect_root: "/var/zosconnect/servers/production/wazideploy-cics"
default_zos_connect_job_name: "BAQSERV3"

# load shared configuration
include_global_config:
files_list:
Expand Down
Loading