Skip to content

Commit

Permalink
Merge pull request sap-linuxlab#825 from sean-freeman/sap_storage_doc
Browse files Browse the repository at this point in the history
sap_storage_setup: defaults and documentation
  • Loading branch information
sean-freeman authored Jul 24, 2024
2 parents 1c4526d + d1daec4 commit feb0e8a
Show file tree
Hide file tree
Showing 5 changed files with 244 additions and 243 deletions.
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 feb0e8a

Please sign in to comment.