From 0184e37a9668b88fbeee20f3f6aa38f0b22aaa51 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Tue, 4 Jun 2024 08:46:03 -0400 Subject: [PATCH 1/8] address build failure Signed-off-by: MarkAckert --- playbooks/install-fmid.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/playbooks/install-fmid.yml b/playbooks/install-fmid.yml index f363d4ba64..e9cdb61ef4 100644 --- a/playbooks/install-fmid.yml +++ b/playbooks/install-fmid.yml @@ -81,6 +81,16 @@ # ============================================================================ # Configure Zowe + + ## This runs only when skip_configfmid=true. Checks that instance.env is preserved + ## during a PTF upgrade. (See install-ptf.yml for instance verification) + - import_role: + name: configfmid + tasks_from: configure_instance + when: skip_configfmid|default(False) + + ## This runs by default, or when skip_configfmid=false. Full configuration and + ## installation of Zowe from the FMID base PAX. No longer compatible on z/OS 2.5+ - import_role: name: configfmid when: not skip_configfmid|default(False) From 2c324e06e1c73c891b42255ea475a3fa3063f8c9 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Tue, 4 Jun 2024 09:20:50 -0400 Subject: [PATCH 2/8] debug content Signed-off-by: MarkAckert --- playbooks/roles/configfmid/tasks/configure_instance.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/roles/configfmid/tasks/configure_instance.yml b/playbooks/roles/configfmid/tasks/configure_instance.yml index 209bddd7d1..fc5f3fb5d5 100644 --- a/playbooks/roles/configfmid/tasks/configure_instance.yml +++ b/playbooks/roles/configfmid/tasks/configure_instance.yml @@ -1,5 +1,9 @@ --- # this playbook call bin/zowe-configure-instance.sh to create instance + +- name: Dump env (debug) + raw: env + - name: Create Zowe instance import_role: name: zos From cb4bf43236773a2b6e124b2a4f82dcf2c821c565 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Wed, 5 Jun 2024 09:56:53 -0400 Subject: [PATCH 3/8] move certificate setup post-ptf Signed-off-by: MarkAckert --- playbooks/README.md | 1 + playbooks/install-fmid.yml | 11 ----------- playbooks/roles/configfmid/tasks/main.yml | 6 ------ playbooks/roles/ptf/tasks/main.yml | 6 ++++++ .../{configfmid => ptf}/tasks/setup_certificates.yml | 0 playbooks/roles/zos/tasks/upload_and_run_script.yml | 5 +++++ 6 files changed, 12 insertions(+), 17 deletions(-) rename playbooks/roles/{configfmid => ptf}/tasks/setup_certificates.yml (100%) diff --git a/playbooks/README.md b/playbooks/README.md index 82375e26aa..7d987a0b83 100644 --- a/playbooks/README.md +++ b/playbooks/README.md @@ -261,6 +261,7 @@ $ ansible-playbook -l show-logs.yml -v - **zowe_auto_create_user_group**: A boolean value to enable or disable creating Zowe user and group. Default value is `false`. - **zowe_configure_skip_zwesecur**: A boolean value to skip running `ZWESECUR` job when configure Zowe instance. - **zos_keystore_mode**: An optional string to configure Zowe instance to store certificates into Keyring instead of keystore. Valid values are `` (default value) or `KEYSTORE_MODE_KEYRING`. +- **convert_upload**: A boolean value to convert uploaded scripts from ASCII to EBCDIC post-transfer. Required for some distros, such as MacOSX. Default value is `false`. - **skip_configfmid**: A boolean value to skip automatically configuring Zowe after FMID installation. Default value is `false`. - **skip_start**: A boolean value to skip automatically starting Zowe after installation. Default value is `false`. - **zowe_uninstall_before_install**: If you want to uninstall Zowe before installing a new version. Default value is `true`. diff --git a/playbooks/install-fmid.yml b/playbooks/install-fmid.yml index e9cdb61ef4..c095977c31 100644 --- a/playbooks/install-fmid.yml +++ b/playbooks/install-fmid.yml @@ -81,19 +81,8 @@ # ============================================================================ # Configure Zowe - - ## This runs only when skip_configfmid=true. Checks that instance.env is preserved - ## during a PTF upgrade. (See install-ptf.yml for instance verification) - - import_role: - name: configfmid - tasks_from: configure_instance - when: skip_configfmid|default(False) - - ## This runs by default, or when skip_configfmid=false. Full configuration and - ## installation of Zowe from the FMID base PAX. No longer compatible on z/OS 2.5+ - import_role: name: configfmid - when: not skip_configfmid|default(False) # ============================================================================ # Start Zowe diff --git a/playbooks/roles/configfmid/tasks/main.yml b/playbooks/roles/configfmid/tasks/main.yml index ab8823eb68..9fef6abac0 100644 --- a/playbooks/roles/configfmid/tasks/main.yml +++ b/playbooks/roles/configfmid/tasks/main.yml @@ -63,12 +63,6 @@ tasks_from: create_security_defn when: not zowe_configure_skip_zwesecur -# ============================================================================ -# Setup certificates -- import_role: - name: configfmid - tasks_from: setup_certificates - # ============================================================================ # Configure Zowe Instance - import_role: diff --git a/playbooks/roles/ptf/tasks/main.yml b/playbooks/roles/ptf/tasks/main.yml index f57e01ebc3..754104b8c8 100644 --- a/playbooks/roles/ptf/tasks/main.yml +++ b/playbooks/roles/ptf/tasks/main.yml @@ -174,3 +174,9 @@ when: not ptfs_existence[item] loop: - "{{ zowe_smpe_ptf_2 }}" + +# ============================================================================ +# Setup certificates +- import_role: + name: ptf + tasks_from: setup_certificates diff --git a/playbooks/roles/configfmid/tasks/setup_certificates.yml b/playbooks/roles/ptf/tasks/setup_certificates.yml similarity index 100% rename from playbooks/roles/configfmid/tasks/setup_certificates.yml rename to playbooks/roles/ptf/tasks/setup_certificates.yml diff --git a/playbooks/roles/zos/tasks/upload_and_run_script.yml b/playbooks/roles/zos/tasks/upload_and_run_script.yml index 08140ae5e9..bf12b76b97 100644 --- a/playbooks/roles/zos/tasks/upload_and_run_script.yml +++ b/playbooks/roles/zos/tasks/upload_and_run_script.yml @@ -13,6 +13,11 @@ file_upload_method: scp file_upload_hashcheck: false +# Necessary for some scp distros, as on MacOS +- name: Convert ascii to ebcdic + when: convert_upload|default(False) + raw: iconv -f ISO8859-1 -t IBM-1047 "{{ work_dir_remote }}/{{ upload_and_run_script_filename }}" > "{{ work_dir_remote }}/{{ upload_and_run_script_filename }}.ebcdic" && mv "{{ work_dir_remote }}/{{ upload_and_run_script_filename }}.ebcdic" "{{ work_dir_remote }}/{{ upload_and_run_script_filename }}" + - name: Add executive permission to {{ upload_and_run_script_filename }} raw: chmod a+x "{{ work_dir_remote }}/{{ upload_and_run_script_filename }}" From 5dfa9179354e9cf10ce37b00b75d1481c9fe11d8 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Wed, 5 Jun 2024 12:58:26 -0400 Subject: [PATCH 4/8] move to configptf Signed-off-by: MarkAckert --- playbooks/install-fmid.yml | 13 +------------ playbooks/install-ptf.yml | 5 +++++ playbooks/roles/{configfmid => configptf}/README.md | 0 .../{configfmid => configptf}/defaults/main.yml | 0 .../roles/{configfmid => configptf}/meta/main.yml | 0 .../tasks/configure_instance.yml | 0 .../tasks/create_security_defn.yml | 0 .../tasks/install_proc.yml | 0 .../tasks/install_xmem_server.yml | 0 .../roles/{configfmid => configptf}/tasks/main.yml | 0 .../{ptf => configptf}/tasks/setup_certificates.yml | 0 .../tasks/validate_configuration.yml | 0 12 files changed, 6 insertions(+), 12 deletions(-) rename playbooks/roles/{configfmid => configptf}/README.md (100%) rename playbooks/roles/{configfmid => configptf}/defaults/main.yml (100%) rename playbooks/roles/{configfmid => configptf}/meta/main.yml (100%) rename playbooks/roles/{configfmid => configptf}/tasks/configure_instance.yml (100%) rename playbooks/roles/{configfmid => configptf}/tasks/create_security_defn.yml (100%) rename playbooks/roles/{configfmid => configptf}/tasks/install_proc.yml (100%) rename playbooks/roles/{configfmid => configptf}/tasks/install_xmem_server.yml (100%) rename playbooks/roles/{configfmid => configptf}/tasks/main.yml (100%) rename playbooks/roles/{ptf => configptf}/tasks/setup_certificates.yml (100%) rename playbooks/roles/{configfmid => configptf}/tasks/validate_configuration.yml (100%) diff --git a/playbooks/install-fmid.yml b/playbooks/install-fmid.yml index c095977c31..8ed10dfad7 100644 --- a/playbooks/install-fmid.yml +++ b/playbooks/install-fmid.yml @@ -1,5 +1,5 @@ --- -- name: Install Zowe SMPE FMID +- name: Install Zowe SMPE FMID. hosts: all gather_facts: false become: false @@ -78,14 +78,3 @@ - import_role: name: fmid tasks_from: overwrite_vars - - # ============================================================================ - # Configure Zowe - - import_role: - name: configfmid - - # ============================================================================ - # Start Zowe - - import_role: - name: start - when: not skip_start|default(False) diff --git a/playbooks/install-ptf.yml b/playbooks/install-ptf.yml index 8a969d9575..56054530b0 100644 --- a/playbooks/install-ptf.yml +++ b/playbooks/install-ptf.yml @@ -61,6 +61,11 @@ name: fmid tasks_from: overwrite_vars + # ============================================================================ + # Configure Zowe + - import_role: + name: configptf + # ============================================================================ # FIXME - name: Check if zowe_keystore_dir has a value diff --git a/playbooks/roles/configfmid/README.md b/playbooks/roles/configptf/README.md similarity index 100% rename from playbooks/roles/configfmid/README.md rename to playbooks/roles/configptf/README.md diff --git a/playbooks/roles/configfmid/defaults/main.yml b/playbooks/roles/configptf/defaults/main.yml similarity index 100% rename from playbooks/roles/configfmid/defaults/main.yml rename to playbooks/roles/configptf/defaults/main.yml diff --git a/playbooks/roles/configfmid/meta/main.yml b/playbooks/roles/configptf/meta/main.yml similarity index 100% rename from playbooks/roles/configfmid/meta/main.yml rename to playbooks/roles/configptf/meta/main.yml diff --git a/playbooks/roles/configfmid/tasks/configure_instance.yml b/playbooks/roles/configptf/tasks/configure_instance.yml similarity index 100% rename from playbooks/roles/configfmid/tasks/configure_instance.yml rename to playbooks/roles/configptf/tasks/configure_instance.yml diff --git a/playbooks/roles/configfmid/tasks/create_security_defn.yml b/playbooks/roles/configptf/tasks/create_security_defn.yml similarity index 100% rename from playbooks/roles/configfmid/tasks/create_security_defn.yml rename to playbooks/roles/configptf/tasks/create_security_defn.yml diff --git a/playbooks/roles/configfmid/tasks/install_proc.yml b/playbooks/roles/configptf/tasks/install_proc.yml similarity index 100% rename from playbooks/roles/configfmid/tasks/install_proc.yml rename to playbooks/roles/configptf/tasks/install_proc.yml diff --git a/playbooks/roles/configfmid/tasks/install_xmem_server.yml b/playbooks/roles/configptf/tasks/install_xmem_server.yml similarity index 100% rename from playbooks/roles/configfmid/tasks/install_xmem_server.yml rename to playbooks/roles/configptf/tasks/install_xmem_server.yml diff --git a/playbooks/roles/configfmid/tasks/main.yml b/playbooks/roles/configptf/tasks/main.yml similarity index 100% rename from playbooks/roles/configfmid/tasks/main.yml rename to playbooks/roles/configptf/tasks/main.yml diff --git a/playbooks/roles/ptf/tasks/setup_certificates.yml b/playbooks/roles/configptf/tasks/setup_certificates.yml similarity index 100% rename from playbooks/roles/ptf/tasks/setup_certificates.yml rename to playbooks/roles/configptf/tasks/setup_certificates.yml diff --git a/playbooks/roles/configfmid/tasks/validate_configuration.yml b/playbooks/roles/configptf/tasks/validate_configuration.yml similarity index 100% rename from playbooks/roles/configfmid/tasks/validate_configuration.yml rename to playbooks/roles/configptf/tasks/validate_configuration.yml From 0709296fcb05ac5ced8161082c48e78f36473d84 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Wed, 5 Jun 2024 13:46:06 -0400 Subject: [PATCH 5/8] small fixes Signed-off-by: MarkAckert --- playbooks/install-ptf.yml | 2 +- playbooks/roles/configptf/tasks/main.yml | 8 ++++---- playbooks/roles/configure/README.md | 4 +++- playbooks/roles/ptf/tasks/main.yml | 6 ------ 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/playbooks/install-ptf.yml b/playbooks/install-ptf.yml index 56054530b0..895c5509da 100644 --- a/playbooks/install-ptf.yml +++ b/playbooks/install-ptf.yml @@ -83,7 +83,7 @@ # ============================================================================ - name: Test upgraded configuration import_role: - name: configfmid + name: configptf tasks_from: validate_configuration # ============================================================================ diff --git a/playbooks/roles/configptf/tasks/main.yml b/playbooks/roles/configptf/tasks/main.yml index 9fef6abac0..536f9059de 100644 --- a/playbooks/roles/configptf/tasks/main.yml +++ b/playbooks/roles/configptf/tasks/main.yml @@ -45,13 +45,13 @@ # ============================================================================ # Install Zowe proc - import_role: - name: configfmid + name: configptf tasks_from: install_proc # ============================================================================ # Install Cross Memory Server - import_role: - name: configfmid + name: configptf tasks_from: install_xmem_server vars: zowe_xmem_install_from_path: "{{ zowe_root_dir }}/scripts/utils" @@ -59,12 +59,12 @@ # ============================================================================ # Run ZWESECUR - import_role: - name: configfmid + name: configptf tasks_from: create_security_defn when: not zowe_configure_skip_zwesecur # ============================================================================ # Configure Zowe Instance - import_role: - name: configfmid + name: configptf tasks_from: configure_instance diff --git a/playbooks/roles/configure/README.md b/playbooks/roles/configure/README.md index a3a93cced6..e1a9f5b069 100644 --- a/playbooks/roles/configure/README.md +++ b/playbooks/roles/configure/README.md @@ -2,4 +2,6 @@ This role will configure Zowe after Zowe runtime has been laid down on the server. -Please note: if you want to configure FMID, should use `configfmid` role. +Please note: if you want to configure SMP/e install, should use `configptf` role. + +Please note: config no longers works for base FMID on z/OS 2.5+ diff --git a/playbooks/roles/ptf/tasks/main.yml b/playbooks/roles/ptf/tasks/main.yml index 754104b8c8..f57e01ebc3 100644 --- a/playbooks/roles/ptf/tasks/main.yml +++ b/playbooks/roles/ptf/tasks/main.yml @@ -174,9 +174,3 @@ when: not ptfs_existence[item] loop: - "{{ zowe_smpe_ptf_2 }}" - -# ============================================================================ -# Setup certificates -- import_role: - name: ptf - tasks_from: setup_certificates From 83a8ca88cc5c095a37528d05d3aab2fb1cb791f0 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Thu, 6 Jun 2024 15:23:37 -0400 Subject: [PATCH 6/8] try skipping old configfmid Signed-off-by: MarkAckert --- playbooks/install-ptf.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/playbooks/install-ptf.yml b/playbooks/install-ptf.yml index 895c5509da..6d914e9d56 100644 --- a/playbooks/install-ptf.yml +++ b/playbooks/install-ptf.yml @@ -61,10 +61,6 @@ name: fmid tasks_from: overwrite_vars - # ============================================================================ - # Configure Zowe - - import_role: - name: configptf # ============================================================================ # FIXME From 5cf632828afdb04d308e7307babd731196d2a399 Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Thu, 6 Jun 2024 15:50:42 -0400 Subject: [PATCH 7/8] remove validate_configuration check Signed-off-by: MarkAckert --- playbooks/install-ptf.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/playbooks/install-ptf.yml b/playbooks/install-ptf.yml index 6d914e9d56..0b0e560239 100644 --- a/playbooks/install-ptf.yml +++ b/playbooks/install-ptf.yml @@ -76,12 +76,6 @@ - import_role: name: configure - # ============================================================================ - - name: Test upgraded configuration - import_role: - name: configptf - tasks_from: validate_configuration - # ============================================================================ # Start Zowe - import_role: From 52fe1f79ff3b6d591939c4c3212c78e58d6acafd Mon Sep 17 00:00:00 2001 From: MarkAckert Date: Fri, 7 Jun 2024 09:58:39 -0400 Subject: [PATCH 8/8] remove debug, add more conversions Signed-off-by: MarkAckert --- .../configptf/tasks/configure_instance.yml | 4 ---- .../roles/configptf/tasks/install_proc.yml | 2 +- .../configptf/tasks/install_xmem_server.yml | 2 +- .../roles/ptf/tasks/is_ptf_installed.yml | 4 ++++ playbooks/roles/ptf/tasks/main.yml | 23 ++++++++++++++----- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/playbooks/roles/configptf/tasks/configure_instance.yml b/playbooks/roles/configptf/tasks/configure_instance.yml index fc5f3fb5d5..209bddd7d1 100644 --- a/playbooks/roles/configptf/tasks/configure_instance.yml +++ b/playbooks/roles/configptf/tasks/configure_instance.yml @@ -1,9 +1,5 @@ --- # this playbook call bin/zowe-configure-instance.sh to create instance - -- name: Dump env (debug) - raw: env - - name: Create Zowe instance import_role: name: zos diff --git a/playbooks/roles/configptf/tasks/install_proc.yml b/playbooks/roles/configptf/tasks/install_proc.yml index c01cf6c7fa..cc7d246b74 100644 --- a/playbooks/roles/configptf/tasks/install_proc.yml +++ b/playbooks/roles/configptf/tasks/install_proc.yml @@ -7,4 +7,4 @@ vars: script_chdir: "{{ zowe_root_dir }}/scripts/utils" script_filename: ./zowe-install-proc.sh - script_parameters: "\"{{ zowe_dataset_prefix }}\" \"{{ zowe_proclib_dsname }}\"" \ No newline at end of file + script_parameters: -d {{ zowe_dataset_prefix }} -r {{ zowe_proclib_dsname }} diff --git a/playbooks/roles/configptf/tasks/install_xmem_server.yml b/playbooks/roles/configptf/tasks/install_xmem_server.yml index a2a3401f36..477f9051db 100644 --- a/playbooks/roles/configptf/tasks/install_xmem_server.yml +++ b/playbooks/roles/configptf/tasks/install_xmem_server.yml @@ -31,7 +31,7 @@ vars: script_chdir: "{{ zowe_root_dir }}/scripts/utils" script_filename: ./zowe-install-xmem.sh - script_parameters: "\"{{ zowe_dataset_prefix }}\" \"{{ zowe_xmem_loadlib }}\" \"{{ zowe_xmem_parmlib }}\" \"{{ zowe_xmem_proclib }}\"" + script_parameters: -d {{ zowe_xmem_loadlib }} -a {{ zowe_xmem_parmlib }} -r {{ zowe_xmem_proclib }} - name: Show content of ZSS proc {{ zowe_xmem_proclib_member_zss }} raw: cat "//'{{ zowe_xmem_proclib }}({{ zowe_xmem_proclib_member_zss }})'" diff --git a/playbooks/roles/ptf/tasks/is_ptf_installed.yml b/playbooks/roles/ptf/tasks/is_ptf_installed.yml index f55337f3a4..5255130854 100644 --- a/playbooks/roles/ptf/tasks/is_ptf_installed.yml +++ b/playbooks/roles/ptf/tasks/is_ptf_installed.yml @@ -53,6 +53,10 @@ file_upload_method: scp file_upload_hashcheck: false +- name: Convert ascii to ebcdic + when: convert_upload|default(False) + raw: iconv -f ISO8859-1 -t IBM-1047 "{{ work_dir_remote }}/LSTFMID.jcl" > "{{ work_dir_remote }}/LSTFMID.jcl.ebcdic" && mv "{{ work_dir_remote }}/LSTFMID.jcl.ebcdic" "{{ work_dir_remote }}/LSTFMID.jcl" + # ============================================================================ # Run LSTFMID.jcl - name: Run LSTFMID.jcl diff --git a/playbooks/roles/ptf/tasks/main.yml b/playbooks/roles/ptf/tasks/main.yml index f57e01ebc3..e3d9c45d6f 100644 --- a/playbooks/roles/ptf/tasks/main.yml +++ b/playbooks/roles/ptf/tasks/main.yml @@ -64,6 +64,17 @@ file_upload_hashcheck: false loop: "{{ zowe_ptf_install_jcls }}" +# ============================================================================ +# Convert uploaded JCLs in remote workspace if necessary +- name: (Optional) convert PTF installation JCLs + vars: + filename: "{{ item }}.jcl" + loop: "{{ zowe_ptf_install_jcls }}" + when: convert_upload|default(False) + raw: iconv -f ISO8859-1 -t IBM-1047 "{{ work_dir_remote }}/{{ filename }}" > "{{ work_dir_remote }}/{{ filename }}.ebcdic" && mv "{{ work_dir_remote }}/{{ filename }}.ebcdic" "{{ work_dir_remote }}/{{ filename }}" + + + - name: Fix JCLs is we only have 1 PTF when: zowe_smpe_ptf_2 == "" block: @@ -129,12 +140,12 @@ mode: 0700 delegate_to: localhost -- import_role: - name: zos - tasks_from: upload_and_run_script - vars: - upload_and_run_script_filename: install-SMPE-SYSMOD.sh - upload_and_run_script_parameters: "\"{{ zowe_smpe_hlq_dsn }}\" \"{{ zowe_smpe_hlq_csi }}\" \"{{ (zowe_smpe_dir_prefix is regex(\"/$\")) | ternary(zowe_smpe_dir_prefix, zowe_smpe_dir_prefix + \"/\") }}\" \"{{ work_dir_remote }}\" \"{{ zowe_smpe_fmid }}\" \"{{ zowe_smpe_ptf }}\" \"{{ zowe_smpe_ptf_2 }}\" \"{{ zowe_smpe_volser }}\" install" +#- import_role: +# name: zos +# tasks_from: upload_and_run_script +# vars: +# upload_and_run_script_filename: install-SMPE-SYSMOD.sh +# upload_and_run_script_parameters: "\"{{ zowe_smpe_hlq_dsn }}\" \"{{ zowe_smpe_hlq_csi }}\" \"{{ (zowe_smpe_dir_prefix is regex(\"/$\")) | ternary(zowe_smpe_dir_prefix, zowe_smpe_dir_prefix + \"/\") }}\" \"{{ work_dir_remote }}\" \"{{ zowe_smpe_fmid }}\" \"{{ zowe_smpe_ptf }}\" \"{{ zowe_smpe_ptf_2 }}\" \"{{ zowe_smpe_volser }}\" install" - name: Check if the first PTF is installed properly block: