From 4033fb8a31b11faaadf1ee1b7ed61b1a20f0bd35 Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Fri, 31 Jan 2025 16:12:04 +0100 Subject: [PATCH] feat: sap_hana_ha reworked --- .../ansible_software_availability.yml | 193 +-- .github/workflows/sync_main_auto_updated.yml | 23 + .../sap_hana_ha/ansible_extravars.yml | 1524 +---------------- .../sap_hana_ha/ansible_playbook.yml | 228 +-- .../ansible_extravars_noninteractive.yml | 375 +--- .../sap_hana_ha/vars/platform_aws_ec2_vs.yml | 102 ++ .../sap_hana_ha/vars/platform_gcp_ce_vm.yml | 125 ++ .../vars/platform_ibmcloud_powervs.yml | 112 ++ .../sap_hana_ha/vars/platform_ibmcloud_vs.yml | 111 ++ .../vars/platform_ibmpowervm_vm.yml | 193 +++ .../sap_hana_ha/vars/platform_msazure_vm.yml | 113 ++ .../sap_hana_ha/vars/platform_ovirt_vm.yml | 118 ++ .../sap_hana_ha/vars/platform_vmware_vm.yml | 117 ++ scripts/python_module_fuzzy_call_script.py | 115 ++ scripts/python_module_search_script.py | 19 + tasks/download_sap_media.yml | 126 ++ tasks/interactive_aws_ec2_vs.yml | 222 +++ tasks/interactive_hana.yml | 156 ++ tasks/interactive_hana_ha.yml | 30 + tasks/interactive_inputs.yml | 100 ++ vars/platform_noninteractive_vars.yml | 254 +++ vars/platform_vars.yml | 356 ++++ 22 files changed, 2514 insertions(+), 2198 deletions(-) create mode 100644 .github/workflows/sync_main_auto_updated.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_aws_ec2_vs.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_gcp_ce_vm.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_powervs.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_vs.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_ibmpowervm_vm.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_msazure_vm.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_ovirt_vm.yml create mode 100644 deploy_scenarios/sap_hana_ha/vars/platform_vmware_vm.yml create mode 100644 scripts/python_module_fuzzy_call_script.py create mode 100644 scripts/python_module_search_script.py create mode 100644 tasks/download_sap_media.yml create mode 100644 tasks/interactive_aws_ec2_vs.yml create mode 100644 tasks/interactive_hana.yml create mode 100644 tasks/interactive_hana_ha.yml create mode 100644 tasks/interactive_inputs.yml create mode 100644 vars/platform_noninteractive_vars.yml create mode 100644 vars/platform_vars.yml diff --git a/.github/workflows/ansible_software_availability.yml b/.github/workflows/ansible_software_availability.yml index 4f12e3ad..fe1f233c 100644 --- a/.github/workflows/ansible_software_availability.yml +++ b/.github/workflows/ansible_software_availability.yml @@ -1,34 +1,36 @@ --- -# This GitHub Action requires the repository to have GitHub Action 'Read and write permissions' under Settings -> Action -> General -> Workflow permissions. -# Amend GitHub Action 'Artifact and log retention' to 60 days to avoid error 'You are running out of disk space. The runner will stop working when the machine runs out of disk space.' +# This GitHub Action requires the repository to have GitHub Action 'Read and write permissions' under: +# Settings -> Action -> General -> Workflow permissions. +# Amend GitHub Action 'Artifact and log retention' to 60 days to avoid error +# 'You are running out of disk space. The runner will stop working when the machine runs out of disk space.' name: SAP Software Availability Tests on: - # * is a special character in YAML, quote string to avoid - # schedule uses UTC - # only uses the main branch, to alter use 'with: ref: branch_name' for the step using actions/checkout # At 05:00 on every day-of-week from Monday through Friday schedule: - cron: '0 5 * * 1-5' push: branches: - - main + - main-auto-updated jobs: sap_software_availability: name: 'SAP software availability CRON job' runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main-auto-updated' strategy: fail-fast: false max-parallel: 1 + steps: - name: Checkout uses: actions/checkout@v4 with: path: gh_repo + - name: Python setup id: local_setup run: | @@ -36,6 +38,7 @@ jobs: python -m pip install requests beautifulsoup4 lxml git clone https://github.com/sap-linuxlab/community.sap_launchpad.git ls -lha + - name: Ansible Playbooks for SAP - check SAP software availability id: identify_software_list env: @@ -45,32 +48,22 @@ jobs: if ! which python > /dev/null; then echo 'Python binary not available' && exit 1 ; fi # Extract from softwarecenter_search_list_.* until first empty line, then remove yaml formatting and sort for unique # Each file on newline and strip whitespaces or tabs - export software_list=$(cat ./gh_repo/**/**/ansible_extravars.yml | awk '!NF{f=0} /^.*softwarecenter_search_list.*/{f=1} f{print}' | awk '!/.*softwarecenter_search_list.*/' | awk '{sub(/#.*/,""); print}' | awk '{sub(/ .*- '\''/,""); print}' | sed '/^ *$/d' | sed '/^---*$/d' | tr -d "'" | sort | uniq | tr -d " \t") + export software_list=$(cat ./gh_repo/**/**/ansible_extravars.yml \ + | awk '!NF{f=0} /^.*softwarecenter_search_list.*/{f=1} f{print}' | awk '!/.*softwarecenter_search_list.*/' \ + | awk '{sub(/#.*/,""); print}' | awk '{sub(/ .*- '\''/,""); print}' | sed '/^ *$/d' \ + | sed '/^---*$/d' | tr -d "'" | sort | uniq | tr -d " \t") export errors_list="" echo "Software List:" echo "$software_list" # Quote command substitution to preserve newline - cd ./community.sap_launchpad/plugins - touch python_module_search_script.py - echo '#!/usr/bin/env python' >> python_module_search_script.py - echo 'import sys' >> python_module_search_script.py - echo 'input_search_file_list=sys.argv[1]' >> python_module_search_script.py - echo 'from module_utils.sap_id_sso import sap_sso_login' >> python_module_search_script.py - echo 'from module_utils.sap_launchpad_software_center_download_runner import *' >> python_module_search_script.py - echo "username='$sap_user_id'" >> python_module_search_script.py - echo "password='$sap_user_id_password'" >> python_module_search_script.py - echo 'sap_sso_login(username, password)' >> python_module_search_script.py - echo 'input_search_file_list_python=iter(input_search_file_list.splitlines())' >> python_module_search_script.py - echo 'for item in input_search_file_list_python:' >> python_module_search_script.py - echo ' try:' >> python_module_search_script.py - echo " download_link, download_filename = search_software_filename(item,'')" >> python_module_search_script.py - echo ' except Exception as e:' >> python_module_search_script.py - echo ' print(item)' >> python_module_search_script.py - echo ' continue' >> python_module_search_script.py + + cd $GITHUB_WORKSPACE/community.sap_launchpad/plugins + cp $GITHUB_WORKSPACE/gh_repo/scripts/python_module_search_script.py . + # Pass multi-line string to Python # Runtime ~30 min to search for ~350 files # If error returned instead of download link, the file is missing - errors_list="$(python ./python_module_search_script.py "$software_list")" # Quote command substitution to preserve newline - cd ../../ + # Quote command substitution to preserve newline + errors_list="$(python ./python_module_search_script.py "$software_list" "$sap_user_id" "$sap_user_id_password")" if [ -z "$errors_list" ] then exit 0 @@ -83,133 +76,11 @@ jobs: echo "" # Ensure stdout accuracy by pause script sleep 10 - cd ./community.sap_launchpad/plugins + cd $GITHUB_WORKSPACE/community.sap_launchpad/plugins sed -i "s|python3|python|g" ./modules/software_center_download.py - touch python_module_fuzzy_call_script.py - echo '#!/usr/bin/env python' >> python_module_fuzzy_call_script.py - echo 'import sys' >> python_module_fuzzy_call_script.py - echo 'import re' >> python_module_fuzzy_call_script.py - echo 'input_search_file=sys.argv[1]' >> python_module_fuzzy_call_script.py - echo 'input_search_file_name_and_version_only=sys.argv[2]' >> python_module_fuzzy_call_script.py - echo 'from module_utils.sap_id_sso import sap_sso_login' >> python_module_fuzzy_call_script.py - echo 'from module_utils.sap_launchpad_software_center_download_search_fuzzy import *' >> python_module_fuzzy_call_script.py - echo "username='$sap_user_id'" >> python_module_fuzzy_call_script.py - echo "password='$sap_user_id_password'" >> python_module_fuzzy_call_script.py - echo 'sap_sso_login(username, password)' >> python_module_fuzzy_call_script.py - echo 'query_result = search_software_fuzzy(input_search_file)' >> python_module_fuzzy_call_script.py - echo 'if len(query_result) >= 2:' >> python_module_fuzzy_call_script.py - echo " if '70SWPM' in query_result[0]['Title']:" >> python_module_fuzzy_call_script.py - echo " print(query_result[-1]['Title'])" >> python_module_fuzzy_call_script.py - echo " elif any('DBATL' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith('DBATL'):" >> python_module_fuzzy_call_script.py - echo " print(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " elif any('_NW_LANG_' in sublist['Description'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " # Skip _NW_LANG_ files which may have duplicates that are filtered automatically when downloaded" >> python_module_fuzzy_call_script.py - echo " print('')" >> python_module_fuzzy_call_script.py - echo " elif any('SYBCTRL' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith('SYBCTRL'):" >> python_module_fuzzy_call_script.py - echo " print(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " elif any('SAPEXE_' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " list_sapexe = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith('SAPEXE'):" >> python_module_fuzzy_call_script.py - echo " list_sapexe.append(int((sublist['Title'].split('-', 1)[0]).split('_', 1)[1]))" >> python_module_fuzzy_call_script.py - echo " list_sapexe.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print('SAPEXE_' + str(list_sapexe[0]) + '-' + input_search_file + '.SAR')" >> python_module_fuzzy_call_script.py - echo " elif any('SAPEXEDB_' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " list_sapexedb = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith('SAPEXEDB'):" >> python_module_fuzzy_call_script.py - echo " list_sapexedb.append(int((sublist['Title'].split('-', 1)[0]).split('_', 1)[1]))" >> python_module_fuzzy_call_script.py - echo " list_sapexedb.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print('SAPEXEDB_' + str(list_sapexedb[0]) + '-' + input_search_file + '.SAR')" >> python_module_fuzzy_call_script.py - echo " elif any('SMDA' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " input_smda = input_search_file_name_and_version_only[:-2]" >> python_module_fuzzy_call_script.py - echo " list_smda = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith(input_smda):" >> python_module_fuzzy_call_script.py - echo " list_smda.append(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " list_smda.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print(list_smda[0])" >> python_module_fuzzy_call_script.py - echo " elif any('IMDB_CLIENT20' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " input_imdb_client = input_search_file_name_and_version_only[:-2]" >> python_module_fuzzy_call_script.py - echo " list_imdb_client = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith(input_imdb_client):" >> python_module_fuzzy_call_script.py - echo " list_imdb_client.append(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " list_imdb_client.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print(list_imdb_client[0])" >> python_module_fuzzy_call_script.py - echo " elif any('IMDB_AFL' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " input_imdb_afl = input_search_file_name_and_version_only[:-1]" >> python_module_fuzzy_call_script.py - echo " list_imdb_afl = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith(input_imdb_afl):" >> python_module_fuzzy_call_script.py - echo " list_imdb_afl.append(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " list_imdb_afl.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print(list_imdb_afl[0])" >> python_module_fuzzy_call_script.py - echo " elif any('IMDB_LCAPPS' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " input_imdb_lcapps = input_search_file_name_and_version_only[:-1]" >> python_module_fuzzy_call_script.py - echo " list_imdb_lcapps = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith(input_imdb_lcapps):" >> python_module_fuzzy_call_script.py - echo " list_imdb_lcapps.append(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " list_imdb_lcapps.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print(list_imdb_lcapps[0])" >> python_module_fuzzy_call_script.py - echo " elif any('IMDB_SERVER' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " list_imdb_server = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " input_imdb_server = input_search_file_name_and_version_only[:-1]" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith(input_imdb_server):" >> python_module_fuzzy_call_script.py - echo " list_imdb_server.append(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " list_imdb_server.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print(list_imdb_server[0])" >> python_module_fuzzy_call_script.py - echo " # Match LCAPPS and AFL to new SAP HANA DB Server version" >> python_module_fuzzy_call_script.py - echo " imdb_server20_existing_prefix = input_search_file_name_and_version_only.split('_')[-1]" >> python_module_fuzzy_call_script.py - echo " imdb_server20_new_prefix = list_imdb_server[0].split('-')[0]" >> python_module_fuzzy_call_script.py - echo " imdb_server20_new_prefix2 = imdb_server20_new_prefix.rsplit('_', 1)[0]" >> python_module_fuzzy_call_script.py - echo " imdb_server20_new_version = imdb_server20_new_prefix2.split('_')[-1]" >> python_module_fuzzy_call_script.py - echo ' imdb_lcapps20_existing_version = "IMDB_LCAPPS_2" + imdb_server20_existing_prefix' >> python_module_fuzzy_call_script.py - echo ' imdb_lcapps20_version = "IMDB_LCAPPS_2" + imdb_server20_new_version' >> python_module_fuzzy_call_script.py - echo " imdb_lcapps20_query = search_software_fuzzy(imdb_lcapps20_version)" >> python_module_fuzzy_call_script.py - echo " imdb_lcapps20_result_prefix = imdb_lcapps20_query[0]['Title'].split('-')[0]" >> python_module_fuzzy_call_script.py - echo ' imdb_afl20_existing_version = "IMDB_AFL20_" + imdb_server20_existing_prefix' >> python_module_fuzzy_call_script.py - echo ' imdb_afl20_version = "IMDB_AFL20_" + imdb_server20_new_version' >> python_module_fuzzy_call_script.py - echo " imdb_afl20_query = search_software_fuzzy(imdb_afl20_version)" >> python_module_fuzzy_call_script.py - echo " imdb_afl20_result_prefix = imdb_afl20_query[0]['Title'].split('-')[0]" >> python_module_fuzzy_call_script.py - echo " print(imdb_lcapps20_existing_version + ';' + imdb_lcapps20_result_prefix)" >> python_module_fuzzy_call_script.py - echo " print(imdb_afl20_existing_version + ';' + imdb_afl20_result_prefix)" >> python_module_fuzzy_call_script.py - echo " elif any('SAPWEBDISP' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " # As SAP WebDisp file name numbering does not use preceeding 0's, manually filter out v7 which is older than v69:" >> python_module_fuzzy_call_script.py - echo " input_webdisp = input_search_file_name_and_version_only[:-2]" >> python_module_fuzzy_call_script.py - echo " list_webdisp = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith(input_webdisp) and not sublist['Title'].startswith('SAPWEBDISP_SP_7'):" >> python_module_fuzzy_call_script.py - echo " list_webdisp.append(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " list_webdisp.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " print(list_webdisp[0])" >> python_module_fuzzy_call_script.py - echo " elif any('SAPHANACOCKPIT' in sublist['Title'] for sublist in query_result):" >> python_module_fuzzy_call_script.py - echo " input_saphana_cockpit = re.sub('P$', '', input_search_file_name_and_version_only)" >> python_module_fuzzy_call_script.py - echo " list_saphana_cockpit = []" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if sublist['Title'].startswith(input_saphana_cockpit):" >> python_module_fuzzy_call_script.py - echo " list_saphana_cockpit.append(sublist['Fastkey'])" >> python_module_fuzzy_call_script.py - echo " list_saphana_cockpit.sort(reverse=True)" >> python_module_fuzzy_call_script.py - echo " for sublist in query_result:" >> python_module_fuzzy_call_script.py - echo " if (list_saphana_cockpit[0] == sublist['Fastkey']):" >> python_module_fuzzy_call_script.py - echo " print(sublist['Title'])" >> python_module_fuzzy_call_script.py - echo " else:" >> python_module_fuzzy_call_script.py - echo ' print("\nERROR. More than 1 result for " + input_search_file + ", manual intervention required....")' >> python_module_fuzzy_call_script.py - echo ' for item in query_result:' >> python_module_fuzzy_call_script.py - echo " print('Identified ' + item['Title'] + ' : ' + item['Description'] + ', ' + item['Infotype'],end='\n')" >> python_module_fuzzy_call_script.py - echo 'else:' >> python_module_fuzzy_call_script.py - echo ' if len(query_result) == 0:' >> python_module_fuzzy_call_script.py - echo ' print("\nERROR. No result for " + input_search_file + ", manual intervention required....")' >> python_module_fuzzy_call_script.py - echo ' else:' >> python_module_fuzzy_call_script.py - echo " print(query_result[0]['Title'])" >> python_module_fuzzy_call_script.py + cp $GITHUB_WORKSPACE/gh_repo/scripts/python_module_fuzzy_call_script.py . export exit1_check=0 - cd ../../ + # Pass list to for loop, not multi-line string. Do not use quote command substitution for filename in $errors_list do @@ -224,9 +95,12 @@ jobs: #echo $filename_id_only #echo "DEBUG - Filename NAME AND VERSION ONLY" #echo $filename_name_and_version_only - cd ./community.sap_launchpad/plugins - search_file="$(python ./python_module_fuzzy_call_script.py $filename_id_only $filename_name_and_version_only)" # Quote command substitution to preserve newline - cd ../../ + cd $GITHUB_WORKSPACE/community.sap_launchpad/plugins + + # Quote command substitution to preserve newline + search_file="$(python ./python_module_fuzzy_call_script.py \ + $filename_id_only $filename_name_and_version_only "$sap_user_id" "$sap_user_id_password")" + if [[ "$search_file" == *"ERROR"* ]]; then echo -e "$search_file" # Quote variable to preserve newline exit1_check=1 @@ -234,7 +108,7 @@ jobs: echo "Skipped file $filename" elif [[ "$search_file" == *"IMDB_SERVER"* ]]; then echo "Perform recursive sed for SAP HANA and SAP HANA Components" - cd "./gh_repo" + cd $GITHUB_WORKSPACE/gh_repo echo "$search_file" | while IFS= read -r line ; do stripped_search_file=$(echo $line | tr -d '\n') if [[ "$stripped_search_file" == *.* ]]; then @@ -247,20 +121,21 @@ jobs: find . -type f -not -path '*/\.*' -exec sed -i "s/$origin_prefix.[0-9]\{1,\}/$replace_prefix/g" {} \; fi done - cd ../ + else echo "Perform recursive sed for $filename change to $search_file" stripped_search_file=$(echo $search_file | tr -d '\n') - cd "./gh_repo" + cd $GITHUB_WORKSPACE/gh_repo find . -type f -not -path '*/\.*' -exec sed -i "s/$filename/$stripped_search_file/g" {} \; - cd ../ + fi done if [[ "$exit1_check" -eq 1 ]]; then exit 1 fi fi - - name: Commit to main branch + + - name: Commit to main-auto-updated branch if: always() # Ensure even if errors on previous step, that any replaced filenames are committed id: git_commit_auto run: | diff --git a/.github/workflows/sync_main_auto_updated.yml b/.github/workflows/sync_main_auto_updated.yml new file mode 100644 index 00000000..d17f6300 --- /dev/null +++ b/.github/workflows/sync_main_auto_updated.yml @@ -0,0 +1,23 @@ +--- +name: Sync Main to Main-Auto-Updated + +on: + push: + branches: + - main + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Sync branches + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git checkout -b main-auto-updated + git fetch origin main + git reset --hard origin/main + git push origin main-auto-updated --force diff --git a/deploy_scenarios/sap_hana_ha/ansible_extravars.yml b/deploy_scenarios/sap_hana_ha/ansible_extravars.yml index 213c8415..6a87fbd7 100755 --- a/deploy_scenarios/sap_hana_ha/ansible_extravars.yml +++ b/deploy_scenarios/sap_hana_ha/ansible_extravars.yml @@ -1,8 +1,6 @@ --- -#### -# Mandatory parameters : Ansible Defaults -#### +#### Mandatory scenario specific variables #### # Default Ansible Facts populate into default variables for all Ansible Roles sap_hostname: "{{ ansible_hostname }}" @@ -10,10 +8,7 @@ sap_domain: "{{ ansible_domain }}" sap_ip: "{{ ansible_default_ipv4.address }}" - -#### -# Mandatory parameters : Virtual instance names -#### +#### Mandatory parameters : Virtual instance names #### # See virtual hostname information in SAP Note 2279110 and 962955 # Ensure this does not contain the local hostname, must use the Virtual Hostname for use with the Virtual IP (VIP) @@ -21,11 +16,7 @@ sap_ip: "{{ ansible_default_ipv4.address }}" sap_swpm_db_host: "{{ sap_vm_provision_dynamic_inventory_hana_primary_hostname }}-ha" # Must be SAP HANA Virtual Hostname -#### -# Mandatory parameters : Preconfigure OS for SAP Software -#### - -# Configuration of Ansible Roles for preconfigure SAP (general, hana, netweaver) +#### Mandatory parameters : Preconfigure OS for SAP Software #### sap_general_preconfigure_modify_etc_hosts: false sap_general_preconfigure_reboot_ok: true sap_general_preconfigure_fail_if_reboot_required: false @@ -35,26 +26,7 @@ sap_hana_preconfigure_update: true sap_hana_update_etchosts: true - -#### -# Mandatory parameters : SAP Software installation media downloads -#### - -# SAP ONE Support Launchpad credentials -#sap_id_user: "SET_IN_VAR_PROMPT" -#sap_id_user_password: 'SET_IN_VAR_PROMPT' - -# Directory for SAP installation media -#sap_software_download_directory: "SET_IN_VAR_PROMPT" - -# Configuration for SAP installation media detection -# sap_install_media_detect_** variables are set for each Ansible Task to the respective host - - - -#### -# Mandatory parameters : Ansible Dictionary for SAP HANA installation media -#### +### Mandatory parameters : Ansible Dictionary for SAP HANA installation media sap_hana_install_media_dictionary: @@ -70,6 +42,11 @@ sap_hana_install_media_dictionary: - 'IMDB_SERVER20_077_0-80002046.SAR' - 'SAPHOSTAGENT62_62-80004831.SAR' # SAP Host Agent 7.22 + software_files_wildcard_list: + - 'SAPCAR*' + - 'IMDB_*' + - 'SAPHOSTAGENT*' + sap_hana_2_sps06_install: softwarecenter_search_list_saphana_x86_64: @@ -82,1478 +59,29 @@ sap_hana_install_media_dictionary: - 'IMDB_SERVER20_067_4-80002046.SAR' - 'SAPHOSTAGENT61_61-80004831.SAR' # SAP Host Agent 7.22 - - -#### -# Mandatory parameters : SAP HANA installation -#### - -# SAP HANA master password -#sap_hana_install_use_master_password: "SET_IN_VAR_PROMPT" -#sap_hana_install_master_password: "SET_IN_VAR_PROMPT" - -# SAP HANA database server instance details -#sap_hana_sid: "SET_IN_VAR_PROMPT" -#sap_hana_install_instance_nr: "SET_IN_VAR_PROMPT" - -# SAP HANA log mode (set to overwrite for Sandbox only, HA cannot use overwrite) -#sap_hana_install_log_mode: overwrite - - -#### -# Mandatory parameters : SAP HANA System Replication (HSR) installation -#### - -# Mandatory, defines which SAP HANA cluster to target -#sap_hana_sid: "SET_IN_VAR_PROMPT" -#sap_hana_install_instance_nr: "SET_IN_VAR_PROMPT" -#sap_hana_hacluster_password: "SET_IN_PLAYBOOK" - -# Populate dynamically from hostvars when executing Ansible Play -#sap_hana_cluster_nodes: -# - node_name: node1 -# node_ip: 192.168.1.11 -# node_role: primary -# hana_site: DC01 -# - node_name: node2 -# node_ip: 192.168.1.12 -# node_role: secondary -# hana_site: DC02 - - -#### -# Mandatory parameters : Virtual IPs (VIPs) -#### -#sap_vm_provision_ha_vip_hana_primary: "SET_IN_VAR_PROMPT" - - -#### -# Mandatory parameters : Linux Pacemaker cluster setup for SAP -#### - -# For debug, set config stdout to true -#sap_ha_pacemaker_cluster_create_config_varfile: true - -# Populate dynamically from hostvars when executing Ansible Play on specific target -#ha_cluster_cluster_name: awsclus1 -#ha_cluster_hacluster_password: 'clusterpass' -#ha_cluster: -# node_name: "{{ ansible_hostname }}" -# pcs_address: "{{ ansible_default_ipv4.address }}" - - -#### -# Optional parameters : SAP HANA installation -#### - -# List of components to be installed, default 'all' -# Components should be comma separated -# sap_hana_install_components: 'all' - -# Unix User -# Leave this blank if you want this set automatically by hdblcm -# For production systems, it's highly advisable to set this manually according to your environment's Unix ID policies -# sap_hana_install_userid: -# sap_hana_install_groupid: - -# Adjust these accordingly for your installation type -# sap_hana_install_env_type: 'production' -# sap_hana_install_mem_restrict: 'n' -# sap_hana_install_max_mem: -# sap_hana_install_system_restart: 'n' - -# Pass some extra arguments to the hdblcm cli, e.g. --ignore=[,]... -# sap_hana_install_hdblcm_extraargs: - -# Update hosts file -sap_hana_install_update_etchosts: 'false' - -# For more optional parameters please consult the documentation or -# Check the file /defaults/main.yml - - - -#### -# Mandatory parameters : Ansible Dictionary for SAP HANA installation media -#### - -sap_hana_install_media_dictionary_regex: - - sap_hana_2_install: - software_files_wildcard_list: - 'SAPCAR*' - 'IMDB_*' - 'SAPHOSTAGENT*' +#### Dynamic assignment of SAP HANA variables #### +sap_hana_sid: "{{ sap_system_hana_db_sid }}" +sap_hana_install_instance_nr: "{{ sap_system_hana_db_instance_nr }}" -#### -# Mandatory parameters : Infrastructure provisioning definitions - AWS -#### - -sap_vm_provision_aws_ec2_vs_host_os_image_dictionary: - rhel-8-1: "*RHEL-8.1*_HVM*x86_64*" - # rhel-8-2: "*RHEL-8.2*_HVM*x86_64*" # removed - rhel-8-4: "*RHEL-8.4*_HVM*x86_64*" - rhel-8-6: "*RHEL-8.6*_HVM*x86_64*" - rhel-8-8: "*RHEL-8.8*_HVM*x86_64*" - rhel-8-10: "*RHEL-8.10*_HVM*x86_64*" - rhel-9-0: "*RHEL-9.0*_HVM*x86_64*" - rhel-9-1: "*RHEL-9.1*_HVM*x86_64*" - rhel-9-2: "*RHEL-9.2*_HVM*x86_64*" - rhel-9-3: "*RHEL-9.3*_HVM*x86_64*" - rhel-9-4: "*RHEL-9.4*_HVM*x86_64*" - sles-12-5: "*suse-sles-12-sp5-v202*-hvm-ssd-x86_64*" - # sles-15-2: "*suse-sles-15-sp2-v202*-hvm-ssd-x86_64*" # removed - # sles-15-3: "*suse-sles-15-sp3-v202*-hvm-ssd-x86_64*" # removed - # sles-15-4: "*suse-sles-15-sp4-v202*-hvm-ssd-x86_64*" # removed - sles-15-5: "*suse-sles-15-sp5-v202*-hvm-ssd-x86_64*" - sles-15-6: "*suse-sles-15-sp6-v202*-hvm-ssd-x86_64*" - # rhel-7-7-sap-ha: "*RHEL-SAP-8.1.0*" # removed - # rhel-7-9-sap-ha: "*RHEL-SAP-8.1.0*" # removed - rhel-8-1-sap-ha: "*RHEL-SAP-8.1.0*" - rhel-8-2-sap-ha: "*RHEL-SAP-8.2.0*" - rhel-8-4-sap-ha: "*RHEL-SAP-8.4.0*" - rhel-8-6-sap-ha: "*RHEL-SAP-8.6.0*" - rhel-8-8-sap-ha: "*RHEL-SAP-8.8.0*" - rhel-8-10-sap-ha: "*RHEL-SAP-8.10.0*" - rhel-9-0-sap-ha: "*RHEL-SAP-9.0.0*" - rhel-9-2-sap-ha: "*RHEL-SAP-9.2.0*" - rhel-9-4-sap-ha: "*RHEL-SAP-9.4.0*" - sles-12-5-sap-ha: "*suse-sles-sap-12-sp5-v202*-hvm-ssd-x86_64*" - sles-15-1-sap-ha: "*suse-sles-sap-15-sp1-v202*-hvm-ssd-x86_64*" - sles-15-2-sap-ha: "*suse-sles-sap-15-sp2-v202*-hvm-ssd-x86_64*" - sles-15-3-sap-ha: "*suse-sles-sap-15-sp3-v202*-hvm-ssd-x86_64*" - sles-15-4-sap-ha: "*suse-sles-sap-15-sp4-v202*-hvm-ssd-x86_64*" - sles-15-5-sap-ha: "*suse-sles-sap-15-sp5-v202*-hvm-ssd-x86_64*" - sles-15-6-sap-ha: "*suse-sles-sap-15-sp6-v202*-hvm-ssd-x86_64*" - sles-15-4-sap-ha-byos: "*suse-sles-sap-15-sp4-byos-v202*-hvm-ssd-x86_64*" - sles-15-5-sap-ha-byos: "*suse-sles-sap-15-sp5-byos-v202*-hvm-ssd-x86_64*" - sles-15-6-sap-ha-byos: "*suse-sles-sap-15-sp6-byos-v202*-hvm-ssd-x86_64*" - - -sap_vm_provision_aws_ec2_vs_host_specifications_dictionary: - - xsmall_256gb: - - 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: "r7i.8xlarge" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - #disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 384 # size in GB, integer - #disk_type: gp3 # default: gp3, for AWS EBS disk type - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - 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 - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - - - 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: "r7i.8xlarge" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - 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 - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - - - -#### -# Mandatory parameters : Infrastructure provisioning definitions - Google Cloud -#### - -sap_vm_provision_gcp_ce_vm_host_os_image_dictionary: - rhel-8-latest: - project: "rhel-cloud" - family: "rhel-8" - rhel-9-latest: - project: "rhel-cloud" - family: "rhel-9" - sles-12-latest: - project: "suse-cloud" - family: "sles-12" - sles-15-latest: - project: "suse-cloud" - family: "sles-15" - # rhel-7-7-sap-ha: # removed - # project: "rhel-sap-cloud" - # family: "rhel-7-7-sap-ha" - rhel-7-9-sap-ha: - project: "rhel-sap-cloud" - family: "rhel-7-9-sap-ha" - # rhel-8-1-sap-ha: # removed - # project: "rhel-sap-cloud" - # family: "rhel-8-1-sap-ha" - rhel-8-2-sap-ha: - project: "rhel-sap-cloud" - family: "rhel-8-2-sap-ha" - rhel-8-4-sap-ha: - project: "rhel-sap-cloud" - family: "rhel-8-4-sap-ha" - rhel-8-6-sap-ha: - project: "rhel-sap-cloud" - family: "rhel-8-6-sap-ha" - sles-12-5-sap-ha: - project: "suse-sap-cloud" - family: "sles-12-sp5-sap" - # sles-15-1-sap-ha: # removed - # project: "suse-sap-cloud" - # family: "sles-15-sp1-sap" - sles-15-2-sap-ha: - project: "suse-sap-cloud" - family: "sles-15-sp2-sap" - sles-15-3-sap-ha: - project: "suse-sap-cloud" - family: "sles-15-sp3-sap" - sles-15-4-sap-ha: - project: "suse-sap-cloud" - family: "sles-15-sp4-sap" - sles-15-5-sap-ha: - project: "suse-sap-cloud" - family: "sles-15-sp5-sap" - sles-15-6-sap-ha: - project: "suse-sap-cloud" - family: "sles-15-sp6-sap" - sles-12-5-sap-ha-byos: - project: "suse-byos-cloud" - family: "sles-12-sp5-sap-byos" - sles-15-2-sap-byos: - project: "suse-byos-cloud" - family: "sles-15-sp2-sap-byos" - sles-15-3-sap-byos: - project: "suse-byos-cloud" - family: "sles-15-sp3-sap-byos" - sles-15-4-sap-byos: - project: "suse-byos-cloud" - family: "sles-15-sp4-sap-byos" - sles-15-5-sap-byos: - project: "suse-byos-cloud" - family: "sles-15-sp5-sap-byos" - sles-15-6-sap-byos: - project: "suse-byos-cloud" - family: "sles-15-sp6-sap-byos" - - -sap_vm_provision_gcp_ce_vm_host_specifications_dictionary: - - xsmall_256gb: - - 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: "n2-highmem-32" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 384 # size in GB, integer - disk_type: pd-ssd # default: gp3, for AWS EBS disk type - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_count: 1 - disk_size: 128 # size in GB, integer - disk_type: pd-ssd - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 320 # size in GB, integer - disk_type: pd-balanced - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - disk_type: pd-balanced - filesystem_type: xfs # default: xfs - - - 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: "n2-highmem-32" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 384 # size in GB, integer - disk_type: pd-ssd # default: gp3, for AWS EBS disk type - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_count: 1 - disk_size: 128 # size in GB, integer - disk_type: pd-ssd - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 320 # size in GB, integer - disk_type: pd-balanced - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - disk_type: pd-balanced - filesystem_type: xfs # default: xfs - - - -#### -# Mandatory parameters : Infrastructure provisioning definitions - IBM Cloud -#### - -sap_vm_provision_ibmcloud_vs_host_os_image_dictionary: - rhel-8-4: ".*redhat.*8-4.*minimal.*amd64.*" - rhel-8-6: ".*redhat.*8-6.*minimal.*amd64.*" - rhel-8-8: ".*redhat.*8-8.*minimal.*amd64.*" - rhel-8-10: ".*redhat.*8-10.*minimal.*amd64.*" - rhel-9-0: ".*redhat.*9-0.*minimal.*amd64.*" - rhel-9-2: ".*redhat.*9-2.*minimal.*amd64.*" - rhel-9-4: ".*redhat.*9-4.*minimal.*amd64.*" - sles-15-5: ".*sles.*15-5.*amd64-[0-9]" - sles-15-6: ".*sles.*15-6.*amd64-[0-9]" - # rhel-7-6-sap-ha: ".*redhat.*7-6.*amd64.*hana.*" # retrievable from deprecated list - # rhel-7-9-sap-ha: ".*redhat.*7-9.*amd64.*hana.*" # retrievable from deprecated list - # rhel-8-1-sap-ha: ".*redhat.*8-1.*amd64.*hana.*" # retrievable from deprecated list - # rhel-8-2-sap-ha: ".*redhat.*8-2.*amd64.*hana.*" # retrievable from deprecated list - rhel-8-4-sap-ha: ".*redhat.*8-4.*amd64.*hana.*" - rhel-8-6-sap-ha: ".*redhat.*8-6.*amd64.*hana.*" - rhel-8-8-sap-ha: ".*redhat.*8-8.*amd64.*hana.*" - rhel-8-10-sap-ha: ".*redhat.*8-10.*amd64.*hana.*" - rhel-9-0-sap-ha: ".*redhat.*9-0.*amd64.*hana.*" - rhel-9-2-sap-ha: ".*redhat.*9-2.*amd64.*hana.*" - rhel-9-4-sap-ha: ".*redhat.*9-4.*amd64.*hana.*" - # sles-12-4-sap-ha: ".*sles.*12-4.*amd64.*hana.*" # retrievable from deprecated list - # sles-12-5-sap-ha: ".*sles.*12-5.*amd64.*hana.*" # retrievable from deprecated list - # sles-15-1-sap-ha: ".*sles.*15-1.*amd64.*hana.*" # retrievable from deprecated list - sles-15-3-sap-ha: ".*sles.*15-3.*amd64.*hana.*" - sles-15-4-sap-ha: ".*sles.*15-4.*amd64.*hana.*" - sles-15-5-sap-ha: ".*sles.*15-5.*amd64.*hana.*" - sles-15-6-sap-ha: ".*sles.*15-6.*amd64.*hana.*" - - -sap_vm_provision_ibmcloud_vs_host_specifications_dictionary: - - xsmall_256gb: - - 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: "mx2-32x256" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 3 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 128 # size in GB, integer - disk_type: 10iops-tier # default: gp3, for AWS EBS disk type - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_count: 3 - disk_size: 48 # size in GB, integer - disk_type: 10iops-tier - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 320 - disk_type: 10iops-tier # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - disk_type: 5iops-tier - filesystem_type: xfs # default: xfs - - - 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: "mx2-32x256" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - - name: hana_data - mountpoint: /hana/data - disk_count: 3 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 128 # size in GB, integer - disk_type: 10iops-tier # default: gp3, for AWS EBS disk type - filesystem_type: xfs # default: xfs - - - name: hana_log - mountpoint: /hana/log - disk_count: 3 - disk_size: 48 # size in GB, integer - disk_type: 10iops-tier - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 320 - disk_type: 10iops-tier # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - disk_type: 5iops-tier - filesystem_type: xfs # default: xfs - - - -#### -# Mandatory parameters : Infrastructure provisioning definitions - IBM Cloud, IBM Power VS -#### - -# Full Linux subscription ppc64le OS Images with support and activation keys -sap_vm_provision_ibmcloud_powervs_host_os_image_dictionary: - rhel-8-8: ".*RHEL.*8.*8" - rhel-9-2: ".*RHEL.*9.*2" - rhel-9-4: ".*RHEL.*9.*4" - sles-15-5: ".*SLES.*15.*5$" - rhel-8-4-sap-ha: "RHEL8-SP4-SAP" - rhel-8-6-sap-ha: ".*RHEL.*8.*6.*SAP$" # ensure string suffix using $ - rhel-8-8-sap-ha: ".*RHEL.*8.*8.*SAP$" # ensure string suffix using $ - rhel-9-2-sap-ha: ".*RHEL.*9.*2.*SAP$" # ensure string suffix using $ - sles-15-2-sap-ha: ".*SLES.*15.*2.*SAP$" # ensure string suffix using $ - sles-15-3-sap-ha: ".*SLES.*15.*3.*SAP$" # ensure string suffix using $ - sles-15-4-sap-ha: ".*SLES.*15.*4.*SAP$" # ensure string suffix using $ - sles-15-5-sap-ha: "SLES15-SP5-SAP" - # rhel-8-4-sap-ha-byol: "RHEL8-SP4-SAP-BYOL" - # rhel-8-6-sap-ha-byol: ".*RHEL.*8.*6.*SAP-BYOL$" # ensure string suffix using $ - # rhel-8-8-sap-ha-byol: ".*RHEL.*8.*8.*SAP-BYOL$" # ensure string suffix using $ - # rhel-9-2-sap-ha-byol: ".*RHEL.*9.*2.*SAP-BYOL$" # ensure string suffix using $ - # sles-15-2-sap-ha-byol: ".*SLES.*15.*2.*SAP-BYOL$" # ensure string suffix using $ - # sles-15-3-sap-ha-byol: ".*SLES.*15.*3.*SAP-BYOL$" # ensure string suffix using $ - # sles-15-4-sap-ha-byol: ".*SLES.*15.*4.*SAP-BYOL$" # ensure string suffix using $ - # sles-15-5-sap-ha-byol: "SLES15-SP5-SAP-BYOL" - - -sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary: - - xsmall_256gb: - - 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 }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 384 # size in GB, integer - disk_type: tier1 - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_count: 1 - disk_size: 144 # size in GB, integer - disk_type: tier1 - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 - disk_type: tier1 # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - disk_type: tier1 - filesystem_type: xfs # default: xfs - - 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 }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 384 # size in GB, integer - disk_type: tier1 - filesystem_type: xfs # default: xfs - - - name: hana_log - mountpoint: /hana/log - disk_count: 1 - disk_size: 144 # size in GB, integer - disk_type: tier1 - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 - disk_type: tier1 # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - 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 - disk_type: tier1 - filesystem_type: xfs # default: xfs - - - -#### -# Mandatory parameters : Infrastructure provisioning definitions - MS Azure -#### - -sap_vm_provision_msazure_vm_host_os_image_dictionary: - rhel-8-0: - publisher: "RedHat" - offer: "RHEL" - sku: "8-gen2" - rhel-8-1: - publisher: "RedHat" - offer: "RHEL" - sku: "81-gen2" - rhel-8-2: - publisher: "RedHat" - offer: "RHEL" - sku: "82-gen2" - rhel-8-3: - publisher: "RedHat" - offer: "RHEL" - sku: "83-gen2" - rhel-8-4: - publisher: "RedHat" - offer: "RHEL" - sku: "84-gen2" - rhel-8-5: - publisher: "RedHat" - offer: "RHEL" - sku: "85-gen2" - rhel-8-6: - publisher: "RedHat" - offer: "RHEL" - sku: "86-gen2" - rhel-8-7: - publisher: "RedHat" - offer: "RHEL" - sku: "87-gen2" - rhel-8-8: - publisher: "RedHat" - offer: "RHEL" - sku: "88-gen2" - rhel-8-9: - publisher: "RedHat" - offer: "RHEL" - sku: "89-gen2" - rhel-8-10: - publisher: "RedHat" - offer: "RHEL" - sku: "810-gen2" - rhel-9-0: - publisher: "RedHat" - offer: "RHEL" - sku: "90-gen2" - rhel-9-1: - publisher: "RedHat" - offer: "RHEL" - sku: "91-gen2" - rhel-9-2: - publisher: "RedHat" - offer: "RHEL" - sku: "92-gen2" - rhel-9-3: - publisher: "RedHat" - offer: "RHEL" - sku: "93-gen2" - rhel-9-4: - publisher: "RedHat" - offer: "RHEL" - sku: "94-gen2" - sles-12-5: - publisher: "SUSE" - offer: "sles-12-sp5" - sku: "gen2" - sles-15-1: - publisher: "SUSE" - offer: "sles-15-sp1" - sku: "gen2" - sles-15-2: - publisher: "SUSE" - offer: "sles-15-sp2" - sku: "gen2" - sles-15-3: - publisher: "SUSE" - offer: "sles-15-sp3" - sku: "gen2" - sles-15-4: - publisher: "SUSE" - offer: "sles-15-sp4" - sku: "gen2" - sles-15-5: - publisher: "SUSE" - offer: "sles-15-sp5" - sku: "gen2" - sles-15-6: - publisher: "SUSE" - offer: "sles-15-sp6" - sku: "gen2" - rhel-8-1-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "81sapha-gen2" - rhel-8-2-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "82sapha-gen2" - rhel-8-4-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "84sapha-gen2" - rhel-8-6-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "86sapha-gen2" - rhel-8-8-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "88sapha-gen2" - rhel-8-10-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "810sapha-gen2" - rhel-9-0-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "90sapha-gen2" - rhel-9-2-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "92sapha-gen2" - rhel-9-4-sap-ha: - publisher: "RedHat" - offer: "RHEL-SAP-HA" - sku: "94sapha-gen2" - sles-12-5-sap-ha: - publisher: "SUSE" - offer: "sles-sap-12-sp5" - sku: "gen2" - sles-15-1-sap-ha: - publisher: "SUSE" - offer: "sles-sap-15-sp1" - sku: "gen2" - sles-15-2-sap-ha: - publisher: "SUSE" - offer: "sles-sap-15-sp2" - sku: "gen2" - sles-15-3-sap-ha: - publisher: "SUSE" - offer: "sles-sap-15-sp3" - sku: "gen2" - sles-15-4-sap-ha: - publisher: "SUSE" - offer: "sles-sap-15-sp4" - sku: "gen2" - sles-15-5-sap-ha: - publisher: "SUSE" - offer: "sles-sap-15-sp5" - sku: "gen2" - sles-15-6-sap-ha: - publisher: "SUSE" - offer: "sles-sap-15-sp6" - sku: "gen2" - sles-15-1-sap-byos: - publisher: "SUSE" - offer: "sles-sap-15-sp1-byos" - sku: "gen2" - sles-15-2-sap-byos: - publisher: "SUSE" - offer: "sles-sap-15-sp2-byos" - sku: "gen2" - sles-15-3-sap-byos: - publisher: "SUSE" - offer: "sles-sap-15-sp3-byos" - sku: "gen2" - sles-15-4-sap-byos: - publisher: "SUSE" - offer: "sles-sap-15-sp4-byos" - sku: "gen2" - sles-15-5-sap-byos: - publisher: "SUSE" - offer: "sles-sap-15-sp5-byos" - sku: "gen2" - sles-15-6-sap-byos: - publisher: "SUSE" - offer: "sles-sap-15-sp6-byos" - sku: "gen2" - - -sap_vm_provision_msazure_vm_host_specifications_dictionary: - - xsmall_256gb: - - 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: "Standard_M32ls" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 4 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 64 # size in GB, integer - disk_type: P6 # default: gp3, for AWS EBS disk type - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_count: 3 - disk_size: 128 # size in GB, integer - disk_type: P10 - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - disk_type: P15 - filesystem_type: xfs # default: xfs - - # MS Azure rootvg-rootlv / has only 2GB, therefore create virtual disk to avoid failures - - name: swap # hdb - #swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 4 # size in GB, integer - disk_type: P1 - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 128 # size in GB, integer - disk_type: P10 - filesystem_type: xfs # default: xfs - - - 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: "Standard_M32ls" # 32 vCPU x 256GB DRAM - disable_ip_anti_spoofing: true - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - - name: hana_data - mountpoint: /hana/data - disk_count: 4 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 64 # size in GB, integer - disk_type: P6 # default: gp3, for AWS EBS disk type - filesystem_type: xfs # default: xfs - - - name: hana_log - mountpoint: /hana/log - disk_count: 3 - disk_size: 128 # size in GB, integer - disk_type: P10 - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - disk_type: P15 - filesystem_type: xfs # default: xfs - - # MS Azure rootvg-rootlv / has only 2GB, therefore create virtual disk to avoid failures - - name: swap # hdb - #swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 4 # size in GB, integer - disk_type: P1 - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 128 # size in GB, integer - disk_type: P10 - filesystem_type: xfs # default: xfs - - - -#### -# Mandatory parameters : Infrastructure provisioning definitions - IBM PowerVM -#### - -sap_vm_provision_ibmpowervm_vm_host_specifications_dictionary: - - xsmall_256gb: - - 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 - ibmpowervm_vm_cpu_threads: 32 - ibmpowervm_vm_memory_gib: 256 - - # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 - ibmpowervm_vm_cpu_smt: 8 - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_size: 512 # size in GB, integer - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_size: 384 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 52 # size in GB, integer - filesystem_type: xfs # default: xfs - - - 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 - ibmpowervm_vm_cpu_threads: 32 - ibmpowervm_vm_memory_gib: 256 - - # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 - ibmpowervm_vm_cpu_smt: 8 - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_size: 512 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_log - mountpoint: /hana/log - disk_size: 384 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 52 # size in GB, integer - filesystem_type: xfs # default: xfs - - tiny_64gb: - - 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 - ibmpowervm_vm_cpu_threads: 8 - ibmpowervm_vm_memory_gib: 64 - - # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 - ibmpowervm_vm_cpu_smt: 8 - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_size: 128 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_log - mountpoint: /hana/log - disk_size: 96 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 64 # size in GB, integer - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 52 # size in GB, integer - filesystem_type: xfs # default: xfs - - 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 - ibmpowervm_vm_cpu_threads: 8 - ibmpowervm_vm_memory_gib: 64 - - # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 - ibmpowervm_vm_cpu_smt: 8 - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_size: 128 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_log - mountpoint: /hana/log - disk_size: 96 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 64 # size in GB, integer - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 52 # size in GB, integer - filesystem_type: xfs # default: xfs - - -#### -# Mandatory parameters : Infrastructure provisioning definitions - OVirt -#### - -sap_vm_provision_ovirt_vm_host_specifications_dictionary: - - xsmall_256gb: - - 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 - ovirt_vm_cpu_threads: 32 - ovirt_vm_memory_gib: 256 - ovirt_vm_type: high_performance - ovirt_vm_placement_policy: pinned - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 512 # size in GB, integer - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_size: 384 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 128 # size in GB, integer - filesystem_type: xfs # default: xfs - - 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 - ovirt_vm_cpu_threads: 32 - ovirt_vm_memory_gib: 256 - ovirt_vm_type: high_performance - ovirt_vm_placement_policy: pinned - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 512 # size in GB, integer - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_size: 384 # size in GB, integer - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 128 # size in GB, integer - filesystem_type: xfs # default: xfs - - - -#### -# Mandatory parameters : Infrastructure provisioning definitions - VMware -#### - -sap_vm_provision_vmware_vm_host_specifications_dictionary: - - xsmall_256gb: - - 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 - - # SMT-2 (i.e. 2 CPU Threads per CPU Core) is default for Intel CPU Hyper-Threading, optionally can be altered to SMT-1 - vmware_vm_cpu_smt: 2 - vmware_vm_cpu_threads: 32 - vmware_vm_memory_gib: 256 - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_primary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 512 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - #disk_iops: # default: null, for AWS EBS with custom IOPS - filesystem_type: xfs # default: xfs - #lvm_lv_name: # default: lv_ - #lvm_lv_stripes: 2 # default: null, number of disks to stripe over - #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size - #lvm_vg_name: # default: vg_ - #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) - #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size - #lvm_pv_device: # default: discovered ansible_devices matching the target size - #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) - #nfs_path: # subdirectory path on the NFS server - #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} - #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} - #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} - - - name: hana_log - mountpoint: /hana/log - disk_size: 384 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - filesystem_type: xfs # default: xfs - - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem - - - name: software - mountpoint: /software - disk_size: 128 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - filesystem_type: xfs # default: xfs - - 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 - - # SMT-2 (i.e. 2 CPU Threads per CPU Core) is default for Intel CPU Hyper-Threading, optionally can be altered to SMT-1 - vmware_vm_cpu_smt: 2 - vmware_vm_cpu_threads: 32 - vmware_vm_memory_gib: 256 - - sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - - # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers - sap_storage_setup_host_type: - - hana_secondary - - storage_definition: - - # Commented out variables are the same for each filesystem, only shown once below to ease readability - - name: hana_data - mountpoint: /hana/data - disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks - disk_size: 512 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - filesystem_type: xfs # default: xfs - - - name: hana_log - mountpoint: /hana/log - disk_size: 384 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - filesystem_type: xfs # default: xfs - - - name: hana_shared - mountpoint: /hana/shared - disk_size: 256 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - filesystem_type: xfs # default: xfs +#### Dynamic assignment of SAP HANA System Replication (HSR) variables #### +sap_ha_install_hana_hsr_sid: "{{ sap_system_hana_db_sid }}" +sap_ha_install_hana_hsr_instance_number: "{{ sap_system_hana_db_instance_nr }}" +sap_ha_install_hana_hsr_db_system_password: "{{ sap_hana_install_db_system_password + if (sap_hana_install_use_master_password is defined and sap_hana_install_use_master_password == 'n' + and sap_hana_install_db_system_password) + else sap_hana_install_master_password }}" - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # hdb - swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap - disk_size: 2 # size in GB, integer - filesystem_type: swap # must be swap filesystem +#### Dynamic assignment for Virtual IP #### +sap_vm_temp_vip_hana_primary: "{{ sap_vm_provision_ha_vip_hana_primary }}" +sap_ha_pacemaker_cluster_vip_hana_primary_ip_address: "{{ sap_vm_provision_ha_vip_hana_primary }}" - - name: software - mountpoint: /software - disk_size: 128 # size in GB, integer - disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) - filesystem_type: xfs # default: xfs +#### Dynamic parameters for AWS #### +# Override of AWS IAM HA roles is required if 'HA-Role-Pacemaker' already exists +sap_vm_provision_aws_ha_iam_role: "HA-Role-Pacemaker-{{ sap_system_hana_db_sid }}" +sap_vm_provision_aws_ha_iam_instance_profile: "HA-Role-Pacemaker-{{ sap_system_hana_db_sid }}-profile" diff --git a/deploy_scenarios/sap_hana_ha/ansible_playbook.yml b/deploy_scenarios/sap_hana_ha/ansible_playbook.yml index 8bb3f464..dcc222b3 100644 --- a/deploy_scenarios/sap_hana_ha/ansible_playbook.yml +++ b/deploy_scenarios/sap_hana_ha/ansible_playbook.yml @@ -2,7 +2,7 @@ # Ansible Playbook for SAP HANA Scale-Up (Performance Optimized) # Use include_role / include_tasks inside Ansible Task block, instead of using roles declaration or Task block with import_roles. -# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation. +# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialization. #### Begin Infrastructure-as-Code provisioning #### @@ -10,45 +10,22 @@ - name: Ansible Play to gather input for gathering vars and VM provisioning hosts: localhost gather_facts: false - - # pre_tasks used only for Interactive Prompts only and can be removed without impact pre_tasks: - - name: Playbook Interactive - Check if standard execution with an Ansible Extravars file is requested by end user - ansible.builtin.set_fact: - playbook_enable_interactive_prompts: "{{ true if (sap_vm_provision_iac_type is undefined and sap_vm_provision_iac_platform is undefined) else false }}" - - - name: Playbook Interactive - Provision execution - Input for sap_vm_provision_iac_type - ansible.builtin.pause: - prompt: "Please choose Infrastructure-as-Code automation from list - ansible , ansible_to_terraform (for existing_hosts, use Ansible standard execution with an Ansible Extravars file)" - register: sap_vm_provision_iac_type_register - no_log: true - when: playbook_enable_interactive_prompts - - - name: Playbook Interactive - Provision execution - Input for sap_vm_provision_iac_platform - ansible.builtin.pause: - prompt: "Please choose Infrastructure Platform from list - aws_ec2_vs , gcp_ce_vm , ibmcloud_powervs , ibmcloud_vs , ibmpowervm_vm , kubevirt_vm , msazure_vm , ovirt_vm" - register: sap_vm_provision_iac_platform_register - no_log: true - when: playbook_enable_interactive_prompts - - - name: Playbook Interactive - SAP Deployment execution - Input for playbook_enable_default_vars_sap - ansible.builtin.pause: - prompt: "Please choose if defaults should be used for SAP Software installation (e.g. SAP System ID) - true , false" - register: playbook_enable_default_vars_sap_register - no_log: true - when: playbook_enable_interactive_prompts + - name: Check if interactive guide is available + ansible.builtin.stat: + path: ../../tasks/interactive_inputs.yml + register: interactive_guide_availability + ignore_errors: true - - name: Playbook Interactive - Set facts from initial prompts - ansible.builtin.set_fact: - sap_vm_provision_iac_type: "{{ sap_vm_provision_iac_type_register.user_input }}" - sap_vm_provision_iac_platform: "{{ sap_vm_provision_iac_platform_register.user_input }}" - playbook_enable_default_vars_sap: "{{ playbook_enable_default_vars_sap_register.user_input }}" - when: playbook_enable_interactive_prompts - - - name: Playbook Interactive - Trigger prompts for VM provisioning via {{ sap_vm_provision_iac_type }} - ansible.builtin.include_tasks: "{{ playbook_dir }}/interactive/ansible_tasks_control_inputs.yml" - when: playbook_enable_interactive_prompts + - name: Playbook Interactive - Collection of interactive inputs + ansible.builtin.include_tasks: + file: ../../tasks/interactive_inputs.yml + vars: + interactive_input_type: hana_ha + when: + - sap_vm_provision_iac_type is undefined or sap_vm_provision_iac_platform is undefined + - interactive_guide_availability.stat.exists #### Provision VM #### @@ -62,14 +39,24 @@ ansible.builtin.add_host: name: "{{ item }}" group: sap_vm_provision_target_inventory_group - loop: "{{ lookup('ansible.builtin.vars', 'sap_vm_provision_' + sap_vm_provision_iac_platform + '_host_specifications_dictionary')[sap_vm_provision_host_specification_plan].keys() }}" + loop: "{{ lookup('ansible.builtin.vars', host_dictionary)[sap_vm_provision_host_specification_plan].keys() }}" + vars: + host_dictionary: "{{ 'sap_vm_provision_' ~ sap_vm_provision_iac_platform ~ '_host_specifications_dictionary' }}" when: sap_vm_provision_iac_type == "ansible" or sap_vm_provision_iac_type == "ansible_to_terraform" + - name: Ansible Play to provision hosts for SAP hosts: sap_vm_provision_target_inventory_group # Ansible Play target hosts pattern, use Inventory Group created by previous Ansible Task (add_host) gather_facts: false tasks: + - name: Assign all relevant facts from execution node to provisioned hosts + ansible.builtin.set_fact: + "{{ item.key }}": "{{ item.value }}" + cacheable: true + loop: "{{ hostvars['localhost'] | dict2items | selectattr('key', 'match', '^(__)?sap_') | list }}" + no_log: true + - name: Execute Ansible Role sap_vm_provision ansible.builtin.include_role: name: community.sap_infrastructure.sap_vm_provision @@ -81,7 +68,7 @@ - name: Ansible Play for hosts storage setup hosts: hana_primary, hana_secondary become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts + any_errors_fatal: true max_fail_percentage: 0 tasks: @@ -90,157 +77,56 @@ name: community.sap_infrastructure.sap_vm_temp_vip - # Use inventory_hostname_short to retrieve host specification from the dictionary. While ansible_hostname will work for Ansible only, using Ansible>Terraform may see ansible_hostname as 'localhost' and fail + # Use inventory_hostname_short to retrieve host specification from the dictionary. + # While ansible_hostname will work for Ansible only, using Ansible>Terraform may see ansible_hostname as 'localhost' and fail - name: Execute Ansible Role sap_storage_setup ansible.builtin.include_role: name: community.sap_install.sap_storage_setup vars: sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" - sap_storage_setup_host_type: "{{ host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].sap_storage_setup_host_type | list }}" + sap_storage_setup_host_type: "{{ host_specifications_dictionary[sap_vm_provision_host_specification_plan] + [inventory_hostname_short].sap_storage_setup_host_type | list }}" # sap_storage_setup_definition set for the host by sap_vm_provision Ansible Role when: - sap_vm_provision_iac_type == "ansible" or sap_vm_provision_iac_type == "ansible_to_terraform" - not sap_vm_provision_iac_type == "existing_hosts" - -# - name: Ansible Play to execute Preflight Checks -# hosts: hana_primary, hana_secondary, nwas_ascs, nwas_ers, nwas_pas, nwas_aas -# become: true -# any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts -# max_fail_percentage: 0 -# tasks: - -# - name: Execute Ansible Role sap_vm_preflight_checks -# ansible.builtin.include_role: -# name: community.sap_infrastructure.sap_vm_verify - - -- name: Ansible Play for ensuring rsync on all hosts - hosts: hana_primary, hana_secondary - become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts - max_fail_percentage: 0 - tasks: - - - name: Install rsync + - name: Install rsync for copying of SAP Software installation media ansible.builtin.package: name: - rsync state: present - #### Begin downloading SAP software installation media to hosts #### -- name: Ansible Play for preparing downloads of SAP Software installation media - hosts: hana_primary - become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts - max_fail_percentage: 0 - tasks: - - - name: Create directories if does not exist - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: '0755' - loop: - - "{{ sap_install_media_detect_source_directory }}" - - - name: Install Python package manager pip3 to system Python - ansible.builtin.package: - name: python3-pip - state: present - - - name: Ensure OS Packages for lxml are installed - ansible.builtin.package: - name: - - python3-lxml - - libxslt-devel - - libxml2-devel - state: present - - - name: Install Python dependency wheel to system Python - ansible.builtin.pip: - name: - - wheel - - - name: Install Python dependencies for Ansible Modules to system Python - ansible.builtin.pip: - name: - - urllib3 - - requests - - beautifulsoup4 - - lxml - - - -- name: Ansible Play for downloading SAP HANA installation media +- name: Ansible Play for download of SAP Software installation media hosts: hana_primary become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts + any_errors_fatal: true max_fail_percentage: 0 tasks: - - name: Set fact x86_64 softwarecenter_search_list_saphana - ansible.builtin.set_fact: - softwarecenter_search_list: "{{ sap_hana_install_media_dictionary[sap_hana_product_input].softwarecenter_search_list_saphana_x86_64 }}" - when: - - ansible_architecture == "x86_64" - - - name: Set fact ppc64le softwarecenter_search_list_saphana - ansible.builtin.set_fact: - softwarecenter_search_list: "{{ sap_hana_install_media_dictionary[sap_hana_product_input].softwarecenter_search_list_saphana_ppc64le }}" - when: - - ansible_architecture == "ppc64le" - - - name: Execute Ansible Module with system Python to download SAP HANA Database Server installation media - community.sap_launchpad.software_center_download: - suser_id: "{{ sap_id_user }}" - suser_password: "{{ sap_id_user_password }}" - softwarecenter_search_query: "{{ item }}" - dest: "{{ sap_install_media_detect_source_directory }}" - loop: "{{ softwarecenter_search_list }}" - loop_control: - label: "{{ item }} : {{ download_task.msg }}" - register: download_task - retries: 1 - until: download_task is not failed - - - - name: Find SAP HANA installation media - ansible.builtin.find: - paths: - - "{{ sap_install_media_detect_source_directory }}" - patterns: "{{ softwarecenter_search_list }}" - recurse: true - register: sap_hana_install_media_files - - - name: Prepare for file transfers, copy Private SSH Key used in Terraform deployment (temporary) - ansible.builtin.copy: - src: "{{ sap_vm_provision_terraform_work_dir_path }}/ssh/hosts_rsa" - dest: "/tmp/hosts_rsa" - mode: "0400" - when: sap_vm_provision_ssh_host_private_key_file_path is undefined - - - name: Prepare for file transfers, copy Private SSH Key from local (Ansible host) - ansible.builtin.copy: - src: "{{ sap_vm_provision_ssh_host_private_key_file_path }}" - dest: "/tmp/hosts_rsa" - mode: "0400" - when: sap_vm_provision_ssh_host_private_key_file_path is defined + - name: Check availability of community.sap_launchpad and prepare environment + ansible.builtin.include_tasks: + file: ../../tasks/download_sap_media.yml + vars: + softwarecenter_search_list: + "{{ sap_hana_install_media_dictionary[sap_hana_product_input]['softwarecenter_search_list_saphana_' ~ ansible_architecture] }}" - name: Ansible Play for copying SAP HANA Database Server installation media to other hosts hosts: hana_secondary become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts + any_errors_fatal: true max_fail_percentage: 0 tasks: - name: Set var of files list from SAP HANA primary, using lookup from Ansible hostvars with key as SAP HANA primary ansible.builtin.set_fact: - sap_hana_install_media_files_list: "{{ hostvars[sap_vm_provision_dynamic_inventory_hana_primary_hostname].sap_hana_install_media_files.files | map(attribute='path') | list }}" + sap_hana_install_media_files_list: + "{{ hostvars[sap_vm_provision_dynamic_inventory_hana_primary_hostname] + .sap_hana_install_media_files.files | map(attribute='path') | list }}" - name: Transfer SAP HANA installation media to SAP HANA Primary and SAP HANA Secondary delegate_to: "{{ sap_vm_provision_dynamic_inventory_hana_primary_ip }}" @@ -260,7 +146,7 @@ - name: Ansible Play to remove temporary files from SAP HANA primary host hosts: hana_primary become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts + any_errors_fatal: true max_fail_percentage: 0 tasks: @@ -275,7 +161,7 @@ - name: Ansible Play for preparing all SAP software hosts hosts: hana_primary, hana_secondary become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts + any_errors_fatal: true max_fail_percentage: 0 tasks: @@ -288,11 +174,10 @@ name: community.sap_install.sap_hana_preconfigure - -- name: Ansible Play for appending temporary Virtual IP (VIP) after preconfiguration and reboot of hosts +- name: Ansible Play for appending temporary Virtual IP (VIP) after pre-configuration and reboot of hosts hosts: hana_primary, hana_secondary become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts + any_errors_fatal: true max_fail_percentage: 0 tasks: @@ -301,13 +186,12 @@ name: community.sap_infrastructure.sap_vm_temp_vip - #### Begin SAP software installations #### - name: Ansible Play for SAP HANA Database Server installation hosts: hana_primary, hana_secondary become: true - any_errors_fatal: true # https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-a-play-on-all-hosts + any_errors_fatal: true max_fail_percentage: 0 tasks: @@ -352,23 +236,12 @@ sap_ha_install_hana_hsr_cluster_nodes: "{{ sap_hana_cluster_nodes }}" # Execute setup of SAP HANA scale-up HA cluster - # -- Linux Pacemaker cluster preparation - # -- Linux Pacemaker basic cluster configuration, 2 nodes - # -- SAP HANA scale-up HA Cluster configuration, with a Virtual IP (VIP) - # -- Fencing Agent/s setup for Infrastructure: fence_aws - # -- Resource Agent/s setup for Infrastructure: aws-vpc-move-ip - # -- Resource Agent/s setup for SAP: SAPHanaSR/SAPHana, SAPHanaSR/SAPHanaTopology - name: Execute Ansible Role sap_ha_pacemaker_cluster ansible.builtin.include_role: name: community.sap_install.sap_ha_pacemaker_cluster vars: - ha_cluster_cluster_name: clusterhdb - ha_cluster_hacluster_password: 'clusterpass' - ha_cluster: - node_name: "{{ ansible_hostname }}" - pcs_address: "{{ ansible_default_ipv4.address }}" - - sap_ha_pacemaker_cluster_sap_type: saphana_scaleup + sap_ha_pacemaker_cluster_cluster_name: clusterhdb + sap_ha_pacemaker_cluster_hacluster_user_password: 'clusterpass' sap_ha_pacemaker_cluster_host_type: - hana_scaleup_perf @@ -376,7 +249,6 @@ sap_ha_pacemaker_cluster_hana_instance_nr: "{{ sap_system_hana_db_instance_nr }}" sap_ha_pacemaker_cluster_cluster_nodes: "{{ sap_hana_cluster_nodes }}" - sap_ha_pacemaker_cluster_replication_type: none sap_ha_pacemaker_cluster_vip_resource_group_name: viphdb diff --git a/deploy_scenarios/sap_hana_ha/optional/ansible_extravars_noninteractive.yml b/deploy_scenarios/sap_hana_ha/optional/ansible_extravars_noninteractive.yml index 2be85e07..1ebc99c9 100755 --- a/deploy_scenarios/sap_hana_ha/optional/ansible_extravars_noninteractive.yml +++ b/deploy_scenarios/sap_hana_ha/optional/ansible_extravars_noninteractive.yml @@ -5,18 +5,12 @@ ## ansible-playbook ansible_playbook.yml --extra-vars "@./ansible_extravars.yml" --extra-vars "@./ansible_extravars_noninteractive.yml" -#### -# Key SAP System variables -#### - +#### Key SAP System variables #### sap_system_hana_db_sid: "H01" sap_system_hana_db_instance_nr: "90" -#### -# Infrastructure Provisioning selection -#### - +#### Infrastructure Provisioning selection #### sap_vm_provision_iac_type: "ENTER_STRING_VALUE_HERE" # ansible , ansible_to_terraform , existing_hosts sap_vm_provision_iac_platform: "ENTER_STRING_VALUE_HERE" # aws_ec2_vs , gcp_ce_vm , ibmcloud_vs , ibmcloud_powervs , msazure_vm , ibmpowervm_vm , kubevirt_vm , ovirt_vm , vmware_vm @@ -24,304 +18,7 @@ sap_vm_provision_host_specification_plan: "ENTER_STRING_VALUE_HERE" sap_vm_provision_dns_root_domain: "ENTER_STRING_VALUE_HERE" -#### -# Infrastructure Provisioning selection -# AWS -# -# Only for use when 'aws_ec2_vs' is value provided for variable sap_vm_provision_iac_platform -#### - -sap_vm_provision_aws_access_key: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_aws_secret_access_key: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_aws_region: "{{ sap_vm_provision_aws_vpc_availability_zone[:-1] }}" -sap_vm_provision_aws_vpc_availability_zone: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_aws_vpc_subnet_create_boolean: "{{ true | default(false) if aws_vpc_subnet_id == 'new' else false }}" -sap_vm_provision_aws_vpc_subnet_id: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_aws_ec2_vs_host_os_image: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_user: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_ssh_port: "ENTER_STRING_VALUE_HERE" - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_bastion_public_ip: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_bastion_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_aws_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_aws_vpc_sg_names: "ENTER_STRING_VALUE_HERE" - - -#### -# Infrastructure Provisioning selection -# Google Cloud -# -# Only for use when 'gcp_ce_vm' is value provided for variable sap_vm_provision_iac_platform -#### - -sap_vm_provision_gcp_credentials_json: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_gcp_project: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_gcp_region: "{{ sap_vm_provision_gcp_region_zone[:-2] }}" -sap_vm_provision_gcp_region_zone: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_gcp_vpc_name: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_gcp_vpc_subnet_name: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_gcp_ce_vm_host_os_image: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_user: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_ssh_port: "ENTER_STRING_VALUE_HERE" - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_bastion_public_ip: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_bastion_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_public_key_file_path: "ENTER_STRING_VALUE_HERE" - - -#### -# Infrastructure Provisioning selection -# IBM Cloud -# -# Only for use when 'ibmcloud_vs' is value provided for variable sap_vm_provision_iac_platform -#### -sap_vm_provision_ibmcloud_api_key: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_resource_group_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_ibmcloud_region: "{{ sap_vm_provision_ibmcloud_availability_zone | regex_replace('-[0-9]', '') }}" -sap_vm_provision_ibmcloud_availability_zone: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_private_dns_instance_name: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_vpc_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_ibmcloud_vpc_subnet_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_ibmcloud_vs_host_os_image: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_user: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_ssh_port: "ENTER_STRING_VALUE_HERE" - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_bastion_public_ip: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_bastion_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_vpc_sg_names: "ENTER_STRING_VALUE_HERE,ENTER_STRING_VALUE_HERE" # comma-separated, if ansible_to_terraform then ignore this variable -# sap_vm_provision_ibmcloud_private_dns_resource_group_name: "" # optional, default use of sap_vm_provision_ibmcloud_resource_group_name - - -#### -# Infrastructure Provisioning selection -# IBM Cloud, IBM Power Virtual Servers -# -# Only for use when 'ibmcloud_powervs' is value provided for variable sap_vm_provision_iac_platform -#### -sap_vm_provision_ibmcloud_api_key: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_resource_group_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_ibmcloud_private_dns_instance_name: "ENTER_STRING_VALUE_HERE" # not required when ansible_to_terraform -sap_vm_provision_ibmcloud_powervs_location: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_powervs_workspace_name: "ENTER_STRING_VALUE_HERE" # not required when ansible_to_terraform -sap_vm_provision_ibmcloud_powervs_vlan_subnet_name: "ENTER_STRING_VALUE_HERE" # not required when ansible_to_terraform -sap_vm_provision_ibmcloud_powervs_host_os_image: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_user: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_ssh_port: "ENTER_STRING_VALUE_HERE" -# sap_vm_provision_ibmcloud_vpc_subnet_name: "ENTER_STRING_VALUE_HERE" # only for ansible_to_terraform, can be name or 'new' - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_bastion_public_ip: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_bastion_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_powervs_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmcloud_private_dns_custom_resolver_ip: "ENTER_STRING_VALUE_HERE" -# sap_vm_provision_ibmcloud_private_dns_resource_group_name: "" # optional, default use of sap_vm_provision_ibmcloud_resource_group_name -sap_vm_provision_proxy_web_forward_proxy_ip: "ENTER_STRING_VALUE_HERE" # IP:Port only, no http:// prefix -sap_vm_provision_proxy_web_forward_exclusions: "localhost,127.0.0.1,{{ sap_vm_provision_dns_root_domain }}" - - -#### -# Infrastructure Provisioning selection -# MS Azure -# -# Only for use when 'msazure_vm' is value provided for variable sap_vm_provision_iac_platform -#### - -sap_vm_provision_msazure_subscription_id: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_msazure_tenant_id: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_msazure_app_client_id: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_msazure_app_client_secret: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_msazure_resource_group_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_msazure_location_region: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_msazure_location_availability_zone_no: 1 -sap_vm_provision_msazure_vnet_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_msazure_vnet_subnet_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" -sap_vm_provision_msazure_vm_host_os_image: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_user: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_ssh_port: "ENTER_STRING_VALUE_HERE" - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_bastion_public_ip: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_bastion_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_msazure_key_pair_name_ssh_host_public_key: "" -# sap_vm_provision_msazure_private_dns_resource_group_name: "" # optional, default use of sap_vm_provision_msazure_resource_group_name - - -#### -# Infrastructure Provisioning selection -# IBM PowerVM -# -# Only for use when 'ibmpowervm_vm' is value provided for variable sap_vm_provision_iac_platform -#### - -sap_vm_provision_ibmpowervm_vc_auth_endpoint: "ENTER_STRING_VALUE_HERE" # e.g https://POWERVC_HOST:5000/v3/ -sap_vm_provision_ibmpowervm_vc_user: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmpowervm_vc_user_password: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmpowervm_vc_project_name: "ENTER_STRING_VALUE_HERE" - -sap_vm_provision_ibmpowervm_host_group_name: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmpowervm_host_group_shared_procesor_pool_name: "ENTER_STRING_VALUE_HERE" # e.g. DefaultPool - -sap_vm_provision_ibmpowervm_network_name: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmpowervm_network_vnic_type: "normal" # 'direct' == SR-IOV, 'normal' == Shared Ethernet Adapter (SEA) - -sap_vm_provision_ibmpowervm_storage_template_name: "ENTER_STRING_VALUE_HERE" # aka. Openstack Cinder Volume Type - -# IBM PowerVM Virtual Machine OS Image (see IBM PowerVC Web GUI for list) -sap_vm_provision_ibmpowervm_vm_host_os_image: "ENTER_STRING_VALUE_HERE" - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_public_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ibmpowervm_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" - - -#### -# Infrastructure Provisioning selection -# OVirt -# -# Only for use when 'ovirt_vm' is value provided for variable sap_vm_provision_iac_platform -#### - -sap_vm_provision_ovirt_engine_insecure_bool: true -sap_vm_provision_ovirt_engine_url: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ovirt_engine_fqdn: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ovirt_engine_user: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ovirt_engine_password: "ENTER_STRING_VALUE_HERE" -#sap_vm_provision_ovirt_engine_cafile: "ENTER_STRING_VALUE_HERE" - -sap_vm_provision_ovirt_hypervisor_cluster_name: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ovirt_hypervisor_cluster_host_node_name: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ovirt_hypervisor_cluster_storage_domain_name: "ENTER_STRING_VALUE_HERE" - -sap_vm_provision_ovirt_vm_boot_menu: false -sap_vm_provision_ovirt_vm_clone_independent: false -sap_vm_provision_ovirt_vm_disk_type: "raw" # default is 'cow' = thin provisioning -sap_vm_provision_ovirt_vm_timezone: "Etc/GMT" -#sap_vm_provision_ovirt_vm_operating_system: "other_linux" - -# OVirt VM option 1 - create from VM Template Name -sap_vm_provision_ovirt_vm_template_name: "ENTER_STRING_VALUE_HERE" - -# OVirt VM option 2 - create from RHEL Kickstart definition -# sap_vm_provision_ovirt_vm_kickstart_definition: -# os_image_iso: RHEL-9.2.0-x86_64-dvd.iso -# # pxeboot path on the hypervisor node(s) -# initrd_path: /software/pxeboot/rhel-9.2/initrd.img -# kernel_path: /software/pxeboot/rhel-9.2/vmlinuz -# # see RHEL release documentations for kickstart installation kernel parameters -# kernel_params: "inst.ks=http://{{ sap_vm_provision_ovirt_kickstart_host }}/kickstart/{{ sap_vm_provision_ovirt_kickstart_config_file_name }} ip={{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_ip }}::{{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_gw }}:{{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_netmask }}:{{ inventory_hostname }}:{{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_interface }}:none inst.nompath ipv6.disable=1 inst.repo=cdrom kpti=0" -# boot_disk: -# activate: true -# bootable: true -# interface: "virtio_scsi" -# size: "25GiB" -# format: "cow" - -# OVirt VM - vNIC definitions when not using DHCP -#sap_vm_provision_ovirt_vm_nics: -# - interface: virtio -# name: nic1 -# profile_name: vm_nic_profile_name - -# OVirt VM - cloud-init -#sap_vm_provision_ovirt_vm_cloud_init: -# authorized_ssh_keys: "{{ lookup('file', ( sap_vm_provision_ssh_host_public_key_file_path | default(sap_vm_provision_ssh_host_private_key_file_path + '.pub') ) ) }}" -# regenerate_ssh_keys: false -# host_name: "{{ host_node }}" # Must use short name for SAP Systems, not FQDN -# custom_script: | # Cloud-init script which will be executed on Virtual Machine when deployed. This is appended to the end of the cloud-init script generated by any other options. -# write_files: -# - content: | -# Hello, world! -# path: /tmp/greeting.txt -# permissions: '0644' - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_public_key_file_path: "ENTER_STRING_VALUE_HERE" - - -#### -# Infrastructure Provisioning selection -# VMware -# -# Only for use when 'vmware_vm' is value provided for variable sap_vm_provision_iac_platform -#### - -sap_vm_provision_vmware_vcenter_hostname: "" -sap_vm_provision_vmware_vcenter_validate_certs_bool: false -sap_vm_provision_vmware_vcenter_user: "" -sap_vm_provision_vmware_vcenter_password: "" - -sap_vm_provision_vmware_vm_folder_name: "" -sap_vm_provision_vmware_vm_cluster_name: "" -sap_vm_provision_vmware_vm_cluster_host_name: "" -sap_vm_provision_vmware_vm_cluster_datastore_name: "" - -sap_vm_provision_vmware_vm_content_library_name: "" -sap_vm_provision_vmware_vm_template_name: "" - -# Only for use when 'ansible' is value provided for variable sap_vm_provision_iac_type -#### -sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_ssh_host_public_key_file_path: "ENTER_STRING_VALUE_HERE" - - -#### -# Infrastructure Provisioning selection, -# when provisioning minimal landing zone and hosts via Terraform -# -# Only for use when 'ansible_to_terraform' is value provided for variable sap_vm_provision_iac_type -#### - -sap_vm_provision_terraform_state: "ENTER_STRING_VALUE_HERE" # present, absent -sap_vm_provision_resource_prefix: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_bastion_os_image: "ENTER_STRING_VALUE_HERE" -sap_vm_provision_terraform_work_dir_path: "/tmp/tf1" - - -#### -# Infrastructure Provisioning selection, -# additional configuration when provisioning On-Premise hosts -# -# Only for use when 'ibmpowervm', 'ovirt_vm' is value provided for variable sap_vm_provision_iac_platform -#### - -# Only for use when environment does not contain an SNAT for Outbound Internet activity -# sap_vm_provision_proxy_web_forward_proxy_ip: "ENTER_STRING_VALUE_HERE" # IP:Port only, no http:// prefix -# sap_vm_provision_proxy_web_forward_exclusions: "localhost,127.0.0.1,{{ sap_vm_provision_dns_root_domain }},{{ sap_ha_pacemaker_cluster_ibmpower_vm_hmc_host }},{{ ibmpower_vc_auth_endpoint.rpartition('//')[-1].partition('/')[0].partition(':')[0] }}" - -# OS Package Repo Mirror - CA file downloaded from RHT Satellite / SUSE RMT for injection to host -sap_vm_provision_os_registration_ca_file_path: "ENTER_STRING_VALUE_HERE" - -# OS Package Repo Mirror - RHEL command example: curl -sS 'https://RHT_SATELLITE_SERVER/register?activation_keys=&location_id=&organization_id=&setup_insights=false&setup_remote_execution=false&update_packages=false' -H 'Authorization: Bearer XXXX' | bash -# OS Package Repo Mirror - SLES command example: curl http://SUSE_RMT_SERVER/tools/rmt-client-setup | bash 'https://SUSE_RMT_SERVER/' --yes -sap_vm_provision_os_registration_script_command: "ENTER_STRING_VALUE_HERE" - -# OS Package Repo Direct - Cannot be used in conjunction with OS Package Repository Mirrors -#sap_vm_provision_os_online_registration_user: "ENTER_STRING_VALUE_HERE" -#sap_vm_provision_os_online_registration_passcode: "ENTER_STRING_VALUE_HERE" - - -#### -# SAP Software installation media downloads -#### - +#### SAP Software installation media downloads #### # SAP ONE Support Launchpad credentials sap_id_user: "ENTER_STRING_VALUE_HERE" sap_id_user_password: 'ENTER_STRING_VALUE_HERE' @@ -329,37 +26,15 @@ sap_id_user_password: 'ENTER_STRING_VALUE_HERE' # Directory for SAP installation media sap_install_media_detect_source_directory: "ENTER_STRING_VALUE_HERE" # e.g. /software - -#### -# SAP HANA +#### SAP HANA Product selection #### # (see ansible_extravars.yml in parent directory of this Ansible Playbook for full definitions) -#### - sap_hana_product_input: "ENTER_STRING_VALUE_HERE" # sap_hana_2_sps07_install , sap_hana_2_sps06_install -# SAP HANA database server instance details, used for sap_hana_install, sap_ha_install_hana_hsr, and sap_ha_pacemaker_cluster -sap_hana_sid: "{{ sap_system_hana_db_sid }}" -sap_hana_install_instance_nr: "{{ sap_system_hana_db_instance_nr }}" - - -#### -# SAP HANA Database Server installation -#### - +#### SAP HANA Database Server installation #### # SAP HANA master password sap_hana_install_use_master_password: "y" sap_hana_install_master_password: "ENTER_STRING_VALUE_HERE" - -#### -# SAP HANA System Replication (HSR) installation -#### - -sap_ha_install_hana_hsr_sid: "{{ sap_system_hana_db_sid }}" -sap_ha_install_hana_hsr_instance_number: "{{ sap_system_hana_db_instance_nr }}" -sap_ha_install_hana_hsr_db_system_password: "{{ sap_hana_install_master_password }}" - - #### # Infrastructure Platform - High Availability Virtual IPs (VIPs) # @@ -375,54 +50,28 @@ sap_ha_install_hana_hsr_db_system_password: "{{ sap_hana_install_master_password sap_vm_provision_ha_vip_hana_primary: "ENTER_STRING_VALUE_HERE" -#### -# Linux Pacemaker cluster setup for SAP - variables for AWS -#### - +#### Linux Pacemaker cluster setup for SAP - variables for AWS #### sap_ha_pacemaker_cluster_aws_region: "{{ sap_vm_provision_aws_vpc_availability_zone[:-1] }}" sap_ha_pacemaker_cluster_aws_access_key_id: "{{ sap_vm_provision_aws_access_key }}" sap_ha_pacemaker_cluster_aws_secret_access_key: "{{ sap_vm_provision_aws_secret_access_key }}" - -#### -# Linux Pacemaker cluster setup for SAP - variables for Google Cloud -#### - +#### Linux Pacemaker cluster setup for SAP - variables for Google Cloud #### sap_ha_pacemaker_cluster_gcp_project: "{{ sap_vm_provision_gcp_project }}" sap_ha_pacemaker_cluster_gcp_region_zone: "{{ sap_vm_provision_gcp_region_zone }}" - -#### -# Linux Pacemaker cluster setup for SAP - variables for IBM Cloud -#### - -sap_ha_pacemaker_cluster_ibmcloud_api_key: "{{ sap_vm_provision_ibmcloud_api_key }}" -sap_ha_pacemaker_cluster_ibmcloud_region: "{{ sap_vm_provision_ibmcloud_region }}" - - -#### -# Linux Pacemaker cluster setup for SAP - variables for IBM Cloud, IBM Power Virtual Servers -#### - +#### Linux Pacemaker cluster setup for SAP - variables for IBM Cloud, IBM Power Virtual Servers #### sap_ha_pacemaker_cluster_ibmcloud_api_key: "{{ sap_vm_provision_ibmcloud_api_key }}" #sap_ha_pacemaker_cluster_ibmcloud_region: "" # Use sap_vm_provision to set automatically #sap_ha_pacemaker_cluster_ibmcloud_powervs_workspace_crn: "" # Use sap_vm_provision to set automatically sap_ha_pacemaker_cluster_ibmcloud_powervs_api_type: private -sap_ha_pacemaker_cluster_ibmcloud_powervs_forward_proxy_url: "http://{{ sap_vm_provision_proxy_web_forward_proxy_ip }}" - - -#### -# Linux Pacemaker cluster setup for SAP - variables for Microsoft Azure -#### +sap_ha_pacemaker_cluster_ibmcloud_powervs_forward_proxy_url: + "http://{{ sap_vm_provision_proxy_web_forward_proxy_ip }}" +#### Linux Pacemaker cluster setup for SAP - variables for Microsoft Azure #### sap_ha_pacemaker_cluster_msazure_subscription_id: "{{ sap_vm_provision_msazure_subscription_id }}" sap_ha_pacemaker_cluster_msazure_resource_group: "{{ sap_vm_provision_msazure_resource_group_name }}" - -#### -# Linux Pacemaker cluster setup for SAP - variables for IBM PowerVM -#### - +#### Linux Pacemaker cluster setup for SAP - variables for IBM PowerVM #### # IBM Power Hardware Management Console (HMC), not to be confused with IBM PowerVC host and credentials sap_ha_pacemaker_cluster_ibmpower_vm_hmc_host: "ENTER_STRING_VALUE_HERE" sap_ha_pacemaker_cluster_ibmpower_vm_hmc_host_port: "ENTER_STRING_VALUE_HERE" # Default, 22 for SSH diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_aws_ec2_vs.yml b/deploy_scenarios/sap_hana_ha/vars/platform_aws_ec2_vs.yml new file mode 100644 index 00000000..3a5734f2 --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_aws_ec2_vs.yml @@ -0,0 +1,102 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_aws_ec2_vs_host_specifications_dictionary: + + xsmall_256gb: + + 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: "r7i.8xlarge" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + #disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 384 # size in GB, integer + #disk_type: gp3 # default: gp3, for AWS EBS disk type + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - 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 + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 + + + 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: "r7i.8xlarge" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - 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 + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_gcp_ce_vm.yml b/deploy_scenarios/sap_hana_ha/vars/platform_gcp_ce_vm.yml new file mode 100644 index 00000000..298c3fe8 --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_gcp_ce_vm.yml @@ -0,0 +1,125 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_gcp_ce_vm_host_specifications_dictionary: + + xsmall_256gb: + + 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: "n2-highmem-32" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 384 # size in GB, integer + disk_type: pd-ssd # default: gp3, for AWS EBS disk type + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_count: 1 + disk_size: 128 # size in GB, integer + disk_type: pd-ssd + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 320 # size in GB, integer + disk_type: pd-balanced + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 + disk_type: pd-balanced + filesystem_type: xfs # default: xfs + + + 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: "n2-highmem-32" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 384 # size in GB, integer + disk_type: pd-ssd # default: gp3, for AWS EBS disk type + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_count: 1 + disk_size: 128 # size in GB, integer + disk_type: pd-ssd + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 320 # size in GB, integer + disk_type: pd-balanced + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 + disk_type: pd-balanced + filesystem_type: xfs # default: xfs diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_powervs.yml b/deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_powervs.yml new file mode 100644 index 00000000..be4421be --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_powervs.yml @@ -0,0 +1,112 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_ibmcloud_powervs_host_specifications_dictionary: + + xsmall_256gb: + + 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 }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 384 # size in GB, integer + disk_type: tier1 + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_count: 1 + disk_size: 144 # size in GB, integer + disk_type: tier1 + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 + disk_type: tier1 # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 + disk_type: tier1 + filesystem_type: xfs # default: xfs + + 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 }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 384 # size in GB, integer + disk_type: tier1 + filesystem_type: xfs # default: xfs + + - name: hana_log + mountpoint: /hana/log + disk_count: 1 + disk_size: 144 # size in GB, integer + disk_type: tier1 + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 + disk_type: tier1 # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 + disk_type: tier1 + filesystem_type: xfs # default: xfs diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_vs.yml b/deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_vs.yml new file mode 100644 index 00000000..cd85b9f6 --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_ibmcloud_vs.yml @@ -0,0 +1,111 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_ibmcloud_vs_host_specifications_dictionary: + + xsmall_256gb: + + 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: "mx2-32x256" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 3 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 128 # size in GB, integer + disk_type: 10iops-tier # default: gp3, for AWS EBS disk type + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_count: 3 + disk_size: 48 # size in GB, integer + disk_type: 10iops-tier + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 320 + disk_type: 10iops-tier # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 + disk_type: 5iops-tier + filesystem_type: xfs # default: xfs + + + 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: "mx2-32x256" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + - name: hana_data + mountpoint: /hana/data + disk_count: 3 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 128 # size in GB, integer + disk_type: 10iops-tier # default: gp3, for AWS EBS disk type + filesystem_type: xfs # default: xfs + + - name: hana_log + mountpoint: /hana/log + disk_count: 3 + disk_size: 48 # size in GB, integer + disk_type: 10iops-tier + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 320 + disk_type: 10iops-tier # Does NOT use Burst IOPS storage. Approx same cost as 1TB at lower IOPS Tiers, use lower capacity and increase to 10IOPS/GB to ensure quicker DB Backup Restore from /hana/shared//HDB/backup/data/DB_ + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + 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 + disk_type: 5iops-tier + filesystem_type: xfs # default: xfs diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_ibmpowervm_vm.yml b/deploy_scenarios/sap_hana_ha/vars/platform_ibmpowervm_vm.yml new file mode 100644 index 00000000..04b4f1e4 --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_ibmpowervm_vm.yml @@ -0,0 +1,193 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_ibmpowervm_vm_host_specifications_dictionary: + + xsmall_256gb: + + 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 + ibmpowervm_vm_cpu_threads: 32 + ibmpowervm_vm_memory_gib: 256 + + # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 + ibmpowervm_vm_cpu_smt: 8 + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_size: 512 # size in GB, integer + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_size: 384 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 52 # size in GB, integer + filesystem_type: xfs # default: xfs + + + 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 + ibmpowervm_vm_cpu_threads: 32 + ibmpowervm_vm_memory_gib: 256 + + # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 + ibmpowervm_vm_cpu_smt: 8 + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_size: 512 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_log + mountpoint: /hana/log + disk_size: 384 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 52 # size in GB, integer + filesystem_type: xfs # default: xfs + + tiny_64gb: + + 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 + ibmpowervm_vm_cpu_threads: 8 + ibmpowervm_vm_memory_gib: 64 + + # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 + ibmpowervm_vm_cpu_smt: 8 + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_size: 128 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_log + mountpoint: /hana/log + disk_size: 96 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 64 # size in GB, integer + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 52 # size in GB, integer + filesystem_type: xfs # default: xfs + + 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 + ibmpowervm_vm_cpu_threads: 8 + ibmpowervm_vm_memory_gib: 64 + + # SMT-8 (i.e. 8 CPU Threads per CPU Core) is used for SAP Software, except for Production systems of SAP HANA on IBM Power10 which uses SMT-4 + ibmpowervm_vm_cpu_smt: 8 + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_size: 128 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_log + mountpoint: /hana/log + disk_size: 96 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 64 # size in GB, integer + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 52 # size in GB, integer + filesystem_type: xfs # default: xfs diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_msazure_vm.yml b/deploy_scenarios/sap_hana_ha/vars/platform_msazure_vm.yml new file mode 100644 index 00000000..c5bf129b --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_msazure_vm.yml @@ -0,0 +1,113 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_msazure_vm_host_specifications_dictionary: + + xsmall_256gb: + + 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: "Standard_M32ls" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 4 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 64 # size in GB, integer + disk_type: P6 # default: gp3, for AWS EBS disk type + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_count: 3 + disk_size: 128 # size in GB, integer + disk_type: P10 + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + disk_type: P15 + filesystem_type: xfs # default: xfs + + # MS Azure rootvg-rootlv / has only 2GB, therefore create virtual disk to avoid failures + - name: swap # hdb + #swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 4 # size in GB, integer + disk_type: P1 + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 128 # size in GB, integer + disk_type: P10 + filesystem_type: xfs # default: xfs + + + 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: "Standard_M32ls" # 32 vCPU x 256GB DRAM + disable_ip_anti_spoofing: true + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + - name: hana_data + mountpoint: /hana/data + disk_count: 4 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 64 # size in GB, integer + disk_type: P6 # default: gp3, for AWS EBS disk type + filesystem_type: xfs # default: xfs + + - name: hana_log + mountpoint: /hana/log + disk_count: 3 + disk_size: 128 # size in GB, integer + disk_type: P10 + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + disk_type: P15 + filesystem_type: xfs # default: xfs + + # MS Azure rootvg-rootlv / has only 2GB, therefore create virtual disk to avoid failures + - name: swap # hdb + #swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 4 # size in GB, integer + disk_type: P1 + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 128 # size in GB, integer + disk_type: P10 + filesystem_type: xfs # default: xfs diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_ovirt_vm.yml b/deploy_scenarios/sap_hana_ha/vars/platform_ovirt_vm.yml new file mode 100644 index 00000000..0282236a --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_ovirt_vm.yml @@ -0,0 +1,118 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_ovirt_vm_host_specifications_dictionary: + + xsmall_256gb: + + 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 + ovirt_vm_cpu_threads: 32 + ovirt_vm_memory_gib: 256 + ovirt_vm_type: high_performance + ovirt_vm_placement_policy: pinned + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 512 # size in GB, integer + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_size: 384 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 128 # size in GB, integer + filesystem_type: xfs # default: xfs + + 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 + ovirt_vm_cpu_threads: 32 + ovirt_vm_memory_gib: 256 + ovirt_vm_type: high_performance + ovirt_vm_placement_policy: pinned + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 512 # size in GB, integer + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_size: 384 # size in GB, integer + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 128 # size in GB, integer + filesystem_type: xfs # default: xfs diff --git a/deploy_scenarios/sap_hana_ha/vars/platform_vmware_vm.yml b/deploy_scenarios/sap_hana_ha/vars/platform_vmware_vm.yml new file mode 100644 index 00000000..16a5246b --- /dev/null +++ b/deploy_scenarios/sap_hana_ha/vars/platform_vmware_vm.yml @@ -0,0 +1,117 @@ +--- +# Scenario specific platform variables for specific platform + +sap_vm_provision_vmware_vm_host_specifications_dictionary: + + xsmall_256gb: + + 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 + + # SMT-2 (i.e. 2 CPU Threads per CPU Core) is default for Intel CPU Hyper-Threading, optionally can be altered to SMT-1 + vmware_vm_cpu_smt: 2 + vmware_vm_cpu_threads: 32 + vmware_vm_memory_gib: 256 + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_primary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 512 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + #disk_iops: # default: null, for AWS EBS with custom IOPS + filesystem_type: xfs # default: xfs + #lvm_lv_name: # default: lv_ + #lvm_lv_stripes: 2 # default: null, number of disks to stripe over + #lvm_lv_stripe_size: 128K # default: 64K, defined by the OS. Akin to Virtualized Block Size + #lvm_vg_name: # default: vg_ + #lvm_vg_options: # default: none, additional LVM VG options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM VG Physical Extent) + #lvm_vg_physical_extent_size: # default: 4, uses 4 MiB default and difficult to change once set. Akin to Physical Block Size + #lvm_pv_device: # default: discovered ansible_devices matching the target size + #lvm_pv_options: # default: none, additional LVM PV options as string in LVM options syntax (e.g. "--dataalignment XX ..." to override MiB offset from disk start before first LVM PV Physical Extent) + #nfs_path: # subdirectory path on the NFS server + #nfs_server: # NFS server and parent directory (e.g. nfs.com:/share1). default: {{ sap_storage_setup_nfs_server }} + #nfs_filesystem_type: # default: {{ sap_storage_setup_nfs_filesystem_type }} + #nfs_mount_options: # default: {{ sap_storage_setup_nfs_mount_options }} + + - name: hana_log + mountpoint: /hana/log + disk_size: 384 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 128 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + filesystem_type: xfs # default: xfs + + 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 + + # SMT-2 (i.e. 2 CPU Threads per CPU Core) is default for Intel CPU Hyper-Threading, optionally can be altered to SMT-1 + vmware_vm_cpu_smt: 2 + vmware_vm_cpu_threads: 32 + vmware_vm_memory_gib: 256 + + sap_storage_setup_sid: "{{ sap_system_hana_db_sid }}" + + # hana_primary, hana_secondary, nwas_abap_ascs, nwas_abap_ers, nwas_abap_pas, nwas_abap_aas, nwas_java_scs, nwas_java_ers + sap_storage_setup_host_type: + - hana_secondary + + storage_definition: + + # Commented out variables are the same for each filesystem, only shown once below to ease readability + - name: hana_data + mountpoint: /hana/data + disk_count: 1 # default: 1, if more then then LVM logical volume will be striped across the defined disks + disk_size: 512 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + filesystem_type: xfs # default: xfs + + - name: hana_log + mountpoint: /hana/log + disk_size: 384 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + filesystem_type: xfs # default: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 256 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + filesystem_type: xfs # default: xfs + + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # hdb + swap_path: /swapfile # use swap file on root disk, instead of creating LVM LV for swap + disk_size: 2 # size in GB, integer + filesystem_type: swap # must be swap filesystem + + - name: software + mountpoint: /software + disk_size: 128 # size in GB, integer + disk_type: scsi # VMware Virtual Disk Node (scsi, ide, sata) + filesystem_type: xfs # default: xfs diff --git a/scripts/python_module_fuzzy_call_script.py b/scripts/python_module_fuzzy_call_script.py new file mode 100644 index 00000000..ab3f2219 --- /dev/null +++ b/scripts/python_module_fuzzy_call_script.py @@ -0,0 +1,115 @@ +#!/usr/bin/env python +import sys +from module_utils.sap_id_sso import sap_sso_login +from module_utils.sap_launchpad_software_center_download_search_fuzzy import * + +input_search_file=sys.argv[1] +input_search_file_name_and_version_only=sys.argv[2] +username = sys.argv[3] +password = sys.argv[4] + +sap_sso_login(username, password) + +query_result = search_software_fuzzy(input_search_file) + +if len(query_result) >= 2: + if '70SWPM' in query_result[0]['Title']: + print(query_result[-1]['Title']) + elif any('DBATL' in sublist['Title'] for sublist in query_result): + for sublist in query_result: + if sublist['Title'].startswith('DBATL'): + print(sublist['Title']) + elif any('_NW_LANG_' in sublist['Description'] for sublist in query_result): + # Skip _NW_LANG_ files which may have duplicates that are filtered automatically when downloaded + print('') + elif any('SYBCTRL' in sublist['Title'] for sublist in query_result): + for sublist in query_result: + if sublist['Title'].startswith('SYBCTRL'): + print(sublist['Title']) + elif any('SAPEXE_' in sublist['Title'] for sublist in query_result): + list_sapexe = [] + for sublist in query_result: + if sublist['Title'].startswith('SAPEXE'): + list_sapexe.append(int((sublist['Title'].split('-', 1)[0]).split('_', 1)[1])) + list_sapexe.sort(reverse=True) + print('SAPEXE_' + str(list_sapexe[0]) + '-' + input_search_file + '.SAR') + elif any('SAPEXEDB_' in sublist['Title'] for sublist in query_result): + list_sapexedb = [] + for sublist in query_result: + if sublist['Title'].startswith('SAPEXEDB'): + list_sapexedb.append(int((sublist['Title'].split('-', 1)[0]).split('_', 1)[1])) + list_sapexedb.sort(reverse=True) + print('SAPEXEDB_' + str(list_sapexedb[0]) + '-' + input_search_file + '.SAR') + elif any('SMDA' in sublist['Title'] for sublist in query_result): + input_smda = input_search_file_name_and_version_only[:-2] + list_smda = [] + for sublist in query_result: + if sublist['Title'].startswith(input_smda): + list_smda.append(sublist['Title']) + list_smda.sort(reverse=True) + print(list_smda[0]) + elif any('IMDB_CLIENT20' in sublist['Title'] for sublist in query_result): + input_imdb_client = input_search_file_name_and_version_only[:-2] + list_imdb_client = [] + for sublist in query_result: + if sublist['Title'].startswith(input_imdb_client): + list_imdb_client.append(sublist['Title']) + list_imdb_client.sort(reverse=True) + print(list_imdb_client[0]) + elif any('IMDB_AFL' in sublist['Title'] for sublist in query_result): + input_imdb_afl = input_search_file_name_and_version_only[:-1] + list_imdb_afl = [] + for sublist in query_result: + if sublist['Title'].startswith(input_imdb_afl): + list_imdb_afl.append(sublist['Title']) + list_imdb_afl.sort(reverse=True) + print(list_imdb_afl[0]) + elif any('IMDB_LCAPPS' in sublist['Title'] for sublist in query_result): + input_imdb_lcapps = input_search_file_name_and_version_only[:-1] + list_imdb_lcapps = [] + for sublist in query_result: + if sublist['Title'].startswith(input_imdb_lcapps): + list_imdb_lcapps.append(sublist['Title']) + list_imdb_lcapps.sort(reverse=True) + print(list_imdb_lcapps[0]) + elif any('IMDB_SERVER' in sublist['Title'] for sublist in query_result): + list_imdb_server = [] + for sublist in query_result: + input_imdb_server = input_search_file_name_and_version_only[:-1] + if sublist['Title'].startswith(input_imdb_server): + list_imdb_server.append(sublist['Title']) + list_imdb_server.sort(reverse=True) + print(list_imdb_server[0]) + # Match LCAPPS and AFL to new SAP HANA DB Server version + imdb_server20_existing_prefix = input_search_file_name_and_version_only.split('_')[-1] + imdb_server20_new_prefix = list_imdb_server[0].split('-')[0] + imdb_server20_new_prefix2 = imdb_server20_new_prefix.rsplit('_', 1)[0] + imdb_server20_new_version = imdb_server20_new_prefix2.split('_')[-1] + imdb_lcapps20_existing_version = "IMDB_LCAPPS_2" + imdb_server20_existing_prefix + imdb_lcapps20_version = "IMDB_LCAPPS_2" + imdb_server20_new_version + imdb_lcapps20_query = search_software_fuzzy(imdb_lcapps20_version) + imdb_lcapps20_result_prefix = imdb_lcapps20_query[0]['Title'].split('-')[0] + imdb_afl20_existing_version = "IMDB_AFL20_" + imdb_server20_existing_prefix + imdb_afl20_version = "IMDB_AFL20_" + imdb_server20_new_version + imdb_afl20_query = search_software_fuzzy(imdb_afl20_version) + imdb_afl20_result_prefix = imdb_afl20_query[0]['Title'].split('-')[0] + print(imdb_lcapps20_existing_version + ';' + imdb_lcapps20_result_prefix) + print(imdb_afl20_existing_version + ';' + imdb_afl20_result_prefix) + elif any('SAPWEBDISP' in sublist['Title'] for sublist in query_result): + # As SAP WebDisp file name numbering does not use preceeding 0's, manually filter out v7 which is older than v69: + input_webdisp = input_search_file_name_and_version_only[:-2] + list_webdisp = [] + for sublist in query_result: + if sublist['Title'].startswith(input_webdisp) and not sublist['Title'].startswith('SAPWEBDISP_SP_7'): + list_webdisp.append(sublist['Title']) + list_webdisp.sort(reverse=True) + print(list_webdisp[0]) + else: + print("\nERROR. More than 1 result for " + input_search_file + ", manual intervention required....") + for item in query_result: + print('Identified ' + item['Title'] + ' : ' + item['Description'] + ', ' + item['Infotype'],end='\n') +else: + if len(query_result) == 0: + print("\nERROR. No result for " + input_search_file + ", manual intervention required....") + else: + print(query_result[0]['Title']) diff --git a/scripts/python_module_search_script.py b/scripts/python_module_search_script.py new file mode 100644 index 00000000..27f27623 --- /dev/null +++ b/scripts/python_module_search_script.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +import sys +from module_utils.sap_id_sso import sap_sso_login +from module_utils.sap_launchpad_software_center_download_runner import * + +input_search_file_list=sys.argv[1] +username = sys.argv[2] +password = sys.argv[3] + +sap_sso_login(username, password) + +input_search_file_list_python=iter(input_search_file_list.splitlines()) + +for item in input_search_file_list_python: + try: + download_link, download_filename = search_software_filename(item,'') + except Exception as e: + print(item) + continue diff --git a/tasks/download_sap_media.yml b/tasks/download_sap_media.yml new file mode 100644 index 00000000..bca0ca61 --- /dev/null +++ b/tasks/download_sap_media.yml @@ -0,0 +1,126 @@ +--- +# Task executes following actions: +# 1. Checks if community.sap_launchpad is present +# 2. Prepares environment for download +# 3. Downloads SAP media + +# Set Python version for sap_launchpad role execution +# You can replace auto-detection jinja2 directly by string value. +- name: Check availability of sap_launchpad collection on execution node + delegate_to: localhost + ansible.builtin.command: + cmd: ansible-galaxy collection list + register: collection_list_output + +- name: Inform if sap_launchpad collection is not present on execution node + ansible.builtin.debug: + msg: | + Collection community.sap_launchpad was not detected! + Ensure that host specification includes disk with SAP Software installation media. + when: + - not collection_list_output.stdout_lines | select('search', 'community.sap_launchpad') + + +- name: Block for preparation of environment for sap_launchpad + when: collection_list_output.stdout_lines | select('search', 'community.sap_launchpad') + block: + + # Ensure compatibility with python versions + - name: Detect and set facts with python version for sap_launchpad + ansible.builtin.set_fact: + sap_launchpad_python: >- + {%- if ansible_distribution.split("_")[0] == 'SLES' + and (ansible_distribution_major_version == '15' and ansible_distribution_version.split('.')[1] | int >= 5 + or ansible_distribution_major_version == '16') -%} + python311 + {%- else -%} + python3 + {%- endif -%} + + sap_launchpad_python_interpreter: >- + {%- if ansible_distribution.split("_")[0] == 'SLES' + and (ansible_distribution_major_version == '15' and ansible_distribution_version.split('.')[1] | int >= 5 + or ansible_distribution_major_version == '16') -%} + python3.11 + {%- else -%} + python3 + {%- endif -%} + + - name: Create directories if they do not exist + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + loop: + - "{{ sap_install_media_detect_source_directory }}" + + - name: Install Python and Python package manager pip + ansible.builtin.package: + name: + - "{{ sap_launchpad_python }}" + - "{{ sap_launchpad_python }}-pip" + state: present + + # Virtual environment in temporary folder is used for python steps + - name: Create temporary directory for Python Virtual Environment + ansible.builtin.tempfile: + state: directory + suffix: _sap_launchpad_venv + register: sap_launchpad_temp_venv + + - name: Install Python modules to Python Virtual Environment + ansible.builtin.pip: + name: + - wheel + - urllib3 + - requests + - beautifulsoup4 + - lxml + virtualenv: "{{ sap_launchpad_temp_venv.path }}" + virtualenv_command: "{{ sap_launchpad_python_interpreter }} -m venv" + + + - name: Execute Ansible Module with system Python to download SAP installation media + community.sap_launchpad.software_center_download: + suser_id: "{{ sap_id_user }}" + suser_password: "{{ sap_id_user_password }}" + softwarecenter_search_query: "{{ item }}" + dest: "{{ sap_install_media_detect_source_directory }}" + loop: "{{ softwarecenter_search_list }}" + loop_control: + label: "{{ item }} : {{ download_task.msg | d('') }}" + register: download_task + retries: 1 + until: download_task is not failed + vars: + ansible_python_interpreter: "{{ sap_launchpad_temp_venv.path ~ '/bin/' ~ sap_launchpad_python_interpreter }}" + + - name: Remove temporary Python Virtual Environment + ansible.builtin.file: + path: "{{ sap_launchpad_temp_venv.path }}" + state: absent + + + # Validate downloaded files and generate lists for rsync + - name: Find SAP HANA installation media + ansible.builtin.find: + paths: + - "{{ sap_install_media_detect_source_directory }}" + patterns: "{{ sap_hana_install_media_dictionary[sap_hana_product_input].software_files_wildcard_list }}" + recurse: true + register: sap_hana_install_media_files + + + - name: Prepare for file transfers, copy Private SSH Key used in Terraform deployment (temporary) + ansible.builtin.copy: + src: "{{ sap_vm_provision_terraform_work_dir_path }}/ssh/hosts_rsa" + dest: "/tmp/hosts_rsa" + mode: "0400" + when: sap_vm_provision_ssh_host_private_key_file_path is undefined + + - name: Prepare for file transfers, copy Private SSH Key from local (Ansible host) + ansible.builtin.copy: + src: "{{ sap_vm_provision_ssh_host_private_key_file_path }}" + dest: "/tmp/hosts_rsa" + mode: "0400" + when: sap_vm_provision_ssh_host_private_key_file_path is defined diff --git a/tasks/interactive_aws_ec2_vs.yml b/tasks/interactive_aws_ec2_vs.yml new file mode 100644 index 00000000..bcb6b3ca --- /dev/null +++ b/tasks/interactive_aws_ec2_vs.yml @@ -0,0 +1,222 @@ +--- +# Interactive inputs for specific platform + +# Credentials +- name: Interactive input - sap_vm_provision_aws_access_key + ansible.builtin.pause: + prompt: | + Please enter AWS Access Key. + register: sap_vm_provision_aws_access_key_register + no_log: true + when: sap_vm_provision_aws_access_key is not defined or not sap_vm_provision_aws_access_key + +- name: Interactive input - sap_vm_provision_aws_secret_access_key + ansible.builtin.pause: + prompt: | + Please enter AWS Secret Access Key. + register: sap_vm_provision_aws_secret_access_key_register + no_log: true + when: sap_vm_provision_aws_secret_access_key is not defined or not sap_vm_provision_aws_secret_access_key + + +# Infrastructure details +- name: Interactive input - sap_vm_provision_aws_vpc_availability_zone + ansible.builtin.pause: + prompt: | + Please enter AWS VPC Availability zone. Example: eu-central-1a + register: sap_vm_provision_aws_vpc_availability_zone_register + no_log: true + when: sap_vm_provision_aws_vpc_availability_zone is not defined or not sap_vm_provision_aws_vpc_availability_zone + +- name: Interactive input - sap_vm_provision_aws_region + ansible.builtin.pause: + prompt: | + Please enter AWS Region. Example: eu-central-1 + register: sap_vm_provision_aws_region_register + no_log: true + when: sap_vm_provision_aws_region is not defined or not sap_vm_provision_aws_region + +- name: Interactive input - sap_vm_provision_aws_vpc_subnet_create_boolean + ansible.builtin.pause: + prompt: | + (ansible_to_terraform) Please enter true if you want VPC subnet creation (true/false). + register: sap_vm_provision_aws_vpc_subnet_create_boolean_register + # no_log: true + when: + - sap_vm_provision_iac_type == 'ansible_to_terraform' + - sap_vm_provision_aws_vpc_subnet_create_boolean is not defined or not sap_vm_provision_aws_vpc_subnet_create_boolean + +- name: Interactive input - sap_vm_provision_aws_vpc_subnet_id + ansible.builtin.pause: + prompt: | + Please enter AWS VPC Subnet ID or new, when using ansible_to_terraform. + register: sap_vm_provision_aws_vpc_subnet_id_register + no_log: true + when: sap_vm_provision_aws_vpc_subnet_id is not defined or not sap_vm_provision_aws_vpc_subnet_id + + +- name: Interactive input - sap_vm_provision_host_specification_plan + ansible.builtin.pause: + prompt: | + Please select deployment plan defined in sap_vm_provision_aws_ec2_vs_host_specifications_dictionary. + Available values: {{ sap_vm_provision_aws_ec2_vs_host_specifications_dictionary.keys() | list }} + register: sap_vm_provision_host_specification_plan_register + failed_when: sap_vm_provision_host_specification_plan_register.user_input + not in sap_vm_provision_aws_ec2_vs_host_specifications_dictionary.keys() + when: sap_vm_provision_host_specification_plan is not defined or not sap_vm_provision_host_specification_plan + +- name: Interactive input - sap_vm_provision_aws_ec2_vs_host_os_image + ansible.builtin.pause: + prompt: | + Please select OS image defined in sap_vm_provision_aws_ec2_vs_host_os_image_dictionary. + Available values: {{ sap_vm_provision_aws_ec2_vs_host_os_image_dictionary.keys() | list }} + register: sap_vm_provision_aws_ec2_vs_host_os_image_register + failed_when: sap_vm_provision_aws_ec2_vs_host_os_image_register.user_input + not in sap_vm_provision_aws_ec2_vs_host_os_image_dictionary.keys() + when: sap_vm_provision_aws_ec2_vs_host_os_image is not defined or not sap_vm_provision_aws_ec2_vs_host_os_image + +- name: Interactive input - sap_vm_provision_aws_dns_overwrite + ansible.builtin.pause: + prompt: | + Please select true to enable overwrite of DNS (true/false). Default: false + Creation of DNS entries will fail, if name is already present. + register: sap_vm_provision_aws_dns_overwrite_register + no_log: true + when: sap_vm_provision_aws_dns_overwrite is not defined or not sap_vm_provision_aws_dns_overwrite + + + +# Bastion details +- name: Interactive input - sap_vm_provision_bastion_user + ansible.builtin.pause: + prompt: | + Please enter name of Bastion user on Bastion server. + register: sap_vm_provision_bastion_user_register + no_log: true + when: sap_vm_provision_bastion_user is not defined or not sap_vm_provision_bastion_user + +- name: Interactive input - sap_vm_provision_bastion_ssh_port + ansible.builtin.pause: + prompt: | + Please enter number of SSH port on Bastion server. + register: sap_vm_provision_bastion_ssh_port_register + no_log: true + when: sap_vm_provision_bastion_ssh_port is not defined or not sap_vm_provision_bastion_ssh_port + +- name: Interactive input - sap_vm_provision_bastion_public_ip + ansible.builtin.pause: + prompt: | + Please enter Public IP of Bastion server. + register: sap_vm_provision_bastion_public_ip_register + no_log: true + when: sap_vm_provision_bastion_public_ip is not defined or not sap_vm_provision_bastion_public_ip + +- name: Interactive input - sap_vm_provision_ssh_bastion_private_key_file_path + ansible.builtin.pause: + prompt: | + Please enter path to Bastion user private key located on execution server. + register: sap_vm_provision_ssh_bastion_private_key_file_path_register + no_log: true + when: sap_vm_provision_ssh_bastion_private_key_file_path is not defined or not sap_vm_provision_ssh_bastion_private_key_file_path + +- name: Interactive input - sap_vm_provision_ssh_host_private_key_file_path + ansible.builtin.pause: + prompt: | + Please enter path to target host user private key located on execution server. + register: sap_vm_provision_ssh_host_private_key_file_path_register + no_log: true + when: sap_vm_provision_ssh_host_private_key_file_path is not defined or not sap_vm_provision_ssh_host_private_key_file_path + +- name: Interactive input - sap_vm_provision_aws_key_pair_name_ssh_host_public_key + ansible.builtin.pause: + prompt: | + Please enter name of AWS SSH key name to be used for provisioning. + register: sap_vm_provision_aws_key_pair_name_ssh_host_public_key_register + no_log: true + when: sap_vm_provision_aws_key_pair_name_ssh_host_public_key is not defined or not sap_vm_provision_aws_key_pair_name_ssh_host_public_key + +- name: Interactive input - sap_vm_provision_aws_vpc_sg_names + ansible.builtin.pause: + prompt: | + Please enter list of AWS Security group IDs to attach to provisioned host. + register: sap_vm_provision_aws_vpc_sg_names_register + no_log: true + when: sap_vm_provision_aws_vpc_sg_names is not defined or not sap_vm_provision_aws_vpc_sg_names + +- name: Interactive input - sap_ha_pacemaker_cluster_aws_vip_update_rt + ansible.builtin.pause: + prompt: | + Please enter routing table IDs for managing Virtual IP failover as comma separated list. + register: sap_ha_pacemaker_cluster_aws_vip_update_rt_register + no_log: true + when: sap_ha_pacemaker_cluster_aws_vip_update_rt is not defined or not sap_ha_pacemaker_cluster_aws_vip_update_rt + + +- name: Interactive input - Set facts from prompts - aws_ec2_vs + ansible.builtin.set_fact: + sap_vm_provision_aws_access_key: "{{ sap_vm_provision_aws_access_key_register.user_input + if sap_vm_provision_aws_access_key_register.user_input is defined and sap_vm_provision_aws_access_key_register.user_input + else sap_vm_provision_aws_access_key }}" + sap_vm_provision_aws_secret_access_key: "{{ sap_vm_provision_aws_secret_access_key_register.user_input + if sap_vm_provision_aws_secret_access_key_register.user_input is defined and sap_vm_provision_aws_secret_access_key_register.user_input + else sap_vm_provision_aws_secret_access_key }}" + + sap_vm_provision_aws_vpc_availability_zone: "{{ sap_vm_provision_aws_vpc_availability_zone_register.user_input + if sap_vm_provision_aws_vpc_availability_zone_register.user_input is defined and sap_vm_provision_aws_vpc_availability_zone_register.user_input + else sap_vm_provision_aws_vpc_availability_zone }}" + sap_vm_provision_aws_region: "{{ sap_vm_provision_aws_region_register.user_input + if sap_vm_provision_aws_region_register.user_input is defined and sap_vm_provision_aws_region_register.user_input + else sap_vm_provision_aws_region }}" + sap_vm_provision_aws_vpc_subnet_create_boolean: "{{ sap_vm_provision_aws_vpc_subnet_create_boolean_register.user_input + if sap_vm_provision_aws_vpc_subnet_create_boolean_register.user_input is defined + else sap_vm_provision_aws_vpc_subnet_create_boolean | d('false') }}" + sap_vm_provision_aws_vpc_subnet_id: "{{ sap_vm_provision_aws_vpc_subnet_id_register.user_input + if sap_vm_provision_aws_vpc_subnet_id_register.user_input is defined and sap_vm_provision_aws_vpc_subnet_id_register.user_input + else sap_vm_provision_aws_vpc_subnet_id }}" + + sap_vm_provision_host_specification_plan: "{{ sap_vm_provision_host_specification_plan_register.user_input + if sap_vm_provision_host_specification_plan_register.user_input is defined and sap_vm_provision_host_specification_plan_register.user_input + else sap_vm_provision_host_specification_plan }}" + sap_vm_provision_aws_ec2_vs_host_os_image: "{{ sap_vm_provision_aws_ec2_vs_host_os_image_register.user_input + if sap_vm_provision_aws_ec2_vs_host_os_image_register.user_input is defined and sap_vm_provision_aws_ec2_vs_host_os_image_register.user_input + else sap_vm_provision_aws_ec2_vs_host_os_image }}" + sap_vm_provision_aws_dns_overwrite: "{{ sap_vm_provision_aws_dns_overwrite_register.user_input | bool + if sap_vm_provision_aws_dns_overwrite_register.user_input is defined and sap_vm_provision_aws_dns_overwrite_register.user_input + else sap_vm_provision_aws_dns_overwrite | d(false) }}" + + sap_vm_provision_bastion_user: "{{ sap_vm_provision_bastion_user_register.user_input + if sap_vm_provision_bastion_user_register.user_input is defined and sap_vm_provision_bastion_user_register.user_input + else sap_vm_provision_bastion_user }}" + sap_vm_provision_bastion_ssh_port: "{{ sap_vm_provision_bastion_ssh_port_register.user_input + if sap_vm_provision_bastion_ssh_port_register.user_input is defined and sap_vm_provision_bastion_ssh_port_register.user_input + else sap_vm_provision_bastion_ssh_port }}" + sap_vm_provision_bastion_public_ip: "{{ sap_vm_provision_bastion_public_ip_register.user_input + if sap_vm_provision_bastion_public_ip_register.user_input is defined and sap_vm_provision_bastion_public_ip_register.user_input + else sap_vm_provision_bastion_public_ip }}" + sap_vm_provision_ssh_bastion_private_key_file_path: "{{ sap_vm_provision_ssh_bastion_private_key_file_path_register.user_input + if sap_vm_provision_ssh_bastion_private_key_file_path_register.user_input is defined and sap_vm_provision_ssh_bastion_private_key_file_path_register.user_input + else sap_vm_provision_ssh_bastion_private_key_file_path }}" + sap_vm_provision_ssh_host_private_key_file_path: "{{ sap_vm_provision_ssh_host_private_key_file_path_register.user_input + if sap_vm_provision_ssh_host_private_key_file_path_register.user_input is defined and sap_vm_provision_ssh_host_private_key_file_path_register.user_input + else sap_vm_provision_ssh_host_private_key_file_path }}" + sap_vm_provision_aws_key_pair_name_ssh_host_public_key: "{{ sap_vm_provision_aws_key_pair_name_ssh_host_public_key_register.user_input + if sap_vm_provision_aws_key_pair_name_ssh_host_public_key_register.user_input is defined and sap_vm_provision_aws_key_pair_name_ssh_host_public_key_register.user_input + else sap_vm_provision_aws_key_pair_name_ssh_host_public_key }}" + sap_vm_provision_aws_vpc_sg_names: "{{ sap_vm_provision_aws_vpc_sg_names_register.user_input + if sap_vm_provision_aws_vpc_sg_names_register.user_input is defined and sap_vm_provision_aws_vpc_sg_names_register.user_input + else sap_vm_provision_aws_vpc_sg_names }}" + +- name: Interactive input - Set facts from prompts - aws_ec2_vs sap_ha_pacemaker_cluster variables + ansible.builtin.set_fact: + sap_ha_pacemaker_cluster_aws_vip_update_rt: "{{ sap_vm_provision_aws_secret_access_key + if sap_ha_pacemaker_cluster_aws_vip_update_rt_register is defined or sap_ha_pacemaker_cluster_aws_vip_update_rt_register + else sap_ha_pacemaker_cluster_aws_vip_update_rt }}" + sap_ha_pacemaker_cluster_aws_region: "{{ sap_vm_provision_aws_vpc_availability_zone[:-1] + if sap_ha_pacemaker_cluster_aws_region is not defined or not sap_ha_pacemaker_cluster_aws_region + else sap_ha_pacemaker_cluster_aws_region }}" + sap_ha_pacemaker_cluster_aws_access_key_id: "{{ sap_vm_provision_aws_access_key + if sap_ha_pacemaker_cluster_aws_access_key_id is not defined or not sap_ha_pacemaker_cluster_aws_access_key_id + else sap_ha_pacemaker_cluster_aws_access_key_id }}" + sap_ha_pacemaker_cluster_aws_secret_access_key: "{{ sap_vm_provision_aws_secret_access_key + if sap_ha_pacemaker_cluster_aws_secret_access_key is not defined or not sap_ha_pacemaker_cluster_aws_secret_access_key + else sap_ha_pacemaker_cluster_aws_secret_access_key }}" diff --git a/tasks/interactive_hana.yml b/tasks/interactive_hana.yml new file mode 100644 index 00000000..d96d1af2 --- /dev/null +++ b/tasks/interactive_hana.yml @@ -0,0 +1,156 @@ +--- +# Interactive inputs for HANA + +# Mandatory inputs +- name: Interactive input - sap_hana_product_input + ansible.builtin.pause: + prompt: | + Please select HANA product from list: {{ sap_hana_install_media_dictionary.keys() }} + Products are defined in sap_hana_install_media_dictionary + register: sap_hana_product_input_register + failed_when: sap_hana_product_input_register.user_input not in sap_hana_install_media_dictionary.keys() + when: sap_hana_product_input is not defined or not sap_hana_product_input + +- name: Interactive input - sap_hana_install_use_master_password + ansible.builtin.pause: + prompt: "Please select if SAP HANA master password should be used for all passwords (y/n). Default: y" + register: sap_hana_install_use_master_password_register + no_log: true + when: sap_hana_install_use_master_password is not defined + +- name: Interactive input - sap_hana_install_master_password + ansible.builtin.pause: + prompt: "Please enter master password of SAP HANA." + register: sap_hana_install_master_password_register + no_log: true + when: sap_hana_install_master_password is not defined or not sap_hana_install_master_password + +- name: Interactive input - sap_system_hana_db_sid + ansible.builtin.pause: + prompt: "Please enter System ID (SID) of SAP HANA." + register: sap_system_hana_db_sid_register + no_log: true + when: sap_system_hana_db_sid is not defined + +- name: Interactive input - sap_system_hana_db_instance_nr + ansible.builtin.pause: + prompt: "Please enter Instance number of SAP HANA." + register: sap_system_hana_db_instance_nr_register + no_log: true + when: sap_system_hana_db_instance_nr is not defined + + +- name: Interactive input - Set facts from prompts + ansible.builtin.set_fact: + sap_hana_product_input: "{{ sap_hana_product_input_register.user_input + if sap_hana_product_input_register.user_input is defined and sap_hana_product_input_register.user_input + else sap_hana_product_input }}" + sap_hana_install_use_master_password: "{{ sap_hana_install_use_master_password_register.user_input + if sap_hana_install_use_master_password_register.user_input is defined and sap_hana_install_use_master_password_register.user_input + else sap_hana_install_use_master_password | d('y')}}" + sap_hana_install_master_password: "{{ sap_hana_install_master_password_register.user_input + if sap_hana_install_master_password_register.user_input is defined and sap_hana_install_master_password_register.user_input + else sap_hana_install_master_password }}" + + # Assignment of playbook wide variables + sap_system_hana_db_sid: "{{ sap_system_hana_db_sid_register.user_input + if sap_system_hana_db_sid_register.user_input is defined + else sap_system_hana_db_sid }}" + sap_system_hana_db_instance_nr: "{{ sap_system_hana_db_instance_nr_register.user_input + if sap_system_hana_db_instance_nr_register.user_input is defined + else sap_system_hana_db_instance_nr }}" + + +# Optional inputs +- name: Interactive input - Optional inputs + ansible.builtin.pause: + prompt: "Please enter yes if you would like to enter optional inputs. (yes/no). Default: no" + register: __optional_inputs_hana + no_log: true + +- name: Block for optional interactive inputs + when: __optional_inputs_hana.user_input== 'yes' + block: + - name: Interactive input - sap_hana_install_log_mode + ansible.builtin.pause: + prompt: "Please enter Log mode of SAP HANA from list: normal, overwrite. Default: normal" + register: sap_hana_install_log_mode_register + failed_when: sap_hana_install_log_mode_register.user_input not in ['normal', 'overwrite'] + when: sap_hana_install_log_mode is not defined or not sap_hana_install_log_mode + + - name: Interactive input - sap_hana_install_update_etchosts + ansible.builtin.pause: + prompt: "(Optional) Please select if /etc/hosts should be updated (true/false). Default: false" + register: sap_hana_install_update_etchosts_register + failed_when: sap_hana_install_update_etchosts_register.user_input not in ['true', 'false'] + when: sap_hana_install_update_etchosts is not defined + + - name: Interactive input - sap_hana_install_components + ansible.builtin.pause: + prompt: "(Optional) Please enter comma separated list of components to install. Default: all" + register: sap_hana_install_components_register + no_log: true + when: sap_hana_install_components is not defined or not sap_hana_install_components + + - name: Interactive input - sap_hana_install_userid + ansible.builtin.pause: + prompt: "(Optional) Please enter user ID of unix user." + register: sap_hana_install_userid_register + no_log: true + when: sap_hana_install_userid is not defined or not sap_hana_install_userid + + - name: Interactive input - sap_hana_install_groupid + ansible.builtin.pause: + prompt: "(Optional) Please enter group ID of unix user." + register: sap_hana_install_groupid_register + no_log: true + when: sap_hana_install_groupid is not defined or not sap_hana_install_groupid + + - name: Interactive input - sap_hana_install_system_usage + ansible.builtin.pause: + prompt: "(Optional) Please enter hdblcm parameter system_usage. Default: custom" + register: sap_hana_install_system_usage_register + no_log: true + when: sap_hana_install_system_usage is not defined or not sap_hana_install_system_usage + + - name: Interactive input - sap_hana_install_restrict_max_mem + ansible.builtin.pause: + prompt: "(Optional) Please enter hdblcm parameter restrict_max_mem (y/n). Default: n" + register: sap_hana_install_restrict_max_mem_register + failed_when: sap_hana_install_restrict_max_mem_register.user_input not in ['y', 'n'] + when: sap_hana_install_restrict_max_mem is not defined + + - name: Interactive input - sap_hana_install_max_mem + ansible.builtin.pause: + prompt: "(Optional) Please enter hdblcm parameter max_mem in MB. Required when restrict_max_mem is y" + register: sap_hana_install_max_mem_register + no_log: true + when: sap_hana_install_max_mem is not defined + + - name: Interactive input - sap_hana_install_system_restart + ansible.builtin.pause: + prompt: "(Optional) Please select if role should start SAP HANA after each system boot (y/n). Default: n" + register: sap_hana_install_system_restart_register + failed_when: sap_hana_install_system_restart_register.user_input not in ['y', 'n'] + when: sap_hana_install_system_restart is not defined + + - name: Interactive input - sap_hana_install_hdblcm_extraargs + ansible.builtin.pause: + prompt: "(Optional) Please enter list of extra arguments to hdblcm cli, e.g. --ignore=[,]..." + register: sap_hana_install_hdblcm_extraargs_register + no_log: true + when: sap_hana_install_hdblcm_extraargs is not defined or not sap_hana_install_hdblcm_extraargs + + + - name: Interactive input - Set facts from prompts + ansible.builtin.set_fact: + sap_hana_install_log_mode: "{{ sap_hana_install_log_mode_register.user_input }}" + sap_hana_install_update_etchosts: "{{ sap_hana_install_update_etchosts_register.user_input | bool }}" + sap_hana_install_components: "{{ sap_hana_install_components_register.user_input }}" + sap_hana_install_userid: "{{ sap_hana_install_userid_register.user_input }}" + sap_hana_install_groupid: "{{ sap_hana_install_groupid_register.user_input }}" + sap_hana_install_system_usage: "{{ sap_hana_install_system_usage_register.user_input }}" + sap_hana_install_restrict_max_mem: "{{ sap_hana_install_restrict_max_mem_register.user_input }}" + sap_hana_install_max_mem: "{{ sap_hana_install_max_mem_register.user_input }}" + sap_hana_install_system_restart: "{{ sap_hana_install_system_restart_register.user_input }}" + sap_hana_install_hdblcm_extraargs: "{{ sap_hana_install_hdblcm_extraargs_register.user_input }}" diff --git a/tasks/interactive_hana_ha.yml b/tasks/interactive_hana_ha.yml new file mode 100644 index 00000000..38d8c1a2 --- /dev/null +++ b/tasks/interactive_hana_ha.yml @@ -0,0 +1,30 @@ +--- +# Interactive inputs for HANA HA + +- name: Interactive input - Gather inputs for type hana + ansible.builtin.include_tasks: + file: "../../tasks/interactive_hana.yml" + +# Mandatory inputs +- name: Interactive input - sap_vm_provision_ha_vip_hana_primary + ansible.builtin.pause: + prompt: | + Please enter Virtual IP for HANA Primary server. Platform specific recommendations: + AWS: the VIP must be **outside** of any VPC Subnet ranges (e.g. 192.168.100.102/32) + GCP: the VIP must be within the VPC Subnetwork range attached to GCP Backend Service for the Internal passthrough Network Load Balancer (e.g. 10.10.10.10/32) + IBM Cloud: the VIP is within the VPC Subnet range and is statically defined by the IBM Cloud Load Balancer [NLB L4 or ALB L7], variable should be commented out + IBM Cloud, Power VS: the VIP must be within the IBM Power Infrastructure VLAN Subnet range (e.g. 192.168.4.4/26) + MS Azure: the VIP must be within the VNet Subnet range attached to the Azure Load Balancer [NLB L4] (e.g. 10.10.10.10/22) + IBM PowerVM: the VIP must be within the VLAN Subnet range + OVirt KVM: the VIP must be within the VLAN Subnet range + KubeVirt: the VIP must be within the VLAN Subnet range + register: sap_vm_provision_ha_vip_hana_primary_register + no_log: true + when: sap_vm_provision_ha_vip_hana_primary is not defined or not sap_vm_provision_ha_vip_hana_primary + + +- name: Interactive input - Set facts from prompts - sap_hana_ha + ansible.builtin.set_fact: + sap_vm_provision_ha_vip_hana_primary: "{{ sap_vm_provision_ha_vip_hana_primary_register.user_input + if sap_vm_provision_ha_vip_hana_primary_register.user_input is defined and sap_vm_provision_ha_vip_hana_primary_register.user_input + else sap_vm_provision_ha_vip_hana_primary }}" diff --git a/tasks/interactive_inputs.yml b/tasks/interactive_inputs.yml new file mode 100644 index 00000000..3544fcf6 --- /dev/null +++ b/tasks/interactive_inputs.yml @@ -0,0 +1,100 @@ +--- +# Interactive inputs for platform selection +- name: Interactive input - sap_vm_provision_iac_type + ansible.builtin.pause: + prompt: | + Please choose Infrastructure-as-Code automation from list: ansible , ansible_to_terraform + (for existing_hosts, use Ansible standard execution with an Ansible Extravars file) + register: sap_vm_provision_iac_type_register + when: sap_vm_provision_iac_type is not defined or not sap_vm_provision_iac_type + +- name: Interactive input - sap_vm_provision_iac_platform + ansible.builtin.pause: + prompt: | + Please choose Infrastructure Platform from list: + aws_ec2_vs , gcp_ce_vm , ibmcloud_powervs , ibmcloud_vs , ibmpowervm_vm , kubevirt_vm , msazure_vm , ovirt_vm + register: sap_vm_provision_iac_platform_register + when: sap_vm_provision_iac_platform is not defined or not sap_vm_provision_iac_platform + +- name: Interactive input - Set facts from initial prompts + ansible.builtin.set_fact: + sap_vm_provision_iac_type: "{{ sap_vm_provision_iac_type_register.user_input + if sap_vm_provision_iac_type_register.user_input is defined and sap_vm_provision_iac_type_register.user_input + else sap_vm_provision_iac_type }}" + sap_vm_provision_iac_platform: "{{ sap_vm_provision_iac_platform_register.user_input + if sap_vm_provision_iac_platform_register.user_input is defined and sap_vm_provision_iac_platform_register.user_input + else sap_vm_provision_iac_platform }}" + + +# Interactive inputs for SAP type +- name: Check that provided {{ interactive_input_type }} has task file + ansible.builtin.stat: + path: "../../tasks/interactive_{{ interactive_input_type }}.yml" + register: __input_type_task_file + ignore_errors: true + +- name: Interactive input - Gather inputs for type {{ interactive_input_type }} + ansible.builtin.include_tasks: + file: "../../tasks/interactive_{{ interactive_input_type }}.yml" + when: __input_type_task_file.stat.exists + + +# Interactive inputs for specific platform +- name: Check that provided {{ sap_vm_provision_iac_platform }} has task file + ansible.builtin.stat: + path: "../../tasks/interactive_{{ sap_vm_provision_iac_platform }}.yml" + register: __iac_platform_task_file + ignore_errors: true + +- name: Interactive input - Trigger prompts for VM provisioning via {{ sap_vm_provision_iac_platform }} + ansible.builtin.include_tasks: + file: "../../tasks/interactive_{{ sap_vm_provision_iac_platform }}.yml" + when: __iac_platform_task_file.stat.exists + + +# Interactive inputs for all scenarios + +- name: Interactive input - sap_vm_provision_dns_root_domain + ansible.builtin.pause: + prompt: "Please enter DNS domain for fully qualified domain name (FQDN)" + register: sap_vm_provision_dns_root_domain_register + no_log: true + when: sap_vm_provision_dns_root_domain is not defined or not sap_vm_provision_dns_root_domain + + +- name: Interactive input - sap_install_media_detect_source_directory + ansible.builtin.pause: + prompt: "Please enter location of SAP installation media. Default: /software" + register: sap_install_media_detect_source_directory_register + no_log: true + when: sap_install_media_detect_source_directory is not defined or not sap_install_media_detect_source_directory + +- name: Interactive input - sap_id_user + ansible.builtin.pause: + prompt: "Please enter SAP S-User ID for downloading SAP installation media using sap_launchpad." + register: sap_id_user_register + no_log: true + when: sap_id_user is not defined or not sap_id_user + +- name: Interactive input - sap_id_user_password + ansible.builtin.pause: + prompt: "Please enter SAP S-User Password for downloading SAP installation media using sap_launchpad." + register: sap_id_user_password_register + no_log: true + when: sap_id_user_password is not defined or not sap_id_user_password + + +- name: Interactive input - Set facts from prompts + ansible.builtin.set_fact: + sap_vm_provision_dns_root_domain: "{{ sap_vm_provision_dns_root_domain_register.user_input + if sap_vm_provision_dns_root_domain_register.user_input is defined and sap_vm_provision_dns_root_domain_register.user_input + else sap_vm_provision_dns_root_domain }}" + sap_install_media_detect_source_directory: "{{ sap_install_media_detect_source_directory_register.user_input + if sap_install_media_detect_source_directory_register.user_input is defined and sap_install_media_detect_source_directory_register.user_input + else sap_install_media_detect_source_directory | d('/software') }}" + sap_id_user: "{{ sap_id_user_register.user_input + if sap_id_user_register.user_input is defined and sap_id_user_register.user_input + else sap_id_user }}" + sap_id_user_password: "{{ sap_id_user_password_register.user_input + if sap_id_user_password_register.user_input is defined and sap_id_user_password_register.user_input + else sap_id_user_password }}" diff --git a/vars/platform_noninteractive_vars.yml b/vars/platform_noninteractive_vars.yml new file mode 100644 index 00000000..338e6b38 --- /dev/null +++ b/vars/platform_noninteractive_vars.yml @@ -0,0 +1,254 @@ +--- +# Shared platform variables for non-interactive execution + +#### Shared variables across platforms #### +sap_vm_provision_bastion_user: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_bastion_ssh_port: "ENTER_STRING_VALUE_HERE" + +## Shared variables required for sap_vm_provision_iac_type=ansible +sap_vm_provision_bastion_public_ip: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ssh_bastion_private_key_file_path: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ssh_host_private_key_file_path: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ssh_host_public_key_file_path: "ENTER_STRING_VALUE_HERE" + + + +#### AWS #### +sap_vm_provision_aws_access_key: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_aws_secret_access_key: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_aws_region: "{{ sap_vm_provision_aws_vpc_availability_zone[:-1] }}" +sap_vm_provision_aws_vpc_availability_zone: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_aws_vpc_subnet_create_boolean: + "{{ true | default(false) if aws_vpc_subnet_id == 'new' else false }}" +sap_vm_provision_aws_vpc_subnet_id: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" +sap_vm_provision_aws_ec2_vs_host_os_image: "ENTER_STRING_VALUE_HERE" +# sap_vm_provision_bastion_user - Need to be defined in Shared section above +# sap_vm_provision_bastion_ssh_port - Need to be defined in Shared section above + +## AWS - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_bastion_public_ip - Need to be defined in Shared section above +# sap_vm_provision_ssh_bastion_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +sap_vm_provision_aws_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_aws_vpc_sg_names: "ENTER_STRING_VALUE_HERE" + + +#### Google Cloud #### +sap_vm_provision_gcp_credentials_json: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_gcp_project: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_gcp_region: "{{ sap_vm_provision_gcp_region_zone[:-2] }}" +sap_vm_provision_gcp_region_zone: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_gcp_vpc_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_gcp_vpc_subnet_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_gcp_ce_vm_host_os_image: "ENTER_STRING_VALUE_HERE" +# sap_vm_provision_bastion_user - Need to be defined in Shared section above +# sap_vm_provision_bastion_ssh_port - Need to be defined in Shared section above + +## Google Cloud - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_bastion_public_ip - Need to be defined in Shared section above +# sap_vm_provision_ssh_bastion_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_public_key_file_path - Need to be defined in Shared section above + + +#### IBM Cloud #### +sap_vm_provision_ibmcloud_api_key: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmcloud_resource_group_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" +sap_vm_provision_ibmcloud_region: + "{{ sap_vm_provision_ibmcloud_availability_zone | regex_replace('-[0-9]', '') }}" +sap_vm_provision_ibmcloud_availability_zone: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmcloud_private_dns_instance_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmcloud_vpc_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" +sap_vm_provision_ibmcloud_vpc_subnet_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" +sap_vm_provision_ibmcloud_vs_host_os_image: "ENTER_STRING_VALUE_HERE" +# sap_vm_provision_bastion_user - Need to be defined in Shared section above +# sap_vm_provision_bastion_ssh_port - Need to be defined in Shared section above + +## IBM Cloud - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_bastion_public_ip - Need to be defined in Shared section above +# sap_vm_provision_ssh_bastion_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +sap_vm_provision_ibmcloud_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmcloud_vpc_sg_names: "ENTER_STRING_VALUE_HERE,ENTER_STRING_VALUE_HERE" # comma-separated, if ansible_to_terraform then ignore this variable +# sap_vm_provision_ibmcloud_private_dns_resource_group_name: "" # optional, default use of sap_vm_provision_ibmcloud_resource_group_name + + +#### IBM Cloud, IBM Power Virtual Servers #### +# sap_vm_provision_ibmcloud_api_key - Need to be defined in IBM Cloud section above +# sap_vm_provision_ibmcloud_resource_group_name - Need to be defined in IBM Cloud section above +# sap_vm_provision_ibmcloud_private_dns_instance_name - Need to be defined in IBM Cloud section above +# sap_vm_provision_ibmcloud_vpc_subnet_name - Need to be defined in IBM Cloud section above +sap_vm_provision_ibmcloud_powervs_location: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmcloud_powervs_workspace_name: "ENTER_STRING_VALUE_HERE" # not required when ansible_to_terraform +sap_vm_provision_ibmcloud_powervs_vlan_subnet_name: "ENTER_STRING_VALUE_HERE" # not required when ansible_to_terraform +sap_vm_provision_ibmcloud_powervs_host_os_image: "ENTER_STRING_VALUE_HERE" +# sap_vm_provision_bastion_user - Need to be defined in Shared section above +# sap_vm_provision_bastion_ssh_port - Need to be defined in Shared section above + +## IBM Cloud, IBM Power Virtual Servers - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_bastion_public_ip - Need to be defined in Shared section above +# sap_vm_provision_ssh_bastion_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +sap_vm_provision_ibmcloud_powervs_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmcloud_private_dns_custom_resolver_ip: "ENTER_STRING_VALUE_HERE" +# sap_vm_provision_ibmcloud_private_dns_resource_group_name: "" # optional, default use of sap_vm_provision_ibmcloud_resource_group_name +sap_vm_provision_proxy_web_forward_proxy_ip: "ENTER_STRING_VALUE_HERE" # IP:Port only, no http:// prefix +sap_vm_provision_proxy_web_forward_exclusions: "localhost,127.0.0.1,{{ sap_vm_provision_dns_root_domain }}" + + +#### MS Azure #### +sap_vm_provision_msazure_subscription_id: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_msazure_tenant_id: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_msazure_app_client_id: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_msazure_app_client_secret: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_msazure_resource_group_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" +sap_vm_provision_msazure_location_region: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_msazure_location_availability_zone_no: 1 +sap_vm_provision_msazure_vnet_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" +sap_vm_provision_msazure_vnet_subnet_name: "ENTER_STRING_VALUE_HERE" # if ansible_to_terraform, use "new" +sap_vm_provision_msazure_vm_host_os_image: "ENTER_STRING_VALUE_HERE" +# sap_vm_provision_bastion_user - Need to be defined in Shared section above +# sap_vm_provision_bastion_ssh_port - Need to be defined in Shared section above + +## MS Azure - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_bastion_public_ip - Need to be defined in Shared section above +# sap_vm_provision_ssh_bastion_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +sap_vm_provision_msazure_key_pair_name_ssh_host_public_key: "" +# sap_vm_provision_msazure_private_dns_resource_group_name: "" # optional, default use of sap_vm_provision_msazure_resource_group_name + + +#### IBM PowerVM #### +sap_vm_provision_ibmpowervm_vc_auth_endpoint: "ENTER_STRING_VALUE_HERE" # e.g https://POWERVC_HOST:5000/v3/ +sap_vm_provision_ibmpowervm_vc_user: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmpowervm_vc_user_password: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmpowervm_vc_project_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmpowervm_host_group_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmpowervm_host_group_shared_procesor_pool_name: "ENTER_STRING_VALUE_HERE" # e.g. DefaultPool +sap_vm_provision_ibmpowervm_network_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ibmpowervm_network_vnic_type: "normal" # 'direct' == SR-IOV, 'normal' == Shared Ethernet Adapter (SEA) +sap_vm_provision_ibmpowervm_storage_template_name: "ENTER_STRING_VALUE_HERE" # aka. Openstack Cinder Volume Type +# IBM PowerVM Virtual Machine OS Image (see IBM PowerVC Web GUI for list) +sap_vm_provision_ibmpowervm_vm_host_os_image: "ENTER_STRING_VALUE_HERE" + +## IBM PowerVM - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_public_key_file_path - Need to be defined in Shared section above +sap_vm_provision_ibmpowervm_key_pair_name_ssh_host_public_key: "ENTER_STRING_VALUE_HERE" + + +#### OVirt #### +sap_vm_provision_ovirt_engine_insecure_bool: true +sap_vm_provision_ovirt_engine_url: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ovirt_engine_fqdn: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ovirt_engine_user: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ovirt_engine_password: "ENTER_STRING_VALUE_HERE" +#sap_vm_provision_ovirt_engine_cafile: "ENTER_STRING_VALUE_HERE" + +sap_vm_provision_ovirt_hypervisor_cluster_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ovirt_hypervisor_cluster_host_node_name: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_ovirt_hypervisor_cluster_storage_domain_name: "ENTER_STRING_VALUE_HERE" + +sap_vm_provision_ovirt_vm_boot_menu: false +sap_vm_provision_ovirt_vm_clone_independent: false +sap_vm_provision_ovirt_vm_disk_type: "raw" # default is 'cow' = thin provisioning +sap_vm_provision_ovirt_vm_timezone: "Etc/GMT" +#sap_vm_provision_ovirt_vm_operating_system: "other_linux" + +# OVirt VM option 1 - create from VM Template Name +sap_vm_provision_ovirt_vm_template_name: "ENTER_STRING_VALUE_HERE" + +# OVirt VM option 2 - create from RHEL Kickstart definition +# sap_vm_provision_ovirt_vm_kickstart_definition: +# os_image_iso: RHEL-9.2.0-x86_64-dvd.iso +# # pxeboot path on the hypervisor node(s) +# initrd_path: /software/pxeboot/rhel-9.2/initrd.img +# kernel_path: /software/pxeboot/rhel-9.2/vmlinuz +# # see RHEL release documentations for kickstart installation kernel parameters +# kernel_params: "inst.ks=http://{{ sap_vm_provision_ovirt_kickstart_host }}/kickstart/{{ sap_vm_provision_ovirt_kickstart_config_file_name }} ip={{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_ip }}::{{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_gw }}:{{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_netmask }}:{{ inventory_hostname }}:{{ sap_vm_provision_ovirt_vm_host_specifications_dictionary[sap_vm_provision_host_specification_plan][inventory_hostname_short].ovirt_vm_interface }}:none inst.nompath ipv6.disable=1 inst.repo=cdrom kpti=0" +# boot_disk: +# activate: true +# bootable: true +# interface: "virtio_scsi" +# size: "25GiB" +# format: "cow" + +# OVirt VM - vNIC definitions when not using DHCP +#sap_vm_provision_ovirt_vm_nics: +# - interface: virtio +# name: nic1 +# profile_name: vm_nic_profile_name + +# OVirt VM - cloud-init +#sap_vm_provision_ovirt_vm_cloud_init: +# authorized_ssh_keys: "{{ lookup('file', ( sap_vm_provision_ssh_host_public_key_file_path | default(sap_vm_provision_ssh_host_private_key_file_path + '.pub') ) ) }}" +# regenerate_ssh_keys: false +# host_name: "{{ host_node }}" # Must use short name for SAP Systems, not FQDN +# custom_script: | # Cloud-init script which will be executed on Virtual Machine when deployed. This is appended to the end of the cloud-init script generated by any other options. +# write_files: +# - content: | +# Hello, world! +# path: /tmp/greeting.txt +# permissions: '0644' + +## Ovirt - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_public_key_file_path - Need to be defined in Shared section above + + +#### KubeVirt - EXPERIMENTAL #### +sap_vm_provision_kubevirt_cluster_url: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_kubevirt_api_key: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_kubevirt_target_namespace: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_kubevirt_vm_host_os_image_url: "ENTER_STRING_VALUE_HERE" # "docker://registry.redhat.io/rhel8/rhel-guest-image:8.6.0" +# Optional, create OS User and Password. Otherwise only 'root' will exist using the SSH Key +sap_vm_provision_kubevirt_os_user: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_kubevirt_os_user_password: "ENTER_STRING_VALUE_HERE" + +## KubeVirt - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_public_key_file_path - Need to be defined in Shared section above + + +#### VMware #### +sap_vm_provision_vmware_vcenter_hostname: "" +sap_vm_provision_vmware_vcenter_validate_certs_bool: false +sap_vm_provision_vmware_vcenter_user: "" +sap_vm_provision_vmware_vcenter_password: "" +sap_vm_provision_vmware_vm_folder_name: "" +sap_vm_provision_vmware_vm_cluster_name: "" +sap_vm_provision_vmware_vm_cluster_host_name: "" +sap_vm_provision_vmware_vm_cluster_datastore_name: "" +sap_vm_provision_vmware_vm_content_library_name: "" +sap_vm_provision_vmware_vm_template_name: "" + +## VMware - Variables required for sap_vm_provision_iac_type=ansible +# sap_vm_provision_ssh_host_private_key_file_path - Need to be defined in Shared section above +# sap_vm_provision_ssh_host_public_key_file_path - Need to be defined in Shared section above + + +#### Infrastructure Provisioning selection - minimal landing zone and hosts via Terraform #### +# Variables required for sap_vm_provision_iac_type=ansible_to_terraform +sap_vm_provision_terraform_state: "ENTER_STRING_VALUE_HERE" # present, absent +sap_vm_provision_resource_prefix: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_bastion_os_image: "ENTER_STRING_VALUE_HERE" +sap_vm_provision_terraform_work_dir_path: "/tmp/tf1" + + +#### Infrastructure Provisioning selection - additional configuration when provisioning On-Premise hosts #### +# Only for use when 'ibmpowervm', 'ovirt_vm' is value provided for variable sap_vm_provision_iac_platform +# Only for use when environment does not contain an SNAT for Outbound Internet activity +# sap_vm_provision_proxy_web_forward_proxy_ip: "ENTER_STRING_VALUE_HERE" # IP:Port only, no http:// prefix +# sap_vm_provision_proxy_web_forward_exclusions: "localhost,127.0.0.1,{{ sap_vm_provision_dns_root_domain }},{{ sap_ha_pacemaker_cluster_ibmpower_vm_hmc_host }},{{ ibmpower_vc_auth_endpoint.rpartition('//')[-1].partition('/')[0].partition(':')[0] }}" + +# OS Package Repo Mirror - CA file downloaded from RHT Satellite / SUSE RMT for injection to host +sap_vm_provision_os_registration_ca_file_path: "ENTER_STRING_VALUE_HERE" + +# OS Package Repo Mirror - RHEL command example: curl -sS 'https://RHT_SATELLITE_SERVER/register?activation_keys=&location_id=&organization_id=&setup_insights=false&setup_remote_execution=false&update_packages=false' -H 'Authorization: Bearer XXXX' | bash +# OS Package Repo Mirror - SLES command example: curl http://SUSE_RMT_SERVER/tools/rmt-client-setup | bash 'https://SUSE_RMT_SERVER/' --yes +sap_vm_provision_os_registration_script_command: "ENTER_STRING_VALUE_HERE" + +# OS Package Repo Direct - Cannot be used in conjunction with OS Package Repository Mirrors +#sap_vm_provision_os_online_registration_user: "ENTER_STRING_VALUE_HERE" +#sap_vm_provision_os_online_registration_passcode: "ENTER_STRING_VALUE_HERE" + diff --git a/vars/platform_vars.yml b/vars/platform_vars.yml new file mode 100644 index 00000000..2820a5fc --- /dev/null +++ b/vars/platform_vars.yml @@ -0,0 +1,356 @@ +--- +# Shared platform variables + +# AWS +sap_vm_provision_aws_ec2_vs_host_os_image_dictionary: + rhel-8-1: "*RHEL-8.1*_HVM*x86_64*" + # rhel-8-2: "*RHEL-8.2*_HVM*x86_64*" # removed + rhel-8-4: "*RHEL-8.4*_HVM*x86_64*" + rhel-8-6: "*RHEL-8.6*_HVM*x86_64*" + rhel-8-8: "*RHEL-8.8*_HVM*x86_64*" + rhel-8-10: "*RHEL-8.10*_HVM*x86_64*" + rhel-9-0: "*RHEL-9.0*_HVM*x86_64*" + rhel-9-1: "*RHEL-9.1*_HVM*x86_64*" + rhel-9-2: "*RHEL-9.2*_HVM*x86_64*" + rhel-9-3: "*RHEL-9.3*_HVM*x86_64*" + rhel-9-4: "*RHEL-9.4*_HVM*x86_64*" + sles-12-5: "*suse-sles-12-sp5-v202*-hvm-ssd-x86_64*" + # sles-15-2: "*suse-sles-15-sp2-v202*-hvm-ssd-x86_64*" # removed + # sles-15-3: "*suse-sles-15-sp3-v202*-hvm-ssd-x86_64*" # removed + # sles-15-4: "*suse-sles-15-sp4-v202*-hvm-ssd-x86_64*" # removed + sles-15-5: "*suse-sles-15-sp5-v202*-hvm-ssd-x86_64*" + sles-15-6: "*suse-sles-15-sp6-v202*-hvm-ssd-x86_64*" + # rhel-7-7-sap-ha: "*RHEL-SAP-8.1.0*" # removed + # rhel-7-9-sap-ha: "*RHEL-SAP-8.1.0*" # removed + rhel-8-1-sap-ha: "*RHEL-SAP-8.1.0*" + rhel-8-2-sap-ha: "*RHEL-SAP-8.2.0*" + rhel-8-4-sap-ha: "*RHEL-SAP-8.4.0*" + rhel-8-6-sap-ha: "*RHEL-SAP-8.6.0*" + rhel-8-8-sap-ha: "*RHEL-SAP-8.8.0*" + rhel-8-10-sap-ha: "*RHEL-SAP-8.10.0*" + rhel-9-0-sap-ha: "*RHEL-SAP-9.0.0*" + rhel-9-2-sap-ha: "*RHEL-SAP-9.2.0*" + rhel-9-4-sap-ha: "*RHEL-SAP-9.4.0*" + sles-12-5-sap-ha: "*suse-sles-sap-12-sp5-v202*-hvm-ssd-x86_64*" + sles-15-1-sap-ha: "*suse-sles-sap-15-sp1-v202*-hvm-ssd-x86_64*" + sles-15-2-sap-ha: "*suse-sles-sap-15-sp2-v202*-hvm-ssd-x86_64*" + sles-15-3-sap-ha: "*suse-sles-sap-15-sp3-v202*-hvm-ssd-x86_64*" + sles-15-4-sap-ha: "*suse-sles-sap-15-sp4-v202*-hvm-ssd-x86_64*" + sles-15-5-sap-ha: "*suse-sles-sap-15-sp5-v202*-hvm-ssd-x86_64*" + sles-15-6-sap-ha: "*suse-sles-sap-15-sp6-v202*-hvm-ssd-x86_64*" + sles-15-4-sap-ha-byos: "*suse-sles-sap-15-sp4-byos-v202*-hvm-ssd-x86_64*" + sles-15-5-sap-ha-byos: "*suse-sles-sap-15-sp5-byos-v202*-hvm-ssd-x86_64*" + sles-15-6-sap-ha-byos: "*suse-sles-sap-15-sp6-byos-v202*-hvm-ssd-x86_64*" + + +# Google Cloud +sap_vm_provision_gcp_ce_vm_host_os_image_dictionary: + rhel-8-latest: + project: "rhel-cloud" + family: "rhel-8" + rhel-9-latest: + project: "rhel-cloud" + family: "rhel-9" + sles-12-latest: + project: "suse-cloud" + family: "sles-12" + sles-15-latest: + project: "suse-cloud" + family: "sles-15" + # rhel-7-7-sap-ha: # removed + # project: "rhel-sap-cloud" + # family: "rhel-7-7-sap-ha" + rhel-7-9-sap-ha: + project: "rhel-sap-cloud" + family: "rhel-7-9-sap-ha" + # rhel-8-1-sap-ha: # removed + # project: "rhel-sap-cloud" + # family: "rhel-8-1-sap-ha" + rhel-8-2-sap-ha: + project: "rhel-sap-cloud" + family: "rhel-8-2-sap-ha" + rhel-8-4-sap-ha: + project: "rhel-sap-cloud" + family: "rhel-8-4-sap-ha" + rhel-8-6-sap-ha: + project: "rhel-sap-cloud" + family: "rhel-8-6-sap-ha" + sles-12-5-sap-ha: + project: "suse-sap-cloud" + family: "sles-12-sp5-sap" + # sles-15-1-sap-ha: # removed + # project: "suse-sap-cloud" + # family: "sles-15-sp1-sap" + sles-15-2-sap-ha: + project: "suse-sap-cloud" + family: "sles-15-sp2-sap" + sles-15-3-sap-ha: + project: "suse-sap-cloud" + family: "sles-15-sp3-sap" + sles-15-4-sap-ha: + project: "suse-sap-cloud" + family: "sles-15-sp4-sap" + sles-15-5-sap-ha: + project: "suse-sap-cloud" + family: "sles-15-sp5-sap" + sles-15-6-sap-ha: + project: "suse-sap-cloud" + family: "sles-15-sp6-sap" + sles-12-5-sap-ha-byos: + project: "suse-byos-cloud" + family: "sles-12-sp5-sap-byos" + sles-15-2-sap-byos: + project: "suse-byos-cloud" + family: "sles-15-sp2-sap-byos" + sles-15-3-sap-byos: + project: "suse-byos-cloud" + family: "sles-15-sp3-sap-byos" + sles-15-4-sap-byos: + project: "suse-byos-cloud" + family: "sles-15-sp4-sap-byos" + sles-15-5-sap-byos: + project: "suse-byos-cloud" + family: "sles-15-sp5-sap-byos" + sles-15-6-sap-byos: + project: "suse-byos-cloud" + family: "sles-15-sp6-sap-byos" + + +# IBM Cloud +sap_vm_provision_ibmcloud_vs_host_os_image_dictionary: + rhel-8-4: ".*redhat.*8-4.*minimal.*amd64.*" + rhel-8-6: ".*redhat.*8-6.*minimal.*amd64.*" + rhel-8-8: ".*redhat.*8-8.*minimal.*amd64.*" + rhel-8-10: ".*redhat.*8-10.*minimal.*amd64.*" + rhel-9-0: ".*redhat.*9-0.*minimal.*amd64.*" + rhel-9-2: ".*redhat.*9-2.*minimal.*amd64.*" + rhel-9-4: ".*redhat.*9-4.*minimal.*amd64.*" + sles-15-5: ".*sles.*15-5.*amd64-[0-9]" + sles-15-6: ".*sles.*15-6.*amd64-[0-9]" + # rhel-7-6-sap-ha: ".*redhat.*7-6.*amd64.*hana.*" # retrievable from deprecated list + # rhel-7-9-sap-ha: ".*redhat.*7-9.*amd64.*hana.*" # retrievable from deprecated list + # rhel-8-1-sap-ha: ".*redhat.*8-1.*amd64.*hana.*" # retrievable from deprecated list + # rhel-8-2-sap-ha: ".*redhat.*8-2.*amd64.*hana.*" # retrievable from deprecated list + rhel-8-4-sap-ha: ".*redhat.*8-4.*amd64.*hana.*" + rhel-8-6-sap-ha: ".*redhat.*8-6.*amd64.*hana.*" + rhel-8-8-sap-ha: ".*redhat.*8-8.*amd64.*hana.*" + rhel-8-10-sap-ha: ".*redhat.*8-10.*amd64.*hana.*" + rhel-9-0-sap-ha: ".*redhat.*9-0.*amd64.*hana.*" + rhel-9-2-sap-ha: ".*redhat.*9-2.*amd64.*hana.*" + rhel-9-4-sap-ha: ".*redhat.*9-4.*amd64.*hana.*" + # sles-12-4-sap-ha: ".*sles.*12-4.*amd64.*hana.*" # retrievable from deprecated list + # sles-12-5-sap-ha: ".*sles.*12-5.*amd64.*hana.*" # retrievable from deprecated list + # sles-15-1-sap-ha: ".*sles.*15-1.*amd64.*hana.*" # retrievable from deprecated list + sles-15-3-sap-ha: ".*sles.*15-3.*amd64.*hana.*" + sles-15-4-sap-ha: ".*sles.*15-4.*amd64.*hana.*" + sles-15-5-sap-ha: ".*sles.*15-5.*amd64.*hana.*" + sles-15-6-sap-ha: ".*sles.*15-6.*amd64.*hana.*" + + +# IBM Cloud, IBM Power VS +# Full Linux subscription ppc64le OS Images with support and activation keys +sap_vm_provision_ibmcloud_powervs_host_os_image_dictionary: + rhel-8-8: ".*RHEL.*8.*8" + rhel-9-2: ".*RHEL.*9.*2" + rhel-9-4: ".*RHEL.*9.*4" + sles-15-5: ".*SLES.*15.*5$" + rhel-8-4-sap-ha: "RHEL8-SP4-SAP" + rhel-8-6-sap-ha: ".*RHEL.*8.*6.*SAP$" # ensure string suffix using $ + rhel-8-8-sap-ha: ".*RHEL.*8.*8.*SAP$" # ensure string suffix using $ + rhel-9-2-sap-ha: ".*RHEL.*9.*2.*SAP$" # ensure string suffix using $ + sles-15-2-sap-ha: ".*SLES.*15.*2.*SAP$" # ensure string suffix using $ + sles-15-3-sap-ha: ".*SLES.*15.*3.*SAP$" # ensure string suffix using $ + sles-15-4-sap-ha: ".*SLES.*15.*4.*SAP$" # ensure string suffix using $ + sles-15-5-sap-ha: "SLES15-SP5-SAP" + # rhel-8-4-sap-ha-byol: "RHEL8-SP4-SAP-BYOL" + # rhel-8-6-sap-ha-byol: ".*RHEL.*8.*6.*SAP-BYOL$" # ensure string suffix using $ + # rhel-8-8-sap-ha-byol: ".*RHEL.*8.*8.*SAP-BYOL$" # ensure string suffix using $ + # rhel-9-2-sap-ha-byol: ".*RHEL.*9.*2.*SAP-BYOL$" # ensure string suffix using $ + # sles-15-2-sap-ha-byol: ".*SLES.*15.*2.*SAP-BYOL$" # ensure string suffix using $ + # sles-15-3-sap-ha-byol: ".*SLES.*15.*3.*SAP-BYOL$" # ensure string suffix using $ + # sles-15-4-sap-ha-byol: ".*SLES.*15.*4.*SAP-BYOL$" # ensure string suffix using $ + # sles-15-5-sap-ha-byol: "SLES15-SP5-SAP-BYOL" + + +# MS Azure +sap_vm_provision_msazure_vm_host_os_image_dictionary: + rhel-8-0: + publisher: "RedHat" + offer: "RHEL" + sku: "8-gen2" + rhel-8-1: + publisher: "RedHat" + offer: "RHEL" + sku: "81-gen2" + rhel-8-2: + publisher: "RedHat" + offer: "RHEL" + sku: "82-gen2" + rhel-8-3: + publisher: "RedHat" + offer: "RHEL" + sku: "83-gen2" + rhel-8-4: + publisher: "RedHat" + offer: "RHEL" + sku: "84-gen2" + rhel-8-5: + publisher: "RedHat" + offer: "RHEL" + sku: "85-gen2" + rhel-8-6: + publisher: "RedHat" + offer: "RHEL" + sku: "86-gen2" + rhel-8-7: + publisher: "RedHat" + offer: "RHEL" + sku: "87-gen2" + rhel-8-8: + publisher: "RedHat" + offer: "RHEL" + sku: "88-gen2" + rhel-8-9: + publisher: "RedHat" + offer: "RHEL" + sku: "89-gen2" + rhel-8-10: + publisher: "RedHat" + offer: "RHEL" + sku: "810-gen2" + rhel-9-0: + publisher: "RedHat" + offer: "RHEL" + sku: "90-gen2" + rhel-9-1: + publisher: "RedHat" + offer: "RHEL" + sku: "91-gen2" + rhel-9-2: + publisher: "RedHat" + offer: "RHEL" + sku: "92-gen2" + rhel-9-3: + publisher: "RedHat" + offer: "RHEL" + sku: "93-gen2" + rhel-9-4: + publisher: "RedHat" + offer: "RHEL" + sku: "94-gen2" + sles-12-5: + publisher: "SUSE" + offer: "sles-12-sp5" + sku: "gen2" + sles-15-1: + publisher: "SUSE" + offer: "sles-15-sp1" + sku: "gen2" + sles-15-2: + publisher: "SUSE" + offer: "sles-15-sp2" + sku: "gen2" + sles-15-3: + publisher: "SUSE" + offer: "sles-15-sp3" + sku: "gen2" + sles-15-4: + publisher: "SUSE" + offer: "sles-15-sp4" + sku: "gen2" + sles-15-5: + publisher: "SUSE" + offer: "sles-15-sp5" + sku: "gen2" + sles-15-6: + publisher: "SUSE" + offer: "sles-15-sp6" + sku: "gen2" + rhel-8-1-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "81sapha-gen2" + rhel-8-2-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "82sapha-gen2" + rhel-8-4-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "84sapha-gen2" + rhel-8-6-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "86sapha-gen2" + rhel-8-8-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "88sapha-gen2" + rhel-8-10-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "810sapha-gen2" + rhel-9-0-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "90sapha-gen2" + rhel-9-2-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "92sapha-gen2" + rhel-9-4-sap-ha: + publisher: "RedHat" + offer: "RHEL-SAP-HA" + sku: "94sapha-gen2" + sles-12-5-sap-ha: + publisher: "SUSE" + offer: "sles-sap-12-sp5" + sku: "gen2" + sles-15-1-sap-ha: + publisher: "SUSE" + offer: "sles-sap-15-sp1" + sku: "gen2" + sles-15-2-sap-ha: + publisher: "SUSE" + offer: "sles-sap-15-sp2" + sku: "gen2" + sles-15-3-sap-ha: + publisher: "SUSE" + offer: "sles-sap-15-sp3" + sku: "gen2" + sles-15-4-sap-ha: + publisher: "SUSE" + offer: "sles-sap-15-sp4" + sku: "gen2" + sles-15-5-sap-ha: + publisher: "SUSE" + offer: "sles-sap-15-sp5" + sku: "gen2" + sles-15-6-sap-ha: + publisher: "SUSE" + offer: "sles-sap-15-sp6" + sku: "gen2" + sles-15-1-sap-byos: + publisher: "SUSE" + offer: "sles-sap-15-sp1-byos" + sku: "gen2" + sles-15-2-sap-byos: + publisher: "SUSE" + offer: "sles-sap-15-sp2-byos" + sku: "gen2" + sles-15-3-sap-byos: + publisher: "SUSE" + offer: "sles-sap-15-sp3-byos" + sku: "gen2" + sles-15-4-sap-byos: + publisher: "SUSE" + offer: "sles-sap-15-sp4-byos" + sku: "gen2" + sles-15-5-sap-byos: + publisher: "SUSE" + offer: "sles-sap-15-sp5-byos" + sku: "gen2" + sles-15-6-sap-byos: + publisher: "SUSE" + offer: "sles-sap-15-sp6-byos" + sku: "gen2"