Hello community, here is the log from the commit of package sapnwbootstrap-formula for openSUSE:Factory checked in at 2020-05-19 14:49:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sapnwbootstrap-formula (Old) and /work/SRC/openSUSE:Factory/.sapnwbootstrap-formula.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sapnwbootstrap-formula" Tue May 19 14:49:33 2020 rev:9 rq:807024 version:0.4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/sapnwbootstrap-formula/sapnwbootstrap-formula.changes 2020-03-11 18:50:39.683549194 +0100 +++ /work/SRC/openSUSE:Factory/.sapnwbootstrap-formula.new.2738/sapnwbootstrap-formula.changes 2020-05-19 14:49:33.896213880 +0200 @@ -1,0 +2,77 @@ +Mon May 18 15:02:26 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.4.4 + * Use gcp-vpc-move-route properly using independent route names + for ASCS and ERS instances + +Fri May 15 09:31:34 UTC 2020 - Stefano Torresi <stefano.torr...@suse.com> + +- Version 0.4.3 + * Update monitoring settings + +------------------------------------------------------------------- +Tue May 12 13:55:55 UTC 2020 - Xabier Arbulu Insausti <xarbulu@localhost> + +- Version 0.4.2 + * Fix the shared disk usage in non HA environments + +------------------------------------------------------------------- +Wed Apr 22 19:17:03 UTC 2020 - Simranpal Singh <simranpal.si...@suse.com> + +- Version 0.4.1 + * Make it optional to install netweaver required packages + +------------------------------------------------------------------- +Tue Apr 21 16:25:44 UTC 2020 - Stefano Torresi <stefano.torr...@suse.com> + +- Version 0.4.0 + * Add Pacemaker resources for the sap_host_exporter + +------------------------------------------------------------------- +Fri Apr 17 10:20:28 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.3.0 + * Adapt the cluster template to use the proper gcp agents + (bsc#1161898, bsc#1160933) + +------------------------------------------------------------------- +Tue Apr 14 13:38:47 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.2.11 + * Update anyting socat resource by azure-lb as recommended in + the updated best practices guide + +------------------------------------------------------------------- +Fri Mar 27 18:23:40 UTC 2020 - Simranpal Singh <simranpal.si...@suse.com> + +- Version 0.2.10 + * Add support for extracting installer sar file + * Update installation logic to use installer from extracted installation media + +------------------------------------------------------------------- +Fri Mar 20 13:14:30 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.2.9 + * Install pydbapi package to connect to the HANA database + +------------------------------------------------------------------- +Thu Mar 17 12:24:56 UTC 2020 - Dario Maiocchi <dmaioc...@suse.com> +- Version 0.2.8 + * Fix non-unique ID name error for monitoring.sls state + * Manage properly multiple exporters execution in the same host + update spec + +------------------------------------------------------------------- +Mon Mar 16 11:02:26 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.2.7 + * Add option to set custom parameters in the installation + configuration files + * Make the installation retry times customizable + +------------------------------------------------------------------- +Tue Mar 10 09:58:57 UTC 2020 - Dario Maiocchi <dmaioc...@suse.com> +- Version 0.2.6 + * Add option to activate the sap_host_exporter on the nodes + +------------------------------------------------------------------- Old: ---- sapnwbootstrap-formula-0.2.5.tar.gz New: ---- sapnwbootstrap-formula-0.4.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sapnwbootstrap-formula.spec ++++++ --- /var/tmp/diff_new_pack.sY6VM3/_old 2020-05-19 14:49:34.392214980 +0200 +++ /var/tmp/diff_new_pack.sY6VM3/_new 2020-05-19 14:49:34.396214988 +0200 @@ -19,7 +19,7 @@ # See also http://en.opensuse.org/openSUSE:Specfile_guidelines Name: sapnwbootstrap-formula -Version: 0.2.5 +Version: 0.4.4 Release: 0 Summary: SAP Netweaver platform deployment formula License: Apache-2.0 ++++++ sapnwbootstrap-formula-0.2.5.tar.gz -> sapnwbootstrap-formula-0.4.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/ci/validate-formula.sh new/sapnwbootstrap-formula-0.4.4/ci/validate-formula.sh --- old/sapnwbootstrap-formula-0.2.5/ci/validate-formula.sh 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/ci/validate-formula.sh 2020-05-18 19:15:34.874091519 +0200 @@ -69,4 +69,4 @@ id: travis EOF -sudo salt-call state.show_highstate --local --file-root=./ --config-dir=. --pillar-root=ci/pillar --retcode-passthrough -l debug \ No newline at end of file +sudo salt-call state.show_highstate --local --file-root=./ --config-dir=. --pillar-root=ci/pillar --retcode-passthrough -l debug diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/defaults.yaml new/sapnwbootstrap-formula-0.4.4/netweaver/defaults.yaml --- old/sapnwbootstrap-formula-0.2.5/netweaver/defaults.yaml 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/defaults.yaml 2020-05-18 19:15:34.874091519 +0200 @@ -1,6 +1,8 @@ netweaver: + install_packages: true clean_nfs: True installation_folder: /tmp/swpm_unattended + swpm_extract_dir: /sapmedia/NW/SWPM additional_dvds: [] ha_enabled: True nfs_version: nfs4 # Used to connect to the nfs share @@ -11,3 +13,4 @@ directory: /var/lib/swap # Swap size in MB size: 2048 + monitoring_enabled: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/extract_installer.sls new/sapnwbootstrap-formula-0.4.4/netweaver/extract_installer.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/extract_installer.sls 1970-01-01 01:00:00.000000000 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/extract_installer.sls 2020-05-18 19:15:34.874091519 +0200 @@ -0,0 +1,12 @@ +{%- from "netweaver/map.jinja" import netweaver with context -%} + +{% if netweaver.sapcar_exe_file is defined and netweaver.swpm_sar_file is defined %} + +extract_installer_file: + sapcar.extracted: + - name: {{ netweaver.swpm_sar_file }} + - sapcar_exe: {{ netweaver.sapcar_exe_file }} + - output_dir: {{ netweaver.swpm_extract_dir }} + - options: "-manifest SIGNATURE.SMF" + +{% endif %} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/init.sls new/sapnwbootstrap-formula-0.4.4/netweaver/init.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/init.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/init.sls 2020-05-18 19:15:34.878091519 +0200 @@ -1,9 +1,15 @@ +{% from "netweaver/map.jinja" import netweaver with context %} + include: - netweaver.setup - netweaver.saptune + - netweaver.extract_installer - netweaver.install_ascs - netweaver.install_ers - netweaver.ha_cluster - netweaver.install_db - netweaver.install_pas - netweaver.install_aas + {%- if netweaver.monitoring_enabled %} + - netweaver.monitoring + {%- endif %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/install_aas.sls new/sapnwbootstrap-formula-0.4.4/netweaver/install_aas.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/install_aas.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/install_aas.sls 2020-05-18 19:15:34.878091519 +0200 @@ -9,11 +9,12 @@ {% set product_id = node.product_id|default(netweaver.product_id) %} {% set product_id = 'NW_DI:'~product_id if 'NW_DI' not in product_id else product_id %} +{% set inifile = '/tmp/aas.inifile'~instance_name~'.params' %} create_aas_inifile_{{ instance_name }}: file.managed: - source: salt://netweaver/templates/aas.inifile.params.j2 - - name: /tmp/aas.inifile.params + - name: {{ inifile }} - template: jinja - context: # set up context for template aas.inifile.params.j2 master_password: {{ netweaver.master_password }} @@ -28,6 +29,16 @@ hana_password: {{ netweaver.hana.password }} hana_inst: {{ hana_instance }} +{% if node.extra_parameters is defined %} +update_aas_inifile_{{ instance_name }}: + module.run: + - netweaver.update_conf_file: + - conf_file: {{ inifile }} + - {%- for key,value in node.extra_parameters.items() %} + {{ key }}: "{{ value|string }}" + {%- endfor %} +{% endif %} + check_sapprofile_directory_exists_{{ instance_name }}: file.exists: - name: /sapmnt/{{ node.sid.upper() }}/profile @@ -45,16 +56,17 @@ - interval: 30 - require: - check_sapprofile_directory_exists_{{ instance_name }} + - nw_install_pydbapi_client netweaver_install_{{ instance_name }}: netweaver.installed: - name: {{ node.sid.lower() }} - inst: {{ instance }} - password: {{ netweaver.sid_adm_password|default(netweaver.master_password) }} - - software_path: {{ netweaver.swpm_folder }} + - software_path: {{ netweaver.swpm_folder|default(netweaver.swpm_extract_dir) }} - root_user: {{ node.root_user }} - root_password: {{ node.root_password }} - - config_file: /tmp/aas.inifile.params + - config_file: {{ inifile }} - virtual_host: {{ node.virtual_host }} - virtual_host_interface: {{ node.virtual_host_interface|default('eth0') }} - virtual_host_mask: {{ node.virtual_host_mask|default(24) }} @@ -66,11 +78,11 @@ - wait_for_db_{{ instance_name }} - retry: attempts: {{ node.attempts|default(10) }} - interval: 600 + interval: {{ node.interval|default(600) }} remove_aas_inifile_{{ instance_name }}: file.absent: - - name: /tmp/aas.inifile.params + - name: {{ inifile }} - require: - create_aas_inifile_{{ instance_name }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/install_ascs.sls new/sapnwbootstrap-formula-0.4.4/netweaver/install_ascs.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/install_ascs.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/install_ascs.sls 2020-05-18 19:15:34.878091519 +0200 @@ -8,11 +8,12 @@ {% set product_id = node.product_id|default(netweaver.product_id) %} {% set product_id = 'NW_ABAP_ASCS:'~product_id if 'NW_ABAP_ASCS' not in product_id else product_id %} +{% set inifile = '/tmp/ascs.inifile'~instance_name~'.params' %} create_ascs_inifile_{{ instance_name }}: file.managed: - source: salt://netweaver/templates/ascs.inifile.params.j2 - - name: /tmp/ascs.inifile.params + - name: {{ inifile }} - template: jinja - context: # set up context for template ascs.inifile.params.j2 master_password: {{ netweaver.master_password }} @@ -23,15 +24,25 @@ virtual_hostname: {{ node.virtual_host }} download_basket: {{ netweaver.sapexe_folder }} +{% if node.extra_parameters is defined %} +update_ascs_inifile_{{ instance_name }}: + module.run: + - netweaver.update_conf_file: + - conf_file: {{ inifile }} + - {%- for key,value in node.extra_parameters.items() %} + {{ key }}: "{{ value|string }}" + {%- endfor %} +{% endif %} + netweaver_install_{{ instance_name }}: netweaver.installed: - name: {{ node.sid.lower() }} - inst: {{ instance }} - password: {{ netweaver.sid_adm_password|default(netweaver.master_password) }} - - software_path: {{ netweaver.swpm_folder }} + - software_path: {{ netweaver.swpm_folder|default(netweaver.swpm_extract_dir) }} - root_user: {{ node.root_user }} - root_password: {{ node.root_password }} - - config_file: /tmp/ascs.inifile.params + - config_file: {{ inifile }} - virtual_host: {{ node.virtual_host }} - virtual_host_interface: {{ node.virtual_host_interface|default('eth0') }} - virtual_host_mask: {{ node.virtual_host_mask|default(24) }} @@ -43,7 +54,7 @@ remove_ascs_inifile_{{ instance_name }}: file.absent: - - name: /tmp/ascs.inifile.params + - name: {{ inifile }} - require: - create_ascs_inifile_{{ instance_name }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/install_db.sls new/sapnwbootstrap-formula-0.4.4/netweaver/install_db.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/install_db.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/install_db.sls 2020-05-18 19:15:34.878091519 +0200 @@ -9,11 +9,12 @@ {% set product_id = node.product_id|default(netweaver.product_id) %} {% set product_id = 'NW_ABAP_DB:'~product_id if 'NW_ABAP_DB' not in product_id else product_id %} +{% set inifile = '/tmp/db.inifile'~instance_name~'.params' %} create_db_inifile_{{ instance_name }}: file.managed: - source: salt://netweaver/templates/db.inifile.params.j2 - - name: /tmp/db.inifile.params + - name: {{ inifile }} - template: jinja - context: # set up context for template db.inifile.params.j2 master_password: {{ netweaver.master_password }} @@ -28,6 +29,16 @@ hana_password: {{ netweaver.hana.password }} hana_inst: {{ hana_instance }} +{% if node.extra_parameters is defined %} +update_db_inifile_{{ instance_name }}: + module.run: + - netweaver.update_conf_file: + - conf_file: {{ inifile }} + - {%- for key,value in node.extra_parameters.items() %} + {{ key }}: "{{ value|string }}" + {%- endfor %} +{% endif %} + check_sapprofile_directory_exists_{{ instance_name }}: file.exists: - name: /sapmnt/{{ node.sid.upper() }}/profile @@ -45,6 +56,7 @@ - interval: 30 - require: - check_sapprofile_directory_exists_{{ instance_name }} + - nw_install_pydbapi_client netweaver_install_{{ instance_name }}: netweaver.db_installed: @@ -52,10 +64,10 @@ - port: 3{{ hana_instance }}15 - schema_name: {{ netweaver.schema.name|default('SAPABAP1') }} - schema_password: {{ netweaver.schema.password }} - - software_path: {{ netweaver.swpm_folder }} + - software_path: {{ netweaver.swpm_folder|default(netweaver.swpm_extract_dir) }} - root_user: {{ node.root_user }} - root_password: {{ node.root_password }} - - config_file: /tmp/db.inifile.params + - config_file: {{ inifile }} - virtual_host: {{ node.virtual_host }} - virtual_host_interface: {{ node.virtual_host_interface|default('eth0') }} - virtual_host_mask: {{ node.virtual_host_mask|default(24) }} @@ -67,11 +79,11 @@ - wait_for_hana_{{ instance_name }} - retry: attempts: {{ node.attempts|default(5) }} - interval: 60 + interval: {{ node.interval|default(60) }} remove_db_inifile_{{ instance_name }}: file.absent: - - name: /tmp/db.inifile.params + - name: {{ inifile }} - require: - create_db_inifile_{{ instance_name }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/install_ers.sls new/sapnwbootstrap-formula-0.4.4/netweaver/install_ers.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/install_ers.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/install_ers.sls 2020-05-18 19:15:34.878091519 +0200 @@ -8,11 +8,12 @@ {% set product_id = node.product_id|default(netweaver.product_id) %} {% set product_id = 'NW_ERS:'~product_id if 'NW_ERS' not in product_id else product_id %} +{% set inifile = '/tmp/ers.inifile'~instance_name~'.params' %} create_ers_inifile_{{ instance_name }}: file.managed: - source: salt://netweaver/templates/ers.inifile.params.j2 - - name: /tmp/ers.inifile.params + - name: {{ inifile }} - template: jinja - context: # set up context for template ers.inifile.params.j2 master_password: {{ netweaver.master_password }} @@ -23,6 +24,16 @@ virtual_hostname: {{ node.virtual_host }} download_basket: {{ netweaver.sapexe_folder }} +{% if node.extra_parameters is defined %} +update_ers_inifile_{{ instance_name }}: + module.run: + - netweaver.update_conf_file: + - conf_file: {{ inifile }} + - {%- for key,value in node.extra_parameters.items() %} + {{ key }}: "{{ value|string }}" + {%- endfor %} +{% endif %} + check_sapprofile_directory_exists_{{ instance_name }}: file.exists: - name: /sapmnt/{{ node.sid.upper() }}/profile @@ -35,10 +46,10 @@ - name: {{ node.sid.lower() }} - inst: {{ instance }} - password: {{ netweaver.sid_adm_password|default(netweaver.master_password) }} - - software_path: {{ netweaver.swpm_folder }} + - software_path: {{ netweaver.swpm_folder|default(netweaver.swpm_extract_dir) }} - root_user: {{ node.root_user }} - root_password: {{ node.root_password }} - - config_file: /tmp/ers.inifile.params + - config_file: {{ inifile }} - virtual_host: {{ node.virtual_host }} - virtual_host_interface: {{ node.virtual_host_interface|default('eth0') }} - virtual_host_mask: {{ node.virtual_host_mask|default(24) }} @@ -47,14 +58,14 @@ - additional_dvds: {{ netweaver.additional_dvds }} - ascs_password: {{ netweaver.sid_adm_password|default(netweaver.master_password) }} - timeout: 1500 - - interval: 15 + - interval: {{ node.interval|default(30) }} - require: - create_ers_inifile_{{ instance_name }} - check_sapprofile_directory_exists_{{ instance_name }} remove_ers_inifile_{{ instance_name }}: file.absent: - - name: /tmp/ers.inifile.params + - name: {{ inifile }} - require: - create_ers_inifile_{{ instance_name }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/install_pas.sls new/sapnwbootstrap-formula-0.4.4/netweaver/install_pas.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/install_pas.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/install_pas.sls 2020-05-18 19:15:34.878091519 +0200 @@ -9,11 +9,12 @@ {% set product_id = node.product_id|default(netweaver.product_id) %} {% set product_id = 'NW_ABAP_CI:'~product_id if 'NW_ABAP_CI' not in product_id else product_id %} +{% set inifile = '/tmp/pas.inifile'~instance_name~'.params' %} create_pas_inifile_{{ instance_name }}: file.managed: - source: salt://netweaver/templates/pas.inifile.params.j2 - - name: /tmp/pas.inifile.params + - name: {{ inifile }} - template: jinja - context: # set up context for template pas.inifile.params.j2 master_password: {{ netweaver.master_password }} @@ -29,6 +30,16 @@ hana_password: {{ netweaver.hana.password }} hana_inst: {{ hana_instance }} +{% if node.extra_parameters is defined %} +update_pas_inifile_{{ instance_name }}: + module.run: + - netweaver.update_conf_file: + - conf_file: {{ inifile }} + - {%- for key,value in node.extra_parameters.items() %} + {{ key }}: "{{ value|string }}" + {%- endfor %} +{% endif %} + check_sapprofile_directory_exists_{{ instance_name }}: file.exists: - name: /sapmnt/{{ node.sid.upper() }}/profile @@ -46,16 +57,17 @@ - interval: 30 - require: - check_sapprofile_directory_exists_{{ instance_name }} + - nw_install_pydbapi_client netweaver_install_{{ instance_name }}: netweaver.installed: - name: {{ node.sid.lower() }} - inst: {{ instance }} - password: {{ netweaver.sid_adm_password|default(netweaver.master_password) }} - - software_path: {{ netweaver.swpm_folder }} + - software_path: {{ netweaver.swpm_folder|default(netweaver.swpm_extract_dir) }} - root_user: {{ node.root_user }} - root_password: {{ node.root_password }} - - config_file: /tmp/pas.inifile.params + - config_file: {{ inifile }} - virtual_host: {{ node.virtual_host }} - virtual_host_interface: {{ node.virtual_host_interface|default('eth0') }} - virtual_host_mask: {{ node.virtual_host_mask|default(24) }} @@ -67,11 +79,11 @@ - wait_for_db_{{ instance_name }} - retry: attempts: {{ node.attempts|default(10) }} - interval: 600 + interval: {{ node.interval|default(600) }} remove_pas_inifile_{{ instance_name }}: file.absent: - - name: /tmp/pas.inifile.params + - name: {{ inifile }} - require: - create_pas_inifile_{{ instance_name }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/monitoring.sls new/sapnwbootstrap-formula-0.4.4/netweaver/monitoring.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/monitoring.sls 1970-01-01 01:00:00.000000000 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/monitoring.sls 2020-05-18 19:15:34.878091519 +0200 @@ -0,0 +1,35 @@ +{%- from "netweaver/map.jinja" import netweaver with context -%} +{% set host = grains['host'] %} + +prometheus_sap_host_exporter_pkg: + pkg.installed: + - name: prometheus-sap_host_exporter + +# the sid, instance number pair of a node is unique, so we need to adapt configuration +{% for node in netweaver.nodes if node.sap_instance != "db" %} +{% set sap_instance_nr = '{:0>2}'.format(node.instance) %} +{% set exporter_instance = '{}_{}{}'.format(node.sid, node.sap_instance.upper(), sap_instance_nr) %} + +# we bind each exporter instance to a SAP instance virtual host +sap_host_exporter_configuration_{{ exporter_instance }}: + file.managed: + - name: /etc/sap_host_exporter/{{ exporter_instance }}.yaml + - contents: | + address: {{ node.virtual_host }} + sap-control-uds: /tmp/.sapstream5{{ sap_instance_nr }}13 + - require: + - pkg: prometheus_sap_host_exporter_pkg + +{% if host == node.host %} +sap_host_exporter_service_{{ exporter_instance }}: + service.running: + - name: prometheus-sap_host_exporter@{{ exporter_instance }} + - enable: {{ not netweaver.ha_enabled }} + - restart: True + - require: + - pkg: prometheus_sap_host_exporter_pkg + - file: sap_host_exporter_configuration_{{ exporter_instance }} + - watch: + - file: sap_host_exporter_configuration_{{ exporter_instance }} +{% endif %} +{% endfor %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/setup/init.sls new/sapnwbootstrap-formula-0.4.4/netweaver/setup/init.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/setup/init.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/setup/init.sls 2020-05-18 19:15:34.878091519 +0200 @@ -1,5 +1,10 @@ +{%- from "netweaver/map.jinja" import netweaver with context -%} + include: +{% if netweaver.install_packages is sameas true %} - netweaver.setup.packages +{% endif %} + - netweaver.setup.install_pydbapi - netweaver.setup.shared_disk - netweaver.setup.virtual_addresses - netweaver.setup.sap_nfs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/setup/install_pydbapi.sls new/sapnwbootstrap-formula-0.4.4/netweaver/setup/install_pydbapi.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/setup/install_pydbapi.sls 1970-01-01 01:00:00.000000000 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/setup/install_pydbapi.sls 2020-05-18 19:15:34.878091519 +0200 @@ -0,0 +1,53 @@ +{%- from "netweaver/map.jinja" import netweaver with context -%} +{% set host = grains['host'] %} + +{% for node in netweaver.nodes if node.host == host and node.sap_instance in ['db', 'pas', 'aas'] %} +{% if loop.first %} +{% set pydbapi_output_dir = '/tmp/pydbapi' %} +nw_install_python_pip: + pkg.installed: + {% if grains['pythonversion'][0] == 2 %} + - name: python-pip + {% else %} + - name: python3-pip + {% endif %} + - retry: + attempts: 3 + interval: 15 + - resolve_capabilities: true + +nw_extract_pydbapi_client: + hana.pydbapi_extracted: + - name: PYDBAPI.TGZ + - software_folders: {{ netweaver.additional_dvds }} + - output_dir: {{ pydbapi_output_dir }} + - hana_version: '20' + - force: true + +# pip.installed fails as it cannot manage propler file names with regular expressions +# TODO: Improve this to use pip.installed somehow +nw_install_pydbapi_client: + cmd.run: + {% if grains['pythonversion'][0] == 2 %} + - name: /usr/bin/python -m pip install {{ pydbapi_output_dir }}/hdbcli-*.tar.gz + {% else %} + - name: /usr/bin/python3 -m pip install {{ pydbapi_output_dir }}/hdbcli-*.tar.gz + {% endif %} + - reload_modules: true + - require: + - nw_install_python_pip + - nw_extract_pydbapi_client + +nw_reload_hdb_connector: + module.run: + - hana.reload_hdb_connector: + - require: + - nw_install_pydbapi_client + +nw_remove_pydbapi_client: + file.absent: + - name: {{ pydbapi_output_dir }} + - onchanges: + - nw_extract_pydbapi_client +{% endif %} +{% endfor %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/setup/mount.sls new/sapnwbootstrap-formula-0.4.4/netweaver/setup/mount.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/setup/mount.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/setup/mount.sls 2020-05-18 19:15:34.878091519 +0200 @@ -7,6 +7,13 @@ {% if node.sap_instance.lower() in ['ascs', 'ers'] %} +create_folder_{{ node.sap_instance.lower() }}_{{ instance_name }}: + file.directory: + - name: /usr/sap/{{ node.sid.upper() }}/{{ node.sap_instance.upper() }}{{ instance }} + +# HA scenario where ASCS and ERS must share a disk to start/stop the processes as cluster +{% if node.shared_disk_dev is defined %} + {% if ':' in node.shared_disk_dev %} # This means that the device is a nfs share {% set device = node.shared_disk_dev %} {% set fstype = netweaver.nfs_version %} @@ -36,6 +43,7 @@ - name: /usr/sap/{{ shared_node.sid.upper() }}/{{ shared_node.sap_instance.upper() }}{{ shared_instance }} {% endfor %} +{% endif %} {% elif node.sap_instance.lower() in ['pas', 'aas'] %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/netweaver/setup/packages.sls new/sapnwbootstrap-formula-0.4.4/netweaver/setup/packages.sls --- old/sapnwbootstrap-formula-0.2.5/netweaver/setup/packages.sls 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/netweaver/setup/packages.sls 2020-05-18 19:15:34.878091519 +0200 @@ -31,14 +31,11 @@ # Install shaptools depending on the os and python version install_netweaver_shaptools: pkg.installed: - - pkgs: - {% if grains['pythonversion'][0] == 2 %} - - python-PyHDB - - python-shaptools - {% else %} - - python3-PyHDB - - python3-shaptools - {% endif %} + {% if grains['pythonversion'][0] == 2 %} + - name: python-shaptools + {% else %} + - name: python3-shaptools + {% endif %} - retry: attempts: 3 interval: 15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/pillar.example new/sapnwbootstrap-formula-0.4.4/pillar.example --- old/sapnwbootstrap-formula-0.2.5/pillar.example 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/pillar.example 2020-05-18 19:15:34.878091519 +0200 @@ -1,4 +1,8 @@ netweaver: + # optional: Install required packages to install SAP Netweaver (true by default) + # If set to false, these packages must be installed before the formula execution manually + # install_packages: true + virtual_addresses: 192.168.201.111: hacert01 192.168.201.112: hacert02 @@ -24,7 +28,14 @@ # True by default clean_nfs: True sapmnt_inst_media: your_nfs_share_SID_folder + # Specify the path to already extracted SWPM installer folder swpm_folder: your_swpm_folder_absolute_path + # Or specify the path to the sapcar executable & SWPM installer sar archive, to extract the installer + # The sar archive will be extracted to path specified at swpm_extract_dir (optional, by default /sapmedia/NW/SWPM) + # Make sure to use the latest/compatible version of sapcar executable, and that it has correct execute permissions + sapcar_exe_file: your_sapcar_exe_file_absolute_path + swpm_sar_file: your_swpm_sar_file_absolute_path + swpm_extract_dir: location_to_extract_swpm_sar_absolute_path sapexe_folder: your_sapexe_sar_folder_absolute_path # Folder where the installation files are stored. /tmp/swpm_unattended by default. Set None to use # SAP default folders (it will only work with ASCS and ERS). @@ -66,8 +77,15 @@ # Just put the product id ommiting the initial part like NW_ABAP_ASCS, NW_ERS, etc # Examples product_id: NW750.HDB.ABAPHA + # For non HA environments + #product_id: NW750.HDB.ABAP + # For HA S4/HANA #product_id: S4HANA1709.CORE.HDB.ABAPHA + # optional: enables monitoring via sap_host_exporter (disabled by default) + # the exporter will be installed and configured in all the nodes + monitoring_enabled: true + nodes: - host: hacert01 virtual_host: sapha1as @@ -77,12 +95,17 @@ instance: 00 root_user: root root_password: linux + # Set the shared disk used in HA environments. Skip this parameter in non HA environments shared_disk_dev: /dev/sbd + # Or if a nfs share is used to manage the HA mounting point, like in the cloud providers + #shared_disk_dev: your_nfs_share_SID_folder/ASCS + # Init the shared disk. Only used if a shared disk is provided, not in nfs share cases init_shared_disk: True - sap_instance: ascs # Set an specific product id. In this case the initial part of the code is accepted too, even though it's recommend to use the 1st example option product_id: NW750.HDB.ABAPHA + #product_id: NW750.HDB.ABAP #product_id: NW_ABAP_ASCS:S4HANA1709.CORE.HDB.ABAPHA + sap_instance: ascs - host: hacert02 virtual_host: sapha1er @@ -91,7 +114,10 @@ saptune_solution: 'MAXDB' root_user: root root_password: linux + # Set the shared disk used in HA environments. Skip this parameter in non HA environments shared_disk_dev: /dev/sbd + # If a nfs share is used to manage the HA mounting point, like in the cloud + #shared_disk_dev: your_nfs_share_SID_folder/ERS sap_instance: ers - host: hacert03 @@ -102,6 +128,11 @@ root_user: root root_password: linux sap_instance: db + # Retry options configuration. Only for ERS, DB, PAS and AAS instances + # How often retry the SAP instance installation (10 by default retries) + #attempts: 10 + # Interval in seconds between retries (60 seconds by default for DB and 600 seconds for PAS and AAS) + #interval: 60 - host: hacert03 virtual_host: sapha1pas @@ -111,6 +142,10 @@ root_user: root root_password: linux sap_instance: pas + # Update configuration file custom parameters using extra_parameters option + # Example: + #extra_parameters: + # NW_liveCache.useLiveCache: "false" - host: hacert04 virtual_host: sapha1aas diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/sapnwbootstrap-formula.changes new/sapnwbootstrap-formula-0.4.4/sapnwbootstrap-formula.changes --- old/sapnwbootstrap-formula-0.2.5/sapnwbootstrap-formula.changes 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/sapnwbootstrap-formula.changes 2020-05-18 19:15:34.878091519 +0200 @@ -1,4 +1,81 @@ ------------------------------------------------------------------- +Mon May 18 15:02:26 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.4.4 + * Use gcp-vpc-move-route properly using independent route names + for ASCS and ERS instances + +Fri May 15 09:31:34 UTC 2020 - Stefano Torresi <stefano.torr...@suse.com> + +- Version 0.4.3 + * Update monitoring settings + +------------------------------------------------------------------- +Tue May 12 13:55:55 UTC 2020 - Xabier Arbulu Insausti <xarbulu@localhost> + +- Version 0.4.2 + * Fix the shared disk usage in non HA environments + +------------------------------------------------------------------- +Wed Apr 22 19:17:03 UTC 2020 - Simranpal Singh <simranpal.si...@suse.com> + +- Version 0.4.1 + * Make it optional to install netweaver required packages + +------------------------------------------------------------------- +Tue Apr 21 16:25:44 UTC 2020 - Stefano Torresi <stefano.torr...@suse.com> + +- Version 0.4.0 + * Add Pacemaker resources for the sap_host_exporter + +------------------------------------------------------------------- +Fri Apr 17 10:20:28 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.3.0 + * Adapt the cluster template to use the proper gcp agents + (bsc#1161898, bsc#1160933) + +------------------------------------------------------------------- +Tue Apr 14 13:38:47 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.2.11 + * Update anyting socat resource by azure-lb as recommended in + the updated best practices guide + +------------------------------------------------------------------- +Fri Mar 27 18:23:40 UTC 2020 - Simranpal Singh <simranpal.si...@suse.com> + +- Version 0.2.10 + * Add support for extracting installer sar file + * Update installation logic to use installer from extracted installation media + +------------------------------------------------------------------- +Fri Mar 20 13:14:30 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.2.9 + * Install pydbapi package to connect to the HANA database + +------------------------------------------------------------------- +Thu Mar 17 12:24:56 UTC 2020 - Dario Maiocchi <dmaioc...@suse.com> +- Version 0.2.8 + * Fix non-unique ID name error for monitoring.sls state + * Manage properly multiple exporters execution in the same host + update spec + +------------------------------------------------------------------- +Mon Mar 16 11:02:26 UTC 2020 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.2.7 + * Add option to set custom parameters in the installation + configuration files + * Make the installation retry times customizable + +------------------------------------------------------------------- +Tue Mar 10 09:58:57 UTC 2020 - Dario Maiocchi <dmaioc...@suse.com> +- Version 0.2.6 + * Add option to activate the sap_host_exporter on the nodes + +------------------------------------------------------------------- Mon Mar 9 15:55:49 UTC 2020 - Xabier Arbulu <xarb...@suse.com> - Version 0.2.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/sapnwbootstrap-formula.spec new/sapnwbootstrap-formula-0.4.4/sapnwbootstrap-formula.spec --- old/sapnwbootstrap-formula-0.2.5/sapnwbootstrap-formula.spec 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/sapnwbootstrap-formula.spec 2020-05-18 19:15:34.878091519 +0200 @@ -19,7 +19,7 @@ # See also http://en.opensuse.org/openSUSE:Specfile_guidelines Name: sapnwbootstrap-formula -Version: 0.2.5 +Version: 0.4.4 Release: 0 Summary: SAP Netweaver platform deployment formula License: Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sapnwbootstrap-formula-0.2.5/templates/cluster_resources.j2 new/sapnwbootstrap-formula-0.4.4/templates/cluster_resources.j2 --- old/sapnwbootstrap-formula-0.2.5/templates/cluster_resources.j2 2020-03-10 11:44:22.755765094 +0100 +++ new/sapnwbootstrap-formula-0.4.4/templates/cluster_resources.j2 2020-05-18 19:15:34.878091519 +0200 @@ -11,6 +11,7 @@ {%- set ers_ip_address = data.ers_ip_address %} {%- set ascs_virtual_host = data.ascs_virtual_host %} {%- set ers_virtual_host = data.ers_virtual_host %} +{%- set monitoring_enabled = pillar.cluster.monitoring_enabled|default(False) %} # Platform dependant (stonith, virtual ip address, cib options, etc) resource @@ -50,33 +51,65 @@ op stop interval=0 timeout=180 \ op monitor interval=60 timeout=60 -{%- else %} +{%- elif cloud_provider == "google-cloud-platform" %} + +# This stonith resource will be duplicated for each node in the cluster +primitive rsc_gcp_stonith_{{ sid }}_{{ grains['host'] }} stonith:fence_gce \ + params plug={{ grains['gcp_instance_name'] }} pcmk_host_map="{{ grains['host'] }}:{{ grains['gcp_instance_name'] }}" \ + meta target-role=Started + +primitive rsc_ip_{{ sid }}_ASCS{{ ascs_instance }} ocf:heartbeat:gcp-vpc-move-route \ + params ip={{ data.ascs_ip_address }} vpc_network={{ data.vpc_network_name }} route_name={{ data.ascs_route_name|default("nw-ascs-"~sid~"-route") }} \ + op start interval=0 timeout=180 \ + op stop interval=0 timeout=180 \ + op monitor interval=60 timeout=60 + +primitive rsc_ip_{{ sid }}_ERS{{ ers_instance }} ocf:heartbeat:gcp-vpc-move-route \ + params ip={{ data.ers_ip_address }} vpc_network={{ data.vpc_network_name }} route_name={{ data.ers_route_name|default("nw-ers-"~sid~"-route") }} \ + op start interval=0 timeout=180 \ + op stop interval=0 timeout=180 \ + op monitor interval=60 timeout=60 -{%- set nic = "nic="~pillar.cluster.interface|default('eth0')|json if cloud_provider == "google-cloud-platform" else "" %} -{%- set cidr_netmask = "cidr_netmask=32" if cloud_provider == "google-cloud-platform" else "" %} +{%- else %} {%- if cloud_provider == "microsoft-azure" %} -primitive nc_{{ sid }}_ASCS anything \ - params binfile="/usr/bin/socat" cmdline_options="-U TCP-LISTEN:620{{ ascs_instance }},backlog=10,fork,reuseaddr /dev/null" \ +primitive rsc_socat_{{ sid }}_ASCS azure-lb \ + params port=620{{ ascs_instance }} \ op monitor timeout=20s interval=10 depth=0 -primitive nc_{{ sid }}_ERS anything \ - params binfile="/usr/bin/socat" cmdline_options="-U TCP-LISTEN:621{{ ers_instance }},backlog=10,fork,reuseaddr /dev/null" \ +primitive rsc_socat_{{ sid }}_ERS azure-lb \ + params port=621{{ ers_instance }} \ op monitor timeout=20s interval=10 depth=0 {%- endif %} primitive rsc_ip_{{ sid }}_ASCS{{ ascs_instance }} IPaddr2 \ - params ip={{ ascs_ip_address}} {{ cidr_netmask }} {{ nic }} \ + params ip={{ ascs_ip_address}} \ op monitor interval=10s timeout=20s primitive rsc_ip_{{ sid }}_ERS{{ ers_instance }} IPaddr2 \ - params ip={{ ers_ip_address }} {{ cidr_netmask }} {{ nic }} \ + params ip={{ ers_ip_address }} \ op monitor interval=10s timeout=20s {%- endif %} +{%- if monitoring_enabled %} + +primitive rsc_exporter_{{ sid }}_ASCS{{ ascs_instance }} systemd:prometheus-sap_host_exporter@{{ sid }}_ASCS{{ ascs_instance }} \ + op start interval=0 timeout=100 \ + op stop interval=0 timeout=100 \ + op monitor interval=10 \ + meta target-role=Started + +primitive rsc_exporter_{{ sid }}_ERS{{ ers_instance }} systemd:prometheus-sap_host_exporter@{{ sid }}_ERS{{ ers_instance }} \ + op start interval=0 timeout=100 \ + op stop interval=0 timeout=100 \ + op monitor interval=10 \ + meta target-role=Started + +{%- endif %} + # SAP Netweaver related resources primitive rsc_fs_{{ sid }}_ASCS{{ ascs_instance }} Filesystem \ @@ -98,7 +131,15 @@ migration-threshold=1 priority=10 group grp_{{ sid }}_ASCS{{ ascs_instance }} \ - rsc_ip_{{ sid }}_ASCS{{ ascs_instance }} rsc_fs_{{ sid }}_ASCS{{ ascs_instance }} rsc_sap_{{ sid }}_ASCS{{ ascs_instance }} {% if cloud_provider == "microsoft-azure" %} nc_{{ sid }}_ASCS {% endif %} \ + rsc_ip_{{ sid }}_ASCS{{ ascs_instance }} \ + rsc_fs_{{ sid }}_ASCS{{ ascs_instance }} \ + rsc_sap_{{ sid }}_ASCS{{ ascs_instance }} \ + {%- if cloud_provider == "microsoft-azure" %} + rsc_socat_{{ sid }}_ASCS \ + {%- endif %} + {%- if monitoring_enabled %} + rsc_exporter_{{ sid }}_ASCS{{ ascs_instance }} \ + {%- endif %} meta resource-stickiness=3000 primitive rsc_fs_{{ sid }}_ERS{{ ers_instance }} Filesystem \ @@ -119,7 +160,16 @@ meta priority=1000 group grp_{{ sid }}_ERS{{ ers_instance }} \ - rsc_ip_{{ sid }}_ERS{{ ers_instance }} rsc_fs_{{ sid }}_ERS{{ ers_instance }} rsc_sap_{{ sid }}_ERS{{ ers_instance }} {% if cloud_provider == "microsoft-azure" %} nc_{{ sid }}_ERS {% endif %} + rsc_ip_{{ sid }}_ERS{{ ers_instance }} \ + rsc_fs_{{ sid }}_ERS{{ ers_instance }} \ + rsc_sap_{{ sid }}_ERS{{ ers_instance }} \ + {%- if cloud_provider == "microsoft-azure" %} + rsc_socat_{{ sid }}_ERS \ + {%- endif %} + {%- if monitoring_enabled -%} + rsc_exporter_{{ sid }}_ERS{{ ers_instance }} \ + {%- endif %} + meta resource-stickiness=3000 colocation col_sap_{{ sid }}_no_both -5000: grp_{{ sid }}_ERS{{ ers_instance }} grp_{{ sid }}_ASCS{{ ascs_instance }} location loc_sap_{{ sid }}_failover_to_ers rsc_sap_{{ sid }}_ASCS{{ ascs_instance }} \