Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap_storage_setup: defaults and documentation #825

Merged
merged 6 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading