Skip to content

Commit

Permalink
Merge branch 'dev' into new-role-sap_swpm_2
Browse files Browse the repository at this point in the history
  • Loading branch information
berndfinger authored Sep 5, 2024
2 parents 8ce28cf + 31abc8f commit 6f8e23b
Show file tree
Hide file tree
Showing 46 changed files with 1,491 additions and 561 deletions.
1 change: 1 addition & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
---
# Based on ansible-lint config
extends: default
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ N.B. The Ansible Collection works with SLES from version 15 SP3 and upwards, for
### Execution/Controller host - Operating System requirements

Execution of Ansible Playbooks using this Ansible Collection have been tested with:
- Python 3.9.7 and above (i.e. CPython distribution)
- Ansible Core 2.12.0 and above _(included with optional installation of Ansible Community Edition 5.0 and above)_
- Python 3.10.14 and above (i.e. CPython distribution)
- Ansible Core 2.16.9 and above _(included with optional installation of Ansible Community Edition 5.0 and above)_
- OS: macOS with Homebrew, RHEL, SLES, and containers in Task Runners (e.g. Azure DevOps)

#### Ansible Core version

This Ansible Collection was designed for maximum backwards compatibility, with full compatibility starting from Ansible Core 2.12.0 and above.
This Ansible Collection was designed for maximum backwards compatibility, with full compatibility starting from Ansible Core 2.16.9 and above.

**Note 1:** Ansible 2.9 was the last release before the Ansible project was split into Ansible Core and Ansible Community Edition, and was before Ansible Collections functionality was introduced. This Ansible Collection should execute when Ansible 2.9 is used, but it is not recommended and errors should be expected (and will not be resolved).

Expand Down
20 changes: 0 additions & 20 deletions playbooks/sample-sap-storage-prep.yml

This file was deleted.

162 changes: 162 additions & 0 deletions playbooks/sample-sap-storage-setup_sap_s4hana_distributed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# SPDX-License-Identifier: Apache-2.0
---

- name: Complete Infrastructure setup
hosts: hana_primary, nwas_ascs, nwas_pas, nwas_aas
become: true
any_errors_fatal: true

vars:

sap_system_sid: "S01"
sap_system_hana_db_sid: "H01"
sap_system_nwas_abap_ascs_instance_nr: "00"
sap_system_nwas_abap_pas_instance_nr: "01"
sap_system_nwas_abap_aas_instance_nr: "11"

aws_nfs_mount_point: "fs-1234567890.efs.eu-west-2.amazonaws.com:/"
aws_nfs_mount_point_separate_sap_transport_dir: "fs-0987654321.efs.eu-west-2.amazonaws.com:/"
aws_nfs_mount_point_type: nfs4
aws_nfs_mount_point_opts: nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,acl,noauto # should include noauto to avoid /etc/fstab mount on boot, when Linux Pacemaker should control mount

aws_host_specifications_dictionary:

hana-p:
sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}"
sap_storage_setup_host_type:
- hana_primary
sap_storage_setup_definition:
- name: hana_data
mountpoint: /hana/data
disk_size: 384 # size in GB, integer
filesystem_type: xfs # default: xfs
- name: hana_log
mountpoint: /hana/log
disk_size: 128 # size in GB, integer
filesystem_type: xfs # default: xfs
- name: hana_shared
mountpoint: /hana/shared
disk_size: 320 # size in GB, integer
filesystem_type: xfs # default: xfs
- name: swap
swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap
disk_size: 2
filesystem_type: swap # must be swap filesystem
- name: software
mountpoint: /software
disk_size: 100 # size in GB, integer
filesystem_type: xfs # default: xfs


nw-ascs:
sap_storage_setup_sid: "{{ sap_system_sid }}"
sap_storage_setup_nwas_abap_ascs_instance_nr: "{{ sap_system_nwas_abap_ascs_instance_nr }}"
sap_storage_setup_host_type:
- nwas_abap_ascs
sap_storage_setup_definition:
- name: usr_sap
mountpoint: /usr/sap
nfs_path: /usr/sap # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: usr_sap_trans
mountpoint: /usr/sap/trans
nfs_path: /usr/sap/trans # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point_separate_sap_transport_dir | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: sapmnt
mountpoint: /sapmnt
nfs_path: /sapmnt # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: swap
disk_size: 96
filesystem_type: swap # must be swap filesystem
- name: software
mountpoint: /software
disk_size: 100 # size in GB, integer
filesystem_type: xfs # default: xfs


nw-pas:
sap_storage_setup_sid: "{{ sap_system_sid }}"
sap_storage_setup_nwas_abap_pas_instance_nr: "{{ sap_system_nwas_abap_pas_instance_nr }}"
sap_storage_setup_host_type:
- nwas_abap_pas
sap_storage_setup_definition:
- name: usr_sap
mountpoint: /usr/sap
nfs_path: /usr/sap # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: usr_sap_trans
mountpoint: /usr/sap/trans
nfs_path: /usr/sap/trans # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point_separate_sap_transport_dir | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: sapmnt
mountpoint: /sapmnt
nfs_path: /sapmnt # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: swap
disk_size: 96
filesystem_type: swap # must be swap filesystem
- name: software
mountpoint: /software
disk_size: 100 # size in GB, integer
filesystem_type: xfs # default: xfs


nw-aas:
sap_storage_setup_sid: "{{ sap_system_sid }}"
sap_storage_setup_nwas_abap_aas_instance_nr: "{{ sap_system_nwas_abap_aas_instance_nr }}"
sap_storage_setup_host_type:
- nwas_abap_aas
sap_storage_setup_definition:
- name: usr_sap
mountpoint: /usr/sap
nfs_path: /usr/sap # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: usr_sap_trans
mountpoint: /usr/sap/trans
nfs_path: /usr/sap/trans # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point_separate_sap_transport_dir | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: sapmnt
mountpoint: /sapmnt
nfs_path: /sapmnt # subdirectory path on the NFS server
nfs_server: "{{ aws_nfs_mount_point | default('') }}" # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }}
nfs_filesystem_type: "{{ aws_nfs_mount_point_type | default('') }}" # default: {{ sap_storage_setup_nfs_filesystem_type }}
nfs_mount_options: "{{ aws_nfs_mount_point_opts | default('') }}" # default: {{ sap_storage_setup_nfs_mount_options }}
- name: swap
disk_size: 96
filesystem_type: swap # must be swap filesystem
- name: software
mountpoint: /software
disk_size: 100 # size in GB, integer
filesystem_type: xfs # default: xfs


tasks:

- name: Execute Ansible Role sap_storage_setup
ansible.builtin.include_role:
name: community.sap_install.sap_storage_setup
vars:
sap_storage_setup_sid: "{{ aws_host_specifications_dictionary[ansible_hostname].sap_storage_setup_sid | default('') }}"
sap_storage_setup_host_type: "{{ aws_host_specifications_dictionary[ansible_hostname].sap_storage_setup_host_type | list }}"
sap_storage_setup_definition: "{{ aws_host_specifications_dictionary[ansible_hostname].sap_storage_setup_definition | list }}"
sap_storage_setup_nwas_abap_ascs_instance_nr: "{{ aws_host_specifications_dictionary[ansible_hostname].sap_storage_setup_nwas_abap_ascs_instance_nr | default(omit) }}"
sap_storage_setup_nwas_abap_ers_instance_nr: "{{ aws_host_specifications_dictionary[ansible_hostname].sap_storage_setup_nwas_abap_ers_instance_nr | default(omit) }}"
sap_storage_setup_nwas_abap_pas_instance_nr: "{{ aws_host_specifications_dictionary[ansible_hostname].sap_storage_setup_nwas_abap_pas_instance_nr | default(omit) }}"
sap_storage_setup_nwas_abap_aas_instance_nr: "{{ aws_host_specifications_dictionary[ansible_hostname].sap_storage_setup_nwas_abap_aas_instance_nr | default(omit) }}"
Loading

0 comments on commit 6f8e23b

Please sign in to comment.