Skip to content

Commit

Permalink
v1.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI User committed Nov 28, 2023
1 parent 235c0e5 commit 24e08ec
Show file tree
Hide file tree
Showing 381 changed files with 1,609 additions and 9,764 deletions.
516 changes: 351 additions & 165 deletions README.md

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- "fileshares-vars.yml"
- "hainfra-vars.yml"
- "dns-vars.yml"

roles:
- ascsclusterinst
...
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- "saphana-vars.yml"
- "hainfra-vars.yml"
- "dns-vars.yml"

roles:
- dbinstance
...
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- "fileshares-vars.yml"
- "hainfra-vars.yml"
- "dns-vars.yml"

roles:
- ersclusterinst
...
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
loop:
- "saphana-vars.yml"
roles:
- hdbclusterhooks
- hdbclusterprimary
- hdbstatus
...
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
- hosts: all
- hosts: hdb_iphost1
gather_facts: true
pre_tasks:
- name: Import playbook variables
include_vars: "{{ item }}"
loop:
- "saphana-vars.yml"
roles:
- hsrstatus
- hdbclusterhooks
- hdbclusterprimary
...
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- "hainfra-vars.yml"
- "dns-vars.yml"
roles:
- sapbasereq
- saphanareq
- clusterreq
...
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
- hosts: all
- hosts: hdb_iphost2
gather_facts: true
pre_tasks:
- name: Import playbook variables
include_vars: "{{ item }}"
loop:
- "saphana-vars.yml"
- "hainfra-vars.yml"
roles:
- saphsrreplica
- hdbclusterhooks
...
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
- "hainfra-vars.yml"
roles:
- saphsrreplica
- hdbclusterhooks
...
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- "hainfra-vars.yml"
- "dns-vars.yml"
roles:
- sapbasereq
- saphanareq
- clusterreq
...
21 changes: 21 additions & 0 deletions ansible/roles/ascsclusterinst/templates/ascsconfig.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
NW_Delete_Sapinst_Users.removeUsers = true

NW_GetMasterPassword.masterPwd = {{ sap_main_password }}

NW_GetSidNoProfiles.sid = {{ sap_sid | upper }}

NW_SAPCrypto.SAPCryptoFile = {{ sap_kit }}/sapexe.sar

NW_SCS_Instance.instanceNumber = {{ sap_ascs_instance_number }}

NW_SCS_Instance.scsVirtualHostname = {{ cname_ascs }}

NW_Unpack.sapExeSar = {{ sap_kit }}/sapexe.sar

NW_getFQDN.FQDN = {{ domain_name }}

archives.downloadBasket = {{ sap_kit }}

hostAgent.sapAdmPassword = {{ sap_main_password }}

nwUsers.sidadmPassword = {{ sap_main_password }}
15 changes: 15 additions & 0 deletions ansible/roles/ascsclusterinst/templates/sapusers.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
NW_Delete_Sapinst_Users.removeUsers = true

NW_Users_Create.sid = {{ sap_sid | upper }}

hostAgent.sapAdmPassword = {{ sap_main_password }}

nwUsers.dbtype = ind

nwUsers.sapadmUID = 1002

nwUsers.sapsysGID = 1002

nwUsers.sidAdmUID = 1001

nwUsers.sidadmPassword = {{ sap_main_password }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
src: dbinstance.cfg
dest: "{{ sap_kit }}/dbinstance.params"

- name: Start SAP NW DB instance installation
- name: Start SAP DB instance installation
shell: "{{ sap_kit }}/swpm/sapinst SAPINST_INPUT_PARAMETERS_URL={{ sap_kit }}/dbinstance.params SAPINST_EXECUTE_PRODUCT_ID={{ sap_product_id }} SAPINST_SKIP_DIALOGS=true SAPINST_START_GUISERVER=false"

- name: Remove virtual hostnames to /etc/hosts file
Expand Down
47 changes: 47 additions & 0 deletions ansible/roles/dbinstance/templates/dbinstance.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
HDB_Schema_Check_Dialogs.schemaName = SAPHANADB

HDB_Schema_Check_Dialogs.schemaPassword = {{ sap_main_password }}

HDB_Userstore.doNotResolveHostnames = {{ cname_hana }}

NW_Delete_Sapinst_Users.removeUsers = true

NW_GetMasterPassword.masterPwd = {{ sap_main_password }}

NW_HDB_DB.abapSchemaName = SAPHANADB

NW_HDB_DB.abapSchemaPassword = {{ sap_main_password }}

NW_HDB_DBClient.clientPathStrategy = SAPCPE

NW_HDB_getDBInfo.dbhost = {{ cname_hana }}

NW_HDB_getDBInfo.dbsid = {{ hana_sid|upper }}

NW_HDB_getDBInfo.instanceNumber = {{ hana_sysno }}

NW_HDB_getDBInfo.systemDbPassword = {{ hana_main_password }}

NW_HDB_getDBInfo.systemPassword = {{ hana_main_password }}

NW_HDB_getDBInfo.systemid = {{ hana_sid|upper }}

NW_Recovery_Install_HDB.extractLocation = /usr/sap/{{ hana_sid|upper }}/HDB{{ hana_sysno }}/backup/data/DB_{{ hana_sid|upper }}

NW_Recovery_Install_HDB.extractParallelJobs = {{ hdb_concurrent_jobs }}

NW_Recovery_Install_HDB.sidAdmName = {{ hana_sid|lower }}adm

NW_Recovery_Install_HDB.sidAdmPassword = {{ hana_main_password }}

NW_System.installSAPHostAgent = false

NW_Unpack.sapExeDbSar = {{ sap_kit }}/sapexedb.sar

NW_getFQDN.FQDN = {{ domain_name }}

NW_getLoadType.loadType = SAP

NW_readProfileDir.profileDir = /usr/sap/{{ sap_sid|upper }}/SYS/profile

archives.downloadBasket = {{ sap_kit }}
File renamed without changes.
21 changes: 21 additions & 0 deletions ansible/roles/ersclusterinst/templates/ersconfig.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
NW_Delete_Sapinst_Users.removeUsers = true

NW_readProfileDir.profileDir = /usr/sap/{{ sap_sid | upper }}/SYS/profile

archives.downloadBasket = {{ sap_kit }}

hostAgent.sapAdmPassword = {{ sap_main_password }}

nwUsers.sapadmUID = 1002

nwUsers.sapsysGID = 1002

nwUsers.sidAdmUID = 1001

nwUsers.sidadmPassword = {{ sap_main_password }}

nw_instance_ers.ersInstanceNumber = {{ sap_ers_instance_number }}

nw_instance_ers.ersVirtualHostname = {{ cname_ers }}

nw_instance_ers.restartSCS = false
15 changes: 15 additions & 0 deletions ansible/roles/ersclusterinst/templates/sapusers.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
NW_Delete_Sapinst_Users.removeUsers = true

NW_Users_Create.sid = {{ sap_sid | upper }}

hostAgent.sapAdmPassword = {{ sap_main_password }}

nwUsers.dbtype = ind

nwUsers.sapadmUID = 1002

nwUsers.sapsysGID = 1002

nwUsers.sidAdmUID = 1001

nwUsers.sidadmPassword = {{ sap_main_password }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
group: sapsys
mode: 0755

- name: Pause for 15 minutes to allow all started processes to complete
ansible.builtin.pause:
minutes: 15

- name: Stop HANADB instance
shell: |
/usr/sap/{{ hana_sid | upper }}/HDB{{ hana_sysno }}/HDB stop
Expand Down Expand Up @@ -48,14 +44,4 @@
template:
src: 20-saphana.j2
dest: /etc/sudoers.d/20-saphana

- name: Start HANADB instance
shell: |
/usr/sap/{{ hana_sid | upper }}/HDB{{ hana_sysno }}/HDB start
args:
executable: /bin/bash
become: true
become_user: "{{ hana_sid | lower }}adm"
register: hanadbstart
changed_when: "'StartSystem' in hanadbstart.stdout"
...
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
- name: Pause for 10 minutes to make sure the replication has completed
ansible.builtin.pause:
minutes: 10

- name: Enable cluster maintenance mode
shell: |
pcs property set maintenance-mode=true
Expand Down Expand Up @@ -30,12 +26,4 @@
- name: Disable cluster maintenance mode
shell: |
pcs property set maintenance-mode=false
- name: Pause for 10 minutes to make sure the replication has completed
ansible.builtin.pause:
minutes: 10

- name: Cluster resource Cleanup
shell: |
pcs resource cleanup SAPHana_{{ hana_sid | upper}}_{{ hana_sysno }}-clone
...
7 changes: 7 additions & 0 deletions ansible/roles/hdbstatus/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
hana_db_env: "source /usr/sap/{{ hana_sid | upper }}/home/.sapenv.sh"
hana_db_status_command: "python /usr/sap/{{ hana_sid | upper }}/HDB{{ hana_sysno }}/exe/python_support/systemOverview.py"
hana_db_status_ok: "| Services | All Started | OK | Yes |"
task_retries: 30
task_delay: 30
...
10 changes: 10 additions & 0 deletions ansible/roles/hdbstatus/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Wait for hdb cluster resource
shell: "{{ hana_db_env }} && {{ hana_db_status_command }}"
become: true
become_user: "{{ hana_sid | lower }}adm"
register: hdbstatus
until: hana_db_status_ok in hdbstatus.stdout
retries: "{{ task_retries }}"
delay: "{{ task_delay }}"
...
7 changes: 7 additions & 0 deletions ansible/roles/hsrstatus/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
hana_db_env: "source /usr/sap/{{ hana_sid | upper }}/home/.sapenv.sh"
hana_replication_status_command: "python /usr/sap/{{ hana_sid | upper }}/HDB{{ hana_sysno }}/exe/python_support/systemReplicationStatus.py"
hana_replication_status_ok: "overall system replication status: ACTIVE"
task_retries: 30
task_delay: 30
...
12 changes: 12 additions & 0 deletions ansible/roles/hsrstatus/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: Wait for hana system replication to complete
shell: "{{ hana_db_env }} && {{ hana_replication_status_command }}"
become: true
become_user: "{{ hana_sid | lower }}adm"
register: hsrstatus
until: hana_replication_status_ok in hsrstatus.stdout
retries: "{{ task_retries }}"
delay: "{{ task_delay }}"
ignore_errors: true
failed_when: "hsrstatus.rc not in [ 0, 10, 11, 12, 13, 14, 15 ]"
...
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,6 @@
state: directory
mode: 0775

# - name: Make sure the paths are immutable
# file:
# path: "{{ path }}"
# attr: +i
# loop:
# - "/sapmnt/{{ sap_sid|upper }}"
# - "/usr/sap/trans"
# - "/usr/sap/{{ sap_sid|upper }}/SYS"
# - "/usr/sap/{{ sap_sid|upper }}/ASCS{{ sap_ascs_instance_number }}"
# - "/usr/sap/{{ sap_sid|upper }}/ERS{{ sap_ers_instance_number }}"
# - "/usr/sap/{{ sap_sid|upper }}/D{{ sap_aas_instance_number }}"
# loop_control:
# loop_var: path

- name: Mount /sapmnt/{{ sap_sid|upper }} and add it to /etc/fstab
mount:
path: "/sapmnt/{{ sap_sid|upper }}"
Expand Down
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions ansible/roles/s4aasinst/templates/aasconfig.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
HDB_Schema_Check_Dialogs.schemaName = SAPHANADB

HDB_Schema_Check_Dialogs.schemaPassword = {{ sap_main_password }}

HDB_Userstore.doNotResolveHostnames = {{ cname_hana }}

NW_HDB_getDBInfo.dbhost = {{ cname_hana }}

NW_AS.instanceNumber = {{ sap_aas_instance_number }}

NW_DI_Instance.virtualHostname = {{ ansible_hostname }}

NW_Delete_Sapinst_Users.removeUsers = true

NW_GetMasterPassword.masterPwd = {{ sap_main_password }}

NW_HDB_getDBInfo.instanceNumber = {{ hana_sysno }}

NW_System.installSAPHostAgent = false

NW_getLoadType.loadType = SAP

NW_readProfileDir.profileDir = /usr/sap/{{ sap_sid | upper }}/SYS/profile

archives.downloadBasket = {{ sap_kit }}

nwUsers.sapsysGID = 1002

nwUsers.sidAdmUID = 1001
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,6 @@
state: directory
mode: 0775

# - name: Make sure the paths are immutable
# file:
# path: "{{ path }}"
# attr: +i
# loop:
# - "/sapmnt/{{ sap_sid|upper }}"
# - "/usr/sap/trans"
# - "/usr/sap/{{ sap_sid|upper }}/SYS"
# - "/usr/sap/{{ sap_sid|upper }}/ASCS{{ sap_ascs_instance_number }}"
# - "/usr/sap/{{ sap_sid|upper }}/ERS{{ sap_ers_instance_number }}"
# - "/usr/sap/{{ sap_sid|upper }}/D{{ sap_ci_instance_number }}"
# loop_control:
# loop_var: path

- name: Mount /sapmnt/{{ sap_sid|upper }} and add it to /etc/fstab
mount:
path: "/sapmnt/{{ sap_sid|upper }}"
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 24e08ec

Please sign in to comment.