sap-linuxlab / community.sap_install

Automation for SAP - Collection of Ansible Roles for various SAP software installation
Apache License 2.0
53 stars 57 forks source link

sap_swpm: SAP Web Dispatcher not Installing #345

Closed slubb closed 1 year ago

slubb commented 1 year ago

Hi,

I'm trying to install a standalone Web Dispatcher. If I look at the created inifile

This is the step from my play:

 - ansible.builtin.include_role:
          name: community.sap_install.sap_swpm
   vars:
      sap_swpm_product_catalog_id: NW_Webdispatcher:NW750.IND.PD
      sap_swpm_ansible_role_mode: default

The variable file I'm using:

# NW Passwords
sap_swpm_master_password: "NewPass$321"
# NW Instance Parameters
sap_swpm_sid: WD5
sap_swpm_wd_instance_nr: '63'
# # Backend Connection
sap_swpm_wd_system_connectivity: "false"
# SAP Host Agent
sap_swpm_install_saphostagent: 'false'

If I run that I get:

    ERROR      2023-03-14 15:12:11.235 (root/sapinst) (startInstallation) [iaxxbjsmod.cpp:83] id=modlib.jslib.caughtException errno=MUT-03025
    Caught ESAPinstException in module call: Validator of step '|NW_Webdispatcher|ind|ind|ind|ind|0|0|NW_Webdispatcher_Instance|ind|ind|ind|ind|wd|0|askMsParameter' reported an error:
    Start SAPinst in interactive mode to solve this problem.

If I start it interactively I see that it gets stuck to the configuring of the backend.

It seems that its not reading the sap_swpm_wd_ parameters.

I also tried to use the default_templates option.

Task from play:

- ansible.builtin.include_role:
    name: community.sap_install.sap_swpm
  vars:
    sap_swpm_ansible_role_mode: default_templates
    sap_swpm_templates_product_input: sap_webdisp_7_50_install

with this input:

sap_swpm_templates_install_dictionary:
  sap_webdisp_7_50_install:
    sap_swpm_product_catalog_id: NW_Webdispatcher:NW750.IND.PD
    sap_swpm_inifile_list:
      - credentials
      - generic_webdisp
    sap_swpm_inifile_dictionary:
      sap_swpm_sid: WD5
      sap_swpm_wd_instance_nr: "63"

And that results in the same almost empty inifile. The only thing in there is the header and the credentials part, but no generic_webdisp.

Kind regards, Sjoerd

sean-freeman commented 1 year ago

Thank you for raising this GH Issue, I've realised just now that many of the sample Ansible Playbooks (/playbooks/sample-*) and sample Ansible Var files (/playbooks/vars/sample-*) are missing an example of the critical variable sap_swpm_inifile_list. This is a mistake since the Ansible Collection was initially released, those files are rarely updated. Appreciate your testing, this would not have otherwise been found and is a negative initial user experience.

For SAP Web Dispatcher, you can see the sample variables here for "Default mode": /playbooks/vars/sample-variables-sap-swpm-default-mode-webdisp-install.yml

For SAP Web Dispatcher, you can see the sample variables here for "Advanced Templates mode": playbooks/vars/sample-variables-sap-swpm-advanced-templates-mode.yml#L323

You can use this with either your first Ansible Play example ("Default mode"), or the second Ansible Play example ("Default Template mode" - which is intended for creating a long list of different SAP installations to choose from at will).

I would need to perform a test to confirm, but using your second Ansible Play example it would need to be expanded to something like the following. The example is without using sap_install_media_detect Ansible Role to automatically detect the Web Disp and other SWPM related files.

Suggestion without testing:

- ansible.builtin.include_role:
    name: community.sap_install.sap_swpm
  vars:
    sap_swpm_ansible_role_mode: default_templates
    sap_swpm_templates_product_input: sap_webdisp_7_50_install
sap_swpm_templates_install_dictionary:
  sap_webdisp_7_50_install:
    sap_swpm_product_catalog_id: NW_Webdispatcher:NW750.IND.PD
    sap_swpm_inifile_list:
      - swpm_installation_media
      - swpm_installation_media_swpm2_hana
      - credentials
      - credentials_hana
      - db_config_hana
      - db_connection_nw_hana
      - nw_config_other
      - nw_config_central_services_abap
      - nw_config_primary_application_server_instance
      - nw_config_ports
      - nw_config_webdisp_generic
      - nw_config_webdisp_gateway
      - nw_config_host_agent
      - sap_os_linux_user
    sap_swpm_inifile_dictionary:
      sap_swpm_software_path: /software
      sap_swpm_sapcar_path: /software
      sap_swpm_swpm_path: /software
      sap_swpm_web_dispatcher_path: /software
      sap_swpm_web_dispatcher_file_name: SAPWEBDISP_ABCDEFG.SAR
      sap_swpm_master_password: "NewPass$321"
      sap_swpm_sid: WD5
      sap_swpm_wd_instance_nr: '63'
      sap_swpm_wd_system_connectivity: 'false'
      sap_swpm_wd_activate_icf: 'false'
      sap_swpm_wd_backend_sid: 'S4H'
      sap_swpm_wd_backend_ms_http_port: '8001'
      sap_swpm_wd_backend_ms_host: ""
      sap_swpm_wd_backend_rfc_host: ""
      sap_swpm_wd_backend_rfc_instance_nr: "01"
      sap_swpm_wd_backend_rfc_ddic_000_password: "NewPass$321"
      sap_swpm_wd_backend_scenario_size: '500'
      sap_swpm_wd_virtual_host: ""
      sap_swpm_install_saphostagent: 'false'
      sap_swpm_pas_instance_nr: ""
      sap_swpm_pas_instance_hostname: ""
      sap_swpm_ascs_instance_nr: ""
      sap_swpm_ascs_instance_hostname: ""
      sap_swpm_fqdn: ""
      sap_swpm_db_host: ""
      sap_swpm_db_sid: ""
      sap_swpm_db_instance_nr: ""
      sap_swpm_db_schema_abap: ""
      sap_swpm_update_etchosts: 'false'
      sap_swpm_load_type: SAP
sean-freeman commented 1 year ago

@slubb Did you resolve your issue? Or are you still unsuccessful?

sean-freeman commented 1 year ago

@slubb Please confirm if the above code was accurate and this GH Issue can be closed

slubb commented 1 year ago

Hi Sean, thank you. I gave the thumbs up so I thought this was closed ;-). Indeed if you do it like this it works.

This is what worked with for me:

Part of playbook:

  pre_tasks:
    - name: Include vars
      ansible.builtin.include_vars: ./vars/sap-wdp-install.yml
  tasks:
    - block:
      - ansible.builtin.include_role:
          name: community.sap_install.sap_swpm
        vars:
          sap_swpm_ansible_role_mode: default
          sap_swpm_product_catalog_id: NW_Webdispatcher:NW750.IND.PD # ook swpm2
          # Software
          sap_swpm_software_path: /SapSoftware/installation
          sap_swpm_sapcar_path: /SapSoftware/installation
          sap_swpm_swpm_path: /SapSoftware/installation
          # NW Passwords
          sap_swpm_master_password: "NewPass$321"
          # NW Instance Parameters
          sap_swpm_sid: WD5
          sap_swpm_wd_instance_nr: '63'
          # Backend Connection
          sap_swpm_wd_system_connectivity: 'false'
          sap_swpm_wd_activate_icf: 'false'
          sap_swpm_wd_backend_sid: 'S4H'
          sap_swpm_wd_backend_ms_http_port: '8001'
          sap_swpm_wd_backend_ms_host: "{{ ansible_hostname }}"
          sap_swpm_wd_backend_rfc_host: "{{ ansible_hostname }}"
          sap_swpm_wd_backend_rfc_instance_nr: "01"
          sap_swpm_wd_backend_rfc_ddic_000_password: "NewPass$321"
          sap_swpm_wd_backend_scenario_size: '500'
          sap_swpm_wd_virtual_host: "{{ ansible_hostname }}"
          # SAP Host Agent
          sap_swpm_install_saphostagent: 'false'