Skip to content

Commit

Permalink
Merge pull request #22 from sean-freeman/dev
Browse files Browse the repository at this point in the history
all: update ibmpowervm and scaleout
  • Loading branch information
sean-freeman authored Apr 29, 2024
2 parents 0048e41 + 55dbb4c commit 7592034
Show file tree
Hide file tree
Showing 27 changed files with 83 additions and 24 deletions.
1 change: 1 addition & 0 deletions deploy_scenarios/sap_bw4hana_sandbox/ansible_extravars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
bw4h01: # Hostname, must be 13 characters or less
sap_host_type: hana_primary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_sid }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ sap_hana_install_update_etchosts: 'false'
# Mandatory parameters : Infrastructure provisioning definitions - SAP HANA scale-out
####

sap_hana_scaleout_active_coordinator: 1
sap_hana_scaleout_active_worker: 2
sap_hana_scaleout_standby: 1 # Only 0 or 1
sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator: 1
sap_vm_provision_calculate_sap_hana_scaleout_active_worker: 2
sap_vm_provision_calculate_sap_hana_scaleout_standby: 1 # Only 0 or 1



Expand Down Expand Up @@ -715,6 +715,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
hdb-node: # Hostname, must be 13 characters or less
sap_host_type: hana_primary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}"
Expand Down Expand Up @@ -762,6 +763,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
nwas01: # Hostname, must be 13 characters or less
sap_host_type: nwas_pas # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "cnp-2x32" # 16 vCPU x 32GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_sid }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,38 +56,38 @@
ansible.builtin.set_fact:
"{{ sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout' }}": "{{ {} | combine({sap_vm_provision_host_specification_plan: {}}) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - dynamically build new Ansible Dictionary
ansible.builtin.set_fact:
"scaleout_build": "{{ scaleout_build | default({}) | combine({(lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys() | first + host_scaleout_node | string): lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan][lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys() | first]}) }}"
loop: "{{ range(0, (sap_hana_scaleout_active_coordinator | int + sap_hana_scaleout_active_worker | int + sap_hana_scaleout_standby | int), 1) | list }}"
loop: "{{ range(0, (sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator | int + sap_vm_provision_calculate_sap_hana_scaleout_active_worker | int + sap_vm_provision_calculate_sap_hana_scaleout_standby | int), 1) | list }}"
loop_control:
loop_var: host_scaleout_node
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - SAP NetWeaver hosts dynamically build new Ansible Dictionary
ansible.builtin.set_fact:
"other_host_spec_hosts": "{{ lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan] | combine({lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys() | first: omit}) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - Merge dynamically built new Ansible Dictionary keys
ansible.builtin.set_fact:
all_host_specs: "{{ {} | combine(scaleout_build, other_host_spec_hosts) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - populate new Ansible Dictionary
ansible.builtin.set_fact:
"{{ sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout' }}": "{{ lookup('ansible.builtin.vars', sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout') | combine({sap_vm_provision_host_specification_plan: all_host_specs}) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"


Expand All @@ -104,7 +104,7 @@
group: sap_vm_provision_target_inventory_group
loop: "{{ lookup('ansible.builtin.vars', sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout')[sap_vm_provision_host_specification_plan].keys() | default(lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys()) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_iac_type == "ansible" or sap_vm_provision_iac_type == "ansible_to_terraform"

- name: Ansible Play to provision hosts for SAP
Expand Down Expand Up @@ -430,12 +430,12 @@
- name: Ansible Vars extravars file check if non-interactive (no var prompts) requested by end user
ansible.builtin.set_fact:
sap_hana_install_addhosts: |
{%- if sap_hana_scaleout_standby > 0 -%}
{%- if sap_vm_provision_calculate_sap_hana_scaleout_standby > 0 -%}
{%- for host in (groups['hana_primary'] | reject('search', '0') | list)[:-1] -%}
{{ hostvars[host]['inventory_hostname_short'] }}:role=worker:workergroup={{ sap_hana_install_workergroup }}:group={{ sap_hana_install_group }},
{%- endfor -%}
{{ hostvars[(groups['hana_primary'][-1])]['inventory_hostname_short'] }}:role=standby:workergroup={{ sap_hana_install_workergroup }}:group={{ sap_hana_install_group }}
{%- elif sap_hana_scaleout_standby == 0 -%}
{%- elif sap_vm_provision_calculate_sap_hana_scaleout_standby == 0 -%}
{%- for host in (groups['hana_primary'] | reject('search', '0') | list) -%}
{{ hostvars[host]['inventory_hostname_short'] }}:role=worker:workergroup={{ sap_hana_install_workergroup }}:group={{ sap_hana_install_group }}
{%- endfor -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
ecc01: # Hostname, must be 13 characters or less
sap_host_type: hana_primary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_sid }}"
Expand Down
1 change: 1 addition & 0 deletions deploy_scenarios/sap_hana/ansible_extravars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
hana01: # Hostname, must be 13 characters or less
sap_host_type: hana_primary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}"
Expand Down
2 changes: 2 additions & 0 deletions deploy_scenarios/sap_hana_ha/ansible_extravars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
hana-p: # Hostname, must be 13 characters or less
sap_host_type: hana_primary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}"
Expand Down Expand Up @@ -701,6 +702,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
hana-s: # Hostname, must be 13 characters or less
sap_host_type: hana_secondary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}"
Expand Down
7 changes: 4 additions & 3 deletions deploy_scenarios/sap_hana_scaleout/ansible_extravars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ sap_hana_install_update_etchosts: 'false'
# Mandatory parameters : Infrastructure provisioning definitions - SAP HANA scale-out
####

sap_hana_scaleout_active_coordinator: 1
sap_hana_scaleout_active_worker: 2
sap_hana_scaleout_standby: 1 # Only 0 or 1
sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator: 1
sap_vm_provision_calculate_sap_hana_scaleout_active_worker: 2
sap_vm_provision_calculate_sap_hana_scaleout_standby: 1 # Only 0 or 1


####
Expand Down Expand Up @@ -421,6 +421,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
hdb-scaleout: # Hostname, must be 13 characters or less
sap_host_type: hana_primary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}"
Expand Down
18 changes: 9 additions & 9 deletions deploy_scenarios/sap_hana_scaleout/ansible_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,38 +56,38 @@
ansible.builtin.set_fact:
"{{ sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout' }}": "{{ {} | combine({sap_vm_provision_host_specification_plan: {}}) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - dynamically build new Ansible Dictionary
ansible.builtin.set_fact:
"scaleout_build": "{{ scaleout_build | default({}) | combine({(lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys() | first + host_scaleout_node | string): lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan][lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys() | first]}) }}"
loop: "{{ range(0, (sap_hana_scaleout_active_coordinator | int + sap_hana_scaleout_active_worker | int + sap_hana_scaleout_standby | int), 1) | list }}"
loop: "{{ range(0, (sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator | int + sap_vm_provision_calculate_sap_hana_scaleout_active_worker | int + sap_vm_provision_calculate_sap_hana_scaleout_standby | int), 1) | list }}"
loop_control:
loop_var: host_scaleout_node
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - SAP NetWeaver hosts dynamically build new Ansible Dictionary
ansible.builtin.set_fact:
"other_host_spec_hosts": "{{ lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan] | combine({lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys() | first: omit}) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - Merge dynamically built new Ansible Dictionary keys
ansible.builtin.set_fact:
all_host_specs: "{{ {} | combine(scaleout_build, other_host_spec_hosts) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"

- name: Input construct - VM provisioning via Ansible - SAP HANA Scale-Out - populate new Ansible Dictionary
ansible.builtin.set_fact:
"{{ sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout' }}": "{{ lookup('ansible.builtin.vars', sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout') | combine({sap_vm_provision_host_specification_plan: all_host_specs}) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
# - sap_vm_provision_iac_type == "ansible"


Expand All @@ -104,7 +104,7 @@
group: sap_vm_provision_target_inventory_group
loop: "{{ lookup('ansible.builtin.vars', sap_vm_provision_iac_platform + '_host_specifications_dictionary_scaleout')[sap_vm_provision_host_specification_plan].keys() | default(lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys()) }}"
when:
- sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_calculate_sap_hana_scaleout_active_coordinator is defined
- sap_vm_provision_iac_type == "ansible" or sap_vm_provision_iac_type == "ansible_to_terraform"

- name: Ansible Play to provision hosts for SAP
Expand Down Expand Up @@ -339,12 +339,12 @@
- name: Ansible Vars extravars file check if non-interactive (no var prompts) requested by end user
ansible.builtin.set_fact:
sap_hana_install_addhosts: |
{%- if sap_hana_scaleout_standby > 0 -%}
{%- if sap_vm_provision_calculate_sap_hana_scaleout_standby > 0 -%}
{%- for host in (groups['hana_primary'] | reject('search', '0') | list)[:-1] -%}
{{ hostvars[host]['inventory_hostname_short'] }}:role=worker:workergroup={{ sap_hana_install_workergroup }}:group={{ sap_hana_install_group }},
{%- endfor -%}
{{ hostvars[(groups['hana_primary'][-1])]['inventory_hostname_short'] }}:role=standby:workergroup={{ sap_hana_install_workergroup }}:group={{ sap_hana_install_group }}
{%- elif sap_hana_scaleout_standby == 0 -%}
{%- elif sap_vm_provision_calculate_sap_hana_scaleout_standby == 0 -%}
{%- for host in (groups['hana_primary'] | reject('search', '0') | list) -%}
{{ hostvars[host]['inventory_hostname_short'] }}:role=worker:workergroup={{ sap_hana_install_workergroup }}:group={{ sap_hana_install_group }}
{%- endfor -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary:
ecc01: # Hostname, must be 13 characters or less
sap_host_type: hana_primary # hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas
virtual_machine_profile: "ush1-4x256" # 32 vCPU x 256GB DRAM, alt: use custom SAP instance profile sizes using cnp-2x16 (2 Power Cores [16 vCPU] x 16GB) and above
ibmcloud_powervs_hardware_machine_type: e980 # IBM Power hardware machine type (MT) used to host the Virtual Machine
disable_ip_anti_spoofing: true

sap_storage_setup_sid: "{{ sap_system_sid }}"
Expand Down
2 changes: 2 additions & 0 deletions deploy_scenarios/sap_landscape_s4hana_standard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ SAP S/4HANA software versions:

Prior to execution, please read the [full documentation of the Ansible Playbooks for SAP](../docs/README.md) for the capabilities and different execution methods.

NOTE: As this provisions and targets more than 5 hosts, it is recommended to execute the Ansible Playbook with `--forks=6` to increase execution speed, as the default forks is `5`.

## Execution outcome

When executing this Ansible Playbook for SAP, the following hosts are provisioned (unless an Ansible Inventory is provided for existing hosts):
Expand Down
Loading

0 comments on commit 7592034

Please sign in to comment.