Skip to content

Commit

Permalink
Feature/local inifiles (#696)
Browse files Browse the repository at this point in the history
* Infrastructure and Configuration
  - Updated SDAF version to 3.14.1.0 with comprehensive UID mapping updates across SAP, DB2, SQLSERVER, and HANA components
  - Implemented secure store configuration for HANA installation with optimized execution modes
  - Corrected ownership settings for /hana/* directories from sidadm to hdbadm UID

* Code Quality and Structure
  - Refactored deployment scripts and Oracle ASM disk setup tasks for improved clarity and maintainability
  - Enhanced debugging capabilities with increased verbosity in DBLoad tasks
  - Streamlined SCS and ERS installation tasks to handle dynamic gateway and JAVA instance configurations

* Dependency Updates
  - Upgraded Azure SDK components: ResourceManager (1.13.0), Network (1.10.0), Identity (1.13.2), and Data.Tables (12.10.0)
  - Updated GitHub Actions: upload-artifact (4.6.0), harden-runner (2.10.4), codeql-action (3.28.1)
  - Updated System.Runtime.Caching to 9.0.1 and Microsoft.Identity.Web to 3.6.0

* Documentation and Compliance
  - Added copyright and license information to template files
  - Improved code comments and documentation clarity
  - Added local templates and updated response file configurations

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Kimmo Forss <[email protected]>
Co-authored-by: hdamecharla <[email protected]>
Co-authored-by: Steffen Bo Thomsen <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Jan 21, 2025
1 parent 7b1e2d9 commit 172c291
Show file tree
Hide file tree
Showing 61 changed files with 1,925 additions and 514 deletions.
26 changes: 13 additions & 13 deletions deploy/ansible/playbook_05_00_00_sap_scs_install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@
ansible.builtin.set_fact:
this_sid:
{
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{% if platform == "SYBASE" %}{{ asesidadm_uid }}{% else %}{{ sidadm_uid }}{% endif %}',
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{{ UIDs[ platform ].uid }}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
}
tags:
- always
Expand Down Expand Up @@ -215,12 +215,12 @@
ansible.builtin.set_fact:
this_sid:
{
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{% if platform == "SYBASE" %}{{ asesidadm_uid }}{% else %}{{ sidadm_uid }}{% endif %}',
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{{ UIDs[ platform ].uid }}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
}

- name: "SCS Installation Playbook: Define list of SIDs"
Expand Down Expand Up @@ -301,7 +301,7 @@
name: roles-sap/7.0.0-post-install
vars:
suffix: "_SCS"
prefix: "{{ bom.product_ids.scs.replace('.', '/').replace('/ABAP', '').split(':')[1] }}"
prefix: "{{ bom.product_ids.scs.replace('.', '/').replace('/ABAP', '').replace('/JAVA', '').split(':')[1] }}"
path: 'INSTALL/DISTRIBUTED/{{ scs_bom_instance_type }}/{{ instance_type }}'
tier: 'scs'
this_sid: "{{ sid_to_be_deployed.sid | upper }}"
Expand Down Expand Up @@ -567,7 +567,7 @@
name: roles-sap/7.0.0-post-install
vars:
suffix: "_SCS"
prefix: "{{ scs_bom_id.replace('.', '/').replace('/ABAPHA', '').replace('/HA', '').split(':')[1] }}"
prefix: "{{ scs_bom_id.replace('.', '/').replace('/JAVAHA', '').replace('/ABAPHA', '').replace('/HA', '').split(':')[1] }}"
path: 'INSTALL/HA/{{ scs_bom_instance_type }}/{{ instance_type }}'
tier: 'scs'
this_sid: "{{ sap_sid | upper }}"
Expand All @@ -581,7 +581,7 @@
name: roles-sap/7.0.0-post-install
vars:
suffix: "_ERS"
prefix: "{{ ers_bom_id.replace('.', '/').replace('/ABAPHA', '').replace('/HA', '').split(':')[1] }}"
prefix: "{{ ers_bom_id.replace('.', '/').replace('/ABAPHA', '').replace('/JAVAHA', '').replace('/HA', '').split(':')[1] }}"
path: 'INSTALL/HA/{{ ers_bom_instance_type }}/ERS'
tier: 'ers'
this_sid: "{{ sap_sid | upper }}"
Expand Down
24 changes: 12 additions & 12 deletions deploy/ansible/playbook_05_02_sap_pas_install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@
ansible.builtin.set_fact:
this_sid:
{
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{% if platform == "SYBASE" %}{{ asesidadm_uid }}{% else %}{{ sidadm_uid }}{% endif %}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{{ UIDs[ platform ].uid }}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
}

- name: "PAS Installation Playbook: - Set 'pas' tier facts"
Expand Down Expand Up @@ -163,12 +163,12 @@
ansible.builtin.set_fact:
this_sid:
{
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{% if platform == "SYBASE" %}{{ asesidadm_uid }}{% else %}{{ sidadm_uid }}{% endif %}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{{ UIDs[ platform ].uid }}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
}

- name: "PAS Installation Playbook: Define list of SIDs"
Expand Down
22 changes: 11 additions & 11 deletions deploy/ansible/playbook_05_03_sap_app_install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@
ansible.builtin.set_fact:
this_sid:
{
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{% if platform == "SYBASE" %}{{ asesidadm_uid }}{% else %}{{ sidadm_uid }}{% endif %}',
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{{ UIDs[ platform ].uid }}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
}

- name: "APP Installation Playbook: Define list of SIDs"
Expand Down Expand Up @@ -151,12 +151,12 @@
ansible.builtin.set_fact:
this_sid:
{
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{% if platform == "SYBASE" %}{{ asesidadm_uid }}{% else %}{{ sidadm_uid }}{% endif %}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}' ,
'app_inst_no': '{% if app_instance_number is defined %}{{ app_instance_number }}{% else %}00{% endif %}'
'sid': '{{ sap_sid | upper }}',
'dbsid_uid': '{{ hdbadm_uid }}',
'sidadm_uid': '{{ UIDs[ platform ].uid }}',
'ascs_inst_no': '{{ scs_instance_number }}',
'pas_inst_no': '{{ pas_instance_number }}',
'app_inst_no': '{{ app_instance_number }}'
}

- name: "APP Installation Playbook: Define list of SIDs"
Expand Down
28 changes: 28 additions & 0 deletions deploy/ansible/roles-db/4.0.0-hdb-install/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,34 @@
msg: "INSTALL:0001:Unable to find hdblcm, please check that the installation media is mounted"
when: not hdblcm_found.stat.exists

- name: "SAP HANA: check sp version from manifest"
ansible.builtin.shell: |
set -o pipefail
grep sp-number manifest | cut -d ":" -f 2 | tr -d [:space:]
args:
chdir: "{{ target_media_location }}/CD_HDBSERVER/SAP_HANA_DATABASE/server"
register: manifest_hana_sp

- name: "SAP HANA: Show sps leve"
ansible.builtin.debug:
msg: "HANA SP Level: {{ manifest_hana_sp.stdout }}"

- name: "SAP HANA: Set fact when sps is 08 or higher"
ansible.builtin.set_fact:
hana_sp08_or_higher: "{{ manifest_hana_sp.stdout is version('080', '>=') }}"

# all | client | es | ets | lcapps | server | smartda | streaming | rdsync | xs | studio | afl | sca | sop | eml | rme | rtl | trp
- name: "SAP HANA: Set HANA components"
ansible.builtin.set_fact:
hana_components: "server, lcapps, afl, vch2021"
when:
- hana_sp08_or_higher
- hana_components == 'all'

- name: "SAP HANA: Show HANA components"
ansible.builtin.debug:
msg: "HANA Components: {{ hana_components }}"

- name: "HANA Install"
block:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ xs_trust_pem=
lss_inst_path=/lss/shared

# Local Secure Store User Password
lss_user_password=
lss_user_password={{ pwd_os_sidadm }}

# Local Secure Store User ID
lss_userid=
lss_userid={{ lss_uid }}

# Local Secure Store User Group ID
lss_groupid=
lss_groupid={{ lss_gid }}

# Local Secure Store User Home Directory ( Default: /usr/sap/${sid}/lss/home )
lss_user_home=/usr/sap/${sid}/lss/home
Expand All @@ -272,7 +272,7 @@ lss_user_home=/usr/sap/${sid}/lss/home
lss_user_shell=/bin/sh

# Local Secure Store Auto Backup Password
lss_backup_password=
lss_backup_password={{ pwd_os_sidadm }}

[streaming]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ verify_signature=n
components={{ _rsp_components }}

# Install Execution Mode ( Default: standard; Valid values: standard | optimized )
install_execution_mode=standard
install_execution_mode=optimized

# Ignore failing prerequisite checks
ignore=
Expand Down Expand Up @@ -251,19 +251,20 @@ xs_cert_key=
# XS Advanced Trust Certificate
xs_trust_pem=


[lss]

# Installation Path for Local Secure Store ( Default: /lss/shared )
lss_inst_path=/lss/shared

# Local Secure Store User Password
lss_user_password=
lss_user_password={{ pwd_os_sidadm }}

# Local Secure Store User ID
lss_userid=
lss_userid={{ lss_uid }}

# Local Secure Store User Group ID
lss_groupid=
lss_groupid={{ lss_gid }}

# Local Secure Store User Home Directory ( Default: /usr/sap/${sid}/lss/home )
lss_user_home=/usr/sap/${sid}/lss/home
Expand All @@ -272,7 +273,7 @@ lss_user_home=/usr/sap/${sid}/lss/home
lss_user_shell=/bin/sh

# Local Secure Store Auto Backup Password
lss_backup_password=
lss_backup_password={{ pwd_os_sidadm }}

[streaming]

Expand Down
26 changes: 13 additions & 13 deletions deploy/ansible/roles-db/4.0.4-hdb-schema/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@
# | |
# +------------------------------------4--------------------------------------*/

- name: "HDB Schema: Get DEFAULT.PFL"
- name: "HDB Schema: Get DEFAULT.PFL"
ansible.builtin.slurp:
src: "/sapmnt/{{ sap_sid | upper }}/profile/DEFAULT.PFL"
register: profilefile
src: "/sapmnt/{{ sap_sid | upper }}/profile/DEFAULT.PFL"
register: profilefile

- name: "HDB Schema: Get schema property"
- name: "HDB Schema: Get schema property"
ansible.builtin.set_fact:
schema_property: "{{ profilefile['content'] | b64decode | split('\n') | select('search', property_name ) }}"
loop: "{{ hdb_schema_property_names }}"
schema_property: "{{ profilefile['content'] | b64decode | split('\n') | select('search', property_name ) }}"
loop: "{{ hdb_schema_property_names }}"
loop_control:
loop_var: property_name
loop_var: property_name
when:
- (schema_property | default([])) | length <= 0

- name: "HDB Schema: Parse schema name"
- name: "HDB Schema: Parse schema name"
ansible.builtin.set_fact:
schema_name: "{{ schema_property | first | split('=') | last | trim }}"
schema_name: "{{ schema_property | first | split('=') | last | trim }}"
when:
- (schema_property | default([])) | length > 0

- name: "HDB Schema: Set default schema"
- name: "HDB Schema: Set default schema"
ansible.builtin.set_fact:
schema_name: "{{ hana_schema }}"
schema_name: "{{ hana_schema }}"
when:
- schema_name is not defined

- name: "HDB Schema: Show schema name"
- name: "HDB Schema: Show schema name"
ansible.builtin.debug:
msg: "Schema name: {{ schema_name }}"
msg: "Schema name: {{ schema_name }}"
Loading

0 comments on commit 172c291

Please sign in to comment.