From fbead1e8e8995eb5d4be855968069ca8f829764f Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Tue, 24 Sep 2024 13:09:58 +0200 Subject: [PATCH 1/3] docs: Readme update collection, pacemaker --- README.md | 142 +- docs/README.md | 135 -- .../INPUT_PARAMETERS.md | 91 ++ roles/sap_anydb_install_oracle/README.md | 89 +- .../defaults/main.yml | 6 +- .../INPUT_PARAMETERS.md | 1020 ++++++++++++++ roles/sap_ha_pacemaker_cluster/README.md | 1252 ++--------------- 7 files changed, 1399 insertions(+), 1336 deletions(-) delete mode 100644 docs/README.md create mode 100644 roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md create mode 100644 roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md diff --git a/README.md b/README.md index 03a04fd0e..55ca84a22 100644 --- a/README.md +++ b/README.md @@ -2,48 +2,140 @@ ![Ansible Lint](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint.yml/badge.svg?branch=main) -This Ansible Collection executes various SAP Software installations and configuration tasks for running various SAP solutions and deployment scenarios on Linux operating systems (RHEL or SLES). +## Description -This includes handlers for SAP HANA database lifecycle manager (HDBLCM) and SAP Software Provisioning Manager (SWPM), and can be combined with other Ansible Collections to provide end-to-end automation _(e.g. provision, download, install, operations)_. +This Ansible Collection executes various SAP Software installations and configuration tasks for various SAP solutions and deployment scenarios on supported Linux operating systems. +Included roles cover range of tasks: +- Preparation of Operating system and SAP installation media before installation +- Installation of SAP Database, either SAP HANA or Oracle Database +- Installation of SAP Products, like SAP S4HANA, SAP BW4HANA, SAP Netweaver, SAP Solution Manager and others. +- Configuration of replication of SAP HANA and High Availability clusters for SAP HANA and SAP Netweaver -**Examples of verified installations include:** +## Requirements + +### Control Nodes +Operating system: +- Any operating system with required Python and Ansible versions. + +Python: 3.11 or higher + +Ansible: 9.9.x + +Ansible-core: 2.16.x + +**NOTE: Ansible 10 and ansible-core 2.17.x are not supported, because of breaking changes requiring higher Python version on managed nodes.** + +### Managed Nodes +Operating system: +- SUSE Linux Enterprise Server for SAP applications 15 SP5+ (SLE4SAP) +- Red Hat Enterprise Linux for SAP Solutions 8.x 9.x (RHEL4SAP) + +**NOTE: Operating system needs to have access to required package repositories either directly or via subscription registration.** + + +Python: 3.6 or higher + + +## Installation Instructions + +### Installation +Install this collection with Ansible Galaxy command: +```console +ansible-galaxy collection install community.sap_install +``` + +Optionally you can include collection in requirements.yml file and include it together with other collections using: `ansible-galaxy collection install -r requirements.yml` +Requirements file need to be maintained in following format: +```yaml +collections: + - name: community.sap_install +``` + +### Upgrade +Installed Ansible Collection will not be upgraded automatically when Ansible package is upgraded. + +To upgrade the collection to the latest available version, run the following command: +```console +ansible-galaxy collection install community.sap_install --upgrade +``` + +You can also install a specific version of the collection, when you encounter issues with latest version. Please report these issues in affected Role repository if that happens. +Example of downgrading collection to version 1.4.0: +``` +ansible-galaxy collection install community.sap_install:==1.4.0 +``` + +See [Installing collections](https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html) for more details on installation methods. + + +## Use Cases + +### Example Scenarios +- Preparation of Operating system for SAP installation +- Preparation of SAP installation media for SAP installation +- Installation of SAP HANA (including High Availability with replication) or Oracle Database +- Installation of SAP S4HANA or other SAP products +- Configuration of Pacemaker cluster for SAP HANA and SAP Netweaver + +More deployment scenarios are available in [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) repository. + +### Ansible Roles +All included roles can be execute separately or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + +| Name | Summary | +| :--- | :--- | +| [sap_anydb_install_oracle](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_anydb_install_oracle) | Install Oracle DB 19.x for SAP | +| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | Configure general OS settings for SAP software | +| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | Configure and enable SAP HANA System Replication | +| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | Configure Pacemaker cluster for SAP HANA and SAP Netweaver | +| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | Install SAP HANA via HDBLCM | +| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | Configure OS settings for SAP HANA database server | +| [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | Install SAP Host Agent | +| [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | Detect and extract SAP Software installation media | +| [sap_maintain_etc_hosts](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_maintain_etc_hosts) | Maintain the /etc/hosts file of an SAP software host | +| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | Configure OS settings for SAP NetWeaver application server | +| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | Configure storage for SAP system (Folder structure, LVM, XFS, NFS) | +| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | Install SAP Software via SWPM | + + +## Testing +This Ansible Collection was tested across different Operating Systems, SAP products and scenarios. You can find examples of some of them below. + +Operating systems: +- SUSE Linux Enterprise Server for SAP applications 15 SP5+ (SLE4SAP) +- Red Hat Enterprise Linux for SAP Solutions 8.x 9.x (RHEL4SAP) + +Deployment scenarios: +- All scenarios included in [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) repository + +SAP Products: - SAP S/4HANA AnyPremise (1809, 1909, 2020, 2021, 2022, 2023) with setup as Standard, Distributed, High Availability and optional Maintenance Planner or Restore System Copy - SAP Business Suite (ECC) on HANA and SAP Business Suite (ECC) with SAP AnyDB - SAP ASE, SAP MaxDB, IBM Db2, Oracle DB - SAP BW/4HANA (2021, 2023) with setup as Standard or Scale-Out - SAP HANA 2.0 (SPS04+) with setup as Scale-Up, Scale-Out, High Availability - Other SAP installation activities; such as System Rename, System Copy Export, SAP Solution Manager and SAP Web Dispatcher +**NOTE: It is not possible to test every Operating System and SAP Product combination with every release. Testing is regularly done for common scenarios: SAP HANA, SAP HANA HA, SAP S4HANA Distributed HA** -**Please read the [full documentation](/docs#readme) for how-to guidance, requirements, and all other details. Summary documentation is below:** +## Contributing +You can find more information about ways you can contribute at [sap-linuxlab website](https://sap-linuxlab.github.io/initiative_contributions/). -## Contents +## Support +You can report any issues using [Issues](https://github.com/sap-linuxlab/community.sap_install/issues) section. -Within this Ansible Collection, there are various Ansible Roles and no custom Ansible Modules. -### Ansible Roles +## Release Notes and Roadmap +You can find the release notes of this collection in [Changelog file](https://github.com/sap-linuxlab/community.sap_install/blob/main/CHANGELOG.rst) -| Name | Summary | -| :--- | :--- | -| [sap_anydb_install_oracle](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_anydb_install_oracle) | install Oracle DB 19.x for SAP | -| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | configure general OS settings for SAP software | -| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | install SAP HANA System Replication | -| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | install and configure pacemaker and SAP resources | -| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | install SAP HANA via HDBLCM | -| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | configure settings for SAP HANA database server | -| [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | install SAP Host Agent | -| [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | detect and extract SAP Software installation media | -| [sap_maintain_etc_hosts](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_maintain_etc_hosts) | maintain the /etc/hosts file of an SAP software host | -| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | configure settings for SAP NetWeaver application server | -| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | configure storage for SAP HANA, with LVM partitions and XFS filesystem | -| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | install SAP Software via SWPM | -## License +## Further Information -- [Apache 2.0](./LICENSE) +### Variable Precedence Rules +Please follow [Ansible Precedence guidelines](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) on how to pass variables when using this collection. -## Contributors -Contributors to the Ansible Roles within this Ansible Collection, are shown within [/docs/contributors](./docs/CONTRIBUTORS.md). +## License +[Apache 2.0](https://github.com/sap-linuxlab/community.sap_install/blob/main/LICENSE) diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index b71bedb27..000000000 --- a/docs/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# Documentation of community.sap_install Ansible Collection - -## Introduction - -The `sap_install` Ansible Collection provides a variety of automated tasks for the configuration and installation of SAP Software. - -Each Ansible Role contained within this Ansible Collection, performs a distinct set of tasks and are designed to be run independently or cohesively - depending on the outcome desired by an end-user. - - -## Functionality - -This Ansible Collection executes various SAP Software installations for different SAP solution scenarios. The code structure and logic has been separated to support a flexible execution of different steps for various scenarios. - -Any Ansible Roles labelled "preconfigure" and "prepare" are prerequisites, executed before the corresponding installation Ansible Roles (such as `sap_hana_install` or `sap_swpm`). - -At a high-level, the key installation functionality of this Ansible Collection includes: - -1. **OS Preparation activities for SAP HANA Database Server, SAP AnyDB Database Server or SAP NetWeaver Application Server** - -2. **SAP HANA installations via SAP HANA database lifecycle manager (HDBLCM)** - - Configure Firewall rules and Hosts file for SAP HANA database server instance/s - - Install SAP Host Agent - - Install SAP HANA database server, with any SAP HANA Component (e.g. Live Cache Apps, Application Function Library etc.) - - Apply license to SAP HANA - -3. **SAP HANA High Availability tasks** - - Install SAP HANA System Replication - - Install Linux Pacemaker, configure Pacemaker Fencing Agents for a given Infrastructure Platform - - Configure Linux Pacemaker Resource Agents for SAP HANA - -4. **Every SAP Software installation via SAP Software Provisioning Manager (SWPM)** - - Execute SAP SWPM Unattended installation - - Using on-the-fly generated inifile.params from Ansible Variables - - Using a list of inifile parameters in an Ansible Dictionary - - Re-using an existing inifile.params - -5. **SAP NetWeaver High Availability tasks** - - Install Linux Pacemaker, configure Pacemaker Fencing Agents for a given Infrastructure Platform - - Configure Linux Pacemaker Resource Agents for SAP NetWeaver ASCS/ERS - - -## Execution - -An Ansible Playbook is the file created and executed by an end-user, which imports from Ansible Collections to perform various activities on the target hosts. - -The Ansible Playbook can call either an Ansible Role, or directly call the individual Ansible Modules: - -- **Ansible Roles** (runs multiple Ansible Modules) -- **Ansible Modules** (and adjoining Python/Bash Functions) - -It is strongly recommended to execute these Ansible Roles in accordance to best practice Ansible usage, where an Ansible Playbook is executed from a host and Ansible will login to a target host to perform the activities. - -> If an Ansible Playbook is executed from the target host itself (similar to logging in and running a shell script), this is known as an Ansible Playbook 'localhost execution' and is not recommended as it has limitations on SAP Software installations (particularly installations across multiple hosts). - -At a high-level, complex executions with various interlinked activities are run in parallel or sequentially using the following execution structure: - -``` -Ansible Playbook --> source Ansible Collection --> execute Ansible Task ----> run Ansible Role ------> run Ansible Module (e.g. built-in Ansible Module for Shell) -``` - -### Execution examples - -There are various methods to execute the Ansible Collection, dependent on the use case. - -For more information, see [Getting started](./getting_started#readme) and edit the [sample Ansible Playbooks in `/playbooks`](../playbooks/). - - -## Requirements and Dependencies - -### Target host - Operating System requirements - -Designed for Linux operating systems, e.g. RHEL (7.x, 8.x, 9.x) and SLES (15 SPx). - -This Ansible Collection has not been tested and amended for SAP NetWeaver Application Server instantiations on IBM AIX or Windows Server. - -Assumptions for executing the Ansible Roles from this Ansible Collection include: - -- Registered OS -- OS Package repositories are available (from the relevant content delivery network of the OS vendor) - -N.B. The Ansible Collection works with SLES from version 15 SP3 and upwards, for the following reasons: - -- firewalld is used within the Ansible Collection. In SLES 15 SP3, firewalld became the replacement for nftables. See changelog [SLE-16300](https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP3/index.html#jsc-SLE-16300) -- SELinux is used within the Ansible Collection. While introduced earlier with community support, full support for SELinux was provided as of SLES 15 SP3. See changelog [SLE-17307](https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP3/index.html#jsc-SLE-17307) - -### Execution/Controller host - Operating System requirements - -Execution of Ansible Playbooks using this Ansible Collection have been tested with: -- Python 3.10.14 and above (i.e. CPython distribution) -- Ansible Core 2.16.9 and above _(included with optional installation of Ansible Community Edition 5.0 and above)_ -- OS: macOS with Homebrew, RHEL, SLES, and containers in Task Runners (e.g. Azure DevOps) - -#### Ansible Core version - -This Ansible Collection was designed for maximum backwards compatibility, with full compatibility starting from Ansible Core 2.16.9 and above. - -**Note 1:** Ansible 2.9 was the last release before the Ansible project was split into Ansible Core and Ansible Community Edition, and was before Ansible Collections functionality was introduced. This Ansible Collection should execute when Ansible 2.9 is used, but it is not recommended and errors should be expected (and will not be resolved). - -**Note 2:** Ansible Core versions prior to 2.14.12 , 2.15.8 , and 2.16.1 where `CVE-2023-5764` (templating inside `that` statement of `assert` Ansible Tasks) security fix was addressed, will work after `v1.3.4` of this Ansible Collection. Otherwise an error similar to the following will occur: - -```yaml -fatal: [host01]: FAILED! => - msg: 'The conditional check ''13 <= 128'' failed. The error was: Conditional is marked as unsafe, and cannot be evaluated.' -``` - - -## Testing - -Various SAP Software solutions have been extensively tested. - -Prior to each release, basic scenarios are executed to confirm functionality is working as expected; including SAP S/4HANA installation. - -Important note: it is not possible for the project maintainers to test every SAP Software installation and solution scenario for each OS hosted on each Infrastructure Platform, if an error is identified please raise a [GitHub Issue](/../../issues/). - - -### Ansible Roles Lint Status - -| Role Name | Ansible Lint Status | -| :--- | :--- | -| [sap_anydb_install_oracle](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_anydb_install_oracle) | N/A | -| [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) | [![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml) | -| [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) | [![Ansible Lint for sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml) | -| [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) | [![Ansible Lint for sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml) | -| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml) | -| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml) | -| [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | N/A | -| [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | N/A | -| [sap_maintain_etc_hosts](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_maintain_etc_hosts) | [![Ansible Lint for sap_maintain_etc_hosts](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_maintain_etc_hosts.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_maintain_etc_hosts.yml) | -| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml) | -| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | N/A | -| [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) | [![Ansible Lint for sap_swpm](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml) | diff --git a/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md b/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md new file mode 100644 index 000000000..70c6424b0 --- /dev/null +++ b/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md @@ -0,0 +1,91 @@ +## Input Parameters for sap_anydb_install_oracle Ansible Role + + +### sap_anydb_install_oracle_prep_reboot_ok + +- _Type:_ `bool` +- _Default:_ `True` + +Allows reboot of Managed node after packages are installed during pre-steps tasks. + +### sap_anydb_install_oracle_prep_fail_if_reboot_required + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to fail execution if packages are installed during pre-steps tasks, but you don't want to proceed with reboot. + +### sap_anydb_install_oracle_prep_precheck + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to execute installation in Check mode to verify all inputs. This is extra validation and it does not disable installation. + +### sap_anydb_install_oracle_method + +- _Type:_ `string` +- _Default:_ `minimal` + +Select installation method out of available: `minimal` or `responsefile`. + +### sap_anydb_install_oracle_sid: + +- _Type:_ `string` +- _Default:_ `OR1` + +Enter Oracle Database SID. + +### sap_anydb_install_oracle_base + +- _Type:_ `string` +- _Default:_ `/oracle` + +Enter base folder for Oracle Database installation. + +### sap_anydb_install_oracle_filesystem_storage + +- _Type:_ `string` +- _Default:_ `/oradata` + +Enter path for `oracle.install.db.config.starterdb.fileSystemStorage.dataLocation` + +### sap_anydb_install_oracle_inventory_central + +- _Type:_ `string` +- _Default:_ `/oraInventory` + +Enter path for `INVENTORY_LOCATION` + +### sap_anydb_install_oracle_system_password + +- _Type:_ `string` + +Enter password for Oracle SYSTEM user. + +### sap_anydb_install_oracle_extract_path + +- _Type:_ `string` + +Enter path of Installation media, for example: `/software`. + +### sap_anydb_install_oracle_patch_opatch_zip + +- _Type:_ `string` + +Enter name of Oracle opatch file, for example: `OPATCH19P_2308-70004508.ZIP` + +### sap_anydb_install_oracle_patch_sap_zip + +- _Type:_ `string` + +Enter name of Oracle SAP patch file, for example: `SAP19P_2311-70004508.ZIP` + +### sap_anydb_install_oracle_patch_enable + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to allow post-installation patching. + + \ No newline at end of file diff --git a/roles/sap_anydb_install_oracle/README.md b/roles/sap_anydb_install_oracle/README.md index 9db03c630..7e55d2424 100644 --- a/roles/sap_anydb_install_oracle/README.md +++ b/roles/sap_anydb_install_oracle/README.md @@ -1,54 +1,65 @@ + # sap_anydb_install_oracle Ansible Role + -Ansible role for Oracle DB 19.x installation for SAP +## Description + +Ansible role `sap_anydb_install_oracle` is used to install Oracle Database 19.x for SAP system. + ## Prerequisites - -### Software Installation files - -Download installation media from SAP Download Center on host, and set Ansible Variable `sap_anydb_install_oracle_extract_path` to this path. - -### Default Parameters - -Please check the default parameters file for more information on other parameters that can be used as an input -- [**sap_anydb_install_oracle** default parameters](defaults/main.yml) + +Managed nodes: +1. Installation media present and `sap_anydb_install_oracle_extract_path` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community.sap_launchpad) Ansible Collection. + ## Execution - -Sample Ansible Playbook Execution: - -- Local Host Installation - - `ansible-playbook --connection=local --limit localhost -i "localhost," sap-anydb-oracle-install.yml -e "@inputs/oracledb.install"` - -- Target Host Installation - - `ansible-playbook -i "" sap-anydb-oracle-install.yml -e "@inputs/oracledb.install"` - -## Sample playbook - + + + +### Execution Flow + +1. Prepare OS: Install packages, create users, create folders and copy installation media. +2. Install Oracle Database in desired method +3. Execute post installation tasks +4. Apply Oracle Patches if available + + +### Example + ```yaml --- -- hosts: all +- name: Ansible Play for Oracle Database installation + hosts: oracle_host become: true - - collections: - - community.sap_install - - vars: - sap_anydb_install_oracle_method: minimal - sap_anydb_install_oracle_sid: "OR1" - sap_anydb_install_oracle_base: "/oracle" - sap_anydb_install_oracle_system_password: "Password1%" - sap_anydb_install_oracle_extract_path: "/software/oracledb_extracted" - + tasks: - name: Execute Ansible Role sap_anydb_install_oracle - include_role: - name: { role: community.sap_install.sap_anydb_install_oracle } + ansible.builtin.include_role: + name: community.sap_install.sap_anydb_install_oracle + vars: + sap_anydb_install_oracle_method: minimal + sap_anydb_install_oracle_sid: "OR1" + sap_anydb_install_oracle_base: "/oracle" + sap_anydb_install_oracle_system_password: "Password1%" + sap_anydb_install_oracle_extract_path: "/software/oracledb_extracted" ``` + -## License + + + + + -Apache license 2.0 +## License + +Apache 2.0 + -## Author Information +## Maintainers + +- [Sean Freeman](https://github.com/sean-freeman) + -Sean Freeman +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md) diff --git a/roles/sap_anydb_install_oracle/defaults/main.yml b/roles/sap_anydb_install_oracle/defaults/main.yml index 5fb993aae..ef7a5e71c 100644 --- a/roles/sap_anydb_install_oracle/defaults/main.yml +++ b/roles/sap_anydb_install_oracle/defaults/main.yml @@ -1,11 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 --- -sap_anydb_install_oracle_prep_reboot_ok: yes +sap_anydb_install_oracle_prep_reboot_ok: true -sap_anydb_install_oracle_prep_fail_if_reboot_required: no +sap_anydb_install_oracle_prep_fail_if_reboot_required: false -sap_anydb_install_oracle_prep_precheck: no +sap_anydb_install_oracle_prep_precheck: false # minimal, responsefile sap_anydb_install_oracle_method: minimal diff --git a/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md b/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md new file mode 100644 index 000000000..49582b6b3 --- /dev/null +++ b/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md @@ -0,0 +1,1020 @@ +## Input Parameters for sap_ha_pacemaker_cluster Ansible Role + +Minimum required parameters for all clusters: + +- [sap_ha_pacemaker_cluster_hacluster_user_password](#sap_ha_pacemaker_cluster_hacluster_user_password) + +Additional minimum requirements depend on the type of cluster setup and on the target platform. + +### sap_ha_pacemaker_cluster_aws_access_key_id + +- _Type:_ `string` + +AWS access key to allow control of instances (for example for fencing operations).
+Mandatory for the cluster nodes setup on AWS EC2 instances, when:
+1. IAM Role or Instance profile is not attached to EC2 instance.
+2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
+ +### sap_ha_pacemaker_cluster_aws_credentials_setup + +- _Type:_ `string` + +Set this parameter to 'true' to store AWS credentials into /root/.aws/credentials.
+Requires: `sap_ha_pacemaker_cluster_aws_access_key_id` and `sap_ha_pacemaker_cluster_aws_secret_access_key`
+Mandatory for the cluster nodes setup on AWS EC2 instances, when:
+1. IAM Role or Instance profile is not attached to EC2 instance.
+ +### sap_ha_pacemaker_cluster_aws_region + +- _Type:_ `string` + +The AWS region in which the instances to be used for the cluster setup are located.
+Mandatory for cluster nodes setup on AWS EC2 instances.
+ +### sap_ha_pacemaker_cluster_aws_secret_access_key + +- _Type:_ `string` + +AWS secret key, paired with the access key for instance control.
+Mandatory for the cluster nodes setup on AWS EC2 instances, when:
+1. IAM Role or Instance profile is not attached to EC2 instance.
+2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
+ +### sap_ha_pacemaker_cluster_aws_vip_update_rt + +- _Type:_ `string` + +List one more routing table IDs for managing Virtual IP failover through routing table changes.
+Multiple routing tables must be defined as a comma-separated string (no spaces).
+Mandatory for the VIP resource configuration in AWS EC2 environments.
+ +### sap_ha_pacemaker_cluster_cluster_name + +- _Type:_ `string` + +The name of the pacemaker cluster.
+Inherits the `ha_cluster` LSR native parameter `ha_cluster_cluster_name` if not defined.
+If not defined, the `ha_cluster` Linux System Role default will be used.
+ +### sap_ha_pacemaker_cluster_cluster_nodes + +- _Type:_ `list` + +List of cluster nodes and associated attributes to describe the target SAP HA environment.
+This is required for the HANA System Replication configuration.
+Synonym for this parameter is `sap_hana_cluster_nodes`.
+Mandatory to be defined for HANA clusters.
+ +- **hana_site**
+ Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
Mandatory for HANA clusters (sudo config for system replication). +- **node_ip**
+ IP address of the node used for HANA System Replication.
_Optional. Currently not needed/used in cluster configuration._ +- **node_name**
+ Name of the cluster node, should match the remote systems' hostnames.
_Optional. Currently not needed/used in cluster configuration._ +- **node_role**
+ Role of the defined `node_name` in the SAP HANA cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes.
_Optional. Currently not needed/used in cluster configuration._ + +Example: + +```yaml +sap_ha_pacemaker_cluster_cluster_nodes: +- hana_site: DC01 + node_ip: 192.168.5.1 + node_name: nodeA + node_role: primary +- hana_site: DC02 +``` + +### sap_ha_pacemaker_cluster_cluster_properties + +- _Type:_ `dict` +- _Default:_ `{'concurrent-fencing': True, 'stonith-enabled': True, 'stonith-timeout': 900}` + +Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
+When no STONITH resource is defined, STONITH will be disabled and a warning displayed.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_cluster_properties: + concurrent-fencing: true + stonith-enabled: true + stonith-timeout: 900 +``` + +### sap_ha_pacemaker_cluster_create_config_dest + +- _Type:_ `string` +- _Default:_ `review_resource_config.yml` + +The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory.
+Requires `sap_ha_pacemaker_cluster_create_config_varfile` to be enabled for generating the output file.
+Specify a path/filename to save the file in a custom location.
+The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
+ +### sap_ha_pacemaker_cluster_create_config_varfile + +- _Type:_ `bool` +- _Default:_ `False` + +When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format.
+This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_pacemaker_cluster' role.
+When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes.
+WARNING! This report may include sensitive details like secrets required for certain cluster resources!
+ +### sap_ha_pacemaker_cluster_enable_cluster_connector + +- _Type:_ `bool` +- _Default:_ `True` + +Enables/Disables the SAP HA Interface for SAP ABAP application server instances, also known as `sap_cluster_connector`.
+Set this parameter to 'false' if the SAP HA interface should not be installed and configured.
+ +### sap_ha_pacemaker_cluster_extra_packages + +- _Type:_ `list` + +Additional extra packages to be installed, for instance specific resource packages.
+For SAP clusters configured by this role, the relevant standard packages for the target scenario are automatically included.
+ +### sap_ha_pacemaker_cluster_fence_agent_packages + +- _Type:_ `list` + +Additional fence agent packages to be installed.
+This is automatically combined with default packages in:
+`__sap_ha_pacemaker_cluster_fence_agent_packages_minimal`
+`__sap_ha_pacemaker_cluster_fence_agent_packages_platform`
+ +### sap_ha_pacemaker_cluster_gcp_project + +- _Type:_ `string` + +Google Cloud project name in which the target instances are installed.
+Mandatory for the cluster setup on GCP instances.
+ +### sap_ha_pacemaker_cluster_gcp_region_zone + +- _Type:_ `string` + +Google Cloud Platform region zone ID.
+Mandatory for the cluster setup on GCP instances.
+ +### sap_ha_pacemaker_cluster_ha_cluster + +- _Type:_ `dict` + +The `ha_cluster` LSR native parameter `ha_cluster` can be used as a synonym.
+Optional _**host_vars**_ parameter - if defined it must be set for each node.
+Dictionary that can contain various node options for the pacemaker cluster configuration.
+Supported options can be reviewed in the `ha_cluster` Linux System Role [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md].
+If not defined, the `ha_cluster` Linux System Role default will be used.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_ha_cluster: + corosync_addresses: + - 192.168.1.10 + - 192.168.2.10 + node_name: nodeA +``` + +### sap_ha_pacemaker_cluster_hacluster_user_password required + +- _Type:_ `string` + +The password of the `hacluster` user which is created during pacemaker installation.
+Inherits the value of `ha_cluster_hacluster_password`, when defined.
+ +### sap_ha_pacemaker_cluster_hana_automated_register + +- _Type:_ `bool` +- _Default:_ `True` + +Parameter for the 'SAPHana' cluster resource.
+Define if a former primary should be re-registered automatically as secondary.
+ +### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_primary_name + +- _Type:_ `string` +- _Default:_ `col_saphana_vip__HDB_primary` + +Customize the cluster constraint name for VIP and SAPHana primary clone colocation.
+ +### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_secondary_name + +- _Type:_ `string` +- _Default:_ `col_saphana_vip__HDB_readonly` + +Customize the cluster constraint name for VIP and SAPHana secondary clone colocation.
+ +### sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout + +- _Type:_ `int` +- _Default:_ `7200` + +Parameter for the 'SAPHana' cluster resource.
+Time difference needed between to primary time stamps, if a dual-primary situation occurs.
+If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
+This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
+ +### sap_ha_pacemaker_cluster_hana_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHanaFil__HDB` + +Customize the cluster resource name of the SAP HANA Filesystem clone.
+ +### sap_ha_pacemaker_cluster_hana_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHanaFil__HDB` + +Customize the cluster resource name of the SAP HANA Filesystem.
+ +### sap_ha_pacemaker_cluster_hana_global_ini_path + +- _Type:_ `string` +- _Default:_ `/usr/sap//SYS/global/hdb/custom/config/global.ini` + +Path with location of global.ini for srHook update
+ +### sap_ha_pacemaker_cluster_hana_hook_chksrv + +- _Type:_ `bool` +- _Default:_ `False` + +Controls if ChkSrv srHook is enabled during srHook creation.
+It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
+ +### sap_ha_pacemaker_cluster_hana_hook_tkover + +- _Type:_ `bool` +- _Default:_ `False` + +Controls if TkOver srHook is enabled during srHook creation.
+It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
+ +### sap_ha_pacemaker_cluster_hana_hooks + +- _Type:_ `list` +- _Default:_ `[]` + +Customize required list of SAP HANA Hooks
+Mandatory to include SAPHanaSR srHook in list.
+Mandatory attributes are provider and path.
+Example below shows mandatory SAPHanaSR, TkOver and ChkSrv hooks.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_hana_hooks: +- options: + - name: execution_order + value: 1 + path: /usr/share/SAPHanaSR/ + provider: SAPHanaSR +- options: + - name: execution_order + value: 2 + path: /usr/share/SAPHanaSR/ + provider: susTkOver +- options: + - name: execution_order + value: 3 + - name: action_on_lost + value: stop + path: /usr/share/SAPHanaSR/ + provider: susChkSrv +``` + +### sap_ha_pacemaker_cluster_hana_instance_nr + +- _Type:_ `string` + +The instance number of the SAP HANA database which this role will configure in the cluster.
+Inherits the value of `sap_hana_instance_number`, when defined.
+Mandatory for SAP HANA cluster setups.
+ +### sap_ha_pacemaker_cluster_hana_order_hana_vip_primary_name + +- _Type:_ `string` +- _Default:_ `ord_saphana_vip__HDB_primary` + +Customize the cluster constraint name for VIP and SAPHana primary clone order.
+ +### sap_ha_pacemaker_cluster_hana_order_hana_vip_secondary_name + +- _Type:_ `string` +- _Default:_ `ord_saphana_vip__HDB_readonly` + +Customize the cluster constraint name for VIP and SAPHana secondary clone order.
+ +### sap_ha_pacemaker_cluster_hana_order_topology_hana_name + +- _Type:_ `string` +- _Default:_ `ord_saphana_saphanatop__HDB` + +Customize the cluster constraint name for SAPHana and Topology order.
+ +### sap_ha_pacemaker_cluster_hana_prefer_site_takeover + +- _Type:_ `bool` +- _Default:_ `True` + +Parameter for the 'SAPHana' cluster resource.
+Set to "false" if the cluster should first attempt to restart the instance on the same node.
+When set to "true" (default) a failover to secondary will be initiated on resource failure.
+ +### sap_ha_pacemaker_cluster_hana_resource_clone_msl_name + +- _Type:_ `string` +- _Default:_ `msl_SAPHana__HDB` + +Customize the cluster resource name of the SAP HANA DB resource master slave clone.
+Master Slave clone is specific to Classic SAPHana resource on SUSE (non-angi).
+ +### sap_ha_pacemaker_cluster_hana_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHana__HDB` + +Customize the cluster resource name of the SAP HANA DB resource clone.
+ +### sap_ha_pacemaker_cluster_hana_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHana__HDB` + +Customize the cluster resource name of the SAP HANA DB resource.
+ +### sap_ha_pacemaker_cluster_hana_sid + +- _Type:_ `string` + +The SAP HANA SID of the instance that will be configured in the cluster.
+The SID must follow SAP specifications - see SAP Note 1979280.
+Inherits the value of `sap_hana_sid`, when defined.
+Mandatory for SAP HANA cluster setups.
+ +### sap_ha_pacemaker_cluster_hana_topology_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHanaTop__HDB` + +Customize the cluster resource name of the SAP HANA Topology resource clone.
+ +### sap_ha_pacemaker_cluster_hana_topology_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHanaTop__HDB` + +Customize the cluster resource name of the SAP HANA Topology resource.
+ +### sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHanaCon__HDB` + +Customize the cluster resource name of the SAP HANA Controller clone.
+ +### sap_ha_pacemaker_cluster_hanacontroller_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHanaCon__HDB` + +Customize the cluster resource name of the SAP HANA Controller.
+ +### sap_ha_pacemaker_cluster_host_type + +- _Type:_ `list` +- _Default:_ `hana_scaleup_perf` + +The SAP landscape to for which the cluster is to be configured.
+The default is a 2-node SAP HANA scale-up cluster.
+ +### sap_ha_pacemaker_cluster_ibmcloud_api_key + +- _Type:_ `string` + +The API key which is required to allow the control of instances (for example for fencing operations).
+Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_powervs_api_type + +- _Type:_ `string` + +IBM Power Virtual Server API Endpoint type (public or private) dependent on network interface attachments for the target instances.
+Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_powervs_forward_proxy_url + +- _Type:_ `string` + +IBM Power Virtual Server forward proxy url when IBM Power Virtual Server API Endpoint type is set to private.
+When public network interface, can be ignored.
+When private network interface, mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_powervs_workspace_crn + +- _Type:_ `string` + +IBM Power Virtual Server Workspace service cloud resource name (CRN) identifier which contains the target instances
+Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_region + +- _Type:_ `string` + +The IBM Cloud VS region name in which the instances are running.
+Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
+ +### sap_ha_pacemaker_cluster_msazure_resource_group + +- _Type:_ `string` + +Resource group name/ID in which the target instances are defined.
+Mandatory for the cluster setup on MS Azure instances.
+ +### sap_ha_pacemaker_cluster_msazure_subscription_id + +- _Type:_ `string` + +Subscription ID of the MS Azure environment containing the target instances.
+Mandatory for the cluster setup on MS Azure instances.
+ +### sap_ha_pacemaker_cluster_nwas_abap_aas_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP AAS instance.
+Mandatory for NetWeaver AAS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1 + +- _Type:_ `bool` +- _Default:_ `False` + +The standard NetWeaver ASCS/ERS cluster will be set up as ENSA2.
+Set this parameter to 'true' to configure it as ENSA1.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_simple_mount + +- _Type:_ `bool` +- _Default:_ `True` + +Enables preferred method for ASCS ERS ENSA2 clusters - Simple Mount
+Set this parameter to 'true' to configure ENSA2 Simple Mount.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__ASCS` + +Name of the filesystem resource for the ASCS instance.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_group_stickiness + +- _Type:_ `string` +- _Default:_ `3000` + +NetWeaver ASCS resource group stickiness to prefer the ASCS group to stay on the node it was started on.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP ASCS instance.
+Mandatory for NetWeaver ASCS/ERS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_automatic_recover_bool + +- _Type:_ `bool` +- _Default:_ `False` + +NetWeaver ASCS instance resource option "AUTOMATIC_RECOVER".
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_failure_timeout + +- _Type:_ `string` +- _Default:_ `60` + +NetWeaver ASCS instance failure-timeout attribute.
+Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_migration_threshold + +- _Type:_ `string` +- _Default:_ `1` + +NetWeaver ASCS instance migration-threshold setting attribute.
+Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_instance_name + +- _Type:_ `string` + +The name of the ASCS instance, typically the profile name.
+Mandatory for the NetWeaver ASCS/ERS cluster setup
+Recommended format _ASCS_.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPInstance__ASCS` + +Name of the ASCS instance resource.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_stickiness + +- _Type:_ `string` +- _Default:_ `5000` + +NetWeaver ASCS instance resource stickiness attribute.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_start_profile_string + +- _Type:_ `string` + +The full path and name of the ASCS instance profile.
+Mandatory for the NetWeaver ASCS/ERS cluster setup.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapstartsrv_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPStartSrv__ASCS` + +Name of the ASCS SAPStartSrv resource for simple mount.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__ERS` + +Name of the filesystem resource for the ERS instance.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP ERS instance.
+Mandatory for NetWeaver ASCS/ERS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_automatic_recover_bool + +- _Type:_ `bool` +- _Default:_ `False` + +NetWeaver ERS instance resource option "AUTOMATIC_RECOVER".
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_instance_name + +- _Type:_ `string` + +The name of the ERS instance, typically the profile name.
+Mandatory for the NetWeaver ASCS/ERS cluster setup.
+Recommended format _ERS_.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPInstance__ERS` + +Name of the ERS instance resource.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_start_profile_string + +- _Type:_ `string` + +The full path and name of the ERS instance profile.
+Mandatory for the NetWeaver ASCS/ERS cluster.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapstartsrv_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPStartSrv__ERS` + +Name of the ERS SAPstartSrv resource for simple mount.
+ +### sap_ha_pacemaker_cluster_nwas_abap_pas_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP PAS instance.
+Mandatory for NetWeaver PAS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_sid + +- _Type:_ `string` + +SID of the NetWeaver instances.
+Mandatory for NetWeaver cluster configuration.
+Uses `sap_swpm_sid` if defined.
+Mandatory for NetWeaver cluster setups.
+ +### sap_ha_pacemaker_cluster_nwas_colocation_ascs_no_ers_name + +- _Type:_ `string` +- _Default:_ `col_ascs_separate_` + +Customize the cluster constraint name for ASCS and ERS separation colocation.
+ +### sap_ha_pacemaker_cluster_nwas_order_ascs_first_name + +- _Type:_ `string` +- _Default:_ `ord_ascs_first_` + +Customize the cluster constraint name for ASCS starting before ERS order.
+ +### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_fs__sapmnt` + +Filesystem resource clone name for the shared filesystem /sapmnt.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__sapmnt` + +Filesystem resource name for the shared filesystem /sapmnt.
+Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed + +- _Type:_ `bool` +- _Default:_ `False` + +Change this parameter to 'true' if the 3 shared filesystems `/usr/sap/trans`, `/usr/sap//SYS` and '/sapmnt' shall be configured as cloned cluster resources.
+ +### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_fs__sys` + +Filesystem resource clone name for the shared filesystem /usr/sap//SYS.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__sys` + +Filesystem resource name for the transports filesystem /usr/sap//SYS.
+Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_fs__trans` + +Filesystem resource clone name for the shared filesystem /usr/sap/trans.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__trans` + +Filesystem resource name for the transports filesystem /usr/sap/trans.
+Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_operation_defaults + +- _Type:_ `dict` +- _Default:_ `{'record-pending': True, 'timeout': 600}` + +Set default operation parameters that will be valid for all pacemaker resources.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_operation_defaults: + record-pending: true + timeout: 600 +``` + +### sap_ha_pacemaker_cluster_resource_defaults + +- _Type:_ `dict` +- _Default:_ `{'migration-threshold': 5000, 'resource-stickiness': 3000}` + +Set default parameters that will be valid for all pacemaker resources.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_resource_defaults: + migration-threshold: 5000 + resource-stickiness: 1000 +``` + +### sap_ha_pacemaker_cluster_saphanasr_angi_detection + +- _Type:_ `string` +- _Default:_ `True` + +Disabling this variable enables to use Classic SAPHanaSR agents even on server, with SAPHanaSR-angi is available.
+ +### sap_ha_pacemaker_cluster_sbd_devices + +- _Type:_ `list` + +Required if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide list of block devices for Stonith SBD agent
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_devices: +- /dev/disk/by-id/scsi-3600 +``` + +### sap_ha_pacemaker_cluster_sbd_enabled + +- _Type:_ `bool` + +Set this parameter to 'true' to enable workflow to add Stonith SBD resource.
+Stonith SBD resource has to be provided as part of `sap_ha_pacemaker_cluster_stonith_custom`.
+Default SBD agents are: stonith:external/sbd for SLES and stonith:fence_sbd for RHEL
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_devices: +- /dev/disk/by-id/scsi-3600 +sap_ha_pacemaker_cluster_sbd_enabled: true +sap_ha_pacemaker_cluster_stonith_custom: +- agent: stonith:external/sbd + id: stonith_sbd + instance_attrs: + - attrs: + - name: pcmk_delay_max + value: 15 +``` + +### sap_ha_pacemaker_cluster_sbd_options + +- _Type:_ `list` + +Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide list of SBD specific options that are added into SBD configuration file.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_options: +- name: startmode + value: clean +``` + +### sap_ha_pacemaker_cluster_sbd_watchdog + +- _Type:_ `str` +- _Default:_ `/dev/watchdog` + +Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide watchdog name to override default /dev/watchdog
+ +### sap_ha_pacemaker_cluster_sbd_watchdog_modules + +- _Type:_ `list` + +Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide list of watchdog kernel modules to be loaded (creates /dev/watchdog* devices).
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_watchdog_modules: +- softdog +``` + +### sap_ha_pacemaker_cluster_stonith_custom + +- _Type:_ `list` + +Custom list of STONITH resource(s) to be configured in the cluster.
+This definition override any defaults the role would apply otherwise.
+Definition follows structure of ha_cluster_resource_primitives in linux-system-roles/ha_cluster
+ +- **agent**
+ Resource agent name, must contain the prefix "stonith:" to avoid mismatches or failures. +- **id**
+ Parameter `id` is required.
Name that will be used as the resource ID (name). +- **instance_attrs**
+ Defines resource agent params as list of name/value pairs.
Requires the mandatory options for the particular stonith resource agent to be defined, otherwise the setup will fail.
Example: stonith:fence_sbd agent requires devices option with list of SBD disks.
Example: stonith:external/sbd agent does not require devices option, but `sap_ha_pacemaker_cluster_sbd_devices`. +- **meta_attrs**
+ Defines meta attributes as list of name/value pairs. +- **name**
+ WARNING! This option will be removed in future release. +- **operations**
+ Defines list of resource agent operations. +- **options**
+ WARNING! This option will be removed in future release. + +Example: + +```yaml +sap_ha_pacemaker_cluster_stonith_custom: +- agent: stonith:fence_rhevm + id: my-fence-resource + instance_attrs: + - attrs: + - name: ip + value: rhevm-server + - name: username + value: login-user + - name: password + value: login-user-password + - name: pcmk_host_list + value: node1,node2 + - name: power_wait + value: 3 + meta_attrs: + - attrs: + - name: target-role + value: Started + operations: + - action: start + attrs: + - name: interval + value: 0 + - name: timeout + value: 180 +``` + +### sap_ha_pacemaker_cluster_storage_definition + +- _Type:_ `list` + +List of filesystem definitions used for filesystem cluster resources.
+Options relevant, see example.
+Mandatory for SAP NetWeaver HA cluster configurations.
+Reuse `sap_storage_setup_definition` if defined.
+Reuse `sap_storage_setup_definition` will extract values 'mountpoint', 'nfs_filesystem_type', 'nfs_mount_options', 'nfs_path', 'nfs_server'.
+Reuse `sap_storage_setup_definition` all options are documented under Ansible Role `sap_storage_setup`.
+Note! For this variable, the argument specification does not list options, to avoid errors during reuse of `sap_storage_setup_definition` if defined.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_storage_definition: +- mountpoint: /usr/sap + name: usr_sap + nfs_path: /usr/sap + nfs_server: nfs-server.example.com:/ +- mountpoint: /usr/sap/trans + name: usr_sap_trans + nfs_path: /usr/sap/trans + nfs_server: nfs-server.example.com:/ +- mountpoint: /sapmnt + name: sapmnt + nfs_filesystem_type: nfs + nfs_mount_options: defaults + nfs_path: /sapmnt + nfs_server: nfs-server.example.com:/ +``` + +### sap_ha_pacemaker_cluster_storage_nfs_filesytem_type + +- _Type:_ `string` +- _Default:_ `nfs` + +Filesystem type of the NFS filesystems that are part of the cluster configuration.
+ +### sap_ha_pacemaker_cluster_storage_nfs_mount_options + +- _Type:_ `string` +- _Default:_ `defaults` + +Mount options of the NFS filesystems that are part of the cluster configuration.
+ +### sap_ha_pacemaker_cluster_storage_nfs_server + +- _Type:_ `string` + +Default address of the NFS server, if not defined individually by filesystem.
+ +### sap_ha_pacemaker_cluster_system_roles_collection + +- _Type:_ `string` +- _Default:_ `fedora.linux_system_roles` + +Reference to the Ansible Collection used for the Linux System Roles.
+For community/upstream, use 'fedora.linux_system_roles'.
+For RHEL System Roles for SAP, or Red Hat Automation Hub, use 'redhat.rhel_system_roles'.
+ +### sap_ha_pacemaker_cluster_vip_client_interface + +- _Type:_ `string` + +OS device name of the network interface to use for the Virtual IP configuration.
+When there is only one interface on the system, its name will be used by default.
+ +### sap_ha_pacemaker_cluster_vip_hana_primary_ip_address + +- _Type:_ `string` + +The virtual IP of the primary HANA instance.
+Mandatory parameter for HANA clusters.
+ +### sap_ha_pacemaker_cluster_vip_hana_primary_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__HDB_primary` + +Customize the name of the resource managing the Virtual IP of the primary HANA instance.
+ +### sap_ha_pacemaker_cluster_vip_hana_secondary_ip_address + +- _Type:_ `string` + +The virtual IP for read-only access to the secondary HANA instance.
+Optional parameter in HANA clusters.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver AAS instance.
+Mandatory for NetWeaver AAS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__AAS` + +Name of the SAPInstance resource for NetWeaver AAS.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver ASCS instance.
+Mandatory for NetWeaver ASCS/ERS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_group_name + +- _Type:_ `string` +- _Default:_ `grp__ASCS` + +Name of the NetWeaver ASCS resource group.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__ASCS` + +Name of the SAPInstance resource for NetWeaver ASCS.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver ERS instance.
+Mandatory for NetWeaver ASCS/ERS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_group_name + +- _Type:_ `string` +- _Default:_ `grp__ERS` + +Name of the NetWeaver ERS resource group.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__ERS` + +Name of the SAPInstance resource for NetWeaver ERS.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver PAS instance.
+Mandatory for NetWeaver PAS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__PAS` + +Name of the SAPInstance resource for NetWeaver PAS.
+ +### sap_ha_pacemaker_cluster_vip_secondary_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__HDB_readonly` + +Customize the name of the resource managing the Virtual IP of read-only access to the secondary HANA instance.
+ + + \ No newline at end of file diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index de8c02791..55e19ad21 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -1,1154 +1,138 @@ - + # sap_ha_pacemaker_cluster Ansible Role - + ![Ansible Lint for sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_pacemaker_cluster.yml/badge.svg) -Ansible Role for installation and configuration of Linux Pacemaker for High Availability of SAP Systems run on various Infrastructure Platforms. - -## Scope - -This Ansible Role provides: -- installation of Linux Pacemaker packages and dependencies -- configuration of Linux Pacemaker cluster with all relevant fencing agent and resource agent for an Infrastructure Platform and SAP Software (SAP HANA or SAP NetWeaver) -- setup and instantiation of Linux Pacemaker cluster (using `ha_cluster` Linux System Role) - -This Ansible Role has been tested for the following SAP Software Solution scenario deployments: -- SAP HANA Scale-up High Availability (SAPHanaSR Classic and SAPHanaSR-angi) -- SAP NetWeaver (ABAP) AS ASCS and ERS High Availability -- `Experimental:` SAP NetWeaver (ABAP) AS PAS and AAS High Availability -- `Experimental:` SAP NetWeaver (JAVA) AS SCS and ERS High Availability - -This Ansible Role contains Infrastructure Platform specific alterations for: -- AWS EC2 Virtual Servers -- `Beta:` Microsoft Azure Virtual Machines -- `Experimental:` Google Cloud Compute Engine Virtual Machine -- `Experimental:` IBM Cloud Virtual Server -- `Experimental:` IBM Power Virtual Server from IBM Cloud -- `Experimental:` IBM PowerVC hypervisor Virtual Machine - -Please note, this Ansible Role `sap_ha_pacemaker_cluster` is acting as a wrapper and generates the parameter definitions for a given SAP System, Infrastructure Platform specific variables and other additional steps to complete the SAP High Availability setup using Linux Pacemaker clusters. - -### Warnings :warning: - -- :warning: Do **not** execute this Ansible Role against already configured Linux Pacemaker cluster nodes; unless you know what you are doing and have prepared the input variables for the Ansible Role according to / matching to the existing Linux Pacemaker setup! -- :warning: Infrastructure Platforms not explicitly listed as available/tested are very unlikely to work. - -## Functionality - -_All of the following functionality is provided as **Technology Preview**._ - -### SAP HANA scale-up (performance-optimized) with SAP HANA System Replication, High Availability using Linux Pacemaker 2-node cluster - -| Platform | Usability | -| -------- | --------- | -| :heavy_check_mark: physical server | expected to work with any fencing method that is supported by the `ha_cluster` Linux System Role | -| :heavy_check_mark: OVirt VM | tested and working | -| :heavy_check_mark: AWS EC2 VS | platform detection and awscli setup included, tested and expected to work | - -### SAP NetWeaver (ABAP) ASCS and ERS, High Availability using Linux Pacemaker 2-node cluster - -| Platform | Usability | -| -------- | --------- | -| :heavy_check_mark: physical server | expected to work with any fencing method that is supported by the `ha_cluster` Linux System Role | -| :heavy_check_mark: OVirt VM | tested and working | -| :heavy_check_mark: AWS EC2 VS | platform detection and awscli setup included, tested and expected to work | - -## Requirements - -The Ansible Role requires the SAP HANA Database Server or SAP NetWeaver Application Server software installation to already exist on the target host/s. - -The target host must be either: -- Red Hat - - OS version: Registered RHEL4SAP (HA and US) 8.4+ - - OS package repositories enabled: SAP and High Availability -- SUSE - - OS version: Registered SLES for SAP 15+ (SLES4SAP 15+) - - OS package repositories enabled: HA Extension is part of registered SLES4SAP - - - -The Ansible Control System (where Ansible is executed from) must have: -- Ansible Core 2.9+ -- Access to dependency Ansible Collections and Ansible Roles: - - **Upstream**: - - Ansible Collection [`community.sap_install` from Ansible Galaxy](https://galaxy.ansible.com/community/sap_install) version `1.4.1` or later - - Ansible Collection [`fedora.linux_system_roles` from Ansible Galaxy](https://galaxy.ansible.com/fedora/linux_system_roles) version `1.82.0` or later - - **Supported (Downstream)** via Red Hat Ansible Automation Platform (AAP) license: - - Ansible Collection [`redhat.sap_install` from Red Hat Ansible Automation Platform Hub](https://console.redhat.com/ansible/automation-hub/repo/published/redhat/sap_install) version `1.3.0` or later - - Ansible Collection [`redhat.rhel_system_roles` from Red Hat Ansible Automation Platform Hub](https://console.redhat.com/ansible/automation-hub/repo/published/redhat/rhel_system_roles) version `1.20.0` or later - - **Supported (Downstream)** via RHEL4SAP license: - - RHEL System Roles for SAP RPM Package `rhel-system-roles-sap-3.6.0` or later - - RHEL System Roles RPM Package `rhel-system-roles-1.20.0` or later +## Description + +Ansible Role `sap_ha_pacemaker_cluster` is used to install and configure Linux Pacemaker High Availability clusters for SAP HANA and SAP Netweaver systems on various infrastructure platforms. + ## Prerequisites + +Infrastructure: +- It is required to create them manually or using [sap_vm_provision](https://github.com/sap-linuxlab/community.sap_infrastructure/tree/main/roles/sap_vm_provision) role, because this role does not create any Cloud platform resources that are required by Resource Agents. -All SAP Software must be installed, and all remote/file storage mounts must be available with correct permissions defined by SAP documentation. For SAP HANA High Availability, SAP HANA System Replication must already be installed. +Collection dependency: +1. `fedora.linux_system_roles` -In addition, the following network ports must be available: +Managed nodes: +1. Supported SAP system is installed +2. SAP HANA System Replication is configured for SAP HANA HA cluster +3. Operating system has access to all required packages +4. All required ports are open (details below) -| **SAP Technical Application and Component** | **Port** | +| SAP HANA System Replication process | Port | +| --- | --- | +| hdbnameserver
used for log and data shipping from a primary site to a secondary site.
System DB port number plus 10,000
| 4``01 | +| hdbnameserver
unencrypted metadata communication between sites.
System DB port number plus 10,000
| 4``02 | +| hdbnameserver
used for encrypted metadata communication between sites.
System DB port number plus 10,000
| 4``06 | +| hdbindexserver
used for first MDC Tenant database schema | 4``03 | +| hdbxsengine
used for SAP HANA XSC/XSA | 4``07| +| hdbscriptserver
used for log and data shipping from a primary site to a secondary site.
Tenant port number plus 10,000
| 4``40-97 | +| hdbxsengine
used for log and data shipping from a primary site to a secondary site.
Tenant port number plus 10,000
| 4``40-97 | + +| Linux Pacemaker process | Port | | --- | --- | -| **_SAP HANA System Replication_** | | -| hdbnameserver
used for log and data shipping from a primary site to a secondary site.
System DB port number plus 10,000
| 4``01 | -| hdbnameserver
unencrypted metadata communication between sites.
System DB port number plus 10,000
| 4``02 | -| hdbnameserver
used for encrypted metadata communication between sites.
System DB port number plus 10,000
| 4``06 | -| hdbindexserver
used for first MDC Tenant database schema | 4``03 | -| hdbxsengine
used for SAP HANA XSC/XSA | 4``07| -| hdbscriptserver
used for log and data shipping from a primary site to a secondary site.
Tenant port number plus 10,000
| 4``40-97 | -| hdbxsengine
used for log and data shipping from a primary site to a secondary site.
Tenant port number plus 10,000
| 4``40-97 | -| **_Linux Pacemaker_** | | | pcsd
cluster nodes requirement for node-to-node communication | 2224 (TCP)| | pacemaker
cluster nodes requirement for Pacemaker Remote service daemon | 3121 (TCP) | | corosync
cluster nodes requirement for node-to-node communication | 5404-5412 (UDP) | + + +## Execution + +**:warning: This ansible role will destroy and then recreate Linux Pacemaker cluster in process.** +:warning: Do not execute this Ansible Role against existing Linux Pacemaker clusters unless you know what you are doing and you prepare inputs according to existing cluster. + +Role can be execute separately or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + +### Supported Platforms +| Platform | Status | Notes | +| -------- | --------- | --------- | +| Physical server | :heavy_check_mark: | Need to specify valid fence agent | +| AWS EC2 Virtual Servers | :heavy_check_mark: | | +| Google Cloud Compute Engine Virtual Machine | :heavy_check_mark: | | +| Microsoft Azure Virtual Machines | :heavy_check_mark: | | +| IBM Cloud Virtual Server | :heavy_check_mark: | | +| IBM Power Virtual Server from IBM Cloud | :heavy_check_mark: | | +| IBM PowerVC hypervisor Virtual Machine | :heavy_check_mark: | | +| OVirt VM | :heavy_check_mark: | | + +### Supported scenarios + +| Platform | Variant | Status | +| -------- | --------- | --------- | +| SAP HANA scale-up (performance-optimized) 2 nodes | SAPHanaSR Classic | :heavy_check_mark: | +| SAP HANA scale-up (performance-optimized) 2 nodes | SAPHanaSR-angi | :heavy_check_mark: | +| SAP NetWeaver (ABAP) ASCS and ERS 2 nodes | Classic | :heavy_check_mark: | +| SAP NetWeaver (ABAP) ASCS and ERS 2 nodes | Simple Mount | :heavy_check_mark: | + + +### Execution Flow + +1. Assert that required inputs were provided. +2. Detect target infrastructure platform and prepare recommended inputs unless they were provided. +3. Prepare variables with all cluster parameters and resources +4. Execute role `ha_cluster` from Ansible Collection `fedora.linux_system_roles` with prepared inputs. +5. Execute SAP product specific post tasks and verify cluster is running + + +### Example + +```yaml +--- +- name: Ansible Play for SAP HANA HA Scale-up cluster setup + hosts: hana_primary, hana_secondary + become: true + tasks: + - name: Execute Ansible Role sap_ha_pacemaker_cluster + ansible.builtin.include_role: + name: community.sap_install.sap_ha_pacemaker_cluster + vars: + sap_ha_pacemaker_cluster_cluster_name: clusterhdb + sap_ha_pacemaker_cluster_hacluster_user_password: 'clusterpass' + + sap_ha_pacemaker_cluster_sap_type: saphana_scaleup + sap_ha_pacemaker_cluster_host_type: + - hana_scaleup_perf + + sap_ha_pacemaker_cluster_hana_sid: "H01" + sap_ha_pacemaker_cluster_hana_instance_nr: "01" + + sap_ha_pacemaker_cluster_cluster_nodes: + - node_name: h01hana0 + node_ip: "10.10.10.10" + node_role: primary + hana_site: DC01 + - node_name: h01hana1 + node_ip: "10.10.10.11" + node_role: secondary + hana_site: DC02 + sap_ha_pacemaker_cluster_replication_type: none + sap_ha_pacemaker_cluster_vip_resource_group_name: viphdb + + sap_hana_cluster_nodes: +``` + -## Execution Flow - -The Ansible Role is sequential: -- Validate input Ansible Variables -- Identify host's Infrastructure Platform -- Generate Linux Pacemaker definition for given Infrastructure Platform and SAP Software -- Execute `ha_cluster` Ansible Role with Linux Pacemaker definition -- Instantiate Linux Pacemaker cluster - -## Tips - -Check out the [role variables of the `ha_cluster` Linux System Role](https://github.com/linux-system-roles/ha_cluster/blob/main/README.md) for additional possible settings that can be applied when using the `sap_ha_pacemaker_cluster` role. - -For example:
-Adding `ha_cluster_start_on_boot: false` to disable the automatic start of cluster services on boot. - -## Sample + + -Please see a full sample using multiple hosts to create an SAP S/4HANA Distributed deployment in the [/playbooks](../../playbooks/) directory of the Ansible Collection `sap_install`. + +## Further Information +Cluster can be further customized with inputs available from underlying role [ha_cluster](https://github.com/linux-system-roles/ha_cluster/blob/main/README.md), which will take precedence over `sap_ha_pacemaker_cluster` inputs. + ## License - + Apache 2.0 + -## Author Information +## Maintainers + +- [Janine Fuchs](https://github.com/ja9fuchs) +- [Marcel Mamula](https://github.com/marcelmamula) + -Red Hat for SAP Community of Practice, Janine Fuchs, IBM Lab for SAP Solutions - - - ---- - ## Role Input Parameters - -Minimum required parameters for all clusters: - -- [sap_ha_pacemaker_cluster_hacluster_user_password](#sap_ha_pacemaker_cluster_hacluster_user_password) - -Additional minimum requirements depend on the type of cluster setup and on the target platform. - -### sap_ha_pacemaker_cluster_aws_access_key_id - -- _Type:_ `string` - -AWS access key to allow control of instances (for example for fencing operations).
-Mandatory for the cluster nodes setup on AWS EC2 instances, when:
-1. IAM Role or Instance profile is not attached to EC2 instance.
-2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
- -### sap_ha_pacemaker_cluster_aws_credentials_setup - -- _Type:_ `string` - -Set this parameter to 'true' to store AWS credentials into /root/.aws/credentials.
-Requires: `sap_ha_pacemaker_cluster_aws_access_key_id` and `sap_ha_pacemaker_cluster_aws_secret_access_key`
-Mandatory for the cluster nodes setup on AWS EC2 instances, when:
-1. IAM Role or Instance profile is not attached to EC2 instance.
- -### sap_ha_pacemaker_cluster_aws_region - -- _Type:_ `string` - -The AWS region in which the instances to be used for the cluster setup are located.
-Mandatory for cluster nodes setup on AWS EC2 instances.
- -### sap_ha_pacemaker_cluster_aws_secret_access_key - -- _Type:_ `string` - -AWS secret key, paired with the access key for instance control.
-Mandatory for the cluster nodes setup on AWS EC2 instances, when:
-1. IAM Role or Instance profile is not attached to EC2 instance.
-2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
- -### sap_ha_pacemaker_cluster_aws_vip_update_rt - -- _Type:_ `string` - -List one more routing table IDs for managing Virtual IP failover through routing table changes.
-Multiple routing tables must be defined as a comma-separated string (no spaces).
-Mandatory for the VIP resource configuration in AWS EC2 environments.
- -### sap_ha_pacemaker_cluster_cluster_name - -- _Type:_ `string` - -The name of the pacemaker cluster.
-Inherits the `ha_cluster` LSR native parameter `ha_cluster_cluster_name` if not defined.
-If not defined, the `ha_cluster` Linux System Role default will be used.
- -### sap_ha_pacemaker_cluster_cluster_nodes - -- _Type:_ `list` - -List of cluster nodes and associated attributes to describe the target SAP HA environment.
-This is required for the HANA System Replication configuration.
-Synonym for this parameter is `sap_hana_cluster_nodes`.
-Mandatory to be defined for HANA clusters.
- -- **hana_site**
- Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
Mandatory for HANA clusters (sudo config for system replication). -- **node_ip**
- IP address of the node used for HANA System Replication.
_Optional. Currently not needed/used in cluster configuration._ -- **node_name**
- Name of the cluster node, should match the remote systems' hostnames.
_Optional. Currently not needed/used in cluster configuration._ -- **node_role**
- Role of the defined `node_name` in the SAP HANA cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes.
_Optional. Currently not needed/used in cluster configuration._ - -Example: - -```yaml -sap_ha_pacemaker_cluster_cluster_nodes: -- hana_site: DC01 - node_ip: 192.168.5.1 - node_name: nodeA - node_role: primary -- hana_site: DC02 -``` - -### sap_ha_pacemaker_cluster_cluster_properties - -- _Type:_ `dict` -- _Default:_ `{'concurrent-fencing': True, 'stonith-enabled': True, 'stonith-timeout': 900}` - -Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
-When no STONITH resource is defined, STONITH will be disabled and a warning displayed.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_cluster_properties: - concurrent-fencing: true - stonith-enabled: true - stonith-timeout: 900 -``` - -### sap_ha_pacemaker_cluster_create_config_dest - -- _Type:_ `string` -- _Default:_ `review_resource_config.yml` - -The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory.
-Requires `sap_ha_pacemaker_cluster_create_config_varfile` to be enabled for generating the output file.
-Specify a path/filename to save the file in a custom location.
-The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
- -### sap_ha_pacemaker_cluster_create_config_varfile - -- _Type:_ `bool` -- _Default:_ `False` - -When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format.
-This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_pacemaker_cluster' role.
-When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes.
-WARNING! This report may include sensitive details like secrets required for certain cluster resources!
- -### sap_ha_pacemaker_cluster_enable_cluster_connector - -- _Type:_ `bool` -- _Default:_ `True` - -Enables/Disables the SAP HA Interface for SAP ABAP application server instances, also known as `sap_cluster_connector`.
-Set this parameter to 'false' if the SAP HA interface should not be installed and configured.
- -### sap_ha_pacemaker_cluster_extra_packages - -- _Type:_ `list` - -Additional extra packages to be installed, for instance specific resource packages.
-For SAP clusters configured by this role, the relevant standard packages for the target scenario are automatically included.
- -### sap_ha_pacemaker_cluster_fence_agent_packages - -- _Type:_ `list` - -Additional fence agent packages to be installed.
-This is automatically combined with default packages in:
-`__sap_ha_pacemaker_cluster_fence_agent_packages_minimal`
-`__sap_ha_pacemaker_cluster_fence_agent_packages_platform`
- -### sap_ha_pacemaker_cluster_gcp_project - -- _Type:_ `string` - -Google Cloud project name in which the target instances are installed.
-Mandatory for the cluster setup on GCP instances.
- -### sap_ha_pacemaker_cluster_gcp_region_zone - -- _Type:_ `string` - -Google Cloud Platform region zone ID.
-Mandatory for the cluster setup on GCP instances.
- -### sap_ha_pacemaker_cluster_ha_cluster - -- _Type:_ `dict` - -The `ha_cluster` LSR native parameter `ha_cluster` can be used as a synonym.
-Optional _**host_vars**_ parameter - if defined it must be set for each node.
-Dictionary that can contain various node options for the pacemaker cluster configuration.
-Supported options can be reviewed in the `ha_cluster` Linux System Role [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md].
-If not defined, the `ha_cluster` Linux System Role default will be used.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_ha_cluster: - corosync_addresses: - - 192.168.1.10 - - 192.168.2.10 - node_name: nodeA -``` - -### sap_ha_pacemaker_cluster_hacluster_user_password required - -- _Type:_ `string` - -The password of the `hacluster` user which is created during pacemaker installation.
-Inherits the value of `ha_cluster_hacluster_password`, when defined.
- -### sap_ha_pacemaker_cluster_hana_automated_register - -- _Type:_ `bool` -- _Default:_ `True` - -Parameter for the 'SAPHana' cluster resource.
-Define if a former primary should be re-registered automatically as secondary.
- -### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_primary_name - -- _Type:_ `string` -- _Default:_ `col_saphana_vip__HDB_primary` - -Customize the cluster constraint name for VIP and SAPHana primary clone colocation.
- -### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_secondary_name - -- _Type:_ `string` -- _Default:_ `col_saphana_vip__HDB_readonly` - -Customize the cluster constraint name for VIP and SAPHana secondary clone colocation.
- -### sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout - -- _Type:_ `int` -- _Default:_ `7200` - -Parameter for the 'SAPHana' cluster resource.
-Time difference needed between to primary time stamps, if a dual-primary situation occurs.
-If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
-This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
- -### sap_ha_pacemaker_cluster_hana_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHanaFil__HDB` - -Customize the cluster resource name of the SAP HANA Filesystem clone.
- -### sap_ha_pacemaker_cluster_hana_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHanaFil__HDB` - -Customize the cluster resource name of the SAP HANA Filesystem.
- -### sap_ha_pacemaker_cluster_hana_global_ini_path - -- _Type:_ `string` -- _Default:_ `/usr/sap//SYS/global/hdb/custom/config/global.ini` - -Path with location of global.ini for srHook update
- -### sap_ha_pacemaker_cluster_hana_hook_chksrv - -- _Type:_ `bool` -- _Default:_ `False` - -Controls if ChkSrv srHook is enabled during srHook creation.
-It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
- -### sap_ha_pacemaker_cluster_hana_hook_tkover - -- _Type:_ `bool` -- _Default:_ `False` - -Controls if TkOver srHook is enabled during srHook creation.
-It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
- -### sap_ha_pacemaker_cluster_hana_hooks - -- _Type:_ `list` -- _Default:_ `[]` - -Customize required list of SAP HANA Hooks
-Mandatory to include SAPHanaSR srHook in list.
-Mandatory attributes are provider and path.
-Example below shows mandatory SAPHanaSR, TkOver and ChkSrv hooks.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_hana_hooks: -- options: - - name: execution_order - value: 1 - path: /usr/share/SAPHanaSR/ - provider: SAPHanaSR -- options: - - name: execution_order - value: 2 - path: /usr/share/SAPHanaSR/ - provider: susTkOver -- options: - - name: execution_order - value: 3 - - name: action_on_lost - value: stop - path: /usr/share/SAPHanaSR/ - provider: susChkSrv -``` - -### sap_ha_pacemaker_cluster_hana_instance_nr - -- _Type:_ `string` - -The instance number of the SAP HANA database which this role will configure in the cluster.
-Inherits the value of `sap_hana_instance_number`, when defined.
-Mandatory for SAP HANA cluster setups.
- -### sap_ha_pacemaker_cluster_hana_order_hana_vip_primary_name - -- _Type:_ `string` -- _Default:_ `ord_saphana_vip__HDB_primary` - -Customize the cluster constraint name for VIP and SAPHana primary clone order.
- -### sap_ha_pacemaker_cluster_hana_order_hana_vip_secondary_name - -- _Type:_ `string` -- _Default:_ `ord_saphana_vip__HDB_readonly` - -Customize the cluster constraint name for VIP and SAPHana secondary clone order.
- -### sap_ha_pacemaker_cluster_hana_order_topology_hana_name - -- _Type:_ `string` -- _Default:_ `ord_saphana_saphanatop__HDB` - -Customize the cluster constraint name for SAPHana and Topology order.
- -### sap_ha_pacemaker_cluster_hana_prefer_site_takeover - -- _Type:_ `bool` -- _Default:_ `True` - -Parameter for the 'SAPHana' cluster resource.
-Set to "false" if the cluster should first attempt to restart the instance on the same node.
-When set to "true" (default) a failover to secondary will be initiated on resource failure.
- -### sap_ha_pacemaker_cluster_hana_resource_clone_msl_name - -- _Type:_ `string` -- _Default:_ `msl_SAPHana__HDB` - -Customize the cluster resource name of the SAP HANA DB resource master slave clone.
-Master Slave clone is specific to Classic SAPHana resource on SUSE (non-angi).
- -### sap_ha_pacemaker_cluster_hana_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHana__HDB` - -Customize the cluster resource name of the SAP HANA DB resource clone.
- -### sap_ha_pacemaker_cluster_hana_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHana__HDB` - -Customize the cluster resource name of the SAP HANA DB resource.
- -### sap_ha_pacemaker_cluster_hana_sid - -- _Type:_ `string` - -The SAP HANA SID of the instance that will be configured in the cluster.
-The SID must follow SAP specifications - see SAP Note 1979280.
-Inherits the value of `sap_hana_sid`, when defined.
-Mandatory for SAP HANA cluster setups.
- -### sap_ha_pacemaker_cluster_hana_topology_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHanaTop__HDB` - -Customize the cluster resource name of the SAP HANA Topology resource clone.
- -### sap_ha_pacemaker_cluster_hana_topology_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHanaTop__HDB` - -Customize the cluster resource name of the SAP HANA Topology resource.
- -### sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHanaCon__HDB` - -Customize the cluster resource name of the SAP HANA Controller clone.
- -### sap_ha_pacemaker_cluster_hanacontroller_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHanaCon__HDB` - -Customize the cluster resource name of the SAP HANA Controller.
- -### sap_ha_pacemaker_cluster_host_type - -- _Type:_ `list` -- _Default:_ `hana_scaleup_perf` - -The SAP landscape to for which the cluster is to be configured.
-The default is a 2-node SAP HANA scale-up cluster.
- -### sap_ha_pacemaker_cluster_ibmcloud_api_key - -- _Type:_ `string` - -The API key which is required to allow the control of instances (for example for fencing operations).
-Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_powervs_api_type - -- _Type:_ `string` - -IBM Power Virtual Server API Endpoint type (public or private) dependent on network interface attachments for the target instances.
-Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_powervs_forward_proxy_url - -- _Type:_ `string` - -IBM Power Virtual Server forward proxy url when IBM Power Virtual Server API Endpoint type is set to private.
-When public network interface, can be ignored.
-When private network interface, mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_powervs_workspace_crn - -- _Type:_ `string` - -IBM Power Virtual Server Workspace service cloud resource name (CRN) identifier which contains the target instances
-Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_region - -- _Type:_ `string` - -The IBM Cloud VS region name in which the instances are running.
-Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
- -### sap_ha_pacemaker_cluster_msazure_resource_group - -- _Type:_ `string` - -Resource group name/ID in which the target instances are defined.
-Mandatory for the cluster setup on MS Azure instances.
- -### sap_ha_pacemaker_cluster_msazure_subscription_id - -- _Type:_ `string` - -Subscription ID of the MS Azure environment containing the target instances.
-Mandatory for the cluster setup on MS Azure instances.
- -### sap_ha_pacemaker_cluster_nwas_abap_aas_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP AAS instance.
-Mandatory for NetWeaver AAS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1 - -- _Type:_ `bool` -- _Default:_ `False` - -The standard NetWeaver ASCS/ERS cluster will be set up as ENSA2.
-Set this parameter to 'true' to configure it as ENSA1.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_simple_mount - -- _Type:_ `bool` -- _Default:_ `True` - -Enables preferred method for ASCS ERS ENSA2 clusters - Simple Mount
-Set this parameter to 'true' to configure ENSA2 Simple Mount.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__ASCS` - -Name of the filesystem resource for the ASCS instance.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_group_stickiness - -- _Type:_ `string` -- _Default:_ `3000` - -NetWeaver ASCS resource group stickiness to prefer the ASCS group to stay on the node it was started on.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP ASCS instance.
-Mandatory for NetWeaver ASCS/ERS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_automatic_recover_bool - -- _Type:_ `bool` -- _Default:_ `False` - -NetWeaver ASCS instance resource option "AUTOMATIC_RECOVER".
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_failure_timeout - -- _Type:_ `string` -- _Default:_ `60` - -NetWeaver ASCS instance failure-timeout attribute.
-Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_migration_threshold - -- _Type:_ `string` -- _Default:_ `1` - -NetWeaver ASCS instance migration-threshold setting attribute.
-Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_instance_name - -- _Type:_ `string` - -The name of the ASCS instance, typically the profile name.
-Mandatory for the NetWeaver ASCS/ERS cluster setup
-Recommended format _ASCS_.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPInstance__ASCS` - -Name of the ASCS instance resource.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_stickiness - -- _Type:_ `string` -- _Default:_ `5000` - -NetWeaver ASCS instance resource stickiness attribute.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_start_profile_string - -- _Type:_ `string` - -The full path and name of the ASCS instance profile.
-Mandatory for the NetWeaver ASCS/ERS cluster setup.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapstartsrv_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPStartSrv__ASCS` - -Name of the ASCS SAPStartSrv resource for simple mount.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__ERS` - -Name of the filesystem resource for the ERS instance.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP ERS instance.
-Mandatory for NetWeaver ASCS/ERS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_automatic_recover_bool - -- _Type:_ `bool` -- _Default:_ `False` - -NetWeaver ERS instance resource option "AUTOMATIC_RECOVER".
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_instance_name - -- _Type:_ `string` - -The name of the ERS instance, typically the profile name.
-Mandatory for the NetWeaver ASCS/ERS cluster setup.
-Recommended format _ERS_.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPInstance__ERS` - -Name of the ERS instance resource.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_start_profile_string - -- _Type:_ `string` - -The full path and name of the ERS instance profile.
-Mandatory for the NetWeaver ASCS/ERS cluster.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapstartsrv_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPStartSrv__ERS` - -Name of the ERS SAPstartSrv resource for simple mount.
- -### sap_ha_pacemaker_cluster_nwas_abap_pas_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP PAS instance.
-Mandatory for NetWeaver PAS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_sid - -- _Type:_ `string` - -SID of the NetWeaver instances.
-Mandatory for NetWeaver cluster configuration.
-Uses `sap_swpm_sid` if defined.
-Mandatory for NetWeaver cluster setups.
- -### sap_ha_pacemaker_cluster_nwas_colocation_ascs_no_ers_name - -- _Type:_ `string` -- _Default:_ `col_ascs_separate_` - -Customize the cluster constraint name for ASCS and ERS separation colocation.
- -### sap_ha_pacemaker_cluster_nwas_order_ascs_first_name - -- _Type:_ `string` -- _Default:_ `ord_ascs_first_` - -Customize the cluster constraint name for ASCS starting before ERS order.
- -### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_fs__sapmnt` - -Filesystem resource clone name for the shared filesystem /sapmnt.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__sapmnt` - -Filesystem resource name for the shared filesystem /sapmnt.
-Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed - -- _Type:_ `bool` -- _Default:_ `False` - -Change this parameter to 'true' if the 3 shared filesystems `/usr/sap/trans`, `/usr/sap//SYS` and '/sapmnt' shall be configured as cloned cluster resources.
- -### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_fs__sys` - -Filesystem resource clone name for the shared filesystem /usr/sap//SYS.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__sys` - -Filesystem resource name for the transports filesystem /usr/sap//SYS.
-Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_fs__trans` - -Filesystem resource clone name for the shared filesystem /usr/sap/trans.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__trans` - -Filesystem resource name for the transports filesystem /usr/sap/trans.
-Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_operation_defaults - -- _Type:_ `dict` -- _Default:_ `{'record-pending': True, 'timeout': 600}` - -Set default operation parameters that will be valid for all pacemaker resources.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_operation_defaults: - record-pending: true - timeout: 600 -``` - -### sap_ha_pacemaker_cluster_resource_defaults - -- _Type:_ `dict` -- _Default:_ `{'migration-threshold': 5000, 'resource-stickiness': 3000}` - -Set default parameters that will be valid for all pacemaker resources.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_resource_defaults: - migration-threshold: 5000 - resource-stickiness: 1000 -``` - -### sap_ha_pacemaker_cluster_saphanasr_angi_detection - -- _Type:_ `string` -- _Default:_ `True` - -Disabling this variable enables to use Classic SAPHanaSR agents even on server, with SAPHanaSR-angi is available.
- -### sap_ha_pacemaker_cluster_sbd_devices - -- _Type:_ `list` - -Required if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide list of block devices for Stonith SBD agent
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_devices: -- /dev/disk/by-id/scsi-3600 -``` - -### sap_ha_pacemaker_cluster_sbd_enabled - -- _Type:_ `bool` - -Set this parameter to 'true' to enable workflow to add Stonith SBD resource.
-Stonith SBD resource has to be provided as part of `sap_ha_pacemaker_cluster_stonith_custom`.
-Default SBD agents are: stonith:external/sbd for SLES and stonith:fence_sbd for RHEL
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_devices: -- /dev/disk/by-id/scsi-3600 -sap_ha_pacemaker_cluster_sbd_enabled: true -sap_ha_pacemaker_cluster_stonith_custom: -- agent: stonith:external/sbd - id: stonith_sbd - instance_attrs: - - attrs: - - name: pcmk_delay_max - value: 15 -``` - -### sap_ha_pacemaker_cluster_sbd_options - -- _Type:_ `list` - -Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide list of SBD specific options that are added into SBD configuration file.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_options: -- name: startmode - value: clean -``` - -### sap_ha_pacemaker_cluster_sbd_watchdog - -- _Type:_ `str` -- _Default:_ `/dev/watchdog` - -Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide watchdog name to override default /dev/watchdog
- -### sap_ha_pacemaker_cluster_sbd_watchdog_modules - -- _Type:_ `list` - -Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide list of watchdog kernel modules to be loaded (creates /dev/watchdog* devices).
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_watchdog_modules: -- softdog -``` - -### sap_ha_pacemaker_cluster_stonith_custom - -- _Type:_ `list` - -Custom list of STONITH resource(s) to be configured in the cluster.
-This definition override any defaults the role would apply otherwise.
-Definition follows structure of ha_cluster_resource_primitives in linux-system-roles/ha_cluster
- -- **agent**
- Resource agent name, must contain the prefix "stonith:" to avoid mismatches or failures. -- **id**
- Parameter `id` is required.
Name that will be used as the resource ID (name). -- **instance_attrs**
- Defines resource agent params as list of name/value pairs.
Requires the mandatory options for the particular stonith resource agent to be defined, otherwise the setup will fail.
Example: stonith:fence_sbd agent requires devices option with list of SBD disks.
Example: stonith:external/sbd agent does not require devices option, but `sap_ha_pacemaker_cluster_sbd_devices`. -- **meta_attrs**
- Defines meta attributes as list of name/value pairs. -- **name**
- WARNING! This option will be removed in future release. -- **operations**
- Defines list of resource agent operations. -- **options**
- WARNING! This option will be removed in future release. - -Example: - -```yaml -sap_ha_pacemaker_cluster_stonith_custom: -- agent: stonith:fence_rhevm - id: my-fence-resource - instance_attrs: - - attrs: - - name: ip - value: rhevm-server - - name: username - value: login-user - - name: password - value: login-user-password - - name: pcmk_host_list - value: node1,node2 - - name: power_wait - value: 3 - meta_attrs: - - attrs: - - name: target-role - value: Started - operations: - - action: start - attrs: - - name: interval - value: 0 - - name: timeout - value: 180 -``` - -### sap_ha_pacemaker_cluster_storage_definition - -- _Type:_ `list` - -List of filesystem definitions used for filesystem cluster resources.
-Options relevant, see example.
-Mandatory for SAP NetWeaver HA cluster configurations.
-Reuse `sap_storage_setup_definition` if defined.
-Reuse `sap_storage_setup_definition` will extract values 'mountpoint', 'nfs_filesystem_type', 'nfs_mount_options', 'nfs_path', 'nfs_server'.
-Reuse `sap_storage_setup_definition` all options are documented under Ansible Role `sap_storage_setup`.
-Note! For this variable, the argument specification does not list options, to avoid errors during reuse of `sap_storage_setup_definition` if defined.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_storage_definition: -- mountpoint: /usr/sap - name: usr_sap - nfs_path: /usr/sap - nfs_server: nfs-server.example.com:/ -- mountpoint: /usr/sap/trans - name: usr_sap_trans - nfs_path: /usr/sap/trans - nfs_server: nfs-server.example.com:/ -- mountpoint: /sapmnt - name: sapmnt - nfs_filesystem_type: nfs - nfs_mount_options: defaults - nfs_path: /sapmnt - nfs_server: nfs-server.example.com:/ -``` - -### sap_ha_pacemaker_cluster_storage_nfs_filesytem_type - -- _Type:_ `string` -- _Default:_ `nfs` - -Filesystem type of the NFS filesystems that are part of the cluster configuration.
- -### sap_ha_pacemaker_cluster_storage_nfs_mount_options - -- _Type:_ `string` -- _Default:_ `defaults` - -Mount options of the NFS filesystems that are part of the cluster configuration.
- -### sap_ha_pacemaker_cluster_storage_nfs_server - -- _Type:_ `string` - -Default address of the NFS server, if not defined individually by filesystem.
- -### sap_ha_pacemaker_cluster_system_roles_collection - -- _Type:_ `string` -- _Default:_ `fedora.linux_system_roles` - -Reference to the Ansible Collection used for the Linux System Roles.
-For community/upstream, use 'fedora.linux_system_roles'.
-For RHEL System Roles for SAP, or Red Hat Automation Hub, use 'redhat.rhel_system_roles'.
- -### sap_ha_pacemaker_cluster_vip_client_interface - -- _Type:_ `string` - -OS device name of the network interface to use for the Virtual IP configuration.
-When there is only one interface on the system, its name will be used by default.
- -### sap_ha_pacemaker_cluster_vip_hana_primary_ip_address - -- _Type:_ `string` - -The virtual IP of the primary HANA instance.
-Mandatory parameter for HANA clusters.
- -### sap_ha_pacemaker_cluster_vip_hana_primary_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__HDB_primary` - -Customize the name of the resource managing the Virtual IP of the primary HANA instance.
- -### sap_ha_pacemaker_cluster_vip_hana_secondary_ip_address - -- _Type:_ `string` - -The virtual IP for read-only access to the secondary HANA instance.
-Optional parameter in HANA clusters.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver AAS instance.
-Mandatory for NetWeaver AAS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__AAS` - -Name of the SAPInstance resource for NetWeaver AAS.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver ASCS instance.
-Mandatory for NetWeaver ASCS/ERS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_group_name - -- _Type:_ `string` -- _Default:_ `grp__ASCS` - -Name of the NetWeaver ASCS resource group.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__ASCS` - -Name of the SAPInstance resource for NetWeaver ASCS.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver ERS instance.
-Mandatory for NetWeaver ASCS/ERS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_group_name - -- _Type:_ `string` -- _Default:_ `grp__ERS` - -Name of the NetWeaver ERS resource group.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__ERS` - -Name of the SAPInstance resource for NetWeaver ERS.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver PAS instance.
-Mandatory for NetWeaver PAS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__PAS` - -Name of the SAPInstance resource for NetWeaver PAS.
- -### sap_ha_pacemaker_cluster_vip_secondary_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__HDB_readonly` - -Customize the name of the resource managing the Virtual IP of read-only access to the secondary HANA instance.
- - +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md) From 594516ecbcc6e55629ec76a3ba1c8b7314358bc1 Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Thu, 26 Sep 2024 13:39:10 +0200 Subject: [PATCH 2/3] Docs: Readme update for all roles except swpm --- README.md | 5 +- docs/getting_started/README.md | 32 + roles/sap_anydb_install_oracle/README.md | 10 +- .../INPUT_PARAMETERS.md | 311 +++++++++ roles/sap_general_preconfigure/README.md | 531 ++++----------- .../INPUT_PARAMETERS.md | 27 + roles/sap_ha_install_anydb_ibmdb2/README.md | 122 ++-- .../INPUT_PARAMETERS.md | 90 +++ roles/sap_ha_install_hana_hsr/README.md | 174 +++-- .../INPUT_PARAMETERS.md | 18 +- roles/sap_ha_pacemaker_cluster/README.md | 52 +- roles/sap_hana_install/INPUT_PARAMETERS.md | 59 ++ roles/sap_hana_install/README.md | 372 +++++------ .../sap_hana_preconfigure/INPUT_PARAMETERS.md | 324 +++++++++ roles/sap_hana_preconfigure/README.md | 626 ++++-------------- roles/sap_hostagent/INPUT_PARAMETERS.md | 130 ++++ roles/sap_hostagent/README.md | 254 ++++--- .../INPUT_PARAMETERS.md | 181 +++++ roles/sap_install_media_detect/README.md | 161 +++-- .../INPUT_PARAMETERS.md | 78 +++ roles/sap_maintain_etc_hosts/README.md | 218 +++--- .../INPUT_PARAMETERS.md | 92 +++ roles/sap_netweaver_preconfigure/README.md | 255 +++---- roles/sap_storage_setup/INPUT_PARAMETERS.md | 140 ++++ roles/sap_storage_setup/README.md | 259 ++++---- 25 files changed, 2595 insertions(+), 1926 deletions(-) create mode 100644 roles/sap_general_preconfigure/INPUT_PARAMETERS.md create mode 100644 roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md create mode 100644 roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md create mode 100644 roles/sap_hana_install/INPUT_PARAMETERS.md create mode 100644 roles/sap_hana_preconfigure/INPUT_PARAMETERS.md create mode 100644 roles/sap_hostagent/INPUT_PARAMETERS.md create mode 100644 roles/sap_install_media_detect/INPUT_PARAMETERS.md create mode 100644 roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md create mode 100644 roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md create mode 100644 roles/sap_storage_setup/INPUT_PARAMETERS.md diff --git a/README.md b/README.md index 55ca84a22..d413df34e 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ See [Installing collections](https://docs.ansible.com/ansible/latest/collections More deployment scenarios are available in [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) repository. ### Ansible Roles -All included roles can be execute separately or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. +All included roles can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. | Name | Summary | | :--- | :--- | @@ -136,6 +136,9 @@ You can find the release notes of this collection in [Changelog file](https://gi ### Variable Precedence Rules Please follow [Ansible Precedence guidelines](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable) on how to pass variables when using this collection. +### Getting Started +More information on how to execute Ansible playbooks is in [Getting started guide](https://github.com/sap-linuxlab/community.sap_install/blob/main/docs/getting_started/README.md). + ## License [Apache 2.0](https://github.com/sap-linuxlab/community.sap_install/blob/main/LICENSE) diff --git a/docs/getting_started/README.md b/docs/getting_started/README.md index 7788e3c4d..c5b79b2c1 100644 --- a/docs/getting_started/README.md +++ b/docs/getting_started/README.md @@ -6,6 +6,7 @@ In this folder you will find sample files, a few additional tips for using the p - [Inventory and variable parameters](#inventory-and-variable-parameters) - [Security parameters](#security-parameters) - [Other useful options](#other-useful-options) + - [Improve readability of playbook output in terminal](#improve-readability-of-playbook-output-in-terminal) ## How to run playbooks @@ -95,3 +96,34 @@ These are not all available options, but ones that may help getting familiar wit Be careful to choose a task which covers pre-requisites, i.e. tasks that discover information which is used in subsequent tasks have to be run to fulfill conditionals. - `-C` attempts a dry-run of the playbook without applying actual changes. This is limited to simple tasks that do not require other changes already been done in previous tasks. - `--step` this executes the playbook but will prompt for every task to be run or skipped. At the prompt it can also be told to continue and not ask again, however. Useful to slow down execution and review each tasks result before proceeding with the next task. + +### Improve readability of playbook output in terminal +Note: For terminals with dark background, replace the color code `30m` by `37m`. +In case you need to make an invisible font readable on a terminal with dark background, run the following command in the terminal: +```yaml +printf "\033[37mreadable font\n" +``` +In case you need to make an invisible font readable on a terminal with bright background, run the following command in the terminal: +```yaml +printf "\033[30mreadable font\n" +``` + +Execution of `sap_general_preconfigure` playbook with a nice compact and colored output, this time for two hosts: +```console +ansible-playbook sap.yml -l host_1,host_2 -e "{sap_general_preconfigure_assert: yes, sap_general_preconfigure_assert_ignore_errors: yes}" | +awk '{sub (" \"msg\": ", "")} + /TASK/{task_line=$0} + /fatal:/{fatal_line=$0; nfatal[host]++} + /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0} + /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2} + /SAP note/{print "\033[30m[" host"] "$0} + /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0} + /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0} + /PASS:/{npass[host]++; print "\033[32m[" host"] "$0} + /INFO:/{print "\033[34m[" host"] "$0} + /changed/&&/unreachable/{print "\033[30m[" host"] "$0} + END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) { + printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033[30m Last TASK and fatal output:\n"); print task_line, fatal_line + } + else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033[30m\n", nfail[var], nwarn[var], npass[var])}}' +``` diff --git a/roles/sap_anydb_install_oracle/README.md b/roles/sap_anydb_install_oracle/README.md index 7e55d2424..027615e3c 100644 --- a/roles/sap_anydb_install_oracle/README.md +++ b/roles/sap_anydb_install_oracle/README.md @@ -7,16 +7,22 @@ Ansible role `sap_anydb_install_oracle` is used to install Oracle Database 19.x for SAP system. -## Prerequisites + + + +## Prerequisites Managed nodes: -1. Installation media present and `sap_anydb_install_oracle_extract_path` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community.sap_launchpad) Ansible Collection. +- Directory with installation media is present and `sap_anydb_install_oracle_extract_path` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community.sap_launchpad) Ansible Collection. ## Execution + + + ### Execution Flow 1. Prepare OS: Install packages, create users, create folders and copy installation media. diff --git a/roles/sap_general_preconfigure/INPUT_PARAMETERS.md b/roles/sap_general_preconfigure/INPUT_PARAMETERS.md new file mode 100644 index 000000000..364683233 --- /dev/null +++ b/roles/sap_general_preconfigure/INPUT_PARAMETERS.md @@ -0,0 +1,311 @@ +## Input Parameters for sap_general_preconfigure Ansible Role + +#### Minimum required parameters: + +This role does not require any parameter to be set in the playbook or inventory. + + +### sap_general_preconfigure_config_all +- _Type:_ `bool` + +If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
+Default is to perform installation and configuration steps.
+ +### sap_general_preconfigure_installation +- _Type:_ `bool` + +If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+installation steps of SAP notes.
+ +### sap_general_preconfigure_configuration +- _Type:_ `bool` + +If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
+ +Example: + +```yaml +sap_general_preconfigure_config_all: false +sap_general_preconfigure_configuration: true +sap_general_preconfigure_2002167_02: true +sap_general_preconfigure_1391070: true +``` + +### sap_general_preconfigure_assert +- _Type:_ `bool` +- _Default:_ `false` + +If set to `true`, the role will run in assertion mode instead of the default configuration mode.
+ +### sap_general_preconfigure_assert_ignore_errors +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will abort when encountering any assertion error.
+If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
+This is useful if the role is used for reporting a system's SAP notes compliance.
+ +### sap_general_preconfigure_system_roles_collection +- _Type:_ `str` +- _Default:_ `'fedora.linux_system_roles'` +- _Possible Values:_
+ - `fedora.linux_system_roles` + - `redhat.rhel_system_roles` + +Set which Ansible Collection to use for the Linux System Roles.
+For community/upstream, use 'fedora.linux_system_roles'
+For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles'
+ +### sap_general_preconfigure_enable_repos +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want the role to enable the repos as configured by the following repo related parameters.
+The default is `false`, meaning that the role will not enable repos.
+ +### sap_general_preconfigure_use_netweaver_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not enable the SAP NetWeaver repo(s).
+The default is `true`, meaning that the role will enable the SAP NetWeaver repo(s).
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_use_hana_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not enable the SAP HANA repo(s).
+The default is `true`, meaning that the role will enable the SAP HANA repo(s).
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_use_ha_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not enable the high availability repo(s).
+The default is `true`, meaning that the role will enable the high availability repo(s).
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_disable_all_other_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not disable all repos before enabling the desired ones as configured above.
+The default is `true`, meaning that the role will disable all repos before enabling the desired ones.
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_req_repos +- _Type:_ `list` with elements of type `str` + +If you want to provide your own list of repos (e.g. on cloud systems), set this variable accordingly.
+Otherwise, the RHEL default repo names with the maximum support duration for the RHEL minor release are chosen automatically
+(e.g. normal repos for RHEL 8.3, e4s repos for RHEL 8.4).
+ +Example: + +```yaml +sap_general_preconfigure_req_repos: +- rhel-8-for-x86_64-baseos-eus-rpms +- rhel-8-for-x86_64-appstream-eus-rpms +- rhel-8-for-x86_64-sap-solutions-eus-rpms +- rhel-8-for-x86_64-sap-netweaver-eus-rpms +- rhel-8-for-x86_64-highavailability-eus-rpms +``` + +### sap_general_preconfigure_set_minor_release +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want the role to set the RHEL minor release, which is required for SAP HANA. Default is `false`.
+If you set the RHEL minor release, then you must also use the `eus` or `e4s` repos.
+ +### sap_general_preconfigure_packagegroups +- _Type:_ `str` +- _Default:_ (set by platform/environment specific variables) + +The name of the software package group to install.
+The default for this parameter is set in the vars file which corresponds to the detected OS version.
+ +Example: + +```yaml +'@minimal-environment' +``` + +### sap_general_preconfigure_envgroups +- _Type:_ `str` +- _Default:_ (set by platform/environment specific variables) + +The name of the software environment group to check.
+The default for this parameter is set in the vars file which corresponds to the detected OS version.
+ +Example: + +```yaml +'@minimal-environment' +``` + +### sap_general_preconfigure_packages +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +The list of packages to install.
+The default for this variable is set in the vars file which corresponds to the detected OS version.
+ +### sap_general_preconfigure_min_package_check +- _Type:_ `bool` +- _Default:_ `true` + +The default is to install or check if the minimum package versions are installed as defined in the vars files.
+Set to `false` if you do not install or check these minimum package versions.
+ +### sap_general_preconfigure_install_ibm_power_tools +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
+See also SAP note 2679703.
+ +### sap_general_preconfigure_add_ibm_power_repo +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
+are already available on the local network). The IBM Power Systems service and productivity tools will only
+be installed if the variable `sap_general_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
+ +### sap_general_preconfigure_ibm_power_repo_url +- _Type:_ `str` +- _Default:_ `'https://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm'` + +URL for the IBM Power Systems service and productivity tools, see https://www.ibm.com/support/pages/service-and-productivity-tools
+ +### sap_general_preconfigure_update +- _Type:_ `bool` +- _Default:_ `false` + +By default, the role will not update the system, for avoiding an unintentional minor OS release update.
+Set this parameter to `true` if you want to update your system to the latest package versions.
+When using SAP HANA, make sure to set the release lock properly so the minor OS release will be one of
+those for which SAP HANA is supported. See also `sap_general_preconfigure_set_minor_release`.
+ +### sap_general_preconfigure_reboot_ok +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want to perform a reboot at the end of the role, if necessary.
+ +### sap_general_preconfigure_fail_if_reboot_required +- _Type:_ `bool` +- _Default:_ `true` + +If `sap_general_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
+remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
+Can be useful if you want to implement your own reboot handling.
+ +### sap_general_preconfigure_selinux_state +- _Type:_ `str` +- _Default:_ `'permissive'` +- _Possible Values:_
+ - `enforcing` + - `permissive` + - `disabled` + +One of the SELinux states to be set on the system.
+ +### sap_general_preconfigure_create_directories +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want the SAP directories to be created by the role.
+The SAP directories will always be created if `sap_general_preconfigure_modify_selinux_labels`
+(see below) is set to `true`, no matter how `sap_general_preconfigure_create_directories` is set.
+ +### sap_general_preconfigure_sap_directories +- _Type:_ `list` with elements of type `str` +- _Default:_ + - /usr/sap + +List of SAP directories to be created.
+ +### sap_general_preconfigure_modify_selinux_labels +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want to modify the SELinux labels for the SAP directories set
+in variable `sap_general_preconfigure_sap_directories`.
+ +### sap_general_preconfigure_size_of_tmpfs_gb +- _Type:_ `str` +- _Default:_ `"{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}"` + +The size of the tmpfs in GB. The formula used here is mentioned in SAP note 941735.
+ +### sap_general_preconfigure_modify_etc_hosts +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want the role to modify the `/etc/hosts` file.
+ +### sap_general_preconfigure_etc_sysctl_sap_conf +- _Type:_ `str` +- _Default:_ `'/etc/sysctl.d/sap.conf'` + +The file name of the sysctl config file to be used
+ +### sap_general_preconfigure_kernel_parameters +- _Type:_ `list` with elements of type `dict` +- _Default:_ (set by platform/environment specific variables) + +The Linux kernel parameters to use. By default, these are taken from the vars file.
+The default for this parameter is set in the vars file which corresponds to the detected OS version.
+ +Example: + +```yaml +sap_general_preconfigure_kernel_parameters: +- name: vm.max_map_count + value: '2147483647' +- name: fs.aio-max-nr + value: '18446744073709551615' +``` + +### sap_general_preconfigure_max_hostname_length +- _Type:_ `str` +- _Default:_ `'13'` + +The maximum length of the hostname. See SAP note 611361.
+ +### sap_hostname +- _Type:_ `str` +- _Default:_ `"{{ ansible_hostname }}"` + +The hostname to be used for updating or checking `/etc/hosts` entries.
+ +### sap_domain +- _Type:_ `str` +- _Default:_ `"{{ ansible_domain }}"` + +The DNS domain name to be used for updating or checking `/etc/hosts` entries.
+ +### sap_ip +- _Type:_ `str` +- _Default:_ `"{{ ansible_default_ipv4.address }}"` + +The IPV4 address to be used for updating or checking `/etc/hosts` entries.
+ +### sap_general_preconfigure_db_group_name +- _Type:_ `str` + +Use this variable to specify the name of the RHEL group which is used for the database processes.
+If defined, it will be used to configure process limits as per step
+Configuring Process Resource Limits
+ +Example: + +```yaml +sap_general_preconfigure_db_group_name: dba +``` + \ No newline at end of file diff --git a/roles/sap_general_preconfigure/README.md b/roles/sap_general_preconfigure/README.md index 65875d070..d2e05c7be 100644 --- a/roles/sap_general_preconfigure/README.md +++ b/roles/sap_general_preconfigure/README.md @@ -1,341 +1,74 @@ + # sap_general_preconfigure Ansible Role + +![Ansible Lint for sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_general_preconfigure.yml/badge.svg) -This role installs required packages and performs configuration steps which are required for installing and running SAP NetWeaver or SAP HANA. Specific installation and configuration steps on top of these basic steps are performed with roles sap-netweaver-preconfigure and sap-hana-preconfigure. Future implementations may reduce the scope of this role, for example if certain installation or configuration steps are done in the more specific roles. +## Description + +Ansible Role `sap_general_preconfigure` is used to ensure that Managed nodes are configured to host SAP systems according to SAP Notes. -For SLES systems, this role may not be necessary. The majority of SAP preparation and tuning is covered by `saptune` which is configured in the `sap_hana_preconfigure` and `sap_netweaver_preconfigure` roles. +This role performs installation of required packages for running SAP systems and configuration of Operating system parameters. -## Requirements - -The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, -make sure that the required collections are installed, for example by using the following command: - -`ansible-galaxy install -vv -r meta/collection-requirements.yml` - -To use this role, your system needs to be installed according to: -- RHEL 7: SAP note 2002167, Red Hat Enterprise Linux 7.x: Installation and Upgrade, section "Installing Red Hat Enterprise Linux 7" -- RHEL 8: SAP note 2772999, Red Hat Enterprise Linux 8.x: Installation and Configuration, section "Installing Red Hat Enterprise Linux 8". -- RHEL 9: SAP note 3108316, Red Hat Enterprise Linux 9.x: Installation and Configuration, section "Installing Red Hat Enterprise Linux 9". - -Note ----- -Do not run this role against an SAP or other production system. The role will enforce a certain configuration on the managed node(s), which might not be intended. - - -## Role Input Parameters - -#### Minimum required parameters: - -This role does not require any parameter to be set in the playbook or inventory. - - -### sap_general_preconfigure_config_all -- _Type:_ `bool` - -If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
-Default is to perform installation and configuration steps.
- -### sap_general_preconfigure_installation -- _Type:_ `bool` - -If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-installation steps of SAP notes.
- -### sap_general_preconfigure_configuration -- _Type:_ `bool` - -If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
- -Example: - -```yaml -sap_general_preconfigure_config_all: false -sap_general_preconfigure_configuration: true -sap_general_preconfigure_2002167_02: true -sap_general_preconfigure_1391070: true -``` - -### sap_general_preconfigure_assert -- _Type:_ `bool` -- _Default:_ `false` - -If set to `true`, the role will run in assertion mode instead of the default configuration mode.
- -### sap_general_preconfigure_assert_ignore_errors -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will abort when encountering any assertion error.
-If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
-This is useful if the role is used for reporting a system's SAP notes compliance.
- -### sap_general_preconfigure_system_roles_collection -- _Type:_ `str` -- _Default:_ `'fedora.linux_system_roles'` -- _Possible Values:_
- - `fedora.linux_system_roles` - - `redhat.rhel_system_roles` - -Set which Ansible Collection to use for the Linux System Roles.
-For community/upstream, use 'fedora.linux_system_roles'
-For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles'
- -### sap_general_preconfigure_enable_repos -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want the role to enable the repos as configured by the following repo related parameters.
-The default is `false`, meaning that the role will not enable repos.
- -### sap_general_preconfigure_use_netweaver_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not enable the SAP NetWeaver repo(s).
-The default is `true`, meaning that the role will enable the SAP NetWeaver repo(s).
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_use_hana_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not enable the SAP HANA repo(s).
-The default is `true`, meaning that the role will enable the SAP HANA repo(s).
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_use_ha_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not enable the high availability repo(s).
-The default is `true`, meaning that the role will enable the high availability repo(s).
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_disable_all_other_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not disable all repos before enabling the desired ones as configured above.
-The default is `true`, meaning that the role will disable all repos before enabling the desired ones.
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_req_repos -- _Type:_ `list` with elements of type `str` - -If you want to provide your own list of repos (e.g. on cloud systems), set this variable accordingly.
-Otherwise, the RHEL default repo names with the maximum support duration for the RHEL minor release are chosen automatically
-(e.g. normal repos for RHEL 8.3, e4s repos for RHEL 8.4).
- -Example: - -```yaml -sap_general_preconfigure_req_repos: -- rhel-8-for-x86_64-baseos-eus-rpms -- rhel-8-for-x86_64-appstream-eus-rpms -- rhel-8-for-x86_64-sap-solutions-eus-rpms -- rhel-8-for-x86_64-sap-netweaver-eus-rpms -- rhel-8-for-x86_64-highavailability-eus-rpms -``` - -### sap_general_preconfigure_set_minor_release -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want the role to set the RHEL minor release, which is required for SAP HANA. Default is `false`.
-If you set the RHEL minor release, then you must also use the `eus` or `e4s` repos.
- -### sap_general_preconfigure_packagegroups -- _Type:_ `str` -- _Default:_ (set by platform/environment specific variables) - -The name of the software package group to install.
-The default for this parameter is set in the vars file which corresponds to the detected OS version.
- -Example: - -```yaml -'@minimal-environment' -``` - -### sap_general_preconfigure_envgroups -- _Type:_ `str` -- _Default:_ (set by platform/environment specific variables) - -The name of the software environment group to check.
-The default for this parameter is set in the vars file which corresponds to the detected OS version.
- -Example: - -```yaml -'@minimal-environment' -``` - -### sap_general_preconfigure_packages -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -The list of packages to install.
-The default for this variable is set in the vars file which corresponds to the detected OS version.
- -### sap_general_preconfigure_min_package_check -- _Type:_ `bool` -- _Default:_ `true` - -The default is to install or check if the minimum package versions are installed as defined in the vars files.
-Set to `false` if you do not install or check these minimum package versions.
- -### sap_general_preconfigure_install_ibm_power_tools -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
-See also SAP note 2679703.
- -### sap_general_preconfigure_add_ibm_power_repo -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
-are already available on the local network). The IBM Power Systems service and productivity tools will only
-be installed if the variable `sap_general_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
- -### sap_general_preconfigure_ibm_power_repo_url -- _Type:_ `str` -- _Default:_ `'https://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm'` - -URL for the IBM Power Systems service and productivity tools, see https://www.ibm.com/support/pages/service-and-productivity-tools
- -### sap_general_preconfigure_update -- _Type:_ `bool` -- _Default:_ `false` - -By default, the role will not update the system, for avoiding an unintentional minor OS release update.
-Set this parameter to `true` if you want to update your system to the latest package versions.
-When using SAP HANA, make sure to set the release lock properly so the minor OS release will be one of
-those for which SAP HANA is supported. See also `sap_general_preconfigure_set_minor_release`.
- -### sap_general_preconfigure_reboot_ok -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want to perform a reboot at the end of the role, if necessary.
- -### sap_general_preconfigure_fail_if_reboot_required -- _Type:_ `bool` -- _Default:_ `true` - -If `sap_general_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
-remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
-Can be useful if you want to implement your own reboot handling.
- -### sap_general_preconfigure_selinux_state -- _Type:_ `str` -- _Default:_ `'permissive'` -- _Possible Values:_
- - `enforcing` - - `permissive` - - `disabled` - -One of the SELinux states to be set on the system.
- -### sap_general_preconfigure_create_directories -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want the SAP directories to be created by the role.
-The SAP directories will always be created if `sap_general_preconfigure_modify_selinux_labels`
-(see below) is set to `true`, no matter how `sap_general_preconfigure_create_directories` is set.
- -### sap_general_preconfigure_sap_directories -- _Type:_ `list` with elements of type `str` -- _Default:_ - - /usr/sap - -List of SAP directories to be created.
- -### sap_general_preconfigure_modify_selinux_labels -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want to modify the SELinux labels for the SAP directories set
-in variable `sap_general_preconfigure_sap_directories`.
- -### sap_general_preconfigure_size_of_tmpfs_gb -- _Type:_ `str` -- _Default:_ `"{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}"` - -The size of the tmpfs in GB. The formula used here is mentioned in SAP note 941735.
- -### sap_general_preconfigure_modify_etc_hosts -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want the role to modify the `/etc/hosts` file.
- -### sap_general_preconfigure_etc_sysctl_sap_conf -- _Type:_ `str` -- _Default:_ `'/etc/sysctl.d/sap.conf'` - -The file name of the sysctl config file to be used
- -### sap_general_preconfigure_kernel_parameters -- _Type:_ `list` with elements of type `dict` -- _Default:_ (set by platform/environment specific variables) - -The Linux kernel parameters to use. By default, these are taken from the vars file.
-The default for this parameter is set in the vars file which corresponds to the detected OS version.
- -Example: - -```yaml -sap_general_preconfigure_kernel_parameters: -- name: vm.max_map_count - value: '2147483647' -- name: fs.aio-max-nr - value: '18446744073709551615' -``` - -### sap_general_preconfigure_max_hostname_length -- _Type:_ `str` -- _Default:_ `'13'` - -The maximum length of the hostname. See SAP note 611361.
- -### sap_hostname -- _Type:_ `str` -- _Default:_ `"{{ ansible_hostname }}"` - -The hostname to be used for updating or checking `/etc/hosts` entries.
- -### sap_domain -- _Type:_ `str` -- _Default:_ `"{{ ansible_domain }}"` - -The DNS domain name to be used for updating or checking `/etc/hosts` entries.
- -### sap_ip -- _Type:_ `str` -- _Default:_ `"{{ ansible_default_ipv4.address }}"` - -The IPV4 address to be used for updating or checking `/etc/hosts` entries.
- -### sap_general_preconfigure_db_group_name -- _Type:_ `str` - -Use this variable to specify the name of the RHEL group which is used for the database processes.
-If defined, it will be used to configure process limits as per step
-Configuring Process Resource Limits
- -Example: +This is general preconfigure role that used for both SAP Netweaver and SAP HANA, which have separate follow-up roles [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) and [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure). + + +## Dependencies +- `fedora.linux_system_roles` + - Roles: + - `selinux` +- `community.sap_install` (This collection) + - Roles: + - `sap_maintain_etc_hosts` + +Install required collections by `ansible-galaxy install -vv -r meta/collection-requirements.yml`. + + + +## Prerequisites + +(Red Hat specific) Ensure system is installed according to: +- RHEL 7: SAP note 2002167, Red Hat Enterprise Linux 7.x: Installation and Upgrade, section `Installing Red Hat Enterprise Linux 7`. +- RHEL 8: SAP note 2772999, Red Hat Enterprise Linux 8.x: Installation and Configuration, section `Installing Red Hat Enterprise Linux 8`. +- RHEL 9: SAP note 3108316, Red Hat Enterprise Linux 9.x: Installation and Configuration, section `Installing Red Hat Enterprise Linux 9`. + + + +## Execution + +**:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.** + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + + + + + +### Execution Flow + +1. Assert that required inputs were provided. +2. Install required packages and patch system if `sap_general_preconfigure_update:true` +3. Apply configurations based on SAP Notes +4. Reboot Managed nodes if packages were installed or patched and `sap_general_preconfigure_reboot_ok: true` + + +### Example + ```yaml -sap_general_preconfigure_db_group_name: dba -``` - - - -## Tags (RHEL systems only) - +--- +- name: Ansible Play for SAP HANA HA Scale-up preconfigure + hosts: hana_primary, hana_secondary + become: true + tasks: + - name: Execute Ansible Role sap_general_preconfigure + ansible.builtin.include_role: + name: community.sap_install.sap_general_preconfigure +``` +Further referenced as `example.yml` + + + +### Role Tags With the following tags, the role can be called to perform certain activities only: - tag `sap_general_preconfigure_installation`: Perform only the installation tasks - tag `sap_general_preconfigure_configuration`: Perform only the configuration tasks @@ -344,69 +77,64 @@ With the following tags, the role can be called to perform certain activities on - tag `sap_general_preconfigure_etc_hosts`: Perform only the tasks(s) related to this step. This step might be one of multiple configuration activities of a SAP note. Also this step might be valid for multiple RHEL major releases. -Sample call for only performing all installation and configuration tasks (sample playbook name sap.yml, see the next section for -an example). This is the default behavior. If no tag is specified, all installation and configuration tasks are enabled: -``` -# ansible-playbook sap.yml -``` - -Sample call for only performing all installation tasks: -``` -# ansible-playbook sap.yml --tags=sap_general_preconfigure_installation -``` +
+ How to run sap_general_preconfigure with tags -Sample call for only performing all configuration tasks: -``` -# ansible-playbook sap.yml --tags=sap_general_preconfigure_configuration -``` + #### Perform only installation tasks: + ```console + ansible-playbook sap.yml --tags=sap_general_preconfigure_installation + ``` -Sample call for only verifying and modifying the /etc/hosts file: -``` -# ansible-playbook sap.yml --tags=sap_general_preconfigure_etc_hosts -``` + #### Perform only configuration tasks: + ```console + ansible-playbook sap.yml --tags=sap_general_preconfigure_configuration + ``` -Sample call for performing all configuration steps except verifying and modifying the /etc/hosts file: -``` -# ansible-playbook sap.yml --tags=sap_general_preconfigure_configuration --skip_tags=sap_general_preconfigure_etc_hosts -``` + #### Verify and modify /etc/hosts file: + ```console + ansible-playbook sap.yml --tags=sap_general_preconfigure_etc_hosts + ``` -Sample call for only performing the configuration activities related to SAP note 3108316 (RHEL 9 specific): -``` -# ansible-playbook sap.yml --tags=sap_general_preconfigure_3108316 -``` + #### Perform all configuration steps except verifying and modifying the /etc/hosts file + ``` + ansible-playbook sap.yml --tags=sap_general_preconfigure_configuration --skip_tags=sap_general_preconfigure_etc_hosts + ``` -Sample call for performing all configuration activities except those related to step 2 (SELinux settings) of SAP note 3108316 (RHEL 9 specific): -Sample call for only performing the configuration activities related to step 2 (SELinux settings) of SAP note 3108316 (RHEL 9 specific): -``` -# ansible-playbook sap.yml --tags=sap_general_preconfigure_3108316_02 -``` + #### (Red Hat) Perform configuration activities related to SAP note 3108316 (RHEL 9) + ``` + ansible-playbook sap.yml --tags=sap_general_preconfigure_3108316 + ``` -Sample call for performing all configuration activities except those related to step 2 (SELinux settings) of SAP note 3108316 (RHEL 9 specific): -``` -# ansible-playbook sap-general-preconfigure.yml --tags=sap_general_preconfigure_configuration --skip_tags=sap_general_preconfigure_3108316_02 -``` + #### (Red Hat) Perform configuration activities related to step 2 (SELinux settings) of SAP note 3108316 (RHEL 9) + ``` + ansible-playbook sap.yml --tags=sap_general_preconfigure_3108316_02 + ``` -## Dependencies + #### (Red Hat) Perform all configuration activities except those related to step 2 (SELinux settings) of SAP note 3108316 (RHEL 9 specific) + ``` + ansible-playbook sap-general-preconfigure.yml --tags=sap_general_preconfigure_configuration --skip_tags=sap_general_preconfigure_3108316_02 + ``` +
+ -This role does not depend on any other role. -## Example Playbook + + -Simple playbook, named sap.yml: -```yaml ---- -- hosts: all - roles: - - role: sap_general_preconfigure -``` +## License + +Apache 2.0 + -## Example Usage +## Maintainers + +- [Bernd Finger](https://github.com/berndfinger) + -Normal run: -```yaml -ansible-playbook sap.yml -l remote_host -``` +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_general_preconfigure/INPUT_PARAMETERS.md) +### Controlling execution with input parameters Extended Check (assert) run, aborting for any error which has been found: ```yaml ansible-playbook sap.yml -l remote_host -e "{sap_general_preconfigure_assert: yes}" @@ -414,42 +142,5 @@ ansible-playbook sap.yml -l remote_host -e "{sap_general_preconfigure_assert: ye Extended Check (assert) run, not aborting even if an error has been found: ```yaml -ansible-playbook sap.yml -l remote_host -e "{sap_general_preconfigure_assert: yes, sap_general_preconfigure_assert_ignore_errors: no}" -``` - -Same as above, with a nice compact and colored output, this time for two hosts: -```yaml -ansible-playbook sap.yml -l host_1,host_2 -e "{sap_general_preconfigure_assert: yes, sap_general_preconfigure_assert_ignore_errors: yes}" | -awk '{sub (" \"msg\": ", "")} - /TASK/{task_line=$0} - /fatal:/{fatal_line=$0; nfatal[host]++} - /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0} - /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2} - /SAP note/{print "\033[30m[" host"] "$0} - /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0} - /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0} - /PASS:/{npass[host]++; print "\033[32m[" host"] "$0} - /INFO:/{print "\033[34m[" host"] "$0} - /changed/&&/unreachable/{print "\033[30m[" host"] "$0} - END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) { - printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033[30m Last TASK and fatal output:\n"); print task_line, fatal_line - } - else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033[30m\n", nfail[var], nwarn[var], npass[var])}}' +ansible-playbook sap.yml -l remote_host -e "{sap_general_preconfigure_assert: yes,sap_general_preconfigure_assert_ignore_errors: no}" ``` -Note: For terminals with dark background, replace the color code `30m` by `37m`. -In case you need to make an invisible font readable on a terminal with dark background, run the following command in the terminal: -```yaml -printf "\033[37mreadable font\n" -``` -In case you need to make an invisible font readable on a terminal with bright background, run the following command in the terminal: -```yaml -printf "\033[30mreadable font\n" -``` - -## License - -Apache license 2.0 - -## Author Information - -Red Hat for SAP Community of Practice, Bernd Finger, Markus Koch, Rainer Leber diff --git a/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md b/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md new file mode 100644 index 000000000..7bc555e10 --- /dev/null +++ b/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md @@ -0,0 +1,27 @@ +## Input Parameters for sap_ha_install_anydb_ibmdb2 Ansible Role + +### sap_ha_install_anydb_ibmdb2_hostname_primary + +- _Type:_ `string` + +Enter IBM Db2 Primary node hostname + + +### sap_ha_install_anydb_ibmdb2_hostname_secondary + +- _Type:_ `string` + +Enter IBM Db2 Secondary node hostname + +### sap_ha_install_anydb_ibmdb2_sid + +- _Type:_ `string` + +Enter IBM Db2 System ID + +### sap_ha_install_anydb_ibmdb2_software_directory + +- _Type:_ `string` + +Enter IBM Db2 installation media path + \ No newline at end of file diff --git a/roles/sap_ha_install_anydb_ibmdb2/README.md b/roles/sap_ha_install_anydb_ibmdb2/README.md index 808f032ed..a87751e6a 100644 --- a/roles/sap_ha_install_anydb_ibmdb2/README.md +++ b/roles/sap_ha_install_anydb_ibmdb2/README.md @@ -1,82 +1,86 @@ `EXPERIMENTAL` - + # sap_ha_install_anydb_ibmdb2 Ansible Role + +## Description + Ansible Role for instantiation of IBM Db2 'Integrated Linux Pacemaker' HADR cluster Note: IBM Db2 with 'Integrated Linux Pacemaker' can use two deployment models: - Mutual Failover option, **not** covered by this Ansible Role -- High Availability and Disaster Recovery (HADR) option for Idle Standby, initialised by this Ansible Role +- High Availability and Disaster Recovery (HADR) option for Idle Standby, initialized by this Ansible Role + + + + ## Prerequisites +Managed nodes: +- Directory with installation media is present and `sap_ha_install_anydb_ibmdb2_software_directory` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community.sap_launchpad) Ansible Collection. -### Software Installation files - -Download IBM Db2 installation media from SAP Download Center on host, and set Ansible Variable `sap_ha_install_anydb_ibmdb2_software_directory` to this path. - -### Variables - -- `sap_ha_install_anydb_ibmdb2_hostname_primary` with the IBM Db2 Primary node hostname -- `sap_ha_install_anydb_ibmdb2_hostname_secondary` with the IBM Db2 Secondary node hostname -- `sap_ha_install_anydb_ibmdb2_sid` with the IBM Db2 System ID -- `sap_ha_install_anydb_ibmdb2_software_directory` with the IBM Db2 installation media path - -These are listed in the default variables file, but commented-out to enforce the required variables: -- [**sap_ha_install_anydb_ibmdb2** default parameters](defaults/main.yml) - -## Requirements and Dependencies - -This Ansible Role is applicable to IBM Db2 11.5 certified for SAP. - -It is applicable to 11.5.9 and later, which provides `db2cm` binary compatibility for AWS, GCP and MS Azure. - -### Target host - Infrastructure Platforms - -This Ansible Role contains Infrastructure Platform specific alterations for: -- AWS EC2 Virtual Servers -- Microsoft Azure Virtual Machines -- Google Cloud Compute Engine Virtual Machine -- IBM Cloud Virtual Server - -### Target host - Operating System requirements - -Designed for Linux operating systems, e.g. RHEL (7.x and 8.x) and SLES (15.x). +Software compatibility: +- This Ansible Role is applicable to IBM Db2 11.5 certified for SAP. +- It is applicable to 11.5.9 and later, which provides `db2cm` binary compatibility for AWS, GCP and MS Azure. + ## Execution - -Sample Ansible Playbook Execution: - -- Local Host Installation - - `ansible-playbook --connection=local --limit localhost -i "localhost," sap-ha-anydb-ibmdb2-init.yml -e "@inputs/ibmdb2_vars.yml` - -- Target Host Installation - - `ansible-playbook -i "" sap-ha-anydb-ibmdb2-init.yml -e "@inputs/ibmdb2_vars.yml"` - -## Sample Ansible Playbook - + +### Supported Platforms +| Platform | Status | Notes | +| -------- | --------- | --------- | +| AWS EC2 Virtual Servers | :heavy_check_mark: | | +| Google Cloud Compute Engine Virtual Machine | :heavy_check_mark: | | +| Microsoft Azure Virtual Machines | :heavy_check_mark: | | +| IBM Cloud Virtual Server | :heavy_check_mark: | | + + + + + +### Execution Flow + +1. Assert that required inputs were provided. +2. Detect target infrastructure platform. +3. Execute platform specific configuration. +4. Instantiate IBM Db2 'Integrated Linux Pacemaker' HADR cluster. + + +### Example + ```yaml --- -- hosts: all - - collections: - - community.sap_install - - vars: - sap_ha_install_anydb_ibmdb2_sid: SD1 # Sandbox Database for D01 SAP System - sap_ha_install_anydb_ibmdb2_hostname_primary: db2-p - sap_ha_install_anydb_ibmdb2_hostname_secondary: db2-s - sap_ha_install_anydb_ibmdb2_software_directory: /software/ibmdb2_extracted - +- name: Ansible Play for IBM Db2 Database installation + hosts: db2_host + become: true + tasks: - name: Execute Ansible Role sap_ha_install_anydb_ibmdb2 ansible.builtin.include_role: name: community.sap_install.sap_ha_install_anydb_ibmdb2 + vars: + sap_ha_install_anydb_ibmdb2_sid: SD1 # Sandbox Database for D01 SAP System + sap_ha_install_anydb_ibmdb2_hostname_primary: db2-p + sap_ha_install_anydb_ibmdb2_hostname_secondary: db2-s + sap_ha_install_anydb_ibmdb2_software_directory: /software/ibmdb2_extracted ``` + -## License + + -Apache license 2.0 + + + +## License + +Apache 2.0 + -## Author Information +## Maintainers + +- [Sean Freeman](https://github.com/sean-freeman) + -Sean Freeman +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md) diff --git a/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md b/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md new file mode 100644 index 000000000..a9bab4b21 --- /dev/null +++ b/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md @@ -0,0 +1,90 @@ +## Input Parameters for sap_ha_pacemaker_cluster Ansible Role + + +### sap_ha_install_hana_hsr_sid + +- _Type:_ `string` +- _Default:_ `{{ sap_hana_sid }}` + +Enter SID of SAP HANA database. + +### sap_ha_install_hana_hsr_instance_number + +- _Type:_ `string` +- _Default:_ `{{ sap_hana_instance_number }}` + +Enter string value of SAP HANA SID. + +### sap_ha_install_hana_hsr_cluster_nodes + +- _Type:_ `list` +- _Default:_ `{{ sap_hana_cluster_nodes }}` + +List of cluster nodes and associated attributes to describe the target SAP HA environment.
+This is required for the HANA System Replication configuration.
+ +- **hana_site**
+ Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
Mandatory for HANA clusters (sudo config for system replication). +- **node_ip**
+ IP address of the node used for HANA System Replication.
_Optional. Currently not needed/used in cluster configuration._ +- **node_name**
+ Name of the cluster node, should match the remote systems' hostnames.
_Optional. Currently not needed/used in cluster configuration._ +- **node_role**
+ Role of the defined `node_name` in the SAP HANA cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes.
_Optional. Currently not needed/used in cluster configuration._ + +Example: + +```yaml +sap_ha_install_hana_hsr_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 +``` + +### sap_ha_install_hana_hsr_hdbuserstore_system_backup_user + +- _Type:_ `string` +- _Default:_ `HDB_SYSTEMDB` + +Enter name of SYSTEM user for backup execution. + +### sap_ha_install_hana_hsr_db_system_password + +- _Type:_ `string` +- _Default:_ `{{ sap_hana_install_master_password }}` + +Enter password of SYSTEM user for backup execution. + +### sap_ha_install_hana_hsr_fqdn + +- _Type:_ `string` +- _Default:_ {{ sap_domain }} + +Enter domain of SAP system, for example `example.com`. + +### sap_ha_install_hana_hsr_rep_mode + +- _Type:_ `string` +- _Default:_ `sync` + +Enter SAP HANA System Replication mode. + +### sap_ha_install_hana_hsr_oper_mode + +- _Type:_ `string` +- _Default:_ `logreplay` + +Enter SAP HANA System Replication operation mode. + +### sap_ha_install_hana_hsr_update_etchosts +- _Type:_ `bool` +- _Default:_ `True` + +Enable to update /etc/hosts file. + \ No newline at end of file diff --git a/roles/sap_ha_install_hana_hsr/README.md b/roles/sap_ha_install_hana_hsr/README.md index f8a5730b3..e16b11b8d 100644 --- a/roles/sap_ha_install_hana_hsr/README.md +++ b/roles/sap_ha_install_hana_hsr/README.md @@ -1,103 +1,93 @@ + # sap_ha_install_hana_hsr Ansible Role + +![Ansible Lint for sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_ha_install_hana_hsr.yml/badge.svg) -Ansible role for SAP HANA System Replication Setup on 2 nodes. +## Description + +Ansible Role `sap_ha_install_hana_hsr` is used to configure and enable SAP HANA System Replication between 2 nodes. + -## Prerequisites - -- target nodes are on the same OS level -- target nodes are using the same SAP HANA release - -## Overview - -The **sap_ha_install_hana_hsr** role is part of this system role sequence: - -| Sequence | System Role | Description | -| :------: | :----------------------- | :----------------------------------------------------------- | -| 1. | sap_general_preconfigure | System Preparation for SAP | -| 2. | sap_hana_preconfigure | System Preparation for SAP HANA | -| 3. | sap_hana_install | Installation of SAP HANA Database | -| _4._ | _sap_ha_install_hana_hsr_ | _Configuration of SAP HANA System Replication_ | -| 5. | sap_ha_pacemaker_cluster | Linux Pacemaker cluster setup and SAP resources configuration | - -The **sap_ha_install_hana_hsr** roles configures a HANA system replication relationship which is used by the pacemaker cluster to automate SAP HANA System Replication (HSR). Prerequisite is the SAP HANA installation on the nodes. - -## Tasks included - -| Task | Description | -| ---------------------- | ----------------------------------------------------------------------------------- | -| update_etchosts.yml | ensures that all nodes of the cluster are configured in all nodes' /etc/hosts | -| configure_firewall.yml | this will configure the firewall für HANA system replication (disabled) | -| hdbuserstore.yml | create a user in the hdbuserstore | -| log_mode.yml | check/set database logmode | -| pki_files.yml | copy pki file from primary to secondary database | -| run_backup.yml | perform backup on the primary note as pre required step for HANA system replication | -| configure_hsr.yml | enable HANA system replication on primary node and register secondary database node | - -## Common Variables/Parameters Used - -| Name | Description | Value | -| -------------------------------- | ------------------------------- | ---------------------- | -| sap_domain | Domain Name | example: `example.com` | -| sap_hana_sid | SAP ID | example: `RH1` | -| sap_hana_instance_number | Instance Number | example: `"00"` | -| sap_hana_install_master_password | DB System Password | -| sap_hana_cluster_nodes | Parameter list of cluster nodes | -| sap_hana_hacluster_password | Pacemaker hacluster Password | - -## Role specific Variables - -| Name | Description | Value | -| --------------------------------- | ---------------- | -------------------- | -| sap_ha_install_hana_hsr_rep_mode | replication mode | default is sync | -| sap_ha_install_hana_hsr_oper_mode | operation mode | default is logreplay | - -## Example Parameter File + + + +## Prerequisites +Managed nodes: +- Same Operating system version +- SAP HANA is installed with same version on both nodes. + + +## Execution + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + + + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order: +1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) +3. [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) +4. [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) +5. *`sap_ha_install_hana_hsr`* + + +### Execution Flow + +1. Assert that required inputs were provided. +2. Verify connection between nodes. +3. Update /etc/hosts, hdbuserstore, Log mode, PKI +4. Execute database backup +5. Configure SAP HANA System Replication + + +### Example + ```yaml -sap_hana_sid: "DB1" -sap_hana_instance_number: "00" -sap_hana_install_master_password: "my_hana-password" - -### Cluster Definition -sap_ha_install_pacemaker_cluster_name: cluster1 -sap_hana_hacluster_password: "my_hacluster-password" - -sap_domain: example.com - -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 -``` - -### Execution Design - -Having the parameters specified as above, it can be executed with one command: - -```text -ansible-playbook example_playbook_with_parameters.ymnl -``` - -If you need to execute the role using an external handled, you can also limit the playbook for specific a **host** adding parameter defined in e **parameter_file**. - -```text -ansible-playbook -l node1 example_playbook.yml -e @parameter_file.yml +--- +- name: Ansible Play for SAP HANA System Replication setup + hosts: hana_primary, hana_secondary + become: true + tasks: + - name: Execute Ansible Role sap_ha_install_hana_hsr + ansible.builtin.include_role: + name: community.sap_install.sap_ha_install_hana_hsr + vars: + sap_ha_install_hana_hsr_cluster_nodes: + - node_name: h01hana0 + node_ip: "10.10.10.10" + node_role: primary + hana_site: DC01 + + - node_name: h01hana1 + node_ip: "10.10.10.11" + node_role: secondary + hana_site: DC02 + + sap_ha_install_hana_hsr_sid: H01 + sap_ha_install_hana_hsr_instance_number: "01" + sap_ha_install_hana_hsr_hdbuserstore_system_backup_user: "HDB_SYSTEMDB" + sap_ha_install_hana_hsr_db_system_password: "Password" + sap_ha_install_hana_hsr_fqdn: example.com ``` + -A good way to start is executing the playbook with the option _--list_tasks_. You can than start a playbook with the option _--start-at-task_ at a specific point. _--list_task_ will not start any task. + + -For more information please check - -```text -ansible-playbook --help -``` + + ## License + +Apache 2.0 + + +## Maintainers + +- [Janine Fuchs](https://github.com/ja9fuchs) + -Apache license 2.0 +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md) diff --git a/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md b/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md index 49582b6b3..564cb3cf7 100644 --- a/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md +++ b/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md @@ -6,6 +6,15 @@ Minimum required parameters for all clusters: Additional minimum requirements depend on the type of cluster setup and on the target platform. +### sap_ha_pacemaker_cluster_hacluster_user_password + +- _Type:_ `string` + +**Mandatory Input Parameter.**
+The password of the `hacluster` user which is created during pacemaker installation.
+Inherits the value of `ha_cluster_hacluster_password`, when defined.
+ + ### sap_ha_pacemaker_cluster_aws_access_key_id - _Type:_ `string` @@ -180,13 +189,6 @@ sap_ha_pacemaker_cluster_ha_cluster: node_name: nodeA ``` -### sap_ha_pacemaker_cluster_hacluster_user_password required - -- _Type:_ `string` - -The password of the `hacluster` user which is created during pacemaker installation.
-Inherits the value of `ha_cluster_hacluster_password`, when defined.
- ### sap_ha_pacemaker_cluster_hana_automated_register - _Type:_ `bool` @@ -1015,6 +1017,4 @@ Name of the SAPInstance resource for NetWeaver PAS.
- _Default:_ `rsc_vip__HDB_readonly` Customize the name of the resource managing the Virtual IP of read-only access to the secondary HANA instance.
- - \ No newline at end of file diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index 55e19ad21..2f0d9f3b3 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -8,19 +8,25 @@ Ansible Role `sap_ha_pacemaker_cluster` is used to install and configure Linux Pacemaker High Availability clusters for SAP HANA and SAP Netweaver systems on various infrastructure platforms. -## Prerequisites + +## Dependencies +- `fedora.linux_system_roles` + - Roles: + - `ha_cluster` + +Install required collections by `ansible-galaxy install -vv -r meta/collection-requirements.yml`. + + +## Prerequisites Infrastructure: - It is required to create them manually or using [sap_vm_provision](https://github.com/sap-linuxlab/community.sap_infrastructure/tree/main/roles/sap_vm_provision) role, because this role does not create any Cloud platform resources that are required by Resource Agents. -Collection dependency: -1. `fedora.linux_system_roles` - Managed nodes: -1. Supported SAP system is installed -2. SAP HANA System Replication is configured for SAP HANA HA cluster -3. Operating system has access to all required packages -4. All required ports are open (details below) +- Supported SAP system is installed. See [Recommended](#recommended) section. +- SAP HANA System Replication is configured for SAP HANA HA cluster. See [Recommended](#recommended) section. +- Operating system has access to all required packages +- All required ports are open (details below) | SAP HANA System Replication process | Port | | --- | --- | @@ -41,10 +47,10 @@ Managed nodes: ## Execution -**:warning: This ansible role will destroy and then recreate Linux Pacemaker cluster in process.** +**:warning: This ansible role will destroy and then recreate Linux Pacemaker cluster in process.**
:warning: Do not execute this Ansible Role against existing Linux Pacemaker clusters unless you know what you are doing and you prepare inputs according to existing cluster. -Role can be execute separately or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ### Supported Platforms | Platform | Status | Notes | @@ -68,13 +74,32 @@ Role can be execute separately or as part of [ansible.playbooks_for_sap](https:/ | SAP NetWeaver (ABAP) ASCS and ERS 2 nodes | Simple Mount | :heavy_check_mark: | + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order:
+#### SAP HANA cluster +1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) +3. [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) +4. [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) +5. [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) +6. *`sap_ha_pacemaker_cluster`* + +#### SAP Netweaver cluster +1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) +3. [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) +4. [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) +5. *`sap_ha_pacemaker_cluster`* + + ### Execution Flow 1. Assert that required inputs were provided. 2. Detect target infrastructure platform and prepare recommended inputs unless they were provided. -3. Prepare variables with all cluster parameters and resources +3. Prepare variables with all cluster parameters and resources. 4. Execute role `ha_cluster` from Ansible Collection `fedora.linux_system_roles` with prepared inputs. -5. Execute SAP product specific post tasks and verify cluster is running +5. Execute SAP product specific post tasks and verify cluster is running. ### Example @@ -104,14 +129,13 @@ Role can be execute separately or as part of [ansible.playbooks_for_sap](https:/ node_ip: "10.10.10.10" node_role: primary hana_site: DC01 + - node_name: h01hana1 node_ip: "10.10.10.11" node_role: secondary hana_site: DC02 sap_ha_pacemaker_cluster_replication_type: none sap_ha_pacemaker_cluster_vip_resource_group_name: viphdb - - sap_hana_cluster_nodes: ``` diff --git a/roles/sap_hana_install/INPUT_PARAMETERS.md b/roles/sap_hana_install/INPUT_PARAMETERS.md new file mode 100644 index 000000000..93f909fb8 --- /dev/null +++ b/roles/sap_hana_install/INPUT_PARAMETERS.md @@ -0,0 +1,59 @@ +## Input Parameters for sap_ha_pacemaker_cluster Ansible Role + +### sap_hana_install_sid + +- _Type:_ `string` + +Enter SAP HANA System ID (SID). + +### sap_hana_install_number + +- _Type:_ `string` + +Enter SAP HANA Instance number. + +### sap_hana_install_fapolicyd_integrity + +- _Type:_ `string` +- _Default:_ `sha256` + +Select fapolicyd integrity check option out of: `none`, `size`, `sha256`, `ima`. + +### sap_hana_install_check_sidadm_user + +- _Type:_ `bool` +- _Default:_ `True` + +If the variable `sap_hana_install_check_sidadm_user` is set to `False`, the role will install SAP HANA even +if the sidadm user exists. Default is `True`, in which case the installation will not be performed if the +sidadm user exists. + +### sap_hana_install_new_system + +- _Type:_ `bool` +- _Default:_ `True` + +The variable `sap_hana_install_new_system` determines if the role will perform a fresh SAP HANA installation +or if it will add further hosts to an existing SAP HANA system as specified by variable +`sap_hana_install_addhosts`. Default is `True` for a fresh SAP HANA installation. + +### sap_hana_install_update_firewall + +- _Type:_ `bool` +- _Default:_ `False` + +The role can be configured to also set the required firewall ports for SAP HANA. If this is desired, set +the variable `sap_hana_install_update_firewall` to `yes` (default is `no`). The firewall ports are defined +in a variable which is compatible with the variable structure used by Linux System Role `firewall`. +The firewall ports for SAP HANA are defined in member `port` of the first field of variable +`sap_hana_install_firewall` (`sap_hana_install_firewall[0].port`), see file `defaults/main.yml`. If the +member `state` is set to `enabled`, the ports will be enabled. If the member `state` is set to `disabled`, +the ports will be disabled, which might be useful for testing. + +Certain parameters have identical meanings, for supporting different naming schemes in playbooks and inventories. +You can find those in the task `Rename some variables used by hdblcm configfile` of the file `tasks/main.yml`. +Example: The parameter `sap_hana_install_number`, which is used by the role to define the hdblm parameter `number` +(= SAP HANA instance number) can be defined by setting `sap_hana_instance_number`, `sap_hana_install_instance_nr`, +`sap_hana_install_instance_number`, or `sap_hana_install_number`. The order of precedence is from left to right. + + \ No newline at end of file diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index 35d439c27..efd9bc842 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -1,80 +1,79 @@ + # sap_hana_install Ansible Role + +![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg) -Ansible role for SAP HANA Installation +## Description + +Ansible Role `sap_hana_install` is used to install SAP HANA database using HDBLCM. + -## Requirements + +## Dependencies +- `fedora.linux_system_roles` + - Roles: + - `selinux` -The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, -make sure that the required collections are installed, for example by using the following command: +Install required collections by `ansible-galaxy install -vv -r meta/collection-requirements.yml`. + -`ansible-galaxy install -vv -r meta/collection-requirements.yml` +## Prerequisites + +Managed nodes: +- Directory with SAP Installation media is present and `sap_install_media_detect_source_directory` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community). +- Ensure that servers are configured for SAP HANA. See [Recommended](#recommended) section. +- Ensure that volumes and filesystems are configured correctly. See [Recommended](#recommended) section. -### Configure your system for the installation of SAP HANA - -- Make sure required volumes and filesystems are configured in the host. -You can use the role `sap_storage_setup` to configure this. More info [here](/roles/sap_storage_setup) - -- Run the roles `sap_general_preconfigure` and `sap_hana_preconfigure` for installing required packages and -for configuring system settings. - -### SAP HANA Software Installation .SAR Files +### Prepare SAP HANA installation media Place the following files in directory /software/hana or in any other directory specified by variable `sap_hana_install_software_directory`: - 1. The SAPCAR executable for the correct hardware architecture - 2. The SAP HANA Installation .SAR file - SAP HANA 2.0 Server - `IMDB_SERVER*.SAR` file - 3. Optional - SAP HANA Components .SAR files - Include other optional components such as `IMDB_AFL*.SAR` or `IMDB_LCAPPS*.SAR` - 4. Optional - SAP Host Agent .SAR file - Include other optional components such as `SAPHOSTAGENT*SAR` -#### Sample Directory Contents - with .SAR files - -- Sample directory `sap_hana_install_software_directory` containing SAP HANA software installation files - ```console - [root@hanahost SAP_HANA_INSTALLATION]# ls -l *.EXE *.SAR - -rwxr-xr-x. 1 nobody nobody 149561376 Mar 4 2021 IMDB_AFL20_054_1-80001894.SAR - -rwxr-xr-x. 1 nobody nobody 211762405 Mar 4 2021 IMDB_CLIENT20_007_23-80002082.SAR - -rwxr-xr-x. 1 nobody nobody 4483040 Mar 4 2021 SAPCAR_1010-70006178.EXE - -rwxr-xr-x. 1 nobody nobody 109492976 Mar 4 2021 IMDB_LCAPPS_2054_0-20010426.SAR - -rwxr-xr-x. 1 nobody nobody 109752805 Mar 4 2021 VCH202000_2054_0-80005463.SAR - -rwxr-xr-x. 1 nobody nobody 3694683699 Mar 4 2021 IMDB_SERVER20_054_0-80002031.SAR - -rwxr-xr-x. 1 nobody nobody 89285401 Sep 30 04:24 SAPHOSTAGENT51_51-20009394.SAR - ``` - -If more than one SAPCAR EXE file is present in the software directory, the role will select the latest version -for the current hardware architecture. Alternatively, the file name of the SAPCAR EXE file can also be set with -variable `sap_hana_install_sapcar_filename`. Example: -``` -sap_hana_install_sapcar_filename: SAPCAR_1115-70006178.EXE -``` - -If more than one SAR file for a certain software product is present in the software directory, the automatic -handling of such SAR files will fail after extraction, when moving the newly created product directories -(like `SAP_HOST_AGENT`) to already existing destinations. -For avoiding such situations, use following variable to provide a list of SAR files to extract: - -`sap_hana_install_sarfiles`. - -Example: -``` -sap_hana_install_sarfiles: - - SAPHOSTAGENT54_54-80004822.SAR - - IMDB_SERVER20_060_0-80002031.SAR +Example of `sap_hana_install_software_directory` content for SAP HANA installation: +```console +[root@hanahost SAP_HANA_INSTALLATION]# ls -l *.EXE *.SAR +-rwxr-xr-x. 1 nobody nobody 149561376 Mar 4 2021 IMDB_AFL20_054_1-80001894.SAR +-rwxr-xr-x. 1 nobody nobody 211762405 Mar 4 2021 IMDB_CLIENT20_007_23-80002082.SAR +-rwxr-xr-x. 1 nobody nobody 4483040 Mar 4 2021 SAPCAR_1010-70006178.EXE +-rwxr-xr-x. 1 nobody nobody 109492976 Mar 4 2021 IMDB_LCAPPS_2054_0-20010426.SAR +-rwxr-xr-x. 1 nobody nobody 109752805 Mar 4 2021 VCH202000_2054_0-80005463.SAR +-rwxr-xr-x. 1 nobody nobody 3694683699 Mar 4 2021 IMDB_SERVER20_054_0-80002031.SAR +-rwxr-xr-x. 1 nobody nobody 89285401 Sep 30 04:24 SAPHOSTAGENT51_51-20009394.SAR ``` -If there is a file named `.sha256` in the software download directory -`sap_hana_install_software_directory` which contains the checksum and the file name similar to the output -of the sha256sum command, the role will examine the sha256sum for the corresponding SAPCAR or SAR file and the -processing will continue only if the checksum matches. - -#### Extracted SAP HANA Software Installation Files - +**Considerations:** +- If more than one SAPCAR EXE file is present in the software directory, the role will select the latest version + for the current hardware architecture. Alternatively, the file name of the SAPCAR EXE file can also be set with + variable `sap_hana_install_sapcar_filename`. Example: + ``` + sap_hana_install_sapcar_filename: SAPCAR_1115-70006178.EXE + ``` +- If more than one SAR file for a certain software product is present in the software directory, the automatic + handling of such SAR files will fail after extraction, when moving the newly created product directories + (like `SAP_HOST_AGENT`) to already existing destinations. + For avoiding such situations, use following variable to provide a list of SAR files to extract: `sap_hana_install_sarfiles`. + + Example: + ``` + sap_hana_install_sarfiles: + - SAPHOSTAGENT54_54-80004822.SAR + - IMDB_SERVER20_060_0-80002031.SAR + ``` + +- If there is a file named `.sha256` in the software download directory + `sap_hana_install_software_directory` which contains the checksum and the file name similar to the output + of the sha256sum command, the role will examine the sha256sum for the corresponding SAPCAR or SAR file and the + processing will continue only if the checksum matches. + + +### Extracted SAP HANA Software Installation Files This role will detect if there is a file `hdblcm` already present in the directory specified by variable `sap_hana_install_software_extract_directory` or in any directory below. If If found, it will skip the .SAR extraction phase and proceed with the installation. @@ -94,16 +93,16 @@ software extract directory is required then set `sap_hana_install_cleanup_extrac these cleanup actions are false. -- Sample directory `sap_hana_install_software_extract_directory` containing extracted SAP HANA software installation files - ```console - [root@hanahost extracted]# ll -lrt - drwxr-xr-x 4 root root 4096 Sep 30 04:55 SAP_HANA_AFL - drwxr-xr-x 5 root root 4096 Sep 30 04:55 SAP_HANA_CLIENT - drwxr-xr-x 4 root root 4096 Sep 30 04:55 SAP_HANA_LCAPPS - drwxr-xr-x 8 root root 4096 Sep 30 04:57 SAP_HANA_DATABASE - drwxr-xr-x 2 root root 4096 Sep 30 04:58 SAP_HOST_AGENT - drwxr-xr-x 4 root root 4096 Sep 30 04:58 VCH_AFL_2020 - ``` +- Example of directory `sap_hana_install_software_extract_directory` containing extracted SAP HANA software installation files +```console +[root@hanahost extracted]# ll -lrt +drwxr-xr-x 4 root root 4096 Sep 30 04:55 SAP_HANA_AFL +drwxr-xr-x 5 root root 4096 Sep 30 04:55 SAP_HANA_CLIENT +drwxr-xr-x 4 root root 4096 Sep 30 04:55 SAP_HANA_LCAPPS +drwxr-xr-x 8 root root 4096 Sep 30 04:57 SAP_HANA_DATABASE +drwxr-xr-x 2 root root 4096 Sep 30 04:58 SAP_HOST_AGENT +drwxr-xr-x 4 root root 4096 Sep 30 04:58 VCH_AFL_2020 +``` #### SAP HANA hdblcm Configfile Processing @@ -140,111 +139,24 @@ Note: If there is a file named `configfile.cfg` in the directory specified by ro will be performed. Be aware that when using this file, any modifications to role variables after creation of this file will not be reflected. -## Further Variables and Parameters - -### Input Parameters - -If the variable `sap_hana_install_check_sidadm_user` is set to `no`, the role will install SAP HANA even -if the sidadm user exists. Default is `yes`, in which case the installation will not be performed if the -sidadm user exists. - -The variable `sap_hana_install_new_system` determines if the role will perform a fresh SAP HANA installation -or if it will add further hosts to an existing SAP HANA system as specified by variable -`sap_hana_install_addhosts`. Default is `yes` for a fresh SAP HANA installation. - -The role can be configured to also set the required firewall ports for SAP HANA. If this is desired, set -the variable `sap_hana_install_update_firewall` to `yes` (default is `no`). The firewall ports are defined -in a variable which is compatible with the variable structure used by Linux System Role `firewall`. -The firewall ports for SAP HANA are defined in member `port` of the first field of variable -`sap_hana_install_firewall` (`sap_hana_install_firewall[0].port`), see file `defaults/main.yml`. If the -member `state` is set to `enabled`, the ports will be enabled. If the member `state` is set to `disabled`, -the ports will be disabled, which might be useful for testing. - -Certain parameters have identical meanings, for supporting different naming schemes in playbooks and inventories. -You can find those in the task `Rename some variables used by hdblcm configfile` of the file `tasks/main.yml`. -Example: The parameter `sap_hana_install_number`, which is used by the role to define the hdblm parameter `number` -(= SAP HANA instance number) can be defined by setting `sap_hana_instance_number`, `sap_hana_install_instance_nr`, -`sap_hana_install_instance_number`, or `sap_hana_install_number`. The order of precedence is from left to right. - -### Default Parameters - -Please check the default parameters file for more information on other parameters that can be used as an input -- [**sap_hana_install** default parameters](defaults/main.yml) + ## Execution - -Sample Ansible Playbook Execution - -- Local Host Installation - - `ansible-playbook --connection=local --limit localhost -i "localhost," sap-hana-install.yml -e "@inputs/HDB.install"` - -- Target Host Installation - - `ansible-playbook -i "" sap-hana-install.yml -e "@inputs/HDB.install"` - -## Sample playbooks - -### Sample playbook for installing a new scale-up (=single node) SAP HANA system - -```yaml ---- -- hosts: all - collections: - - community.sap_install - become: true - vars: - sap_hana_install_software_directory: /software/hana - sap_hana_install_common_master_password: 'NewPass$321' - sap_hana_install_sid: 'H01' - sap_hana_install_instance_nr: '00' - roles: - - sap_hana_install -``` - -### Sample playbook for installing a new scale-out SAP HANA system - -```yaml ---- -- hosts: all - collections: - - community.sap_install - become: true - vars: - sap_hana_install_software_directory: /software/hana - sap_hana_install_common_master_password: 'NewPass$321' - sap_hana_install_root_password: 'NewPass$321' - sap_hana_install_addhosts: 'host2:role=worker,host3:role=worker:group=g02,host4:role=standby:group=g02' - sap_hana_install_sid: 'H01' - sap_hana_install_instance_nr: '00' - roles: - - sap_hana_install -``` - -### Sample playbook for adding additional nodes to an existing SAP HANA installation - -```yaml ---- -- hosts: all - collections: - - community.sap_install - become: true - vars: - sap_hana_install_software_directory: /software/hana - sap_hana_install_new_system: no - sap_hana_install_addhosts: 'host2:role=worker,host3:role=worker:group=g02,host4:role=standby:group=g02' - sap_hana_install_common_master_password: 'NewPass$321' - sap_hana_install_root_password: 'NewPass$321' - sap_hana_install_sid: 'H01' - sap_hana_install_instance_nr: '00' - roles: - - sap_hana_install -``` - -You can find more complex playbooks in directory `playbooks` of the collection `community.sap_install`. - -## Flow - -### New SAP HANA Installation - + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + + + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order:
+1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) +3. [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) +4. *`sap_hana_install`* + + +### Execution Flow + #### Perform Initial Checks These checks will be performed by default but can be skipped by setting `sap_hana_install_force` to `true`. @@ -338,9 +250,70 @@ in a temporary directory for use by the hdblcm command in the next step. #### Post-Install - Print a short summary of the result of the installation. + + +### Example + +#### Example playbook for installing a new scale-up (=single node) SAP HANA system +```yaml +--- +- name: Ansible Play for SAP HANA installation - One host + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_hana_install + ansible.builtin.include_role: + name: community.sap_install.sap_hana_install + vars: + sap_hana_install_software_directory: /software/hana + sap_hana_install_common_master_password: 'NewPass$321' + sap_hana_install_sid: 'H01' + sap_hana_install_instance_nr: '00' +``` + +#### Example playbook for installing a new scale-out SAP HANA system +```yaml +--- +- name: Ansible Play for SAP HANA installation - Scale-out + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_hana_install + ansible.builtin.include_role: + name: community.sap_install.sap_hana_install + vars: + sap_hana_install_software_directory: /software/hana + sap_hana_install_common_master_password: 'NewPass$321' + sap_hana_install_root_password: 'NewPass$321' + sap_hana_install_addhosts: 'host2:role=worker,host3:role=worker:group=g02,host4:role=standby:group=g02' + sap_hana_install_sid: 'H01' + sap_hana_install_instance_nr: '00' +``` + +#### Example playbook for adding additional nodes to an existing SAP HANA installation +```yaml +--- +- name: Ansible Play for SAP HANA installation - Add host + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_hana_install + ansible.builtin.include_role: + name: community.sap_install.sap_hana_install + vars: + sap_hana_install_software_directory: /software/hana + sap_hana_install_new_system: no + sap_hana_install_addhosts: 'host2:role=worker,host3:role=worker:group=g02,host4:role=standby:group=g02' + sap_hana_install_common_master_password: 'NewPass$321' + sap_hana_install_root_password: 'NewPass$321' + sap_hana_install_sid: 'H01' + sap_hana_install_instance_nr: '00' +``` + -## Tags + +### Role Tags With the following tags, the role can be called to perform certain activities only: - tag `sap_hana_install_check_installation`: Perform an installation check, using `hdbcheck` or `hdblcm --action=check_installation`. @@ -373,30 +346,45 @@ With the following tags, the role can be called to perform certain activities on `overwrite`. - tag `sap_hana_install_store_connection_information`: Only run the `hdbuserstore` command -Sample call for only processing the SAPCAR and SAR files and creating the hdblcm configfile: -``` -# ansible-playbook sap-hana-install.yml --tags=sap_hana_install_preinstall --skip-tags=sap_hana_install_chown_hana_directories -``` +
+ How to run sap_hana_install with tags -Sample call for only processing the SAPCAR files: -``` -# ansible-playbook sap-hana-install.yml --tags=sap_hana_install_prepare_sapcar -``` + #### Process SAPCAR and SAR files and create the hdblcm configfile: + ```console + ansible-playbook sap-hana-install.yml --tags=sap_hana_install_preinstall --skip-tags=sap_hana_install_chown_hana_directories + ``` -Sample call for only processing the SAPCAR and SAR files, without extracting the SAR files: -``` -# ansible-playbook sap-hana-install.yml --tags=sap_hana_install_prepare_sarfiles --skip-tags=sap_hana_install_extract_sarfiles -``` + #### Process only SAPCAR files: + ```console + ansible-playbook sap-hana-install.yml --tags=sap_hana_install_prepare_sapcar + ``` -Sample call for only displaying the SAP HANA hdblcm command line: -``` -# ansible-playbook sap-hana-install.yml --tags=sap_hana_install_hdblcm_commandline -``` + #### Process SAPCAR and SAR files without extracting SAR files: + ```console + ansible-playbook sap-hana-install.yml --tags=sap_hana_install_prepare_sarfiles --skip-tags=sap_hana_install_extract_sarfiles + ``` -## License + #### Display SAP HANA hdblcm command without using it + ``` + ansible-playbook sap-hana-install.yml --tags=sap_hana_install_hdblcm_commandline + ``` +
-Apache license 2.0 -## Author Information + + + + + +## License + +Apache 2.0 + + +## Maintainers + +- [Bernd Finger](https://github.com/berndfinger) + -Red Hat for SAP Community of Practice, IBM Lab for SAP Solutions, Markus Koch, Thomas Bludau, Bernd Finger, Than Ngo, Rainer Leber +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_hana_install/INPUT_PARAMETERS.md) diff --git a/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md b/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md new file mode 100644 index 000000000..5cd5c87e9 --- /dev/null +++ b/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md @@ -0,0 +1,324 @@ +## Input Parameters for sap_hana_preconfigure Ansible Role + +## Role Input Parameters + +#### Minimum required parameters: + +This role does not require any parameter to be set in the playbook or inventory. + + +### sap_hana_preconfigure_config_all +- _Type:_ `bool` + +If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
+Default is to perform installation and configuration steps.
+ +### sap_hana_preconfigure_installation +- _Type:_ `bool` + +If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+installation steps of SAP notes.
+ +### sap_hana_preconfigure_configuration +- _Type:_ `bool` + +If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
+ +Example: + +```yaml +sap_hana_preconfigure_config_all: false +sap_hana_preconfigure_configuration: true +sap_hana_preconfigure_2772999_04: true +sap_hana_preconfigure_2382421: true +``` + +### sap_hana_preconfigure_assert +- _Type:_ `bool` +- _Default:_ `false` + +If set to `true`, the role will run in assertion mode instead of the default configuration mode.
+ +### sap_hana_preconfigure_assert_all_config +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will check either tuned or static settings.
+If this parameter is set to to `true`, the role will check both tuned and static settings.
+ +### sap_hana_preconfigure_assert_ignore_errors +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will abort when encountering any assertion error.
+If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
+This is useful if the role is used for reporting a system's SAP notes compliance.
+ +### sap_hana_preconfigure_system_roles_collection +- _Type:_ `str` +- _Default:_ `'fedora.linux_system_roles'` +- _Possible Values:_
+ - `fedora.linux_system_roles` + - `redhat.rhel_system_roles` + +Set which Ansible Collection to use for the Linux System Roles.
+For community/upstream, use 'fedora.linux_system_roles'
+For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles'
+ +### sap_hana_preconfigure_min_rhel_release_check +- _Type:_ `bool` +- _Default:_ `false` + +Check the RHEL release against parameter `sap_hana_preconfigure_supported_rhel_minor_releases`, which is a list of
+known SAP HANA supported RHEL minor releases. By default, the role will display a message and continue running if
+the RHEL release is not part of that list. If set to `true`, the role will fail in such a case.
+ +### sap_hana_preconfigure_supported_rhel_minor_releases +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA supported RHEL minor releases.
+ +### sap_hana_preconfigure_enable_sap_hana_repos +- _Type:_ `bool` +- _Default:_ `false` + +Set to 'true' to enable the SAP HANA required RHEL repos.
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_use_hana_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_7_x86_64 +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 7 repos on x86_64'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_7_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 7 repos on ppc64le'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_8_x86_64 +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 8 repos on x86_64'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_8_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 8 repos on ppc64le'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_9_x86_64 +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 9 repos on x86_64'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_9_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 9 repos on ppc64le'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_set_minor_release +- _Type:_ `bool` +- _Default:_ `false` + +Use this parameter to set the RHEL minor release, which is required for SAP HANA.
+The related parameter is `sap_general_preconfigure_set_minor_release`.
+ +### sap_hana_preconfigure_create_directories +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want the SAP HANA directories to be created by the role.
+The SAP HANA directories will always be created if `sap_hana_preconfigure_modify_selinux_labels`
+(see below) is set to `true`, no matter how `sap_hana_preconfigure_create_directories` is set.
+ +### sap_hana_preconfigure_hana_directories +- _Type:_ `list` with elements of type `str` +- _Default:_ + - /hana + - /lss/shared + +List of SAP HANA directories to be created.
+ +### sap_hana_preconfigure_modify_selinux_labels +- _Type:_ `bool` +- _Default:_ `true` + +For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively add
+the `usr_t` label to directories and files in the directories where HANA is installed.
+If relabeling not desired, set this parameter `false`.
+If the variable is set to `true`, the SAP HANA directories will be created no matter
+how the variable `sap_hana_preconfigure_create_directories` (see above) is set.
+ +### sap_hana_preconfigure_packages +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +List of RHEL packages to be installed for SAP HANA. For RHEL 8 and later, you can choose to install either the default list
+or a list of the minimum required packages for SAP HANA server (parameter `__sap_hana_preconfigure_packages_min_install`).
+ +### sap_hana_preconfigure_min_package_check +- _Type:_ `bool` +- _Default:_ `true` + +SAP HANA requires certain minimum package versions to be supported. These minimum levels are listed in SAP Note 2235581.
+Set this parameter to `false` if you want to ignore these requirements.
+ +### sap_hana_preconfigure_update +- _Type:_ `bool` +- _Default:_ `false` + +Set this parameter to `true` to update the system to the latest package levels.
+By setting the parameter `sap_general_preconfigure_set_minor_release` of the
+role `sap_general_preconfigure` to `true`, you can install the most recent package updates
+without updating to a more recent RHEL minor release.
+ +### sap_hana_preconfigure_reboot_ok +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want to perform a reboot at the end of the role, if necessary.
+ +### sap_hana_preconfigure_fail_if_reboot_required +- _Type:_ `bool` +- _Default:_ `true` + +If `sap_hana_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
+remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
+Can be useful if you want to implement your own reboot handling.
+ +### sap_hana_preconfigure_kernel_parameters +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Network related linux kernel parameter settings for SAP HANA on all hardware platforms.
+ +### sap_hana_preconfigure_kernel_parameters_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Network related linux kernel parameter settings for platform ppc64le.
+ +### sap_hana_preconfigure_use_netapp_settings_nfs +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to also set NetApp NFS required kernel parameters.
+ +### sap_hana_preconfigure_install_ibm_power_tools +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
+ +### sap_hana_preconfigure_add_ibm_power_repo +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
+are already available on the local network). The IBM Power Systems service and productivity tools will only
+be installed if the variable `sap_hana_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
+ +### sap_hana_preconfigure_ibm_power_repo_url +- _Type:_ `str` +- _Default:_ (set by platform/environment specific variables) + +URL of the IBM Power tools repository.
+ +### sap_hana_preconfigure_ppcle_mtu9000_if +- _Type:_ `str` +- _Default:_ `''` + +List of interfaces for which the MTU size will be set to `9000`.
+ +### sap_hana_preconfigure_ppcle_tso_if +- _Type:_ `list` with elements of type `str` +- _Default:_ + '{{ ansible_interfaces | difference([''lo'']) }}' + +List of interfaces for which the tso flag will be set.
+ +### sap_hana_preconfigure_use_tuned +- _Type:_ `bool` +- _Default:_ `true` + +Use tuned for configuring most of the kernel settings for SAP HANA
+Set this parameter to `false` to use static kernel settings
+ +### sap_hana_preconfigure_tuned_profile +- _Type:_ `str` +- _Default:_ `'sap-hana'` + +Name of the SAP HANA tuned tuned profile to enable (RHEL).
+ +### sap_hana_preconfigure_modify_grub_cmdline_linux +- _Type:_ `bool` +- _Default:_ `false` + +Set this parameter to `true` to modify the Grub boot command line.
+ +### sap_hana_preconfigure_run_grub2_mkconfig +- _Type:_ `bool` +- _Default:_ `true` + +By default, the role will run `grub2-mkconfig` to update the Grub configuration if necessary.
+Set this parameter to `false` if this is not desired.
+ +### sap_hana_preconfigure_db_group_name +- _Type:_ `str` + +Use this parameter to specify the name of the RHEL group which is used for the database processes.
+It will be used to configure process limits as per step "Configuring Process Resource Limits" of SAP note 2772999.
+ +Example: + +```yaml +sap_hana_preconfigure_db_group_name: dba +``` + +### sap_hana_preconfigure_saptune_version +- _Type:_ `str` +- _Default:_ `''` + +Version of saptune to install (SLES for SAP Applications).
+This will replace the current installed version if present, even downgrade if necessary.
+ +### sap_hana_preconfigure_saptune_solution +- _Type:_ `str` +- _Default:_ `'HANA'` +- _Possible Values:_
+ - `HANA` + - `NETWEAVER+HANA` + - `S4HANA-APP+DB` + - `S4HANA-DBSERVER` + +The saptune solution to apply (SLES for SAP Applications).
+ +### sap_hana_preconfigure_saptune_azure +- _Type:_ `bool` +- _Default:_ `false` + +On Azure, TCP timestamps, reuse and recycle should be disabled (SLES for SAP Applications).
+If the variable is set, an override file for saptune will be created (/etc/saptune/override/2382421) to set net.ipv4.tcp_timestamps and net.ipv4.tcp_tw_reuse to 0.
+Set this parameter to `true` on Azure.
+ + \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index bb581b58c..f141faac4 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -1,504 +1,146 @@ + # sap_hana_preconfigure Ansible Role + +![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg) -This role installs additional required packages and performs additional configuration steps for installing and running SAP HANA. -If you want to configure a RHEL system for the installation and later usage of SAP HANA, you have to first run role sap_general_preconfigure -and then role sap_hana_preconfigure. However, if we wish to run SLES for HANA, you may run only this role. +## Description + +Ansible Role `sap_hana_preconfigure` is used to ensure that Managed nodes are configured to host SAP HANA systems according to SAP Notes after [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) role was executed. -## Requirements - -The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, -make sure that the required collections are installed, for example by using the following command: - -`ansible-galaxy install -vv -r meta/collection-requirements.yml` - -To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). - -It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP HANA, to maintain an identical system time, before or after running role sap_hana_preconfigure. - -Managed nodes need to be properly registered to a repository source and have at least the following Red Hat repositories accessible (see also example playbook): - -for RHEL 7.x: -- rhel-7-[server|for-power-le]-e4s-rpms -- rhel-sap-hana-for-rhel-7-[server|for-power-le]-e4s-rpms - -for RHEL 8.x: -- rhel-8-for-[x86_64|ppc64le]-baseos-e4s-rpms -- rhel-8-for-[x86_64|ppc64le]-appstream-e4s-rpms -- rhel-8-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms - -for RHEL 9.x: -- rhel-9-for-[x86_64|ppc64le]-baseos-e4s-rpms -- rhel-9-for-[x86_64|ppc64le]-appstream-e4s-rpms -- rhel-9-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms - -for SLES 15.x: -- SLE-Module-SAP-Applications15-[SP number]-Pool -- SLE-Module-SAP-Applications15-[SP number]-Updates -- SLE-Product-SLES_SAP15-[SP number]-Pool -- SLE-Product-SLES_SAP15-[SP number]-Updates - -For details on configuring Red Hat, see the knowledge base article: [How to subscribe SAP HANA systems to the Update Services for SAP Solutions](https://access.redhat.com/solutions/3075991)). If you set role parameter sap_hana_preconfigure_enable_sap_hana_repos to `yes`, the role can enable these repos. - -To install HANA on Red Hat Enterprise Linux 7, 8, or 9, you need some additional packages which are contained in the -- rhel-sap-hana-for-rhel-7-[server|for-power-le]-e4s-rpms, -- rhel-8-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms, or -- rhel-9-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms - -repository. - -To get this repository you need to have one of the following products: - -- [RHEL for SAP Solutions](https://access.redhat.com/solutions/3082481) (premium, standard) -- RHEL for Business Partner NFRs -- [RHEL Developer Subscription](https://developers.redhat.com/products/sap/download/) - -To get a personal developer edition of RHEL for SAP solutions, please register as a developer and download the developer edition. - -- [Registration Link](http://developers.redhat.com/register) : - Here you can either register a new personal account or link it to an already existing - **personal** Red Hat Network account. -- [Download Link](https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.2/x86_64/product-software): - Here you can download the Installation DVD for RHEL with your previously registered - account - -*NOTE:* This is a regular RHEL installation DVD as RHEL for SAP Solutions is no additional - product but only a special bundling. The subscription grants you access to the additional - packages through our content delivery network (CDN) after installation. - -For supported RHEL releases [click here](https://access.redhat.com/solutions/2479121). - -Details on configuring SLES repositories can be found on the following articles for [on-premise systems](https://www.suse.com/support/kb/doc/?id=000018564) or [BYOS cloud images](https://www.suse.com/c/byos-instances-and-the-suse-public-cloud-update-infrastructure/) - - -It is also important that your disks are setup according to the [SAP storage requirements for SAP HANA](https://www.sap.com/documents/2015/03/74cdb554-5a7c-0010-8F2c7-eda71af511fa.html). This [BLOG](https://blogs.sap.com/2017/03/07/the-ultimate-guide-to-effective-sizing-of-sap-hana/) is also quite helpful when sizing HANA systems. -You can use the [storage](https://galaxy.ansible.com/linux-system-roles/storage) role to automate this process - -If you want to use this system in production, make sure that the time service is configured correctly. You can use [rhel-system-roles](https://access.redhat.com/articles/3050101) to automate this. - -Note ----- -For finding out which SAP notes will be used by this role for Red Hat systems, please check the contents of variable `__sap_hana_preconfigure_sapnotes` in files `vars/*.yml` (choose the file which matches your OS distribution and version). - -For SLES, notes are applied using the saptune service. Saptune supports a number of solutions. A solution implements several SAP notes. The default solution for this role is 'HANA'. To see a list of supported solutions and the notes that they implement, you can run `saptune solution list` on the command line. - -Do not run this role against an SAP HANA or other production system. The role will enforce a certain configuration on the managed node(s), which might not be intended. - -Changes -------- -1) Previous versions of this role used the variable sap_hana_preconfigure_use_tuned_where_possible to switch between either tuned settings -or kernel command line settings (where applicable). -The current version modifies this behavior: -- The variable sap_hana_preconfigure_use_tuned_where_possible has been renamed to sap_hana_preconfigure_use_tuned -- The variable sap_hana_preconfigure_switch_to_tuned_profile_sap_hana has been removed. -- If sap_hana_preconfigure_use_tuned is set to `yes`, which is also the default, the role will configure the system for using tuned and also switch to tuned profile sap-hana. - If sap_hana_preconfigure_use_tuned is set to `no`, the role will perform a static configuration, including the modification of the linux command line in grub. -- The role can use tuned, or configure the kernel command line, or both. - -2) Previous versions of this role used variable sap_hana_preconfigure_selinux_state to set the SELinux state to disabled. -As the role sap_general_preconfigure already allows to specify the desired SELinux state, and as sap_general_preconfigure -is always run before sap_hana_preconfigure, there is no need any more to let sap_hana_preconfigure configure the SELinux state. -The same applies to the assertion of the SELinux state. - -3) SLES systems are now configured using saptune rather than the ansible implementation of the notes. - - -## Role Input Parameters - -#### Minimum required parameters: - -This role does not require any parameter to be set in the playbook or inventory. - - -### sap_hana_preconfigure_config_all -- _Type:_ `bool` - -If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
-Default is to perform installation and configuration steps.
- -### sap_hana_preconfigure_installation -- _Type:_ `bool` - -If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-installation steps of SAP notes.
- -### sap_hana_preconfigure_configuration -- _Type:_ `bool` - -If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
- -Example: - -```yaml -sap_hana_preconfigure_config_all: false -sap_hana_preconfigure_configuration: true -sap_hana_preconfigure_2772999_04: true -sap_hana_preconfigure_2382421: true -``` - -### sap_hana_preconfigure_assert -- _Type:_ `bool` -- _Default:_ `false` - -If set to `true`, the role will run in assertion mode instead of the default configuration mode.
- -### sap_hana_preconfigure_assert_all_config -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will check either tuned or static settings.
-If this parameter is set to to `true`, the role will check both tuned and static settings.
- -### sap_hana_preconfigure_assert_ignore_errors -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will abort when encountering any assertion error.
-If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
-This is useful if the role is used for reporting a system's SAP notes compliance.
- -### sap_hana_preconfigure_system_roles_collection -- _Type:_ `str` -- _Default:_ `'fedora.linux_system_roles'` -- _Possible Values:_
- - `fedora.linux_system_roles` - - `redhat.rhel_system_roles` - -Set which Ansible Collection to use for the Linux System Roles.
-For community/upstream, use 'fedora.linux_system_roles'
-For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles'
- -### sap_hana_preconfigure_min_rhel_release_check -- _Type:_ `bool` -- _Default:_ `false` - -Check the RHEL release against parameter `sap_hana_preconfigure_supported_rhel_minor_releases`, which is a list of
-known SAP HANA supported RHEL minor releases. By default, the role will display a message and continue running if
-the RHEL release is not part of that list. If set to `true`, the role will fail in such a case.
- -### sap_hana_preconfigure_supported_rhel_minor_releases -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA supported RHEL minor releases.
- -### sap_hana_preconfigure_enable_sap_hana_repos -- _Type:_ `bool` -- _Default:_ `false` - -Set to 'true' to enable the SAP HANA required RHEL repos.
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_use_hana_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_7_x86_64 -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 7 repos on x86_64'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_7_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 7 repos on ppc64le'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_8_x86_64 -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 8 repos on x86_64'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_8_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 8 repos on ppc64le'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_9_x86_64 -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 9 repos on x86_64'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_9_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 9 repos on ppc64le'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_set_minor_release -- _Type:_ `bool` -- _Default:_ `false` - -Use this parameter to set the RHEL minor release, which is required for SAP HANA.
-The related parameter is `sap_general_preconfigure_set_minor_release`.
- -### sap_hana_preconfigure_create_directories -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want the SAP HANA directories to be created by the role.
-The SAP HANA directories will always be created if `sap_hana_preconfigure_modify_selinux_labels`
-(see below) is set to `true`, no matter how `sap_hana_preconfigure_create_directories` is set.
- -### sap_hana_preconfigure_hana_directories -- _Type:_ `list` with elements of type `str` -- _Default:_ - - /hana - - /lss/shared - -List of SAP HANA directories to be created.
- -### sap_hana_preconfigure_modify_selinux_labels -- _Type:_ `bool` -- _Default:_ `true` - -For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively add
-the `usr_t` label to directories and files in the directories where HANA is installed.
-If relabeling not desired, set this parameter `false`.
-If the variable is set to `true`, the SAP HANA directories will be created no matter
-how the variable `sap_hana_preconfigure_create_directories` (see above) is set.
- -### sap_hana_preconfigure_packages -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -List of RHEL packages to be installed for SAP HANA. For RHEL 8 and later, you can choose to install either the default list
-or a list of the minimum required packages for SAP HANA server (parameter `__sap_hana_preconfigure_packages_min_install`).
- -### sap_hana_preconfigure_min_package_check -- _Type:_ `bool` -- _Default:_ `true` - -SAP HANA requires certain minimum package versions to be supported. These minimum levels are listed in SAP Note 2235581.
-Set this parameter to `false` if you want to ignore these requirements.
- -### sap_hana_preconfigure_update -- _Type:_ `bool` -- _Default:_ `false` - -Set this parameter to `true` to update the system to the latest package levels.
-By setting the parameter `sap_general_preconfigure_set_minor_release` of the
-role `sap_general_preconfigure` to `true`, you can install the most recent package updates
-without updating to a more recent RHEL minor release.
- -### sap_hana_preconfigure_reboot_ok -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want to perform a reboot at the end of the role, if necessary.
- -### sap_hana_preconfigure_fail_if_reboot_required -- _Type:_ `bool` -- _Default:_ `true` - -If `sap_hana_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
-remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
-Can be useful if you want to implement your own reboot handling.
- -### sap_hana_preconfigure_kernel_parameters -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Network related linux kernel parameter settings for SAP HANA on all hardware platforms.
- -### sap_hana_preconfigure_kernel_parameters_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Network related linux kernel parameter settings for platform ppc64le.
- -### sap_hana_preconfigure_use_netapp_settings_nfs -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` to also set NetApp NFS required kernel parameters.
- -### sap_hana_preconfigure_install_ibm_power_tools -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
- -### sap_hana_preconfigure_add_ibm_power_repo -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
-are already available on the local network). The IBM Power Systems service and productivity tools will only
-be installed if the variable `sap_hana_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
- -### sap_hana_preconfigure_ibm_power_repo_url -- _Type:_ `str` -- _Default:_ (set by platform/environment specific variables) - -URL of the IBM Power tools repository.
- -### sap_hana_preconfigure_ppcle_mtu9000_if -- _Type:_ `str` -- _Default:_ `''` - -List of interfaces for which the MTU size will be set to `9000`.
- -### sap_hana_preconfigure_ppcle_tso_if -- _Type:_ `list` with elements of type `str` -- _Default:_ - '{{ ansible_interfaces | difference([''lo'']) }}' - -List of interfaces for which the tso flag will be set.
- -### sap_hana_preconfigure_use_tuned -- _Type:_ `bool` -- _Default:_ `true` - -Use tuned for configuring most of the kernel settings for SAP HANA
-Set this parameter to `false` to use static kernel settings
- -### sap_hana_preconfigure_tuned_profile -- _Type:_ `str` -- _Default:_ `'sap-hana'` - -Name of the SAP HANA tuned tuned profile to enable (RHEL).
- -### sap_hana_preconfigure_modify_grub_cmdline_linux -- _Type:_ `bool` -- _Default:_ `false` - -Set this parameter to `true` to modify the Grub boot command line.
- -### sap_hana_preconfigure_run_grub2_mkconfig -- _Type:_ `bool` -- _Default:_ `true` - -By default, the role will run `grub2-mkconfig` to update the Grub configuration if necessary.
-Set this parameter to `false` if this is not desired.
- -### sap_hana_preconfigure_db_group_name -- _Type:_ `str` - -Use this parameter to specify the name of the RHEL group which is used for the database processes.
-It will be used to configure process limits as per step "Configuring Process Resource Limits" of SAP note 2772999.
- -Example: - -```yaml -sap_hana_preconfigure_db_group_name: dba -``` - -### sap_hana_preconfigure_saptune_version -- _Type:_ `str` -- _Default:_ `''` - -Version of saptune to install (SLES for SAP Applications).
-This will replace the current installed version if present, even downgrade if necessary.
- -### sap_hana_preconfigure_saptune_solution -- _Type:_ `str` -- _Default:_ `'HANA'` -- _Possible Values:_
- - `HANA` - - `NETWEAVER+HANA` - - `S4HANA-APP+DB` - - `S4HANA-DBSERVER` - -The saptune solution to apply (SLES for SAP Applications).
- -### sap_hana_preconfigure_saptune_azure -- _Type:_ `bool` -- _Default:_ `false` - -On Azure, TCP timestamps, reuse and recycle should be disabled (SLES for SAP Applications).
-If the variable is set, an override file for saptune will be created (/etc/saptune/override/2382421) to set net.ipv4.tcp_timestamps and net.ipv4.tcp_tw_reuse to 0.
-Set this parameter to `true` on Azure.
- - - -## Example Playbook - -Simple playbook, named sap+hana.yml: -```yaml ---- -- hosts: all - roles: - - role: sap_general_preconfigure - - role: sap_hana_preconfigure -``` - -Simple playbook for an extended check (assert) run, named sap+hana-assert.yml: +This role performs installation of required packages for running SAP HANA systems and configuration of Operating system parameters. + + + +## Dependencies +- `fedora.linux_system_roles` + - Roles: + - `selinux` + +Install required collections by `ansible-galaxy install -vv -r meta/collection-requirements.yml`. + + + +## Prerequisites +Managed nodes: +- Ensure that general operating system configuration for SAP is performed by [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure). See [Recommended](#recommended) section. + +
+ (Red Hat) Ensure required repositories are available + + Managed nodes need to be properly registered to a repository source and have at least the following Red Hat repositories accessible: + + for RHEL 7.x: + - rhel-7-[server|for-power-le]-e4s-rpms + - rhel-sap-hana-for-rhel-7-[server|for-power-le]-e4s-rpms + + for RHEL 8.x: + - rhel-8-for-[x86_64|ppc64le]-baseos-e4s-rpms + - rhel-8-for-[x86_64|ppc64le]-appstream-e4s-rpms + - rhel-8-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms + + for RHEL 9.x: + - rhel-9-for-[x86_64|ppc64le]-baseos-e4s-rpms + - rhel-9-for-[x86_64|ppc64le]-appstream-e4s-rpms + - rhel-9-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms + + For details on configuring Red Hat, see the knowledge base article: [How to subscribe SAP HANA systems to the Update Services for SAP Solutions](https://access.redhat.com/solutions/3075991)). If you set role parameter sap_hana_preconfigure_enable_sap_hana_repos to `yes`, the role can enable these repos. + + To install HANA on Red Hat Enterprise Linux 7, 8, or 9, you need some additional packages which are contained in one of following repositories + - rhel-sap-hana-for-rhel-7-[server|for-power-le]-e4s-rpms + - rhel-8-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms + - rhel-9-for-[x86_64|ppc64le]-sap-solutions-e4s-rpms + + To get this repository you need to have one of the following products: + - [RHEL for SAP Solutions](https://access.redhat.com/solutions/3082481) (premium, standard) + - RHEL for Business Partner NFRs + - [RHEL Developer Subscription](https://developers.redhat.com/products/sap/download/) + + To get a personal developer edition of RHEL for SAP solutions, please register as a developer and download the developer edition. + + - [Registration Link](http://developers.redhat.com/register) : + Here you can either register a new personal account or link it to an already existing + **personal** Red Hat Network account. + - [Download Link](https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.2/x86_64/product-software): + Here you can download the Installation DVD for RHEL with your previously registered + account + + *NOTE:* This is a regular RHEL installation DVD as RHEL for SAP Solutions is no additional + product but only a special bundling. The subscription grants you access to the additional + packages through our content delivery network (CDN) after installation. + + For supported RHEL releases [click here](https://access.redhat.com/solutions/2479121). + + It is also important that your disks are setup according to the [SAP storage requirements for SAP HANA](https://www.sap.com/documents/2015/03/74cdb554-5a7c-0010-8F2c7-eda71af511fa.html). This [BLOG](https://blogs.sap.com/2017/03/07/the-ultimate-guide-to-effective-sizing-of-sap-hana/) is also quite helpful when sizing HANA systems. + You can use the [storage](https://galaxy.ansible.com/linux-system-roles/storage) role to automate this process + + If you want to use this system in production, make sure that the time service is configured correctly. You can use [rhel-system-roles](https://access.redhat.com/articles/3050101) to automate this. + + Note + ---- + For finding out which SAP notes will be used by this role for Red Hat systems, please check the contents of variable `__sap_hana_preconfigure_sapnotes` in files `vars/*.yml` (choose the file which matches your OS distribution and version). +
+ + +## Execution + +**:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.** + +**NOTE: It is recommended to execute `timesync` role from Ansible Collection `fedora.linux_system_roles` before or after executing this role.** + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + + + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order:
+1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. *`sap_hana_preconfigure`* + + +### Execution Flow + +1. Assert that required inputs were provided. +2. Install required packages and patch system if `sap_hana_preconfigure_update:true` +3. Apply configurations + - Execute configuration tasks based on SAP Notes + - (SUSE) Execute saptune with solution `sap_hana_preconfigure_saptune_solution` (Default: `HANA`) +4. Reboot Managed nodes if packages were installed or patched and `sap_hana_preconfigure_reboot_ok: true` + + +### Example + +Example of execution together with prerequisite role [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) ```yaml --- -- hosts: all - vars: - sap_general_preconfigure_assert: yes - sap_general_preconfigure_assert_ignore_errors: yes - sap_hana_preconfigure_assert: yes - sap_hana_preconfigure_assert_ignore_errors: yes - roles: - - role: sap_general_preconfigure - - role: sap_hana_preconfigure -``` - -## Example Usage - -Normal run, for configuring server host_1 for SAP HANA: -```yaml -ansible-playbook sap+hana.yml -l host_1 -``` - -Extended Check (assert) run, not aborting if an error has been found: -```yaml -ansible-playbook sap+hana-assert.yml -l host_1 +- name: Ansible Play for SAP HANA HA Scale-up preconfigure + hosts: hana_primary, hana_secondary + become: true + tasks: + - name: Execute Ansible Role sap_general_preconfigure + ansible.builtin.include_role: + name: community.sap_install.sap_general_preconfigure + + - name: Execute Ansible Role sap_hana_preconfigure + ansible.builtin.include_role: + name: community.sap_install.sap_hana_preconfigure ``` + -Same as above, with a nice compact and colored output, this time for two hosts: -```yaml -ansible-playbook sap+hana-assert.yml -l host_1,host_2 | -awk '{sub (" \"msg\": ", "")} - /TASK/{task_line=$0} - /fatal:/{fatal_line=$0; nfatal[host]++} - /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0} - /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2} - /SAP note/{print "\033[30m[" host"] "$0} - /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0} - /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0} - /PASS:/{npass[host]++; print "\033[32m[" host"] "$0} - /INFO:/{print "\033[34m[" host"] "$0} - /changed/&&/unreachable/{print "\033[30m[" host"] "$0} - END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) { - printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033[30m Last TASK and fatal output:\n"); print task_line, fatal_line - } - else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033[30m\n", nfail[var], nwarn[var], npass[var])}}' -``` -Note: For terminals with dark background, replace the color code `30m` by `37m`. -In case you need to make an invisible font readable on a terminal with dark background, run the following command in the terminal: -```yaml -printf "\033[37mreadable font\n" -``` -In case you need to make an invisible font readable on a terminal with bright background, run the following command in the terminal: -```yaml -printf "\033[30mreadable font\n" -``` - -## Contribution + + -Please read the [developer guidelines](./README.DEV.md) if you want to contribute + + ## License + +Apache 2.0 + -Apache license 2.0 +## Maintainers + +- [Bernd Finger](https://github.com/berndfinger) + -## Author Information - -Red Hat for SAP Community of Practice, Markus Koch, Thomas Bludau, Bernd Finger, Than Ngo, Rainer Leber +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md) diff --git a/roles/sap_hostagent/INPUT_PARAMETERS.md b/roles/sap_hostagent/INPUT_PARAMETERS.md new file mode 100644 index 000000000..1b10434b8 --- /dev/null +++ b/roles/sap_hostagent/INPUT_PARAMETERS.md @@ -0,0 +1,130 @@ +## Input Parameters for sap_hostagent Ansible Role + + +### sap_hostagent_installation_type + +- _Type:_ `string` +- _Default:_ `rpm` + +Select type of installation source for SAPHOSTAGENT.
+Available options: `sar`, `sar-remote`, `bundle`, `rpm` + + +## Input Parameters for SAR +Following input parameters are used by both Local SAR and Remote SAR. + +### sap_hostagent_sar_file_name + +- _Type:_ `string` + +Name of SAR file containing SAPHOSTAGENT. + +### sap_hostagent_sapcar_file_name + +- _Type:_ `string` + +Name of SAR file containing SAPCAR. + +## Input Parameters for Local SAR + +### sap_hostagent_sar_local_path + +- _Type:_ `string` + +Local directory path where SAR file is located. Do not use together with `sap_hostagent_sar_remote_path`. + +### sap_hostagent_sapcar_local_path + +- _Type:_ `string` + +Local directory path where SAPCAR file is located. Do not use together with `sap_hostagent_sapcar_remote_path`. + +## Input Parameters for Remote SAR + +### sap_hostagent_sar_remote_path + +- _Type:_ `string` + +Remote directory path where SAR file is located. Do not use together with `sap_hostagent_sar_local_path`. + +### sap_hostagent_sapcar_remote_path + +- _Type:_ `string` + +Local directory path where SAPCAR file is located. Do not use together with `sap_hostagent_sapcar_local_path`. + + +## Input Parameters for RPM + +### sap_hostagent_rpm_local_path + +- _Type:_ `string` + +Local directory path where RPM file is located. Do not use together with `sap_hostagent_rpm_remote_path`. + +### sap_hostagent_rpm_remote_path + +- _Type:_ `string` + +Remote directory path where RPM file is located. Do not use together with `sap_hostagent_rpm_local_path`. + +### sap_hostagent_rpm_file_name + +- _Type:_ `string` + +Name of RPM package containing SAPHOSTAGENT. + + +## Input Parameters for SAP Bundle + +### sap_hostagent_bundle_path + +- _Type:_ `string` + +Remote directory path where SAP Bundle file is located after being extracted. + + +## Input Parameters for SSL setup + +### sap_hostagent_config_ssl + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to configure PSE and create CSR.
+Adding signed certificates from a valid CA is not supported yet. + +### sap_hostagent_ssl_passwd + +- _Type:_ `string` + +Enter password for the CSR. It is used when `sap_hostagent_config_ssl` is set. + +### sap_hostagent_ssl_org + +- _Type:_ `string` + +Enter Organization information for the CSR. It is used when `sap_hostagent_config_ssl` is set. + +### sap_hostagent_ssl_country + +- _Type:_ `string` + +Enter Country information for the CSR. It is used when `sap_hostagent_config_ssl` is set. + + +### sap_hostagent_agent_tmp_directory + +- _Type:_ `string` +- _Default:_ `/tmp/hostagent` + +Temporary directory for processing of source file. + +### sap_hostagent_clean_tmp_directory + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to remove temporary directory after installation. + + \ No newline at end of file diff --git a/roles/sap_hostagent/README.md b/roles/sap_hostagent/README.md index 13aa84fa4..400395153 100644 --- a/roles/sap_hostagent/README.md +++ b/roles/sap_hostagent/README.md @@ -1,150 +1,134 @@ + # sap_hostagent Ansible Role + -SAP Host Agent is an agent that can accomplish several life-cycle management tasks, such as operating system monitoring, database monitoring, system instance control and provisioning. - -It is recommended to install SAP Host Agent upfront in any HA environment. - -You can find the latest Documentation in [SAP NOTE 1907566](https://launchpad.support.sap.com/#/notes/1907566) - -This role installs or updates the SAP Host Agent on a RHEL 7.x or 8.x system. It is provided as RPM package, tarball or as part of an SAP softwarebundle. -While Red Hat recommends RPM for easier upgrade, this role take care of all formats. - -## Requirements - -This role is intended to use on a RHEL system that gets SAP software. -So your system needs to be installed with at least the RHEL core packages, properly registered and prepared for HANA or Netweaver installation. - -It needs access to the software repositories required to install SAP HANA (see also: [How to subscribe SAP HANA systems to the Update Services for SAP Solutions](https://access.redhat.com/solutions/3075991)) - -You can use the [redhat_sap.sap_rhsm](https://galaxy.ansible.com/redhat_sap/sap_rhsm) Galaxy Role to automate this process - -To install SAP software on Red Hat Enterprise Linux you need some additional packages which come in a special repository. To get this repository you need to have one -of the following products: - -- [RHEL for SAP Solutions](https://access.redhat.com/solutions/3082481) (premium, standard, developer Edition) -- [RHEL for Business Partner NFRs](https://partnercenter.redhat.com/NFRPageLayout) - -[Click here](https://developers.redhat.com/products/sap/download/) to achieve a personal developer edition of RHEL for SAP Solutions. Please register as a developer and download the developer edition. - -- [Registration Link](http://developers.redhat.com/register) : - Here you can either register a new personal account or link it to an already existing **personal** Red Hat Network account. -- [Download Link](https://access.redhat.com/downloads/): - Here you can download the Installation DVD for RHEL with your previously registered account - -*NOTE:* This is a regular RHEL installation DVD as RHEL for SAP Solutions is no additional - product but only a special bundling. The subscription grants you access to the additional - packages through our content delivery network(CDN) after installation. - -It is also important that your disks are setup according to the [SAP storage requirements for SAP HANA](https://www.sap.com/documents/2015/03/74cdb554-5a7c-0010-82c7-eda71af511fa.html). This [BLOG](https://blogs.sap.com/2017/03/07/the-ultimate-guide-to-effective-sizing-of-sap-hana/) is also quite helpful when sizing HANA systems. - -## Role Variables - -### RPM based installations - -| variable | info | required? | -|:--------:|:----:|:---------:| -|sap_hostagent_installation_type|Source type of the installation for SAPHOSTAGENT|yes, with `rpm` value| -|sap_hostagent_rpm_local_path|Local directory path where RPM file is located|yes, unless `sap_hostagent_rpm_remote_path` is used| -|sap_hostagent_rpm_remote_path|Local directory path where RPM file is located|yes, unless `sap_hostagent_rpm_local_path` is used| -|sap_hostagent_rpm_file_name|Local RPM file name|yes| -|sap_hostagent_agent_tmp_directory|Temporary directory path that will be created on the target host|no (defaulted in the role)| -|sap_hostagent_clean_tmp_directory|Boolean variable to indicate if the temporary directory will be removed or not after the installation| no (defaulted in the role)| - -### SAR based installations (content on ansible control node) - -| variable | info | required? | -|:--------:|:----:|:---------:| -|sap_hostagent_installation_type|Source type of the installation for SAPHOSTAGENT|yes with `sar` value| -|sap_hostagent_sar_local_path|Local directory path where SAR file is located|yes| -|sap_hostagent_sar_file_name|Local SAR file name|yes| -|sap_hostagent_sapcar_local_path|Local directory path where SAPCAR tool file is located|yes| -|sap_hostagent_sapcar_file_name|Local SAPCAR tool file name|yes| -|sap_hostagent_agent_tmp_directory|Temporary directory path that will be created on the target host|no (defaulted in the role)| -|sap_hostagent_clean_tmp_directory|Boolean variable to indicate if the temporary directory will be removed or not after the installation| no (defaulted in the role)| - -### SAR based installations (with content existing on target node) - -| variable | info | required? | -|:--------:|:----:|:---------:| -|sap_hostagent_installation_type|Source type of the installation for SAPHOSTAGENT|yes with `sar-remote` value| -|sap_hostagent_sar_remote_path|Remote directory path where SAR tool file is located|yes| -|sap_hostagent_sar_file_name|SAR tool file name|yes| -|sap_hostagent_sapcar_remote_path|Remote directory path of SAR archive|yes| -|sap_hostagent_sapcar_file_name|Remote file name of SAR archive|yes| -|sap_hostagent_agent_tmp_directory|Temporary directory path that will be created on the target host|no (defaulted in the role)| -|sap_hostagent_clean_tmp_directory|Boolean variable to indicate if the temporary directory will be removed or not after the installation| no (defaulted in the role)| +## Description + +Ansible Role `sap_hostagent` is used install SAP Host Agent. +SAP Host Agent is an agent that can accomplish several life-cycle management tasks, such as operating system monitoring, database monitoring, system instance control and provisioning. -### SAP Bundle based installations - -| variable | info | required? | -|:--------:|:----:|:---------:| -|sap_hostagent_installation_type|Source type of the installation for SAPHOSTAGENT|yes with `bundle` value| -|sap_hostagent_bundle_path|Target host directory path where SAP Installation Bundle has been unarchived| -|sap_hostagent_agent_tmp_directory|Temporary directory path that will be created on the target host|no (defaulted in the role)| -|sap_hostagent_clean_tmp_directory|Boolean variable to indicate if the temporary directory will be removed or not after the installation| no (defaulted in the role)| - -### SSL Configuration - -Right now the role will configure the PSE and create a CSR. Adding signed certificates from a valid CA is not supported yet - -| variable | info | required? | -|:--------:|:----:|:---------:| -|sap_hostagent_config_ssl|This boolean variable will configure Agent for SSL communication|no (defaulted in the role)| -|sap_hostagent_ssl_passwd|Password to be used for the CSR|yes when `sap_hostagent_config_ssl` True| -|sap_hostagent_ssl_org|Organization information for the CSR|yes when `sap_hostagent_config_ssl` True| -|sap_hostagent_ssl_country|Country information for the CSR|yes when `sap_hostagent_config_ssl` True| - -## Dependencies - -Before using this role ensure your system has been configured properly to run SAP applications. - -You can use the supported role `sap_general_preconfigure` coming with RHEL 7 and 8 with RHEL for SAP Solutions Subscription - -The upstream version of this role can be found [here](https://github.com/linux-system-roles/sap_general_preconfigure) - -## Example Playbook - +This role installs SAP Host Agent with following source methods: +- SAP SAR file +- SAP Bundle +- RPM package (Red Hat only) + + + + + + +## Prerequisites +Managed nodes: +- Ensure that servers are configured for SAP Systems. See [Recommended](#recommended) section. + + +## Execution + + + + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order:
+1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. *`sap_hostagent`* + + +### Execution Flow + +1. Create temporary directory. +2. Execute deployment based on chosen method. +3. Configure SSL if `sap_hostagent_config_ssl` was set. +4. Cleanup temporary directory + + +### Example + +#### Example playbook for installing using SAR file located on control node ```yaml - - hosts: servers - roles: - - role: sap_hostagent +--- +- name: Ansible Play for SAP Host Agent installation - Local SAR + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_hostagent + ansible.builtin.include_role: + name: community.sap_install.sap_hostagent + vars: + sap_hostagent_installation_type: "sar" + sap_hostagent_sar_local_path: "/software/SAPHOSTAGENT" + sap_hostagent_sar_file_name: "SAPHOSTAGENT44_44-20009394.SAR" + sap_hostagent_sapcar_local_path: "/software/SAPHOSTAGENT" + sap_hostagent_sapcar_file_name: "SAPCAR_1311-80000935.EXE" + sap_hostagent_clean_tmp_directory: true ``` - -## Example Inventory - -When using RPM: - +#### Example playbook for installing using SAR file located on managed node ```yaml -sap_hostagent_installation_type: "rpm" -sap_hostagent_rpm_local_path: "/mylocaldir/SAPHOSTAGENT" -sap_hostagent_rpm_file_name: "saphostagentrpm_44-20009394.rpm" -sap_hostagent_clean_tmp_directory: true +--- +- name: Ansible Play for SAP Host Agent installation - Remote SAR + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_hostagent + ansible.builtin.include_role: + name: community.sap_install.sap_hostagent + vars: + sap_hostagent_installation_type: "sar" + sap_hostagent_sar_remote_path: "/software/SAPHOSTAGENT" + sap_hostagent_sar_file_name: "SAPHOSTAGENT44_44-20009394.SAR" + sap_hostagent_sapcar_remote_path: "/software/SAPHOSTAGENT" + sap_hostagent_sapcar_file_name: "SAPCAR_1311-80000935.EXE" + sap_hostagent_clean_tmp_directory: true ``` - -When using SAR: - +#### Example playbook for installing using SAP Bundle ```yaml -sap_hostagent_installation_type: "sar" -sap_hostagent_sar_local_path: "/mylocaldir/SAPHOSTAGENT" -sap_hostagent_sar_file_name: "SAPHOSTAGENT44_44-20009394.SAR" -sap_hostagent_sapcar_local_path: "/mylocaldir/SAPHOSTAGENT" -sap_hostagent_sapcar_file_name: "SAPCAR_1311-80000935.EXE" -sap_hostagent_clean_tmp_directory: true +--- +- name: Ansible Play for SAP Host Agent installation - SAP bundle + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_hostagent + ansible.builtin.include_role: + name: community.sap_install.sap_hostagent + vars: + sap_hostagent_installation_type: "bundle" + sap_hostagent_bundle_path: "/usr/local/src/HANA-BUNDLE/51053381" + sap_hostagent_clean_tmp_directory: true ``` - -When using SAP Bundle: - +#### Example playbook for installing using RPM on Red Hat ```yaml -sap_hostagent_installation_type: "bundle" -sap_hostagent_bundle_path: "/usr/local/src/HANA-BUNDLE/51053381" -sap_hostagent_clean_tmp_directory: true +--- +- name: Ansible Play for SAP Host Agent installation - SAP bundle + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_hostagent + ansible.builtin.include_role: + name: community.sap_install.sap_hostagent + vars: + sap_hostagent_installation_type: "rpm" + sap_hostagent_rpm_local_path: "/mylocaldir/SAPHOSTAGENT" + sap_hostagent_rpm_file_name: "saphostagentrpm_44-20009394.rpm" + sap_hostagent_clean_tmp_directory: true ``` + -## License + + -Apache license 2.0 + + -## Author Information - -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice +## License + +Apache 2.0 + + +## Maintainers + +- [Markus Koch](https://github.com/rhmk) +- [Bernd Finger](https://github.com/berndfinger) + + +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_hostagent/INPUT_PARAMETERS.md) diff --git a/roles/sap_install_media_detect/INPUT_PARAMETERS.md b/roles/sap_install_media_detect/INPUT_PARAMETERS.md new file mode 100644 index 000000000..67beaf028 --- /dev/null +++ b/roles/sap_install_media_detect/INPUT_PARAMETERS.md @@ -0,0 +1,181 @@ +## Input Parameters for sap_install_media_detect Ansible Role + +### sap_install_media_detect_rar_handling + +- _Type:_ `bool` +- _Default:_ `True` + +Set this parameter to `false` for skipping the handling of RAR files. In this case, also no `unar` or other RAR handling software will be installed. + + +### sap_install_media_detect_rar_package + +- _Type:_ `str` +- _Default:_ `EPEL` + +Set this parameter to use either the `unar` package from `EPEL` or another software package for handling RAR files.
+Based on this setting, the commands for listing and extracting RAR files are being set in tasks/prepare/enable_rar_handling.yml + +### sap_install_media_detect_epel_gpg_key_url + +- _Type:_ `str` +- _Default:_ `https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}` + +URL for the EPEL GPG key + +### sap_install_media_detect_use_rpm_key_module_for_removing_the_key + +- _Type:_ `bool` +- _Default:_ `True` + +The `EPEL` GPG key can be removed with the rpm_key module and the URL for the key, or by using the `rpm -e` command.
+For using the rpm -e command, set this variable to 'false'. + +### sap_install_media_detect_file_server_only + +- _Type:_ `bool` +- _Default:_ `False` + +If this role is running on a file server on which the SAP software is not to be installed, set the following to true.
+If this role is running on a system on which the SAP software is to be installed, set the following to false. + +### sap_install_media_detect_rar_list + +- _Type:_ `str` +- _Default:_ `/usr/bin/unrar lb` + +Fully qualified path to the program for listing RAR files, including the argument for listing files.
+If not specified, the `lsar` program (or a link with the name `lsar`, pointing to the actual `lsar` program) is expected to be located in one of the PATH directories.
+If sap_install_media_detect_rar_package is set to `EPEL`, this variable is not used. + +### sap_install_media_detect_rar_extract + +- _Type:_ `str` +- _Default:_ `/usr/bin/unrar x` + +Fully qualified path to the program for extracting RAR files, including the argument for extracting files.
+If not specified, the `unar` program (or a link with the name `unar`, pointing to the actual `unar` program) is expected to be located in one of the PATH directories.
+If sap_install_media_detect_rar_package is set to `EPEL`, this variable is not used. + +### sap_install_media_detect_rar_extract_directory_argument + +- _Type:_ `str` + +Fully qualified path to an additional argument to the program for extracting RAR files, for specifying the directory into which the archive is to be extracted. Needs to be empty or start with a space character.
+If sap_install_media_detect_rar_package is set to 'EPEL', this variable is not used. + +### sap_install_media_detect_source_directory + +- _Type:_ `str` +- _Default:_ `/software` + +Directory where the SAP software is located + +### sap_install_media_detect_target_directory + +- _Type:_ `str` + +Directory where the SAP software is located after the role is run, if different from `sap_install_media_detect_source_directory` + +### sap_install_media_detect_create_target_directory + +- _Type:_ `bool` +- _Default:_ `True` + +Create target directory if it does not yet exist. If set to false, perform a check only + +### sap_install_media_detect_rename_target_file_exists + +- _Type:_ `str` +- _Default:_ `skip` + +If there are two files of the same RAR or ZIP type, one with and one without suffix, the following parameter will determine what the role will do for such a file: `skip` the file renaming, `fail`, or `overwrite` the file with the suffix by the file without suffix + +### sap_install_media_detect_extract_archives + +- _Type:_ `bool` +- _Default:_ `True` + +If you want the role to not extract archives which have the extract flag set, set the following parameter to `false`. + +### sap_install_media_detect_move_or_copy_archives + +- _Type:_ `bool` +- _Default:_ `True` + +If you want the role to not move or copy archive files to the `target_dir` subdirectories, set the following parameter to `false`. + +### sap_install_media_detect_assert_after_sapfile + +- _Type:_ `bool` +- _Default:_ `True` + +By default, the presence of at least one file for each file type according to the configured role parameters is asserted. Set the following parameter to 'false' to skip this step. + +### sap_install_media_detect_db + +- _Type:_ `str` + +Select which database type to detect: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2` + +### sap_install_media_detect_db_client + +- _Type:_ `str` + +Select which database client to detect: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2` + +### sap_install_media_detect_swpm + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SWPM. + +### sap_install_media_detect_hostagent + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP Hostagent. + +### sap_install_media_detect_igs + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP IGS. + +### sap_install_media_detect_kernel + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP Kernel files. + +### sap_install_media_detect_kernel_db + +- _Type:_ `str` + +Select which database kernel to detect: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2`
\ No newline at end of file diff --git a/roles/sap_install_media_detect/README.md b/roles/sap_install_media_detect/README.md index 23dfaa60c..45e739bd6 100644 --- a/roles/sap_install_media_detect/README.md +++ b/roles/sap_install_media_detect/README.md @@ -1,48 +1,104 @@ + # sap_install_media_detect Ansible Role - -Ansible Role for detection and extraction of SAP Software installation media - -This role is used to prepare for installation of SAP Software, by searching a given directory for SAP installation media (e.g. SAR files), -moving files to subdirectories (i.e. `/sap_hana` and `/sap_swpm`) with the directory/file ownership permissions, then extracting the detected files. - -Detection of installation media is available for SAP HANA and the various key installation files when using SAP SWPM to install -SAP Business Applications based upon SAP NetWeaver (e.g. SAP S/4HANA, SAP BW/4HANA, SAP ECC, SAP BW, SAP WebDispatcher etc). -As an example, SAP HANA Client would be detected and the SAP Kernel Part I/II would be detected. - -Once detection (e.g. using `zipinfo -1` and `unrar lb`) and extraction are completed, the file paths are shown and stored as variables for subsequent use by other Ansible Tasks. - -RAR files can be either handled by the unar package from EPEL or by another package which can list the contents of, and extract files from, -RAR files. See the comments and examples for the RAR file handling in `defaults/main.yml`. If the EPEL repo had been enabled at the time -when the role was run, it will remain enabled. If the EPEL repo was not present, the associated GPG key will be removed and the EPEL repo -will be disabled as the last task. - -## Execution Flow - -- At the beginning of the execution of the role, a new tool `sapfile` is pushed to a temporary directory on the managed node. -- Also a package which contains a command for extracting and listing content of files of type `RAR` is installed. -- The next step is to check if source and/or target directories exist. If role parameter `sap_install_media_detect_target_directory` is defined, files will later be copied from `sap_install_media_detect_source_directory`. This is the `remote_dir` case. -- If the system on which the `sap_install_media_detect_source_directory` is not writable, the role would normally fail because one or both of the following conditions are not met: - - The SAPCAR EXE file is not executable. - - There are one or more `ZIP` or `RAR` files without extension. -- In this `remote_dir` case, to make sure the role does not fail, it needs to be run first on the node on which `sap_install_media_detect_source_directory` is writable, with role parameter `sap_install_media_detect_file_server_only` set to `true` so the role will not perform and further file detection activities. -- After the SAPCAR EXE file is executable and there are no more `ZIP` or `RAR` files without extension, the role can be called on a managed node where `sap_install_media_detect_source_directory` is not writable. -- A new list of all files with the correct final file names will then be created, and for each of the files, the SAP file types are determined using the `sapfile` tool, either using the file names or - if this information is not sufficient - from information inside the file. -- We then assert that there is at least (or exactly, depending on the file type) one file available for each of the `sap_install_media_detect_*` parameters. For example, if `sap_install_media_detect_kernel_db` is set to `saphana`, then there must be one SAP Kernel DB dependent file for SAP HANA. -- In case of `remote_dir`, the next step is to copy all files from `sap_install_media_detect_source_directory` to `sap_install_media_detect_target_directory`. -- Then we extract files which are configured in `sapfile` to be extracted, and copy or move files which are configured in `sapfile` to be copied or moved. Certain files like `SAPCAR*.EXE` and the SAP Host Agent will be copied to two different directories. -- Once all necessary files have been extracted and all files are copied or moved to where we want them to be, we are using the Ansible find module to identify the different file types by using file or directory name patterns. -- The last step is to fill all required `sap_swpm` parameters from the result of the previous find step, and display all the variables. - -## Variables and Parameters - -See the file `defaults/main.yml`. - -## Dependencies - -This role does not depend on any other Ansible Role. - -## Tags - + +![Ansible Lint for sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_install_media_detect.yml/badge.svg) + +## Description + +Ansible Role `sap_install_media_detect` is used to detect and extract SAP installation media. + +This role searches provided source directory, sorts files based on type and extracts them to target directory. Extraction can be further adjusted to create individual folders based on defined inputs. + +Detection of supported installation media is available for SAP HANA and wide range of SAP Applications (example: SAP S/4HANA, SAP BW/4HANA, SAP ECC, SAP BW, SAP WebDispatcher, SAP Business Applications based upon SAP NetWeaver, etc). + + + + + + +## Prerequisites +Managed nodes: +- Directory with SAP Installation media is present and `sap_install_media_detect_source_directory` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community.sap_launchpad) Ansible Collection. + + +## Execution + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + + + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order:
+#### SAP HANA +1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) +3. *`sap_install_media_detect`* +4. [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) +5. [sap_ha_install_hana_hsr](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_install_hana_hsr) - High Availability specific +6. [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) - High Availability specific + +#### SAP Netweaver +1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) +3. *`sap_install_media_detect`* +4. [sap_swpm](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_swpm) +5. [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) - High Availability specific + + +### Execution Flow + +1. At the beginning of the execution of the role, a new tool `sapfile` is pushed to a temporary directory on the managed node. +2. Also a package which contains a command for extracting and listing content of files of type `RAR` is installed. +3. The next step is to check if source and/or target directories exist. If role parameter `sap_install_media_detect_target_directory` is defined, files will later be copied from `sap_install_media_detect_source_directory`. This is the `remote_dir` case. +4. If the system on which the `sap_install_media_detect_source_directory` is not writable, the role would normally fail because one or both of the following conditions are not met: + - The SAPCAR EXE file is not executable. + - There are one or more `ZIP` or `RAR` files without extension. +5. In this `remote_dir` case, to make sure the role does not fail, it needs to be run first on the node on which `sap_install_media_detect_source_directory` is writable, with role parameter `sap_install_media_detect_file_server_only` set to `true` so the role will not perform and further file detection activities. +6. After the SAPCAR EXE file is executable and there are no more `ZIP` or `RAR` files without extension, the role can be called on a managed node where `sap_install_media_detect_source_directory` is not writable. +7. A new list of all files with the correct final file names will then be created, and for each of the files, the SAP file types are determined using the `sapfile` tool, either using the file names or - if this information is not sufficient - from information inside the file. +8. We then assert that there is at least (or exactly, depending on the file type) one file available for each of the `sap_install_media_detect_*` parameters. For example, if `sap_install_media_detect_kernel_db` is set to `saphana`, then there must be one SAP Kernel DB dependent file for SAP HANA. +9. In case of `remote_dir`, the next step is to copy all files from `sap_install_media_detect_source_directory` to `sap_install_media_detect_target_directory`. +10. Then we extract files which are configured in `sapfile` to be extracted, and copy or move files which are configured in `sapfile` to be copied or moved. Certain files like `SAPCAR*.EXE` and the SAP Host Agent will be copied to two different directories. +11. Once all necessary files have been extracted and all files are copied or moved to where we want them to be, we are using the Ansible find module to identify the different file types by using file or directory name patterns. +12. The last step is to fill all required `sap_swpm` parameters from the result of the previous find step, and display all the variables. + - Once detection (e.g. using `zipinfo -1` and `unrar lb`) and extraction are completed, the file paths are shown and stored as variables for subsequent use by other Ansible Tasks. + +
+ (Red Hat) Additional steps for RAR files + + RAR files can be either handled by the unar package from EPEL or by another package which can list the contents of, and extract files from, RAR files. See the comments and examples for the RAR file handling in `defaults/main.yml`. + + - If the EPEL repo had been enabled at the time when the role was run, it will remain enabled. + - If the EPEL repo was not present, the associated GPG key will be removed and the EPEL repo will be disabled as the last task. +
+ + +### Example + +Example playbook to extract SAP Installation media for SAP ASCS Netweaver. +```yaml +--- +- name: Ansible Play for SAP NetWeaver ASCS - Extract SAP Installation media + hosts: nwas_ascs + become: true + any_errors_fatal: true + max_fail_percentage: 0 + tasks: + + - name: Execute Ansible Role sap_install_media_detect + ansible.builtin.include_role: + name: community.sap_install.sap_install_media_detect + vars: + sap_install_media_detect_swpm: true + sap_install_media_detect_hostagent: true + sap_install_media_detect_igs: true + sap_install_media_detect_kernel: true + sap_install_media_detect_webdisp: false +``` + + + +### Role Tags With the following tags, the role can be called to perform certain activities only: - tag `sap_install_media_detect_zip_handling`: Only perform the task for enabling the listing and extracting of files of type `ZIP`. - tag `sap_install_media_detect_rar_handling`: Only perform the tasks for enabling the listing and extracting of files of type `RAR`. This @@ -59,11 +115,20 @@ With the following tags, the role can be called to perform certain activities on Note: After running the role with the following four tags, the SAP archive files will be in the same place as before running the role the first time. The directories with pattern `*_extracted` will remain in place. `sap_install_media_detect_provide_sapfile_utility,sap_install_media_detect_check_directories,sap_install_media_detect_create_file_list_phase_1,sap_install_media_detect_move_files_to_main_directory` + -## License + + -Apache license 2.0 +## License + +Apache 2.0 + -## Author Information +## Maintainers + +- [Bernd Finger](https://github.com/berndfinger) + -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Bernd Finger +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_install_media_detect/INPUT_PARAMETERS.md) diff --git a/roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md b/roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md new file mode 100644 index 000000000..959447a1f --- /dev/null +++ b/roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md @@ -0,0 +1,78 @@ +## Input Parameters for sap_maintain_etc_hosts Ansible Role + + +This role requires the dictionary `sap_maintain_etc_hosts_list` which contains the parameters for the `/etc/hosts` file. + +The default value is the definition of the cluster nodes like in the role [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster). If the value `sap_hana_cluster_nodes`or `sap_ha_pacemaker_cluster_cluster_nodes` is not defined, then the role creates a default value from `ansible_facts`. + +**NOTE: If you want to use this role to remove entries from /etc/hosts it is a good practice to do this before adding entries. The adding/removal is done in the order the entries are listed.** + +### sap_maintain_etc_hosts_list + +- _Type:_ `list` with elements of type `dict` + +Mandatory list of nodes in form of dictionaries to be added or removed in `/etc/hosts` file. + +Following dictionary keys can be defined: +- **node_ip**
+ IP address of the managed node.
+ **Required** for adding new entries to `/etc/hosts`.
+ _Optional_ for removing entries, where `node_name` and `node_domain` can be used instead. + + - _Type:_ `string` + +- **node_name**
+ Hostname of the managed node.
+ **Required** for adding new entries to `/etc/hosts`.
+ _Optional_ for removing entries, when `node_ip` is not used. + + - _Type:_ `string` + +- **node_domain**
+ Domain name of the managed node. Defaults to `sap_domain` if set or `ansible_domain`.
+ **Required** for adding new entries to `/etc/hosts`.
+ _Optional_ for removing entries, when `node_name` is used. + + - _Type:_ `string` + - _Default:_ `sap_domain` + +- **aliases**
+ List of aliases for the managed node.
+ _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `list` with elements of type `string` + +- **alias_mode**
+ Select method of updating `/etc/hosts` file:
+ - `merge` : merges the list of aliases with the exiting aliases of the node.
+ - `overwrite` : overwrites the aliases of the node. + _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `string` + - _Default:_ `merge` + +- **node_comment**
+ Node comment is appended at end of line of managed node.
+ _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `string` + - _Default:_ `managed by ansible sap_maintain_etc_hosts role` + +- **hana_site**
+ Used by [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) and it is appended to `node_comment`
+ _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `string` + +- **node_role**
+ Not used, but mentioned for compatibility reasons for [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) role.
+ + - _Type:_ `string` + +- **state**
+ Select `present` for adding new entries, `absent` for removing them.
+ **Required** for removing entries, otherwise default `present` is used. + + - _Type:_ `string` + - _Default:_ `present` + \ No newline at end of file diff --git a/roles/sap_maintain_etc_hosts/README.md b/roles/sap_maintain_etc_hosts/README.md index 98fab9adf..e822ae55e 100644 --- a/roles/sap_maintain_etc_hosts/README.md +++ b/roles/sap_maintain_etc_hosts/README.md @@ -1,142 +1,92 @@ -# Role Name: sap_maintain_etc_hosts - -This role can be used to reliably update the /etc/hosts file. - - - -## Role Input Parameters - -This role requires the dictionary `sap_maintain_etc_hosts_list` which contains the parameters for the hostfile. The default value is the definition of the cluster nodes like in the role `sap_ha_pacemaker_cluster`. If the value `sap_hana_cluster_nodes`or `sap_ha_pacemaker_cluster_cluster_nodes` is not defined the role creates a default value from `ansible_facts`. - -Caution: If you want to use this role to remove entries from /etc/hosts it is a good practise to do this before adding entries. The adding/removal is done in the order the entries are listed. - -### sap_maintain_etc_hosts_list - -- _Type:_ `list` - - List of nodes to be added or removed in /etc/hosts - possible list options: - -#### node_ip - -- _Type:_ `string` - - IP address of the node. - It is required for adding a node. - When deleting a node use only when node_name and node_domain are not defined - -#### node_name - -- _Type:_ `string` - - Hostname of the node - It is required for adding a node. - When deleting a node use only when node_ip is not defined - -#### node_domain - -- _Type:_ `string` - - Domainname of the node - Defaults to sap_domain, if set, otherwise ansible_domain is the default - When deleting a node use only when node_name is defined - -#### aliases - -- _Type:_ `list` - - List of aliases for the node - Not used when state is absent - -#### alias_mode - -- _Type:_ `string` - - Options: - - - `merge` : merges the list of aliases with the exiting aliases of the node. (default) - - `overwrite` : overwrites the aliases of the node. - - Not used when state is absent - -#### node_comment - -- _Type:_ `string` - - default: managed by ansible sap_maintain_etc_hosts role` - String which is appended to line in hosts after comment string - Not used when state is absent - -#### hana_site - -- _Type:_ `string` - - if set (e.g. for configuring cluster) it is appended to the comment - Not used when state is absent - -#### node_role - - Not used. For compatibility reason only. - -#### state - -- _Type:_ `string` - - Options: - - - `present` : creates a host entry (default)` - - `absent` : removes a host entry by ip or hostname - - - -Example Playbook ----------------- - -If you want to setup/add entries your etc hosts you can use this snippet - -```[yaml] -- name: Ensure /etc/hosts is updated - include_role: sap_sap_maintain_etc_hosts - var: + +# sap_maintain_etc_hosts Ansible Role + + +## Description + +Ansible Role `sap_maintain_etc_hosts` is used to maintain `/etc/hosts` file. + + + + + + + + +## Execution + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + + + + + +### Execution Flow + +1. Assert that required inputs were provided. +2. Verify duplicate entries and conflicts; +3. Update `/etc/hosts` file. + + +### Example + +Example playbook will update `/etc/hosts`: +- Remove node with IP `10.10.10.10`. +- Remove node with name `host2`. +- Add node with IP `10.10.10.11`, name `host1`, aliases `alias1, alias2` and comment `host1 comment`. +```yaml +- name: Ansible Play for add entry in /etc/hosts + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_sap_maintain_etc_hosts + ansible.builtin.include_role: + name: community.sap_install.sap_sap_maintain_etc_hosts + vars: sap_maintain_etc_hosts_list: - - node_ip: 1.2.3.5 - state: absent - - node_name: host2 - state: absent - - node_ip: 1.2.3.4 - node_name: host1 - aliases: - - alias1 - - anotheralias2 - node_comment: "Here comes text after hashsign" (defaults to hana_site) - state: present + - node_ip: 10.10.10.10 + state: absent + - node_name: host2 + state: absent + - node_ip: 10.10.10.11 + node_name: host1 + aliases: + - alias1 + - alias2 + node_comment: "host1 comment" # Comment is created after hash sign (defaults to hana_site) + state: present ``` -If you have defined a cluster and the variable `sap_ha_pacemaker_cluster_cluster_nodes` or `sap_hana_cluster_nodes` is set, you can use the following play: - -```[yaml] -- name: ensure all cluster nodes are in /etc/hosts - include_role: sap_maintain_etc_hosts - var: - sap_maintain_etc_hosts_list: "{{ sap_hana_cluster_nodes }}" +Example playbook when executed together with [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) role which uses either `sap_ha_pacemaker_cluster_cluster_nodes` or `sap_hana_cluster_nodes`. +```yaml +- name: Ansible Play for add entry in /etc/hosts + hosts: all + become: true + tasks: + - name: Execute Ansible Role sap_sap_maintain_etc_hosts + ansible.builtin.include_role: + name: community.sap_install.sap_sap_maintain_etc_hosts + vars: + sap_maintain_etc_hosts_list: "{{ sap_ha_pacemaker_cluster_cluster_nodes }}" ``` + -License -------- + + -Apache-2.0 + + -Author Information ------------------- +## License + +Apache 2.0 + -@rhmk 10/10/23 +## Maintainers + +- [Markus Koch](https://github.com/rhmk) +- [Bernd Finger](https://github.com/berndfinger) + + +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_sap_maintain_etc_hosts/INPUT_PARAMETERS.md) diff --git a/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md b/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md new file mode 100644 index 000000000..bdaf4cdf6 --- /dev/null +++ b/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md @@ -0,0 +1,92 @@ +## Input Parameters for sap_netweaver_preconfigure Ansible Role + +## Role Input Parameters + +Minimum required parameters: +This role does not require any parameter to be set in the playbook or inventory. + + +### sap_netweaver_preconfigure_config_all +- _Type:_ `bool` +- _Default:_ `true` + +If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
+Default is to perform installation and configuration steps.
+ +### sap_netweaver_preconfigure_installation +- _Type:_ `bool` +- _Default:_ `false` + +If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+installation steps of SAP notes.
+ +### sap_netweaver_preconfigure_configuration +- _Type:_ `bool` +- _Default:_ `false` + +If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+configuration steps of SAP notes.
+ +### sap_netweaver_preconfigure_assert +- _Type:_ `bool` +- _Default:_ `false` + +If set to `true`, the role will run in assertion mode instead of the default configuration mode.
+ +### sap_netweaver_preconfigure_assert_ignore_errors +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will abort when encountering any assertion error.
+If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
+This is useful if the role is used for reporting a system's SAP notes compliance.
+ +### sap_netweaver_preconfigure_min_swap_space_mb +- _Type:_ `str` +- _Default:_ `20480` + +Specifies the minimum amount of swap space on the system required by SAP NetWeaver.
+If this requirement is not met, the role will abort.
+Set your own value to override the default of `20480`.
+ +### sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured +- _Type:_ `bool` +- _Default:_ `true` + +If the system does not have the minimum amount of swap space configured as defined
+in parameter `sap_netweaver_preconfigure_min_swap_space_mb`, the role will abort.
+By setting this parameter to `false`, the role will not abort in such cases.
+ +### sap_netweaver_preconfigure_rpath +- _Type:_ `str` +- _Default:_ `/usr/sap/lib` + +Specifies the SAP kernel's `RPATH`. This is where the SAP kernel is searching for libraries, and where the role
+is creating a link named `libstdc++.so.6` pointing to `/opt/rh/SAP/lib64/compat-sap-c++-10.so`,
+so that newer SAP kernels which are built with GCC10 can find the required symbols.
+ +### sap_netweaver_preconfigure_use_adobe_doc_services +- _Type:_ `bool` +- _Default:_ `false` + +Set this parameter to `true` when using Adobe Document Services, to ensure all required packages are installed.
+ +### sap_netweaver_preconfigure_saptune_version +- _Type:_ `str` +- _Default:_ `3.0.2` + +On SLES systems, specifies the saptune version
+ +### sap_netweaver_preconfigure_saptune_solution +- _Type:_ `str` +- _Default:_ `NETWEAVER` +- _Possible Values:_
+ - `NETWEAVER` + - `NETWEAVER+HANA` + - `S4HANA-APP+DB` + - `S4HANA-APPSERVER` + - `S4HANA-DBSERVER` + +On SLES systems, specifies the saptune solution to apply.
+ + \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/README.md b/roles/sap_netweaver_preconfigure/README.md index ae666ccd8..4375bfeca 100644 --- a/roles/sap_netweaver_preconfigure/README.md +++ b/roles/sap_netweaver_preconfigure/README.md @@ -1,191 +1,84 @@ + # sap_netweaver_preconfigure Ansible Role - -This role installs additional required packages and performs additional configuration steps for installing and running SAP NetWeaver. -If you want to configure a RHEL system for the installation and later usage of SAP NetWeaver, you have to first run role `sap_general_preconfigure` and then role sap_netweaver_preconfigure. -For SLES, running the `sap_general_preconfigure` role is not necessary. - -## Requirements - -To use this role, your system needs to be configured with the basic requirements for SAP NetWeaver or SAP HANA. This is typically done by -running role sap_general_preconfigure (for RHEL managed nodes before RHEL 7.6, community maintained role sap-base-settings can be used). -It is also strongly recommended to run role linux-system-roles.timesync for all systems running SAP NetWeaver, to maintain an identical -system time, before or after running role sap_netweaver_preconfigure. - -Note ----- -On RHEL, as per SAP notes 2002167, 2772999, and 3108316, the role will switch to tuned profile sap-netweaver no matter if another tuned profile -(e.g. virtual-guest) had been active before or not. - -On SLES, this role will switch the saptune solution to the one specified by the configuration and will override any previously set solution. -The default solution is `NETWEAVER`. - -The role can check if enough swap space - as per the prerequisite checker in sapinst - has been configured on the managed node. -Please check the SAP NetWeaver installation guide for swap space requirements. - -Do not run this role against an SAP NetWeaver or other production system. The role will enforce a certain configuration on the managed -node(s), which might not be intended. - - -## Role Input Parameters - -Minimum required parameters: -This role does not require any parameter to be set in the playbook or inventory. - - -### sap_netweaver_preconfigure_config_all -- _Type:_ `bool` -- _Default:_ `true` - -If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
-Default is to perform installation and configuration steps.
- -### sap_netweaver_preconfigure_installation -- _Type:_ `bool` -- _Default:_ `false` - -If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-installation steps of SAP notes.
- -### sap_netweaver_preconfigure_configuration -- _Type:_ `bool` -- _Default:_ `false` - -If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-configuration steps of SAP notes.
- -### sap_netweaver_preconfigure_assert -- _Type:_ `bool` -- _Default:_ `false` - -If set to `true`, the role will run in assertion mode instead of the default configuration mode.
- -### sap_netweaver_preconfigure_assert_ignore_errors -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will abort when encountering any assertion error.
-If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
-This is useful if the role is used for reporting a system's SAP notes compliance.
- -### sap_netweaver_preconfigure_min_swap_space_mb -- _Type:_ `str` -- _Default:_ `20480` - -Specifies the minimum amount of swap space on the system required by SAP NetWeaver.
-If this requirement is not met, the role will abort.
-Set your own value to override the default of `20480`.
- -### sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured -- _Type:_ `bool` -- _Default:_ `true` - -If the system does not have the minimum amount of swap space configured as defined
-in parameter `sap_netweaver_preconfigure_min_swap_space_mb`, the role will abort.
-By setting this parameter to `false`, the role will not abort in such cases.
- -### sap_netweaver_preconfigure_rpath -- _Type:_ `str` -- _Default:_ `/usr/sap/lib` - -Specifies the SAP kernel's `RPATH`. This is where the SAP kernel is searching for libraries, and where the role
-is creating a link named `libstdc++.so.6` pointing to `/opt/rh/SAP/lib64/compat-sap-c++-10.so`,
-so that newer SAP kernels which are built with GCC10 can find the required symbols.
- -### sap_netweaver_preconfigure_use_adobe_doc_services -- _Type:_ `bool` -- _Default:_ `false` - -Set this parameter to `true` when using Adobe Document Services, to ensure all required packages are installed.
- -### sap_netweaver_preconfigure_saptune_version -- _Type:_ `str` -- _Default:_ `3.0.2` - -On SLES systems, specifies the saptune version
- -### sap_netweaver_preconfigure_saptune_solution -- _Type:_ `str` -- _Default:_ `NETWEAVER` -- _Possible Values:_
- - `NETWEAVER` - - `NETWEAVER+HANA` - - `S4HANA-APP+DB` - - `S4HANA-APPSERVER` - - `S4HANA-DBSERVER` - -On SLES systems, specifies the saptune solution to apply.
- - - -## Example Playbook - -Simple playbook, named sap+netweaver.yml: -```yaml ---- -- hosts: all - roles: - - role: sap_general_preconfigure - - role: sap_netweaver_preconfigure -``` - -Simple playbook for an extended check (assert) run, named sap+netweaver-assert.yml: + + +## Description + +Ansible Role `sap_netweaver_preconfigure` is used to ensure that Managed nodes are configured to host SAP Netweaver systems according to SAP Notes after [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) role was executed. + +This role performs installation of required packages for running SAP Netweaver systems and configuration of Operating system parameters. + + + + + + +## Prerequisites +Managed nodes: +- Ensure that general operating system configuration for SAP is performed by [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure). See [Recommended](#recommended) section. + + +## Execution + +**:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.** + +**NOTE: It is recommended to execute `timesync` role from Ansible Collection `fedora.linux_system_roles` before or after executing this role.** + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + + + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order:
+1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. *`sap_netweaver_preconfigure`* + + +### Execution Flow + +1. Assert that required inputs were provided. +2. Install required packages +3. Apply configurations + - Execute configuration tasks based on SAP Notes + - (SUSE) Execute saptune with solution `sap_netweaver_preconfigure_saptune_solution` (Default: `NETWEAVER`) + +**Note: (Red Hat) Due to SAP notes 2002167, 2772999, and 3108316, the role will switch to tuned profile sap-netweaver no matter if another tuned profile (e.g. virtual-guest) had been active before or not.** + + +### Example + +Example of execution together with prerequisite role [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) ```yaml --- -- hosts: all - vars: - sap_preconfigure_assert: yes - sap_preconfigure_assert_ignore_errors: yes - sap_netweaver_preconfigure_assert: yes - sap_netweaver_preconfigure_assert_ignore_errors: yes - roles: - - role: sap_general_preconfigure - - role: sap_netweaver_preconfigure +- name: Ansible Play for SAP Netweaver preconfigure + hosts: nwas_ascs, nwas_ers + become: true + tasks: + - name: Execute Ansible Role sap_general_preconfigure + ansible.builtin.include_role: + name: community.sap_install.sap_general_preconfigure + + - name: Execute Ansible Role sap_netweaver_preconfigure + ansible.builtin.include_role: + name: community.sap_install.sap_netweaver_preconfigure ``` + -## Example Usage -Normal run, for configuring server host_1 for SAP NetWeaver: -```yaml -ansible-playbook sap+netweaver.yml -l host_1 -``` + + -Extended Check (assert) run, not aborting if an error has been found: -```yaml -ansible-playbook sap+netweaver-assert.yml -l host_1 -``` - -Same as above, with a nice compact and colored output, this time for two hosts: -```yaml -ansible-playbook sap+netweaver-assert.yml -l host_1,host_2 | -awk '{sub (" \"msg\": ", "")} - /TASK/{task_line=$0} - /fatal:/{fatal_line=$0; nfatal[host]++} - /...ignoring/{nfatal[host]--; if (nfatal[host]<0) nfatal[host]=0} - /^[a-z]/&&/: \[/{gsub ("\\[", ""); gsub ("]", ""); gsub (":", ""); host=$2} - /SAP note/{print "\033[30m[" host"] "$0} - /FAIL:/{nfail[host]++; print "\033[31m[" host"] "$0} - /WARN:/{nwarn[host]++; print "\033[33m[" host"] "$0} - /PASS:/{npass[host]++; print "\033[32m[" host"] "$0} - /INFO:/{print "\033[34m[" host"] "$0} - /changed/&&/unreachable/{print "\033[30m[" host"] "$0} - END{print ("---"); for (var in npass) {printf ("[%s] ", var); if (nfatal[var]>0) { - printf ("\033[31mFATAL ERROR!!! Playbook might have been aborted!!!\033[30m Last TASK and fatal output:\n"); print task_line, fatal_line - } - else printf ("\033[31mFAIL: %d \033[33mWARN: %d \033[32mPASS: %d\033[30m\n", nfail[var], nwarn[var], npass[var])}}' -``` -Note: For terminals with dark background, replace the color code `30m` by `37m`. -In case you need to make an invisible font readable on a terminal with dark background, run the following command in the terminal: -```yaml -printf "\033[37mreadable font\n" -``` -In case you need to make an invisible font readable on a terminal with bright background, run the following command in the terminal: -```yaml -printf "\033[30mreadable font\n" -``` + + ## License + +Apache 2.0 + -Apache license 2.0 - -## Author Information +## Maintainers + +- [Bernd Finger](https://github.com/berndfinger) + -Red Hat for SAP Community of Practice, Bernd Finger, Rainer Leber +## Role Input Parameters +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md) diff --git a/roles/sap_storage_setup/INPUT_PARAMETERS.md b/roles/sap_storage_setup/INPUT_PARAMETERS.md new file mode 100644 index 000000000..f4de99ad2 --- /dev/null +++ b/roles/sap_storage_setup/INPUT_PARAMETERS.md @@ -0,0 +1,140 @@ + +## Input Parameters for sap_netweaver_preconfigure Ansible Role + + +Minimum required parameters: + +- [sap_storage_setup_definition](#sap_storage_setup_definition-required) +- [sap_storage_setup_host_type](#sap_storage_setup_host_type-required) +- [sap_storage_setup_sid](#sap_storage_setup_sid-required) + + +### sap_storage_setup_definition required + +- _Type:_ `list` + +Describes list of the filesystems to be configured.
+ +- **disk_size**
+ Size of the disk device that is used for the filesystem.
For filesystems with no LVM logical volume striping, this is the total size of the filesystem.
For filesystems with LVM LV striping defined (`lvm_lv_stripes`), this is the size of each disk. The resulting filesystem size will be `disk_size` multiplied by `lvm_lv_stripes` (=disks). + + - _Type:_ `int` + +- **filesystem_type**
+ The type of filesystem that will be created on the logical volume. + + - _Type:_ `str` + - _Default:_ `xfs` + +- **lvm_lv_name**
+ The name of the LVM volume.
The default name is derived from the name value of the filesystem definition entry, for example 'lv_hanalog'. + + - _Type:_ `str` + +- **lvm_lv_stripe_size**
+ When setting up a striped volume, the stripe size can be defined.
Example format - "128K". + + - _Type:_ `str` + +- **lvm_lv_stripes**
+ Number of disks that will be configured in a striped volume.
This requires the availability of the same amount of unused disks, which must be of the size defined in `disk_size`. + + - _Type:_ `int` + _Default:_ `1` + +- **lvm_vg_name**
+ The name of the LVM volume group.
The default name is derived from the name value of the filesystem definition entry, for example 'vg_hanalog'. + + - _Type:_ `str` + +- **lvm_vg_physical_extent_size**
+ Adjustable size of the physical extents of the volume group in LVM. + + - _Type:_ `int` + - _Default:_ `4` + +- **mountpoint**
+ The path to where the filesystem will be mounted.
This can be left out for the definition of a swap volume. + + - _Type:_ `str` + +- **name**
+ A name of the filesystem definition entry.
This name is used to generate volume group name and logical volume name. + + - _Type:_ `str` + +- **nfs_filesystem_type**
+ The type of the NFS filesystem, for example `nfs`, `nfs4`. + + - _Type:_ `str` + - _Default:_ `nfs4` + +- **nfs_mount_options**
+ Mount options to use for the NFS mount.
Generic default is `hard,acl`.
Defaults depend on the specific platform detected by the role or defined explicitly. + + - _Type:_ `str` + - _Default:_ `hard,acl` + +- **nfs_path**
+ When defining an NFS filesystem, this is the directory path of the filesystem to be mounted. + + - _Type:_ `str` + +- **nfs_server**
+ When defining an NFS filesystem, this is the address of the NFS server.
The address must contain the root path, in which the mount directories exist or will be created.
For example, `192.168.1.100:/`. + + - _Type:_ `str` + +- **swap_path**
+ The path to the swap file.
When this option is defined for a swap filesystem definition, it will create a swap file on an existing filesystem. + + - _Type:_ `str` + +Example: + +```yaml +sap_storage_setup_definition: + + # Block Storage volume + - name: hana_data # required: string, filesystem name used to generate lvm_lv_name and lvm_vg_name + mountpoint: /hana/data # required: string, directory path where the filesystem is mounted + disk_size: 100 # required: integer, size in GB + filesystem_type: xfs # optional: string, value 'xfs'. Use 'swap' to create swap filesystem + + # File Storage volume + - name: hana_shared # required: string, reference name + mountpoint: /hana/shared # required: string, directory path where the filesystem is mounted + nfs_server: nfs.corp:/ # required: string, server and parent directory of the NFS Server; value default from var sap_storage_setup_nfs_server + + # Swap as file instead of Block Storage volume + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # required: string, reference name + swap_path: /swapfile # required: string, directory path where swap file is created + disk_size: 4 # required: integer, size in GB of swap file + filesystem_type: swap # required: string, must be value 'swap' +``` + +### sap_storage_setup_host_type required + +- _Type:_ `list` + +The type of service the target system is going to be configured for.
+This can be a list of multiple types which apply to a single host.
+If not defined, the default will be inherited from the global parameter `sap_host_type`. One of these parameters must be defined.
+Available values: `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_multipath_enable_and_detect + +- _Type:_ `bool` +- _Default:_ `False` + +Define if multipathing should be enabled and dynamic multipath devices detected and used for the filesystem setup.
+ +### sap_storage_setup_sid required + +- _Type:_ `str` + +SID of the SAP service.
+If not defined, the default will be inherited from the global parameter `sap_system_sid`. One of these parameters must be defined.
+ + \ No newline at end of file diff --git a/roles/sap_storage_setup/README.md b/roles/sap_storage_setup/README.md index d5e5ff23c..55231f601 100644 --- a/roles/sap_storage_setup/README.md +++ b/roles/sap_storage_setup/README.md @@ -1,161 +1,126 @@ + # sap_storage_setup Ansible Role + +![Ansible Lint for sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_storage_setup.yml/badge.svg) -Ansible Role for preparing a host with the storage requirements of an SAP System (prior to software installation) +## Description + +Ansible Role `sap_storage_setup` is used to prepare a host with the storage requirements of an SAP System (prior to software installation). -## Scope - -This Ansible Role provides: -- local/block storage volumes setup as LVM Logical Volumes, Filesystem formatting and mount to defined directory path -- remote/file storage mount (and subdirectories as required) -- swap file or swap partition - -This Ansible Role has been tested for the following SAP software deployment types: -- SAP HANA Scale-up, Scale-out and Scale-up High Availability -- SAP NetWeaver AS in Sandbox (Two-Tier/OneHost), Standard (Three-Tier/DualHost), Distributed (Multi-Tier) and Distributed High Availability +This role can prepare host with: +- Local block storage volume setup as LVM Logical Volumes, Filesystem formatting and mount to defined directory path +- Remote file storage mount (and subdirectories as required) +- SWAP file or SWAP partition This Ansible Role is agnostic, and will run on any Infrastructure Platform. Only LVM is used for local/block storage, to allow for further expansion if the SAP System requires further storage space in the future. - -Please note, while this Ansible Role has protection against overwrite of existing disks and filesystems - sensible review and care is required for any automation of disk storage. Please review the documentation and samples/examples carefully. It is strongly suggested to initially execute the Ansible Playbook calling this Ansible Role, with `ansible-playbook --check` for Check Mode - this will perform no changes to the host and show which changes would be made. - -In addition, this Ansible Role: - -- Does not permit static definition for mountpoint to use a specific device (e.g. `/dev/sdk`). The definition will define the disk size to use for the mountpoint, and match accordingly. -- Enforces 1 mountpoint will use 1 LVM Logical Volume (LV) that consumes 100% of an LVM Volume Group (VG), with the LVM Volume Group (VG) consuming 100% of 1..n LVM Physical Volumes (PV). - - For granular control of LVM setup, the suggestion is to instead use Ansible Role `storage` from the `fedora.linux_system_roles` Ansible Collection or the Ansible Roles `lvg/lvol/filesystem` from `community.general` Ansible Collection - - -## Requirements - -The Ansible Role requires the `community.general` Ansible Collection (uses the `lvg`, `lvol` and `filesystem` Ansible Modules). - -Before using this Ansible Role, please make sure that the required collections are installed; for example, by using the command `ansible-galaxy install community.general` - + + + +## Dependencies +- `community.general` + - Modules: + - `lvg` + - `lvol` + - `filesystem` +Install required collection by `ansible-galaxy install community.general`. + + + ## Prerequisites +Managed nodes: +- All local/block storage volumes must be attached to the host +- All remote/file storage mounts must be available with host accessibility (e.g. port 2049). + + +## Execution + +**:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.**
+:warning: While this Ansible Role has protection against overwrite of existing disks and filesystems - sensible review and care is required for any automation of disk storage. Please review the documentation and samples/examples carefully. It is strongly suggested to initially execute the Ansible Playbook calling this Ansible Role, with `ansible-playbook --check` for Check Mode - this will perform no changes to the host and show which changes would be made. + +Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + +**Considerations** +- This role does not permit static definition for mountpoint to use a specific device (e.g. `/dev/sdk`). The definition will define the disk size to use for the mountpoint, and match accordingly. +- This role enforces that 1 mountpoint will use 1 LVM Logical Volume (LV) that consumes 100% of an LVM Volume Group (VG), with the LVM Volume Group (VG) consuming 100% of 1..n LVM Physical Volumes (PV). + - Following roles and modules offer alternative for more granular control of LVM setup: + - Role `storage` from [fedora.linux_system_roles](https://github.com/linux-system-roles/storage) + - Modules `filesystem`, `lvg`, `lvol` from [community.general](https://galaxy.ansible.com/ui/repo/published/community/general/) + + + + + +### Execution Flow + +1. Gather facts about hosts. +2. Create list of unused disk devices +3. Match/Map unused disk devices to the `sap_storage_setup_definition` +4. Create LVM Logical Volumes (and prerequisite LVM Volume Groups and LVM Physical Volumes) +5. Create swap file or swap partition +6. Mount NFS temporarily, create required subdirectories, unmount and mount subdirectory on the NFS share + + + +Example playbook to configure SAP HANA OneHost node on AWS that includes: +- 3 disks for `/hana/data`, `/hana/log` and ` /hana/shared` +- Remote filesystem for `/software` +- SWAP +```yaml +--- +- name: Ansible Play for SAP HANA HA storage setup + hosts: hana_primary + become: true + tasks: + - name: Execute Ansible Role sap_storage_setup + ansible.builtin.include_role: + name: community.sap_install.sap_storage_setup + vars: + sap_storage_setup_sid: "H01" + sap_storage_setup_host_type: "hana_primary" + sap_storage_setup_definition: + - name: hana_data + mountpoint: /hana/data + disk_size: 150 + filesystem_type: xfs + + - name: hana_log + mountpoint: /hana/log + disk_size: 100 + filesystem_type: xfs + + - name: hana_shared + mountpoint: /hana/shared + disk_size: 200 + filesystem_type: xfs + + - name: software + mountpoint: /software + nfs_path: /software + nfs_server: "fs-00000000000000000.efs.eu-central-1.amazonaws.com:/software" + nfs_filesystem_type: "nfs4" + nfs_mount_options: "vers=4.1,hard,timeo=600,retrans=2,acl" + + - name: swap + disk_size: 96 + filesystem_type: swap +``` + -All local/block storage volumes must be attached to the host, and all remote/file storage mounts must be available with host accessibility (e.g. port 2049). - -## Variables and Parameters - -The 3 critical variables are: -- `sap_storage_setup_definition` - a list with a dictionary for each mountpoint (e.g. /hana/data) for the host -- `sap_storage_setup_host_type` - a list which defines SAP Software on the host (e.g. list containing both hana_primary and nwas_abap_ascs values if creating a Sandbox Two-Tier/OneHost) -- `sap_storage_setup_sid` - a string with the SAP System ID of the logical system (e.g. D01) - -## Execution Flow - -The Ansible Role is sequential: -- Get host facts -- Create list of unused disk devices -- Match/Map unused disk devices to the `sap_storage_setup_definition` -- Create LVM Logical Volumes (and prerequisite LVM Volume Groups and LVM Physical Volumes) -- Create swap file or swap partition -- Mount NFS temporarily, create required subdirectories, unmount and mount subdictory on the NFS share - -## Sample + + -Please see a full sample using multiple hosts to create an SAP S/4HANA Distributed deployment in the [/playbooks](../../playbooks/) directory of the Ansible Collection `sap_install`. + + ## License - + Apache 2.0 + -## Author Information - -Red Hat for SAP Community of Practice, Janine Fuchs, IBM Lab for SAP Solutions +## Maintainers + +- [Janine Fuchs](https://github.com/ja9fuchs) + ---- - ## Role Input Parameters - -Minimum required parameters: - -- [sap_storage_setup_definition](#sap_storage_setup_definition-required) -- [sap_storage_setup_host_type](#sap_storage_setup_host_type-required) -- [sap_storage_setup_sid](#sap_storage_setup_sid-required) - - -### sap_storage_setup_definition required - -- _Type:_ `list` - -Describes the filesystems to be configured.
- -- **disk_size**
- Size of the disk device that is used for the filesystem.
For filesystems with no LVM logical volume striping, this is the total size of the filesystem.
For filesystems with LVM LV striping defined (`lvm_lv_stripes`), this is the size of each disk. The resulting filesystem size will be `disk_size` multiplied by `lvm_lv_stripes` (=disks). -- **filesystem_type**
- _Default:_ `xfs`
- The type of filesystem that will be created on the logical volume. -- **lvm_lv_name**
- The name of the LVM volume.
The default name is derived from the name value of the filesystem definition entry, for example 'lv_hanalog'. -- **lvm_lv_stripe_size**
- When setting up a striped volume, the stripe size can be defined.
Example format - "128K". -- **lvm_lv_stripes**
- _Default:_ `1`
- Number of disks that will be configured in a striped volume.
This requires the availability of the same amount of unused disks, which must be of the size defined in `disk_size`. -- **lvm_vg_name**
- The name of the LVM volume group.
The default name is derived from the name value of the filesystem definition entry, for example 'vg_hanalog'. -- **lvm_vg_physical_extent_size**
- _Default:_ `4`
- Adjustable size of the physical extents of the volume group in LVM. -- **mountpoint**
- The path to where the filesystem will be mounted.
This can be left out for the definition of a swap volume. -- **name**
- A name of the filesystem definition entry.
This name is used to generate volume group name and logical volume name. -- **nfs_filesystem_type**
- _Default:_ `nfs4`
- The type of the NFS filesystem, for example `nfs`, `nfs4`. -- **nfs_mount_options**
- Mount options to use for the NFS mount.
Generic default is `hard,acl`.
Defaults depend on the specific platform detected by the role or defined explicitly. -- **nfs_path**
- When defining an NFS filesystem, this is the directory path of the filesystem to be mounted. -- **nfs_server**
- When defining an NFS filesystem, this is the address of the NFS server.
The address must contain the root path, in which the mount directories exist or will be created.
For example, `192.168.1.100:/`. -- **swap_path**
- The path to the swap file.
When this option is defined for a swap filesystem definition, it will create a swap file on an existing filesystem. - -Example: - -```yaml -sap_storage_setup_definition: - - # Block Storage volume - - name: hana_data # required: string, filesystem name used to generate lvm_lv_name and lvm_vg_name - mountpoint: /hana/data # required: string, directory path where the filesystem is mounted - disk_size: 100 # required: integer, size in GB - filesystem_type: xfs # optional: string, value 'xfs'. Use 'swap' to create swap filesystem - - # File Storage volume - - name: hana_shared # required: string, reference name - mountpoint: /hana/shared # required: string, directory path where the filesystem is mounted - nfs_server: nfs.corp:/ # required: string, server and parent directory of the NFS Server; value default from var sap_storage_setup_nfs_server - - # Swap as file instead of Block Storage volume - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # required: string, reference name - swap_path: /swapfile # required: string, directory path where swap file is created - disk_size: 4 # required: integer, size in GB of swap file - filesystem_type: swap # required: string, must be value 'swap' -``` - -### sap_storage_setup_host_type required - - -The type of service the target system is going to be configured for.
-This can be a list of multiple types which apply to a single host.
-If not defined, the default will be inherited from the global parameter `sap_host_type`. One of these parameters must be defined.
- -### sap_storage_setup_multipath_enable_and_detect - -- _Type:_ `bool` -- _Default:_ `False` - -Define if multipathing should be enabled and dynamic multipath devices detected and used for the filesystem setup.
- -### sap_storage_setup_sid required - -- _Type:_ `str` - -SID of the SAP service.
-If not defined, the default will be inherited from the global parameter `sap_system_sid`. One of these parameters must be defined.
- - +All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_storage_setup/INPUT_PARAMETERS.md) From 0942046f772fcbc8c40ae9cf51258d42384a0958 Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Fri, 27 Sep 2024 16:35:50 +0200 Subject: [PATCH 3/3] First round of adjustments after review --- .../INPUT_PARAMETERS.md | 91 -- roles/sap_anydb_install_oracle/README.md | 98 +- .../INPUT_PARAMETERS.md | 311 ----- roles/sap_general_preconfigure/README.md | 320 ++++- .../INPUT_PARAMETERS.md | 27 - roles/sap_ha_install_anydb_ibmdb2/README.md | 33 +- .../INPUT_PARAMETERS.md | 90 -- roles/sap_ha_install_hana_hsr/README.md | 96 +- .../INPUT_PARAMETERS.md | 1020 ---------------- roles/sap_ha_pacemaker_cluster/README.md | 1029 ++++++++++++++++- roles/sap_hana_install/INPUT_PARAMETERS.md | 59 - roles/sap_hana_install/README.md | 61 +- .../sap_hana_preconfigure/INPUT_PARAMETERS.md | 324 ------ roles/sap_hana_preconfigure/README.md | 320 ++++- roles/sap_hostagent/INPUT_PARAMETERS.md | 130 --- roles/sap_hostagent/README.md | 138 ++- .../INPUT_PARAMETERS.md | 181 --- roles/sap_install_media_detect/README.md | 196 +++- .../INPUT_PARAMETERS.md | 78 -- roles/sap_maintain_etc_hosts/README.md | 86 +- .../INPUT_PARAMETERS.md | 92 -- roles/sap_netweaver_preconfigure/README.md | 89 +- roles/sap_storage_setup/INPUT_PARAMETERS.md | 140 --- roles/sap_storage_setup/README.md | 146 ++- 24 files changed, 2549 insertions(+), 2606 deletions(-) delete mode 100644 roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md delete mode 100644 roles/sap_general_preconfigure/INPUT_PARAMETERS.md delete mode 100644 roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md delete mode 100644 roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md delete mode 100644 roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md delete mode 100644 roles/sap_hana_install/INPUT_PARAMETERS.md delete mode 100644 roles/sap_hana_preconfigure/INPUT_PARAMETERS.md delete mode 100644 roles/sap_hostagent/INPUT_PARAMETERS.md delete mode 100644 roles/sap_install_media_detect/INPUT_PARAMETERS.md delete mode 100644 roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md delete mode 100644 roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md delete mode 100644 roles/sap_storage_setup/INPUT_PARAMETERS.md diff --git a/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md b/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md deleted file mode 100644 index 70c6424b0..000000000 --- a/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md +++ /dev/null @@ -1,91 +0,0 @@ -## Input Parameters for sap_anydb_install_oracle Ansible Role - - -### sap_anydb_install_oracle_prep_reboot_ok - -- _Type:_ `bool` -- _Default:_ `True` - -Allows reboot of Managed node after packages are installed during pre-steps tasks. - -### sap_anydb_install_oracle_prep_fail_if_reboot_required - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to fail execution if packages are installed during pre-steps tasks, but you don't want to proceed with reboot. - -### sap_anydb_install_oracle_prep_precheck - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to execute installation in Check mode to verify all inputs. This is extra validation and it does not disable installation. - -### sap_anydb_install_oracle_method - -- _Type:_ `string` -- _Default:_ `minimal` - -Select installation method out of available: `minimal` or `responsefile`. - -### sap_anydb_install_oracle_sid: - -- _Type:_ `string` -- _Default:_ `OR1` - -Enter Oracle Database SID. - -### sap_anydb_install_oracle_base - -- _Type:_ `string` -- _Default:_ `/oracle` - -Enter base folder for Oracle Database installation. - -### sap_anydb_install_oracle_filesystem_storage - -- _Type:_ `string` -- _Default:_ `/oradata` - -Enter path for `oracle.install.db.config.starterdb.fileSystemStorage.dataLocation` - -### sap_anydb_install_oracle_inventory_central - -- _Type:_ `string` -- _Default:_ `/oraInventory` - -Enter path for `INVENTORY_LOCATION` - -### sap_anydb_install_oracle_system_password - -- _Type:_ `string` - -Enter password for Oracle SYSTEM user. - -### sap_anydb_install_oracle_extract_path - -- _Type:_ `string` - -Enter path of Installation media, for example: `/software`. - -### sap_anydb_install_oracle_patch_opatch_zip - -- _Type:_ `string` - -Enter name of Oracle opatch file, for example: `OPATCH19P_2308-70004508.ZIP` - -### sap_anydb_install_oracle_patch_sap_zip - -- _Type:_ `string` - -Enter name of Oracle SAP patch file, for example: `SAP19P_2311-70004508.ZIP` - -### sap_anydb_install_oracle_patch_enable - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to allow post-installation patching. - - \ No newline at end of file diff --git a/roles/sap_anydb_install_oracle/README.md b/roles/sap_anydb_install_oracle/README.md index 027615e3c..c7e0cdd2c 100644 --- a/roles/sap_anydb_install_oracle/README.md +++ b/roles/sap_anydb_install_oracle/README.md @@ -4,7 +4,7 @@ ## Description -Ansible role `sap_anydb_install_oracle` is used to install Oracle Database 19.x for SAP system. +The Ansible role `sap_anydb_install_oracle` is used to install Oracle Database 19.x for SAP system. @@ -12,8 +12,9 @@ Ansible role `sap_anydb_install_oracle` is used to install Oracle Database 19.x ## Prerequisites -Managed nodes: -- Directory with installation media is present and `sap_anydb_install_oracle_extract_path` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community.sap_launchpad) Ansible Collection. +Managed Nodes: +- Directory with installation media is present and `sap_anydb_install_oracle_extract_path` updated.
+ Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community.sap_launchpad) Ansible Collection. ## Execution @@ -67,5 +68,92 @@ Apache 2.0 - [Sean Freeman](https://github.com/sean-freeman) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_anydb_install_oracle/INPUT_PARAMETERS.md) +## Role Variables + +### sap_anydb_install_oracle_prep_reboot_ok + +- _Type:_ `bool` +- _Default:_ `True` + +Allows reboot of Managed node after packages are installed during pre-steps tasks. + +### sap_anydb_install_oracle_prep_fail_if_reboot_required + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to fail execution if packages are installed during pre-steps tasks, but you don't want to proceed with reboot. + +### sap_anydb_install_oracle_prep_precheck + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to execute installation in Check mode to verify all inputs. This is extra validation and it does not disable installation. + +### sap_anydb_install_oracle_method + +- _Type:_ `string` +- _Default:_ `minimal` + +Select installation method out of available: `minimal` or `responsefile`. + +### sap_anydb_install_oracle_sid: + +- _Type:_ `string` +- _Default:_ `OR1` + +Enter Oracle Database SID. + +### sap_anydb_install_oracle_base + +- _Type:_ `string` +- _Default:_ `/oracle` + +Enter base folder for Oracle Database installation. + +### sap_anydb_install_oracle_filesystem_storage + +- _Type:_ `string` +- _Default:_ `/oradata` + +Enter path for `oracle.install.db.config.starterdb.fileSystemStorage.dataLocation` + +### sap_anydb_install_oracle_inventory_central + +- _Type:_ `string` +- _Default:_ `/oraInventory` + +Enter path for `INVENTORY_LOCATION` + +### sap_anydb_install_oracle_system_password + +- _Type:_ `string` + +Enter password for Oracle SYSTEM user. + +### sap_anydb_install_oracle_extract_path + +- _Type:_ `string` + +Enter path of Installation media, for example: `/software`. + +### sap_anydb_install_oracle_patch_opatch_zip + +- _Type:_ `string` + +Enter name of Oracle opatch file, for example: `OPATCH19P_2308-70004508.ZIP` + +### sap_anydb_install_oracle_patch_sap_zip + +- _Type:_ `string` + +Enter name of Oracle SAP patch file, for example: `SAP19P_2311-70004508.ZIP` + +### sap_anydb_install_oracle_patch_enable + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to allow post-installation patching. + \ No newline at end of file diff --git a/roles/sap_general_preconfigure/INPUT_PARAMETERS.md b/roles/sap_general_preconfigure/INPUT_PARAMETERS.md deleted file mode 100644 index 364683233..000000000 --- a/roles/sap_general_preconfigure/INPUT_PARAMETERS.md +++ /dev/null @@ -1,311 +0,0 @@ -## Input Parameters for sap_general_preconfigure Ansible Role - -#### Minimum required parameters: - -This role does not require any parameter to be set in the playbook or inventory. - - -### sap_general_preconfigure_config_all -- _Type:_ `bool` - -If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
-Default is to perform installation and configuration steps.
- -### sap_general_preconfigure_installation -- _Type:_ `bool` - -If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-installation steps of SAP notes.
- -### sap_general_preconfigure_configuration -- _Type:_ `bool` - -If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
- -Example: - -```yaml -sap_general_preconfigure_config_all: false -sap_general_preconfigure_configuration: true -sap_general_preconfigure_2002167_02: true -sap_general_preconfigure_1391070: true -``` - -### sap_general_preconfigure_assert -- _Type:_ `bool` -- _Default:_ `false` - -If set to `true`, the role will run in assertion mode instead of the default configuration mode.
- -### sap_general_preconfigure_assert_ignore_errors -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will abort when encountering any assertion error.
-If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
-This is useful if the role is used for reporting a system's SAP notes compliance.
- -### sap_general_preconfigure_system_roles_collection -- _Type:_ `str` -- _Default:_ `'fedora.linux_system_roles'` -- _Possible Values:_
- - `fedora.linux_system_roles` - - `redhat.rhel_system_roles` - -Set which Ansible Collection to use for the Linux System Roles.
-For community/upstream, use 'fedora.linux_system_roles'
-For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles'
- -### sap_general_preconfigure_enable_repos -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want the role to enable the repos as configured by the following repo related parameters.
-The default is `false`, meaning that the role will not enable repos.
- -### sap_general_preconfigure_use_netweaver_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not enable the SAP NetWeaver repo(s).
-The default is `true`, meaning that the role will enable the SAP NetWeaver repo(s).
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_use_hana_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not enable the SAP HANA repo(s).
-The default is `true`, meaning that the role will enable the SAP HANA repo(s).
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_use_ha_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not enable the high availability repo(s).
-The default is `true`, meaning that the role will enable the high availability repo(s).
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_disable_all_other_repos -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you want the role to not disable all repos before enabling the desired ones as configured above.
-The default is `true`, meaning that the role will disable all repos before enabling the desired ones.
-Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
- -### sap_general_preconfigure_req_repos -- _Type:_ `list` with elements of type `str` - -If you want to provide your own list of repos (e.g. on cloud systems), set this variable accordingly.
-Otherwise, the RHEL default repo names with the maximum support duration for the RHEL minor release are chosen automatically
-(e.g. normal repos for RHEL 8.3, e4s repos for RHEL 8.4).
- -Example: - -```yaml -sap_general_preconfigure_req_repos: -- rhel-8-for-x86_64-baseos-eus-rpms -- rhel-8-for-x86_64-appstream-eus-rpms -- rhel-8-for-x86_64-sap-solutions-eus-rpms -- rhel-8-for-x86_64-sap-netweaver-eus-rpms -- rhel-8-for-x86_64-highavailability-eus-rpms -``` - -### sap_general_preconfigure_set_minor_release -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want the role to set the RHEL minor release, which is required for SAP HANA. Default is `false`.
-If you set the RHEL minor release, then you must also use the `eus` or `e4s` repos.
- -### sap_general_preconfigure_packagegroups -- _Type:_ `str` -- _Default:_ (set by platform/environment specific variables) - -The name of the software package group to install.
-The default for this parameter is set in the vars file which corresponds to the detected OS version.
- -Example: - -```yaml -'@minimal-environment' -``` - -### sap_general_preconfigure_envgroups -- _Type:_ `str` -- _Default:_ (set by platform/environment specific variables) - -The name of the software environment group to check.
-The default for this parameter is set in the vars file which corresponds to the detected OS version.
- -Example: - -```yaml -'@minimal-environment' -``` - -### sap_general_preconfigure_packages -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -The list of packages to install.
-The default for this variable is set in the vars file which corresponds to the detected OS version.
- -### sap_general_preconfigure_min_package_check -- _Type:_ `bool` -- _Default:_ `true` - -The default is to install or check if the minimum package versions are installed as defined in the vars files.
-Set to `false` if you do not install or check these minimum package versions.
- -### sap_general_preconfigure_install_ibm_power_tools -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
-See also SAP note 2679703.
- -### sap_general_preconfigure_add_ibm_power_repo -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
-are already available on the local network). The IBM Power Systems service and productivity tools will only
-be installed if the variable `sap_general_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
- -### sap_general_preconfigure_ibm_power_repo_url -- _Type:_ `str` -- _Default:_ `'https://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm'` - -URL for the IBM Power Systems service and productivity tools, see https://www.ibm.com/support/pages/service-and-productivity-tools
- -### sap_general_preconfigure_update -- _Type:_ `bool` -- _Default:_ `false` - -By default, the role will not update the system, for avoiding an unintentional minor OS release update.
-Set this parameter to `true` if you want to update your system to the latest package versions.
-When using SAP HANA, make sure to set the release lock properly so the minor OS release will be one of
-those for which SAP HANA is supported. See also `sap_general_preconfigure_set_minor_release`.
- -### sap_general_preconfigure_reboot_ok -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want to perform a reboot at the end of the role, if necessary.
- -### sap_general_preconfigure_fail_if_reboot_required -- _Type:_ `bool` -- _Default:_ `true` - -If `sap_general_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
-remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
-Can be useful if you want to implement your own reboot handling.
- -### sap_general_preconfigure_selinux_state -- _Type:_ `str` -- _Default:_ `'permissive'` -- _Possible Values:_
- - `enforcing` - - `permissive` - - `disabled` - -One of the SELinux states to be set on the system.
- -### sap_general_preconfigure_create_directories -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want the SAP directories to be created by the role.
-The SAP directories will always be created if `sap_general_preconfigure_modify_selinux_labels`
-(see below) is set to `true`, no matter how `sap_general_preconfigure_create_directories` is set.
- -### sap_general_preconfigure_sap_directories -- _Type:_ `list` with elements of type `str` -- _Default:_ - - /usr/sap - -List of SAP directories to be created.
- -### sap_general_preconfigure_modify_selinux_labels -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want to modify the SELinux labels for the SAP directories set
-in variable `sap_general_preconfigure_sap_directories`.
- -### sap_general_preconfigure_size_of_tmpfs_gb -- _Type:_ `str` -- _Default:_ `"{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}"` - -The size of the tmpfs in GB. The formula used here is mentioned in SAP note 941735.
- -### sap_general_preconfigure_modify_etc_hosts -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want the role to modify the `/etc/hosts` file.
- -### sap_general_preconfigure_etc_sysctl_sap_conf -- _Type:_ `str` -- _Default:_ `'/etc/sysctl.d/sap.conf'` - -The file name of the sysctl config file to be used
- -### sap_general_preconfigure_kernel_parameters -- _Type:_ `list` with elements of type `dict` -- _Default:_ (set by platform/environment specific variables) - -The Linux kernel parameters to use. By default, these are taken from the vars file.
-The default for this parameter is set in the vars file which corresponds to the detected OS version.
- -Example: - -```yaml -sap_general_preconfigure_kernel_parameters: -- name: vm.max_map_count - value: '2147483647' -- name: fs.aio-max-nr - value: '18446744073709551615' -``` - -### sap_general_preconfigure_max_hostname_length -- _Type:_ `str` -- _Default:_ `'13'` - -The maximum length of the hostname. See SAP note 611361.
- -### sap_hostname -- _Type:_ `str` -- _Default:_ `"{{ ansible_hostname }}"` - -The hostname to be used for updating or checking `/etc/hosts` entries.
- -### sap_domain -- _Type:_ `str` -- _Default:_ `"{{ ansible_domain }}"` - -The DNS domain name to be used for updating or checking `/etc/hosts` entries.
- -### sap_ip -- _Type:_ `str` -- _Default:_ `"{{ ansible_default_ipv4.address }}"` - -The IPV4 address to be used for updating or checking `/etc/hosts` entries.
- -### sap_general_preconfigure_db_group_name -- _Type:_ `str` - -Use this variable to specify the name of the RHEL group which is used for the database processes.
-If defined, it will be used to configure process limits as per step
-Configuring Process Resource Limits
- -Example: - -```yaml -sap_general_preconfigure_db_group_name: dba -``` - \ No newline at end of file diff --git a/roles/sap_general_preconfigure/README.md b/roles/sap_general_preconfigure/README.md index d2e05c7be..3511e61e9 100644 --- a/roles/sap_general_preconfigure/README.md +++ b/roles/sap_general_preconfigure/README.md @@ -5,11 +5,9 @@ ## Description -Ansible Role `sap_general_preconfigure` is used to ensure that Managed nodes are configured to host SAP systems according to SAP Notes. +The Ansible role `sap_general_preconfigure` installs required packages and performs basic OS configuration steps according to applicable SAP notes for installing and running SAP HANA or SAP ABAP Application Platform (formerly known as SAP NetWeaver). -This role performs installation of required packages for running SAP systems and configuration of Operating system parameters. - -This is general preconfigure role that used for both SAP Netweaver and SAP HANA, which have separate follow-up roles [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) and [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure). +Specific installation and configuration steps then have to be performed with the roles [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) and [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure). @@ -28,7 +26,6 @@ Install required collections by `ansible-galaxy install -vv -r meta/collection-r ## Prerequisites (Red Hat specific) Ensure system is installed according to: -- RHEL 7: SAP note 2002167, Red Hat Enterprise Linux 7.x: Installation and Upgrade, section `Installing Red Hat Enterprise Linux 7`. - RHEL 8: SAP note 2772999, Red Hat Enterprise Linux 8.x: Installation and Configuration, section `Installing Red Hat Enterprise Linux 8`. - RHEL 9: SAP note 3108316, Red Hat Enterprise Linux 9.x: Installation and Configuration, section `Installing Red Hat Enterprise Linux 9`. @@ -37,8 +34,6 @@ Install required collections by `ansible-galaxy install -vv -r meta/collection-r ## Execution **:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.** - -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. @@ -117,8 +112,9 @@ With the following tags, the role can be called to perform certain activities on - +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -131,9 +127,8 @@ Apache 2.0 - [Bernd Finger](https://github.com/berndfinger) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_general_preconfigure/INPUT_PARAMETERS.md) - +## Role Variables + ### Controlling execution with input parameters Extended Check (assert) run, aborting for any error which has been found: ```yaml @@ -144,3 +139,306 @@ Extended Check (assert) run, not aborting even if an error has been found: ```yaml ansible-playbook sap.yml -l remote_host -e "{sap_general_preconfigure_assert: yes,sap_general_preconfigure_assert_ignore_errors: no}" ``` + +### sap_general_preconfigure_config_all +- _Type:_ `bool` + +If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
+Default is to perform installation and configuration steps.
+ +### sap_general_preconfigure_installation +- _Type:_ `bool` + +If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+installation steps of SAP notes.
+ +### sap_general_preconfigure_configuration +- _Type:_ `bool` + +If `sap_general_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
+ +Example: + +```yaml +sap_general_preconfigure_config_all: false +sap_general_preconfigure_configuration: true +sap_general_preconfigure_2002167_02: true +sap_general_preconfigure_1391070: true +``` + +### sap_general_preconfigure_assert +- _Type:_ `bool` +- _Default:_ `false` + +If set to `true`, the role will run in assertion mode instead of the default configuration mode.
+ +### sap_general_preconfigure_assert_ignore_errors +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will abort when encountering any assertion error.
+If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
+This is useful if the role is used for reporting a system's SAP notes compliance.
+ +### sap_general_preconfigure_system_roles_collection +- _Type:_ `str` +- _Default:_ `'fedora.linux_system_roles'` + +Set which Ansible Collection to use for the Linux System Roles.
+Available values: +- `fedora.linux_system_roles` - for community/upstream.
+- `redhat.rhel_system_roles` - for the RHEL System Roles for SAP, or for Red Hat Automation Hub.
+ +### sap_general_preconfigure_enable_repos +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want the role to enable the repos as configured by the following repo related parameters.
+The default is `false`, meaning that the role will not enable repos.
+ +### sap_general_preconfigure_use_netweaver_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not enable the SAP NetWeaver repo(s).
+The default is `true`, meaning that the role will enable the SAP NetWeaver repo(s).
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_use_hana_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not enable the SAP HANA repo(s).
+The default is `true`, meaning that the role will enable the SAP HANA repo(s).
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_use_ha_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not enable the high availability repo(s).
+The default is `true`, meaning that the role will enable the high availability repo(s).
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_disable_all_other_repos +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you want the role to not disable all repos before enabling the desired ones as configured above.
+The default is `true`, meaning that the role will disable all repos before enabling the desired ones.
+Only valid if `sap_general_preconfigure_enable_repos` is set to `true`.
+ +### sap_general_preconfigure_req_repos +- _Type:_ `list` with elements of type `str` + +If you want to provide your own list of repos (e.g. on cloud systems), set this variable accordingly.
+Otherwise, the RHEL default repo names with the maximum support duration for the RHEL minor release are chosen automatically
+(e.g. normal repos for RHEL 8.3, e4s repos for RHEL 8.4).
+ +Example: + +```yaml +sap_general_preconfigure_req_repos: +- rhel-8-for-x86_64-baseos-eus-rpms +- rhel-8-for-x86_64-appstream-eus-rpms +- rhel-8-for-x86_64-sap-solutions-eus-rpms +- rhel-8-for-x86_64-sap-netweaver-eus-rpms +- rhel-8-for-x86_64-highavailability-eus-rpms +``` + +### sap_general_preconfigure_set_minor_release +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want the role to set the RHEL minor release, which is required for SAP HANA. Default is `false`.
+If you set the RHEL minor release, then you must also use the `eus` or `e4s` repos.
+ +### sap_general_preconfigure_packagegroups +- _Type:_ `str` +- _Default:_ (set by platform/environment specific variables) + +The name of the software package group to install.
+The default for this parameter is set in the vars file which corresponds to the detected OS version.
+ +Example: + +```yaml +'@minimal-environment' +``` + +### sap_general_preconfigure_envgroups +- _Type:_ `str` +- _Default:_ (set by platform/environment specific variables) + +The name of the software environment group to check.
+The default for this parameter is set in the vars file which corresponds to the detected OS version.
+ +Example: + +```yaml +'@minimal-environment' +``` + +### sap_general_preconfigure_packages +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +The list of packages to install.
+The default for this variable is set in the vars file which corresponds to the detected OS version.
+ +### sap_general_preconfigure_min_package_check +- _Type:_ `bool` +- _Default:_ `true` + +The default is to install or check if the minimum package versions are installed as defined in the vars files.
+Set to `false` if you do not install or check these minimum package versions.
+ +### sap_general_preconfigure_install_ibm_power_tools +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
+See also SAP note 2679703.
+ +### sap_general_preconfigure_add_ibm_power_repo +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
+are already available on the local network). The IBM Power Systems service and productivity tools will only
+be installed if the variable `sap_general_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
+ +### sap_general_preconfigure_ibm_power_repo_url +- _Type:_ `str` +- _Default:_ `'https://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm'` + +URL for the IBM Power Systems service and productivity tools, see https://www.ibm.com/support/pages/service-and-productivity-tools
+ +### sap_general_preconfigure_update +- _Type:_ `bool` +- _Default:_ `false` + +By default, the role will not update the system, for avoiding an unintentional minor OS release update.
+Set this parameter to `true` if you want to update your system to the latest package versions.
+When using SAP HANA, make sure to set the release lock properly so the minor OS release will be one of
+those for which SAP HANA is supported. See also `sap_general_preconfigure_set_minor_release`.
+ +### sap_general_preconfigure_reboot_ok +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want to perform a reboot at the end of the role, if necessary.
+ +### sap_general_preconfigure_fail_if_reboot_required +- _Type:_ `bool` +- _Default:_ `true` + +If `sap_general_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
+remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
+Can be useful if you want to implement your own reboot handling.
+ +### sap_general_preconfigure_selinux_state +- _Type:_ `str` +- _Default:_ `'permissive'` +- _Possible Values:_
+ - `enforcing` + - `permissive` + - `disabled` + +One of the SELinux states to be set on the system.
+ +### sap_general_preconfigure_create_directories +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want the SAP directories to be created by the role.
+The SAP directories will always be created if `sap_general_preconfigure_modify_selinux_labels`
+(see below) is set to `true`, no matter how `sap_general_preconfigure_create_directories` is set.
+ +### sap_general_preconfigure_sap_directories +- _Type:_ `list` with elements of type `str` +- _Default:_ + - /usr/sap + +List of SAP directories to be created.
+ +### sap_general_preconfigure_modify_selinux_labels +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want to modify the SELinux labels for the SAP directories set
+in variable `sap_general_preconfigure_sap_directories`.
+ +### sap_general_preconfigure_size_of_tmpfs_gb +- _Type:_ `str` +- _Default:_ `"{{ ((0.75 * (ansible_memtotal_mb + ansible_swaptotal_mb)) / 1024) | round | int }}"` + +The size of the tmpfs in GB. The formula used here is mentioned in SAP note 941735.
+ +### sap_general_preconfigure_modify_etc_hosts +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want the role to modify the `/etc/hosts` file.
+ +### sap_general_preconfigure_etc_sysctl_sap_conf +- _Type:_ `str` +- _Default:_ `'/etc/sysctl.d/sap.conf'` + +The file name of the sysctl config file to be used
+ +### sap_general_preconfigure_kernel_parameters +- _Type:_ `list` with elements of type `dict` +- _Default:_ (set by platform/environment specific variables) + +The Linux kernel parameters to use. By default, these are taken from the vars file.
+The default for this parameter is set in the vars file which corresponds to the detected OS version.
+ +Example: + +```yaml +sap_general_preconfigure_kernel_parameters: +- name: vm.max_map_count + value: '2147483647' +- name: fs.aio-max-nr + value: '18446744073709551615' +``` + +### sap_general_preconfigure_max_hostname_length +- _Type:_ `str` +- _Default:_ `'13'` + +The maximum length of the hostname. See SAP note 611361.
+ +### sap_hostname +- _Type:_ `str` +- _Default:_ `"{{ ansible_hostname }}"` + +The hostname to be used for updating or checking `/etc/hosts` entries.
+ +### sap_domain +- _Type:_ `str` +- _Default:_ `"{{ ansible_domain }}"` + +The DNS domain name to be used for updating or checking `/etc/hosts` entries.
+ +### sap_ip +- _Type:_ `str` +- _Default:_ `"{{ ansible_default_ipv4.address }}"` + +The IPV4 address to be used for updating or checking `/etc/hosts` entries.
+ +### sap_general_preconfigure_db_group_name +- _Type:_ `str` + +Use this variable to specify the name of the RHEL group which is used for the database processes.
+If defined, it will be used to configure process limits as per step
+Configuring Process Resource Limits
+ +Example: + +```yaml +sap_general_preconfigure_db_group_name: dba +``` + \ No newline at end of file diff --git a/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md b/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md deleted file mode 100644 index 7bc555e10..000000000 --- a/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md +++ /dev/null @@ -1,27 +0,0 @@ -## Input Parameters for sap_ha_install_anydb_ibmdb2 Ansible Role - -### sap_ha_install_anydb_ibmdb2_hostname_primary - -- _Type:_ `string` - -Enter IBM Db2 Primary node hostname - - -### sap_ha_install_anydb_ibmdb2_hostname_secondary - -- _Type:_ `string` - -Enter IBM Db2 Secondary node hostname - -### sap_ha_install_anydb_ibmdb2_sid - -- _Type:_ `string` - -Enter IBM Db2 System ID - -### sap_ha_install_anydb_ibmdb2_software_directory - -- _Type:_ `string` - -Enter IBM Db2 installation media path - \ No newline at end of file diff --git a/roles/sap_ha_install_anydb_ibmdb2/README.md b/roles/sap_ha_install_anydb_ibmdb2/README.md index a87751e6a..92e604b03 100644 --- a/roles/sap_ha_install_anydb_ibmdb2/README.md +++ b/roles/sap_ha_install_anydb_ibmdb2/README.md @@ -5,9 +5,9 @@ ## Description -Ansible Role for instantiation of IBM Db2 'Integrated Linux Pacemaker' HADR cluster +The Ansible Role for instantiation of IBM Db2 'Integrated Linux Pacemaker' HADR cluster. -Note: IBM Db2 with 'Integrated Linux Pacemaker' can use two deployment models: +**NOTE:** IBM Db2 with 'Integrated Linux Pacemaker' can use two deployment models: - Mutual Failover option, **not** covered by this Ansible Role - High Availability and Disaster Recovery (HADR) option for Idle Standby, initialized by this Ansible Role @@ -82,5 +82,30 @@ Apache 2.0 - [Sean Freeman](https://github.com/sean-freeman) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_ha_install_anydb_ibmdb2/INPUT_PARAMETERS.md) +## Role Variables + +### sap_ha_install_anydb_ibmdb2_hostname_primary + +- _Type:_ `string` + +Enter IBM Db2 Primary node hostname + + +### sap_ha_install_anydb_ibmdb2_hostname_secondary + +- _Type:_ `string` + +Enter IBM Db2 Secondary node hostname + +### sap_ha_install_anydb_ibmdb2_sid + +- _Type:_ `string` + +Enter IBM Db2 System ID + +### sap_ha_install_anydb_ibmdb2_software_directory + +- _Type:_ `string` + +Enter IBM Db2 installation media path + \ No newline at end of file diff --git a/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md b/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md deleted file mode 100644 index a9bab4b21..000000000 --- a/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md +++ /dev/null @@ -1,90 +0,0 @@ -## Input Parameters for sap_ha_pacemaker_cluster Ansible Role - - -### sap_ha_install_hana_hsr_sid - -- _Type:_ `string` -- _Default:_ `{{ sap_hana_sid }}` - -Enter SID of SAP HANA database. - -### sap_ha_install_hana_hsr_instance_number - -- _Type:_ `string` -- _Default:_ `{{ sap_hana_instance_number }}` - -Enter string value of SAP HANA SID. - -### sap_ha_install_hana_hsr_cluster_nodes - -- _Type:_ `list` -- _Default:_ `{{ sap_hana_cluster_nodes }}` - -List of cluster nodes and associated attributes to describe the target SAP HA environment.
-This is required for the HANA System Replication configuration.
- -- **hana_site**
- Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
Mandatory for HANA clusters (sudo config for system replication). -- **node_ip**
- IP address of the node used for HANA System Replication.
_Optional. Currently not needed/used in cluster configuration._ -- **node_name**
- Name of the cluster node, should match the remote systems' hostnames.
_Optional. Currently not needed/used in cluster configuration._ -- **node_role**
- Role of the defined `node_name` in the SAP HANA cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes.
_Optional. Currently not needed/used in cluster configuration._ - -Example: - -```yaml -sap_ha_install_hana_hsr_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 -``` - -### sap_ha_install_hana_hsr_hdbuserstore_system_backup_user - -- _Type:_ `string` -- _Default:_ `HDB_SYSTEMDB` - -Enter name of SYSTEM user for backup execution. - -### sap_ha_install_hana_hsr_db_system_password - -- _Type:_ `string` -- _Default:_ `{{ sap_hana_install_master_password }}` - -Enter password of SYSTEM user for backup execution. - -### sap_ha_install_hana_hsr_fqdn - -- _Type:_ `string` -- _Default:_ {{ sap_domain }} - -Enter domain of SAP system, for example `example.com`. - -### sap_ha_install_hana_hsr_rep_mode - -- _Type:_ `string` -- _Default:_ `sync` - -Enter SAP HANA System Replication mode. - -### sap_ha_install_hana_hsr_oper_mode - -- _Type:_ `string` -- _Default:_ `logreplay` - -Enter SAP HANA System Replication operation mode. - -### sap_ha_install_hana_hsr_update_etchosts -- _Type:_ `bool` -- _Default:_ `True` - -Enable to update /etc/hosts file. - \ No newline at end of file diff --git a/roles/sap_ha_install_hana_hsr/README.md b/roles/sap_ha_install_hana_hsr/README.md index e16b11b8d..9d2a1ae21 100644 --- a/roles/sap_ha_install_hana_hsr/README.md +++ b/roles/sap_ha_install_hana_hsr/README.md @@ -5,7 +5,7 @@ ## Description -Ansible Role `sap_ha_install_hana_hsr` is used to configure and enable SAP HANA System Replication between 2 nodes. +The Ansible Role `sap_ha_install_hana_hsr` is used to configure and enable SAP HANA System Replication between 2 nodes. @@ -20,7 +20,6 @@ Managed nodes: ## Execution -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. @@ -77,6 +76,8 @@ It is recommended to execute this role together with other roles in this collect +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -89,5 +90,92 @@ Apache 2.0 - [Janine Fuchs](https://github.com/ja9fuchs) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_ha_install_hana_hsr/INPUT_PARAMETERS.md) +## Role Variables + +### sap_ha_install_hana_hsr_sid + +- _Type:_ `string` +- _Default:_ `{{ sap_hana_sid }}` + +Enter SID of SAP HANA database. + +### sap_ha_install_hana_hsr_instance_number + +- _Type:_ `string` +- _Default:_ `{{ sap_hana_instance_number }}` + +Enter string value of SAP HANA SID. + +### sap_ha_install_hana_hsr_cluster_nodes + +- _Type:_ `list` +- _Default:_ `{{ sap_hana_cluster_nodes }}` + +List of cluster nodes and associated attributes to describe the target SAP HA environment.
+This is required for the HANA System Replication configuration.
+ +- **hana_site**
+ Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
Mandatory for HANA clusters (sudo config for system replication). +- **node_ip**
+ IP address of the node used for HANA System Replication.
_Optional. Currently not needed/used in cluster configuration._ +- **node_name**
+ Name of the cluster node, should match the remote systems' hostnames.
_Optional. Currently not needed/used in cluster configuration._ +- **node_role**
+ Role of the defined `node_name` in the SAP HANA cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes.
_Optional. Currently not needed/used in cluster configuration._ + +Example: + +```yaml +sap_ha_install_hana_hsr_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 +``` + +### sap_ha_install_hana_hsr_hdbuserstore_system_backup_user + +- _Type:_ `string` +- _Default:_ `HDB_SYSTEMDB` + +Enter name of SYSTEM user for backup execution. + +### sap_ha_install_hana_hsr_db_system_password + +- _Type:_ `string` +- _Default:_ `{{ sap_hana_install_master_password }}` + +Enter password of SYSTEM user for backup execution. + +### sap_ha_install_hana_hsr_fqdn + +- _Type:_ `string` +- _Default:_ {{ sap_domain }} + +Enter domain of SAP system, for example `example.com`. + +### sap_ha_install_hana_hsr_rep_mode + +- _Type:_ `string` +- _Default:_ `sync` + +Enter SAP HANA System Replication mode. + +### sap_ha_install_hana_hsr_oper_mode + +- _Type:_ `string` +- _Default:_ `logreplay` + +Enter SAP HANA System Replication operation mode. + +### sap_ha_install_hana_hsr_update_etchosts +- _Type:_ `bool` +- _Default:_ `True` + +Enable to update /etc/hosts file. + \ No newline at end of file diff --git a/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md b/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md deleted file mode 100644 index 564cb3cf7..000000000 --- a/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md +++ /dev/null @@ -1,1020 +0,0 @@ -## Input Parameters for sap_ha_pacemaker_cluster Ansible Role - -Minimum required parameters for all clusters: - -- [sap_ha_pacemaker_cluster_hacluster_user_password](#sap_ha_pacemaker_cluster_hacluster_user_password) - -Additional minimum requirements depend on the type of cluster setup and on the target platform. - -### sap_ha_pacemaker_cluster_hacluster_user_password - -- _Type:_ `string` - -**Mandatory Input Parameter.**
-The password of the `hacluster` user which is created during pacemaker installation.
-Inherits the value of `ha_cluster_hacluster_password`, when defined.
- - -### sap_ha_pacemaker_cluster_aws_access_key_id - -- _Type:_ `string` - -AWS access key to allow control of instances (for example for fencing operations).
-Mandatory for the cluster nodes setup on AWS EC2 instances, when:
-1. IAM Role or Instance profile is not attached to EC2 instance.
-2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
- -### sap_ha_pacemaker_cluster_aws_credentials_setup - -- _Type:_ `string` - -Set this parameter to 'true' to store AWS credentials into /root/.aws/credentials.
-Requires: `sap_ha_pacemaker_cluster_aws_access_key_id` and `sap_ha_pacemaker_cluster_aws_secret_access_key`
-Mandatory for the cluster nodes setup on AWS EC2 instances, when:
-1. IAM Role or Instance profile is not attached to EC2 instance.
- -### sap_ha_pacemaker_cluster_aws_region - -- _Type:_ `string` - -The AWS region in which the instances to be used for the cluster setup are located.
-Mandatory for cluster nodes setup on AWS EC2 instances.
- -### sap_ha_pacemaker_cluster_aws_secret_access_key - -- _Type:_ `string` - -AWS secret key, paired with the access key for instance control.
-Mandatory for the cluster nodes setup on AWS EC2 instances, when:
-1. IAM Role or Instance profile is not attached to EC2 instance.
-2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
- -### sap_ha_pacemaker_cluster_aws_vip_update_rt - -- _Type:_ `string` - -List one more routing table IDs for managing Virtual IP failover through routing table changes.
-Multiple routing tables must be defined as a comma-separated string (no spaces).
-Mandatory for the VIP resource configuration in AWS EC2 environments.
- -### sap_ha_pacemaker_cluster_cluster_name - -- _Type:_ `string` - -The name of the pacemaker cluster.
-Inherits the `ha_cluster` LSR native parameter `ha_cluster_cluster_name` if not defined.
-If not defined, the `ha_cluster` Linux System Role default will be used.
- -### sap_ha_pacemaker_cluster_cluster_nodes - -- _Type:_ `list` - -List of cluster nodes and associated attributes to describe the target SAP HA environment.
-This is required for the HANA System Replication configuration.
-Synonym for this parameter is `sap_hana_cluster_nodes`.
-Mandatory to be defined for HANA clusters.
- -- **hana_site**
- Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
Mandatory for HANA clusters (sudo config for system replication). -- **node_ip**
- IP address of the node used for HANA System Replication.
_Optional. Currently not needed/used in cluster configuration._ -- **node_name**
- Name of the cluster node, should match the remote systems' hostnames.
_Optional. Currently not needed/used in cluster configuration._ -- **node_role**
- Role of the defined `node_name` in the SAP HANA cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes.
_Optional. Currently not needed/used in cluster configuration._ - -Example: - -```yaml -sap_ha_pacemaker_cluster_cluster_nodes: -- hana_site: DC01 - node_ip: 192.168.5.1 - node_name: nodeA - node_role: primary -- hana_site: DC02 -``` - -### sap_ha_pacemaker_cluster_cluster_properties - -- _Type:_ `dict` -- _Default:_ `{'concurrent-fencing': True, 'stonith-enabled': True, 'stonith-timeout': 900}` - -Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
-When no STONITH resource is defined, STONITH will be disabled and a warning displayed.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_cluster_properties: - concurrent-fencing: true - stonith-enabled: true - stonith-timeout: 900 -``` - -### sap_ha_pacemaker_cluster_create_config_dest - -- _Type:_ `string` -- _Default:_ `review_resource_config.yml` - -The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory.
-Requires `sap_ha_pacemaker_cluster_create_config_varfile` to be enabled for generating the output file.
-Specify a path/filename to save the file in a custom location.
-The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
- -### sap_ha_pacemaker_cluster_create_config_varfile - -- _Type:_ `bool` -- _Default:_ `False` - -When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format.
-This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_pacemaker_cluster' role.
-When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes.
-WARNING! This report may include sensitive details like secrets required for certain cluster resources!
- -### sap_ha_pacemaker_cluster_enable_cluster_connector - -- _Type:_ `bool` -- _Default:_ `True` - -Enables/Disables the SAP HA Interface for SAP ABAP application server instances, also known as `sap_cluster_connector`.
-Set this parameter to 'false' if the SAP HA interface should not be installed and configured.
- -### sap_ha_pacemaker_cluster_extra_packages - -- _Type:_ `list` - -Additional extra packages to be installed, for instance specific resource packages.
-For SAP clusters configured by this role, the relevant standard packages for the target scenario are automatically included.
- -### sap_ha_pacemaker_cluster_fence_agent_packages - -- _Type:_ `list` - -Additional fence agent packages to be installed.
-This is automatically combined with default packages in:
-`__sap_ha_pacemaker_cluster_fence_agent_packages_minimal`
-`__sap_ha_pacemaker_cluster_fence_agent_packages_platform`
- -### sap_ha_pacemaker_cluster_gcp_project - -- _Type:_ `string` - -Google Cloud project name in which the target instances are installed.
-Mandatory for the cluster setup on GCP instances.
- -### sap_ha_pacemaker_cluster_gcp_region_zone - -- _Type:_ `string` - -Google Cloud Platform region zone ID.
-Mandatory for the cluster setup on GCP instances.
- -### sap_ha_pacemaker_cluster_ha_cluster - -- _Type:_ `dict` - -The `ha_cluster` LSR native parameter `ha_cluster` can be used as a synonym.
-Optional _**host_vars**_ parameter - if defined it must be set for each node.
-Dictionary that can contain various node options for the pacemaker cluster configuration.
-Supported options can be reviewed in the `ha_cluster` Linux System Role [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md].
-If not defined, the `ha_cluster` Linux System Role default will be used.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_ha_cluster: - corosync_addresses: - - 192.168.1.10 - - 192.168.2.10 - node_name: nodeA -``` - -### sap_ha_pacemaker_cluster_hana_automated_register - -- _Type:_ `bool` -- _Default:_ `True` - -Parameter for the 'SAPHana' cluster resource.
-Define if a former primary should be re-registered automatically as secondary.
- -### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_primary_name - -- _Type:_ `string` -- _Default:_ `col_saphana_vip__HDB_primary` - -Customize the cluster constraint name for VIP and SAPHana primary clone colocation.
- -### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_secondary_name - -- _Type:_ `string` -- _Default:_ `col_saphana_vip__HDB_readonly` - -Customize the cluster constraint name for VIP and SAPHana secondary clone colocation.
- -### sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout - -- _Type:_ `int` -- _Default:_ `7200` - -Parameter for the 'SAPHana' cluster resource.
-Time difference needed between to primary time stamps, if a dual-primary situation occurs.
-If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
-This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
- -### sap_ha_pacemaker_cluster_hana_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHanaFil__HDB` - -Customize the cluster resource name of the SAP HANA Filesystem clone.
- -### sap_ha_pacemaker_cluster_hana_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHanaFil__HDB` - -Customize the cluster resource name of the SAP HANA Filesystem.
- -### sap_ha_pacemaker_cluster_hana_global_ini_path - -- _Type:_ `string` -- _Default:_ `/usr/sap//SYS/global/hdb/custom/config/global.ini` - -Path with location of global.ini for srHook update
- -### sap_ha_pacemaker_cluster_hana_hook_chksrv - -- _Type:_ `bool` -- _Default:_ `False` - -Controls if ChkSrv srHook is enabled during srHook creation.
-It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
- -### sap_ha_pacemaker_cluster_hana_hook_tkover - -- _Type:_ `bool` -- _Default:_ `False` - -Controls if TkOver srHook is enabled during srHook creation.
-It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
- -### sap_ha_pacemaker_cluster_hana_hooks - -- _Type:_ `list` -- _Default:_ `[]` - -Customize required list of SAP HANA Hooks
-Mandatory to include SAPHanaSR srHook in list.
-Mandatory attributes are provider and path.
-Example below shows mandatory SAPHanaSR, TkOver and ChkSrv hooks.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_hana_hooks: -- options: - - name: execution_order - value: 1 - path: /usr/share/SAPHanaSR/ - provider: SAPHanaSR -- options: - - name: execution_order - value: 2 - path: /usr/share/SAPHanaSR/ - provider: susTkOver -- options: - - name: execution_order - value: 3 - - name: action_on_lost - value: stop - path: /usr/share/SAPHanaSR/ - provider: susChkSrv -``` - -### sap_ha_pacemaker_cluster_hana_instance_nr - -- _Type:_ `string` - -The instance number of the SAP HANA database which this role will configure in the cluster.
-Inherits the value of `sap_hana_instance_number`, when defined.
-Mandatory for SAP HANA cluster setups.
- -### sap_ha_pacemaker_cluster_hana_order_hana_vip_primary_name - -- _Type:_ `string` -- _Default:_ `ord_saphana_vip__HDB_primary` - -Customize the cluster constraint name for VIP and SAPHana primary clone order.
- -### sap_ha_pacemaker_cluster_hana_order_hana_vip_secondary_name - -- _Type:_ `string` -- _Default:_ `ord_saphana_vip__HDB_readonly` - -Customize the cluster constraint name for VIP and SAPHana secondary clone order.
- -### sap_ha_pacemaker_cluster_hana_order_topology_hana_name - -- _Type:_ `string` -- _Default:_ `ord_saphana_saphanatop__HDB` - -Customize the cluster constraint name for SAPHana and Topology order.
- -### sap_ha_pacemaker_cluster_hana_prefer_site_takeover - -- _Type:_ `bool` -- _Default:_ `True` - -Parameter for the 'SAPHana' cluster resource.
-Set to "false" if the cluster should first attempt to restart the instance on the same node.
-When set to "true" (default) a failover to secondary will be initiated on resource failure.
- -### sap_ha_pacemaker_cluster_hana_resource_clone_msl_name - -- _Type:_ `string` -- _Default:_ `msl_SAPHana__HDB` - -Customize the cluster resource name of the SAP HANA DB resource master slave clone.
-Master Slave clone is specific to Classic SAPHana resource on SUSE (non-angi).
- -### sap_ha_pacemaker_cluster_hana_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHana__HDB` - -Customize the cluster resource name of the SAP HANA DB resource clone.
- -### sap_ha_pacemaker_cluster_hana_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHana__HDB` - -Customize the cluster resource name of the SAP HANA DB resource.
- -### sap_ha_pacemaker_cluster_hana_sid - -- _Type:_ `string` - -The SAP HANA SID of the instance that will be configured in the cluster.
-The SID must follow SAP specifications - see SAP Note 1979280.
-Inherits the value of `sap_hana_sid`, when defined.
-Mandatory for SAP HANA cluster setups.
- -### sap_ha_pacemaker_cluster_hana_topology_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHanaTop__HDB` - -Customize the cluster resource name of the SAP HANA Topology resource clone.
- -### sap_ha_pacemaker_cluster_hana_topology_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHanaTop__HDB` - -Customize the cluster resource name of the SAP HANA Topology resource.
- -### sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_SAPHanaCon__HDB` - -Customize the cluster resource name of the SAP HANA Controller clone.
- -### sap_ha_pacemaker_cluster_hanacontroller_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPHanaCon__HDB` - -Customize the cluster resource name of the SAP HANA Controller.
- -### sap_ha_pacemaker_cluster_host_type - -- _Type:_ `list` -- _Default:_ `hana_scaleup_perf` - -The SAP landscape to for which the cluster is to be configured.
-The default is a 2-node SAP HANA scale-up cluster.
- -### sap_ha_pacemaker_cluster_ibmcloud_api_key - -- _Type:_ `string` - -The API key which is required to allow the control of instances (for example for fencing operations).
-Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_powervs_api_type - -- _Type:_ `string` - -IBM Power Virtual Server API Endpoint type (public or private) dependent on network interface attachments for the target instances.
-Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_powervs_forward_proxy_url - -- _Type:_ `string` - -IBM Power Virtual Server forward proxy url when IBM Power Virtual Server API Endpoint type is set to private.
-When public network interface, can be ignored.
-When private network interface, mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_powervs_workspace_crn - -- _Type:_ `string` - -IBM Power Virtual Server Workspace service cloud resource name (CRN) identifier which contains the target instances
-Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
- -### sap_ha_pacemaker_cluster_ibmcloud_region - -- _Type:_ `string` - -The IBM Cloud VS region name in which the instances are running.
-Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
- -### sap_ha_pacemaker_cluster_msazure_resource_group - -- _Type:_ `string` - -Resource group name/ID in which the target instances are defined.
-Mandatory for the cluster setup on MS Azure instances.
- -### sap_ha_pacemaker_cluster_msazure_subscription_id - -- _Type:_ `string` - -Subscription ID of the MS Azure environment containing the target instances.
-Mandatory for the cluster setup on MS Azure instances.
- -### sap_ha_pacemaker_cluster_nwas_abap_aas_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP AAS instance.
-Mandatory for NetWeaver AAS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1 - -- _Type:_ `bool` -- _Default:_ `False` - -The standard NetWeaver ASCS/ERS cluster will be set up as ENSA2.
-Set this parameter to 'true' to configure it as ENSA1.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_simple_mount - -- _Type:_ `bool` -- _Default:_ `True` - -Enables preferred method for ASCS ERS ENSA2 clusters - Simple Mount
-Set this parameter to 'true' to configure ENSA2 Simple Mount.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__ASCS` - -Name of the filesystem resource for the ASCS instance.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_group_stickiness - -- _Type:_ `string` -- _Default:_ `3000` - -NetWeaver ASCS resource group stickiness to prefer the ASCS group to stay on the node it was started on.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP ASCS instance.
-Mandatory for NetWeaver ASCS/ERS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_automatic_recover_bool - -- _Type:_ `bool` -- _Default:_ `False` - -NetWeaver ASCS instance resource option "AUTOMATIC_RECOVER".
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_failure_timeout - -- _Type:_ `string` -- _Default:_ `60` - -NetWeaver ASCS instance failure-timeout attribute.
-Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_migration_threshold - -- _Type:_ `string` -- _Default:_ `1` - -NetWeaver ASCS instance migration-threshold setting attribute.
-Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_instance_name - -- _Type:_ `string` - -The name of the ASCS instance, typically the profile name.
-Mandatory for the NetWeaver ASCS/ERS cluster setup
-Recommended format _ASCS_.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPInstance__ASCS` - -Name of the ASCS instance resource.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_stickiness - -- _Type:_ `string` -- _Default:_ `5000` - -NetWeaver ASCS instance resource stickiness attribute.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_start_profile_string - -- _Type:_ `string` - -The full path and name of the ASCS instance profile.
-Mandatory for the NetWeaver ASCS/ERS cluster setup.
- -### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapstartsrv_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPStartSrv__ASCS` - -Name of the ASCS SAPStartSrv resource for simple mount.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__ERS` - -Name of the filesystem resource for the ERS instance.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP ERS instance.
-Mandatory for NetWeaver ASCS/ERS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_automatic_recover_bool - -- _Type:_ `bool` -- _Default:_ `False` - -NetWeaver ERS instance resource option "AUTOMATIC_RECOVER".
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_instance_name - -- _Type:_ `string` - -The name of the ERS instance, typically the profile name.
-Mandatory for the NetWeaver ASCS/ERS cluster setup.
-Recommended format _ERS_.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPInstance__ERS` - -Name of the ERS instance resource.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_start_profile_string - -- _Type:_ `string` - -The full path and name of the ERS instance profile.
-Mandatory for the NetWeaver ASCS/ERS cluster.
- -### sap_ha_pacemaker_cluster_nwas_abap_ers_sapstartsrv_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_SAPStartSrv__ERS` - -Name of the ERS SAPstartSrv resource for simple mount.
- -### sap_ha_pacemaker_cluster_nwas_abap_pas_instance_nr - -- _Type:_ `string` - -Instance number of the NetWeaver ABAP PAS instance.
-Mandatory for NetWeaver PAS cluster configuration.
- -### sap_ha_pacemaker_cluster_nwas_abap_sid - -- _Type:_ `string` - -SID of the NetWeaver instances.
-Mandatory for NetWeaver cluster configuration.
-Uses `sap_swpm_sid` if defined.
-Mandatory for NetWeaver cluster setups.
- -### sap_ha_pacemaker_cluster_nwas_colocation_ascs_no_ers_name - -- _Type:_ `string` -- _Default:_ `col_ascs_separate_` - -Customize the cluster constraint name for ASCS and ERS separation colocation.
- -### sap_ha_pacemaker_cluster_nwas_order_ascs_first_name - -- _Type:_ `string` -- _Default:_ `ord_ascs_first_` - -Customize the cluster constraint name for ASCS starting before ERS order.
- -### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_fs__sapmnt` - -Filesystem resource clone name for the shared filesystem /sapmnt.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__sapmnt` - -Filesystem resource name for the shared filesystem /sapmnt.
-Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed - -- _Type:_ `bool` -- _Default:_ `False` - -Change this parameter to 'true' if the 3 shared filesystems `/usr/sap/trans`, `/usr/sap//SYS` and '/sapmnt' shall be configured as cloned cluster resources.
- -### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_fs__sys` - -Filesystem resource clone name for the shared filesystem /usr/sap//SYS.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__sys` - -Filesystem resource name for the transports filesystem /usr/sap//SYS.
-Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_clone_name - -- _Type:_ `string` -- _Default:_ `cln_fs__trans` - -Filesystem resource clone name for the shared filesystem /usr/sap/trans.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_fs__trans` - -Filesystem resource name for the transports filesystem /usr/sap/trans.
-Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
-Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
- -### sap_ha_pacemaker_cluster_operation_defaults - -- _Type:_ `dict` -- _Default:_ `{'record-pending': True, 'timeout': 600}` - -Set default operation parameters that will be valid for all pacemaker resources.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_operation_defaults: - record-pending: true - timeout: 600 -``` - -### sap_ha_pacemaker_cluster_resource_defaults - -- _Type:_ `dict` -- _Default:_ `{'migration-threshold': 5000, 'resource-stickiness': 3000}` - -Set default parameters that will be valid for all pacemaker resources.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_resource_defaults: - migration-threshold: 5000 - resource-stickiness: 1000 -``` - -### sap_ha_pacemaker_cluster_saphanasr_angi_detection - -- _Type:_ `string` -- _Default:_ `True` - -Disabling this variable enables to use Classic SAPHanaSR agents even on server, with SAPHanaSR-angi is available.
- -### sap_ha_pacemaker_cluster_sbd_devices - -- _Type:_ `list` - -Required if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide list of block devices for Stonith SBD agent
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_devices: -- /dev/disk/by-id/scsi-3600 -``` - -### sap_ha_pacemaker_cluster_sbd_enabled - -- _Type:_ `bool` - -Set this parameter to 'true' to enable workflow to add Stonith SBD resource.
-Stonith SBD resource has to be provided as part of `sap_ha_pacemaker_cluster_stonith_custom`.
-Default SBD agents are: stonith:external/sbd for SLES and stonith:fence_sbd for RHEL
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_devices: -- /dev/disk/by-id/scsi-3600 -sap_ha_pacemaker_cluster_sbd_enabled: true -sap_ha_pacemaker_cluster_stonith_custom: -- agent: stonith:external/sbd - id: stonith_sbd - instance_attrs: - - attrs: - - name: pcmk_delay_max - value: 15 -``` - -### sap_ha_pacemaker_cluster_sbd_options - -- _Type:_ `list` - -Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide list of SBD specific options that are added into SBD configuration file.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_options: -- name: startmode - value: clean -``` - -### sap_ha_pacemaker_cluster_sbd_watchdog - -- _Type:_ `str` -- _Default:_ `/dev/watchdog` - -Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide watchdog name to override default /dev/watchdog
- -### sap_ha_pacemaker_cluster_sbd_watchdog_modules - -- _Type:_ `list` - -Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
-Provide list of watchdog kernel modules to be loaded (creates /dev/watchdog* devices).
- -Example: - -```yaml -sap_ha_pacemaker_cluster_sbd_watchdog_modules: -- softdog -``` - -### sap_ha_pacemaker_cluster_stonith_custom - -- _Type:_ `list` - -Custom list of STONITH resource(s) to be configured in the cluster.
-This definition override any defaults the role would apply otherwise.
-Definition follows structure of ha_cluster_resource_primitives in linux-system-roles/ha_cluster
- -- **agent**
- Resource agent name, must contain the prefix "stonith:" to avoid mismatches or failures. -- **id**
- Parameter `id` is required.
Name that will be used as the resource ID (name). -- **instance_attrs**
- Defines resource agent params as list of name/value pairs.
Requires the mandatory options for the particular stonith resource agent to be defined, otherwise the setup will fail.
Example: stonith:fence_sbd agent requires devices option with list of SBD disks.
Example: stonith:external/sbd agent does not require devices option, but `sap_ha_pacemaker_cluster_sbd_devices`. -- **meta_attrs**
- Defines meta attributes as list of name/value pairs. -- **name**
- WARNING! This option will be removed in future release. -- **operations**
- Defines list of resource agent operations. -- **options**
- WARNING! This option will be removed in future release. - -Example: - -```yaml -sap_ha_pacemaker_cluster_stonith_custom: -- agent: stonith:fence_rhevm - id: my-fence-resource - instance_attrs: - - attrs: - - name: ip - value: rhevm-server - - name: username - value: login-user - - name: password - value: login-user-password - - name: pcmk_host_list - value: node1,node2 - - name: power_wait - value: 3 - meta_attrs: - - attrs: - - name: target-role - value: Started - operations: - - action: start - attrs: - - name: interval - value: 0 - - name: timeout - value: 180 -``` - -### sap_ha_pacemaker_cluster_storage_definition - -- _Type:_ `list` - -List of filesystem definitions used for filesystem cluster resources.
-Options relevant, see example.
-Mandatory for SAP NetWeaver HA cluster configurations.
-Reuse `sap_storage_setup_definition` if defined.
-Reuse `sap_storage_setup_definition` will extract values 'mountpoint', 'nfs_filesystem_type', 'nfs_mount_options', 'nfs_path', 'nfs_server'.
-Reuse `sap_storage_setup_definition` all options are documented under Ansible Role `sap_storage_setup`.
-Note! For this variable, the argument specification does not list options, to avoid errors during reuse of `sap_storage_setup_definition` if defined.
- -Example: - -```yaml -sap_ha_pacemaker_cluster_storage_definition: -- mountpoint: /usr/sap - name: usr_sap - nfs_path: /usr/sap - nfs_server: nfs-server.example.com:/ -- mountpoint: /usr/sap/trans - name: usr_sap_trans - nfs_path: /usr/sap/trans - nfs_server: nfs-server.example.com:/ -- mountpoint: /sapmnt - name: sapmnt - nfs_filesystem_type: nfs - nfs_mount_options: defaults - nfs_path: /sapmnt - nfs_server: nfs-server.example.com:/ -``` - -### sap_ha_pacemaker_cluster_storage_nfs_filesytem_type - -- _Type:_ `string` -- _Default:_ `nfs` - -Filesystem type of the NFS filesystems that are part of the cluster configuration.
- -### sap_ha_pacemaker_cluster_storage_nfs_mount_options - -- _Type:_ `string` -- _Default:_ `defaults` - -Mount options of the NFS filesystems that are part of the cluster configuration.
- -### sap_ha_pacemaker_cluster_storage_nfs_server - -- _Type:_ `string` - -Default address of the NFS server, if not defined individually by filesystem.
- -### sap_ha_pacemaker_cluster_system_roles_collection - -- _Type:_ `string` -- _Default:_ `fedora.linux_system_roles` - -Reference to the Ansible Collection used for the Linux System Roles.
-For community/upstream, use 'fedora.linux_system_roles'.
-For RHEL System Roles for SAP, or Red Hat Automation Hub, use 'redhat.rhel_system_roles'.
- -### sap_ha_pacemaker_cluster_vip_client_interface - -- _Type:_ `string` - -OS device name of the network interface to use for the Virtual IP configuration.
-When there is only one interface on the system, its name will be used by default.
- -### sap_ha_pacemaker_cluster_vip_hana_primary_ip_address - -- _Type:_ `string` - -The virtual IP of the primary HANA instance.
-Mandatory parameter for HANA clusters.
- -### sap_ha_pacemaker_cluster_vip_hana_primary_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__HDB_primary` - -Customize the name of the resource managing the Virtual IP of the primary HANA instance.
- -### sap_ha_pacemaker_cluster_vip_hana_secondary_ip_address - -- _Type:_ `string` - -The virtual IP for read-only access to the secondary HANA instance.
-Optional parameter in HANA clusters.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver AAS instance.
-Mandatory for NetWeaver AAS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__AAS` - -Name of the SAPInstance resource for NetWeaver AAS.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver ASCS instance.
-Mandatory for NetWeaver ASCS/ERS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_group_name - -- _Type:_ `string` -- _Default:_ `grp__ASCS` - -Name of the NetWeaver ASCS resource group.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__ASCS` - -Name of the SAPInstance resource for NetWeaver ASCS.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver ERS instance.
-Mandatory for NetWeaver ASCS/ERS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_group_name - -- _Type:_ `string` -- _Default:_ `grp__ERS` - -Name of the NetWeaver ERS resource group.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__ERS` - -Name of the SAPInstance resource for NetWeaver ERS.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_ip_address - -- _Type:_ `string` - -Virtual IP of the NetWeaver PAS instance.
-Mandatory for NetWeaver PAS cluster setup.
- -### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__PAS` - -Name of the SAPInstance resource for NetWeaver PAS.
- -### sap_ha_pacemaker_cluster_vip_secondary_resource_name - -- _Type:_ `string` -- _Default:_ `rsc_vip__HDB_readonly` - -Customize the name of the resource managing the Virtual IP of read-only access to the secondary HANA instance.
- \ No newline at end of file diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index 2f0d9f3b3..97491599f 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -5,7 +5,7 @@ ## Description -Ansible Role `sap_ha_pacemaker_cluster` is used to install and configure Linux Pacemaker High Availability clusters for SAP HANA and SAP Netweaver systems on various infrastructure platforms. +The Ansible Role `sap_ha_pacemaker_cluster` is used to install and configure Linux Pacemaker High Availability clusters for SAP HANA and SAP Netweaver systems on various infrastructure platforms. @@ -50,8 +50,6 @@ Managed nodes: **:warning: This ansible role will destroy and then recreate Linux Pacemaker cluster in process.**
:warning: Do not execute this Ansible Role against existing Linux Pacemaker clusters unless you know what you are doing and you prepare inputs according to existing cluster. -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. - ### Supported Platforms | Platform | Status | Notes | | -------- | --------- | --------- | @@ -144,6 +142,8 @@ It is recommended to execute this role together with other roles in this collect ## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. + Cluster can be further customized with inputs available from underlying role [ha_cluster](https://github.com/linux-system-roles/ha_cluster/blob/main/README.md), which will take precedence over `sap_ha_pacemaker_cluster` inputs. @@ -158,5 +158,1024 @@ Apache 2.0 - [Marcel Mamula](https://github.com/marcelmamula) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_ha_pacemaker_cluster/INPUT_PARAMETERS.md) +## Role Variables + +Minimum required parameters for all clusters: + +- [sap_ha_pacemaker_cluster_hacluster_user_password](#sap_ha_pacemaker_cluster_hacluster_user_password) + +Additional minimum requirements depend on the type of cluster setup and on the target platform. + +### sap_ha_pacemaker_cluster_hacluster_user_password + +- _Type:_ `string` + +**Mandatory Input Parameter.**
+The password of the `hacluster` user which is created during pacemaker installation.
+Inherits the value of `ha_cluster_hacluster_password`, when defined.
+ + +### sap_ha_pacemaker_cluster_aws_access_key_id + +- _Type:_ `string` + +AWS access key to allow control of instances (for example for fencing operations).
+Mandatory for the cluster nodes setup on AWS EC2 instances, when:
+1. IAM Role or Instance profile is not attached to EC2 instance.
+2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
+ +### sap_ha_pacemaker_cluster_aws_credentials_setup + +- _Type:_ `string` + +Set this parameter to 'true' to store AWS credentials into /root/.aws/credentials.
+Requires: `sap_ha_pacemaker_cluster_aws_access_key_id` and `sap_ha_pacemaker_cluster_aws_secret_access_key`
+Mandatory for the cluster nodes setup on AWS EC2 instances, when:
+1. IAM Role or Instance profile is not attached to EC2 instance.
+ +### sap_ha_pacemaker_cluster_aws_region + +- _Type:_ `string` + +The AWS region in which the instances to be used for the cluster setup are located.
+Mandatory for cluster nodes setup on AWS EC2 instances.
+ +### sap_ha_pacemaker_cluster_aws_secret_access_key + +- _Type:_ `string` + +AWS secret key, paired with the access key for instance control.
+Mandatory for the cluster nodes setup on AWS EC2 instances, when:
+1. IAM Role or Instance profile is not attached to EC2 instance.
+2. `sap_ha_pacemaker_cluster_aws_credentials_setup` is `true`
+ +### sap_ha_pacemaker_cluster_aws_vip_update_rt + +- _Type:_ `string` + +List one more routing table IDs for managing Virtual IP failover through routing table changes.
+Multiple routing tables must be defined as a comma-separated string (no spaces).
+Mandatory for the VIP resource configuration in AWS EC2 environments.
+ +### sap_ha_pacemaker_cluster_cluster_name + +- _Type:_ `string` + +The name of the pacemaker cluster.
+Inherits the `ha_cluster` LSR native parameter `ha_cluster_cluster_name` if not defined.
+If not defined, the `ha_cluster` Linux System Role default will be used.
+ +### sap_ha_pacemaker_cluster_cluster_nodes + +- _Type:_ `list` + +List of cluster nodes and associated attributes to describe the target SAP HA environment.
+This is required for the HANA System Replication configuration.
+Synonym for this parameter is `sap_hana_cluster_nodes`.
+Mandatory to be defined for HANA clusters.
+ +- **hana_site**
+ Site of the cluster and/or SAP HANA System Replication node (for example 'DC01').
Mandatory for HANA clusters (sudo config for system replication). +- **node_ip**
+ IP address of the node used for HANA System Replication.
_Optional. Currently not needed/used in cluster configuration._ +- **node_name**
+ Name of the cluster node, should match the remote systems' hostnames.
_Optional. Currently not needed/used in cluster configuration._ +- **node_role**
+ Role of the defined `node_name` in the SAP HANA cluster setup.
There must be only **one** primary, but there can be multiple secondary nodes.
_Optional. Currently not needed/used in cluster configuration._ + +Example: + +```yaml +sap_ha_pacemaker_cluster_cluster_nodes: +- hana_site: DC01 + node_ip: 192.168.5.1 + node_name: nodeA + node_role: primary +- hana_site: DC02 +``` + +### sap_ha_pacemaker_cluster_cluster_properties + +- _Type:_ `dict` +- _Default:_ `{'concurrent-fencing': True, 'stonith-enabled': True, 'stonith-timeout': 900}` + +Standard pacemaker cluster properties are configured with recommended settings for cluster node fencing.
+When no STONITH resource is defined, STONITH will be disabled and a warning displayed.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_cluster_properties: + concurrent-fencing: true + stonith-enabled: true + stonith-timeout: 900 +``` + +### sap_ha_pacemaker_cluster_create_config_dest + +- _Type:_ `string` +- _Default:_ `review_resource_config.yml` + +The pacemaker cluster resource configuration optionally created by this role will be saved in a Yaml file in the current working directory.
+Requires `sap_ha_pacemaker_cluster_create_config_varfile` to be enabled for generating the output file.
+Specify a path/filename to save the file in a custom location.
+The file can be used as input vars file for an Ansible playbook running the 'ha_cluster' Linux System Role.
+ +### sap_ha_pacemaker_cluster_create_config_varfile + +- _Type:_ `bool` +- _Default:_ `False` + +When enabled, all cluster configuration parameters this role constructs for executing the 'ha_cluster' Linux System role will be written into a file in Yaml format.
+This allows using the output file later as input file for additional custom steps using the 'ha_cluster' role and covering the resource configuration in a cluster that was set up using this 'sap_ha_pacemaker_cluster' role.
+When enabled this parameters file is also created when the playbook is run in check_mode (`--check`) and can be used to review the configuration parameters without executing actual changes on the target nodes.
+WARNING! This report may include sensitive details like secrets required for certain cluster resources!
+ +### sap_ha_pacemaker_cluster_enable_cluster_connector + +- _Type:_ `bool` +- _Default:_ `True` + +Enables/Disables the SAP HA Interface for SAP ABAP application server instances, also known as `sap_cluster_connector`.
+Set this parameter to 'false' if the SAP HA interface should not be installed and configured.
+ +### sap_ha_pacemaker_cluster_extra_packages + +- _Type:_ `list` + +Additional extra packages to be installed, for instance specific resource packages.
+For SAP clusters configured by this role, the relevant standard packages for the target scenario are automatically included.
+ +### sap_ha_pacemaker_cluster_fence_agent_packages + +- _Type:_ `list` + +Additional fence agent packages to be installed.
+This is automatically combined with default packages in:
+`__sap_ha_pacemaker_cluster_fence_agent_packages_minimal`
+`__sap_ha_pacemaker_cluster_fence_agent_packages_platform`
+ +### sap_ha_pacemaker_cluster_gcp_project + +- _Type:_ `string` + +Google Cloud project name in which the target instances are installed.
+Mandatory for the cluster setup on GCP instances.
+ +### sap_ha_pacemaker_cluster_gcp_region_zone + +- _Type:_ `string` + +Google Cloud Platform region zone ID.
+Mandatory for the cluster setup on GCP instances.
+ +### sap_ha_pacemaker_cluster_ha_cluster + +- _Type:_ `dict` + +The `ha_cluster` LSR native parameter `ha_cluster` can be used as a synonym.
+Optional _**host_vars**_ parameter - if defined it must be set for each node.
+Dictionary that can contain various node options for the pacemaker cluster configuration.
+Supported options can be reviewed in the `ha_cluster` Linux System Role [https://github.com/linux-system-roles/ha_cluster/blob/master/README.md].
+If not defined, the `ha_cluster` Linux System Role default will be used.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_ha_cluster: + corosync_addresses: + - 192.168.1.10 + - 192.168.2.10 + node_name: nodeA +``` + +### sap_ha_pacemaker_cluster_hana_automated_register + +- _Type:_ `bool` +- _Default:_ `True` + +Parameter for the 'SAPHana' cluster resource.
+Define if a former primary should be re-registered automatically as secondary.
+ +### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_primary_name + +- _Type:_ `string` +- _Default:_ `col_saphana_vip__HDB_primary` + +Customize the cluster constraint name for VIP and SAPHana primary clone colocation.
+ +### sap_ha_pacemaker_cluster_hana_colocation_hana_vip_secondary_name + +- _Type:_ `string` +- _Default:_ `col_saphana_vip__HDB_readonly` + +Customize the cluster constraint name for VIP and SAPHana secondary clone colocation.
+ +### sap_ha_pacemaker_cluster_hana_duplicate_primary_timeout + +- _Type:_ `int` +- _Default:_ `7200` + +Parameter for the 'SAPHana' cluster resource.
+Time difference needed between to primary time stamps, if a dual-primary situation occurs.
+If the time difference is less than the time gap, then the cluster holds one or both instances in a "WAITING" status.
+This is to give an admin a chance to react on a failover. A failed former primary will be registered after the time difference is passed.
+ +### sap_ha_pacemaker_cluster_hana_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHanaFil__HDB` + +Customize the cluster resource name of the SAP HANA Filesystem clone.
+ +### sap_ha_pacemaker_cluster_hana_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHanaFil__HDB` + +Customize the cluster resource name of the SAP HANA Filesystem.
+ +### sap_ha_pacemaker_cluster_hana_global_ini_path + +- _Type:_ `string` +- _Default:_ `/usr/sap//SYS/global/hdb/custom/config/global.ini` + +Path with location of global.ini for srHook update
+ +### sap_ha_pacemaker_cluster_hana_hook_chksrv + +- _Type:_ `bool` +- _Default:_ `False` + +Controls if ChkSrv srHook is enabled during srHook creation.
+It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
+ +### sap_ha_pacemaker_cluster_hana_hook_tkover + +- _Type:_ `bool` +- _Default:_ `False` + +Controls if TkOver srHook is enabled during srHook creation.
+It is ignored when sap_ha_pacemaker_cluster_hana_hooks is defined.
+ +### sap_ha_pacemaker_cluster_hana_hooks + +- _Type:_ `list` +- _Default:_ `[]` + +Customize required list of SAP HANA Hooks
+Mandatory to include SAPHanaSR srHook in list.
+Mandatory attributes are provider and path.
+Example below shows mandatory SAPHanaSR, TkOver and ChkSrv hooks.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_hana_hooks: +- options: + - name: execution_order + value: 1 + path: /usr/share/SAPHanaSR/ + provider: SAPHanaSR +- options: + - name: execution_order + value: 2 + path: /usr/share/SAPHanaSR/ + provider: susTkOver +- options: + - name: execution_order + value: 3 + - name: action_on_lost + value: stop + path: /usr/share/SAPHanaSR/ + provider: susChkSrv +``` + +### sap_ha_pacemaker_cluster_hana_instance_nr + +- _Type:_ `string` + +The instance number of the SAP HANA database which this role will configure in the cluster.
+Inherits the value of `sap_hana_instance_number`, when defined.
+Mandatory for SAP HANA cluster setups.
+ +### sap_ha_pacemaker_cluster_hana_order_hana_vip_primary_name + +- _Type:_ `string` +- _Default:_ `ord_saphana_vip__HDB_primary` + +Customize the cluster constraint name for VIP and SAPHana primary clone order.
+ +### sap_ha_pacemaker_cluster_hana_order_hana_vip_secondary_name + +- _Type:_ `string` +- _Default:_ `ord_saphana_vip__HDB_readonly` + +Customize the cluster constraint name for VIP and SAPHana secondary clone order.
+ +### sap_ha_pacemaker_cluster_hana_order_topology_hana_name + +- _Type:_ `string` +- _Default:_ `ord_saphana_saphanatop__HDB` + +Customize the cluster constraint name for SAPHana and Topology order.
+ +### sap_ha_pacemaker_cluster_hana_prefer_site_takeover + +- _Type:_ `bool` +- _Default:_ `True` + +Parameter for the 'SAPHana' cluster resource.
+Set to "false" if the cluster should first attempt to restart the instance on the same node.
+When set to "true" (default) a failover to secondary will be initiated on resource failure.
+ +### sap_ha_pacemaker_cluster_hana_resource_clone_msl_name + +- _Type:_ `string` +- _Default:_ `msl_SAPHana__HDB` + +Customize the cluster resource name of the SAP HANA DB resource master slave clone.
+Master Slave clone is specific to Classic SAPHana resource on SUSE (non-angi).
+ +### sap_ha_pacemaker_cluster_hana_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHana__HDB` + +Customize the cluster resource name of the SAP HANA DB resource clone.
+ +### sap_ha_pacemaker_cluster_hana_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHana__HDB` + +Customize the cluster resource name of the SAP HANA DB resource.
+ +### sap_ha_pacemaker_cluster_hana_sid + +- _Type:_ `string` + +The SAP HANA SID of the instance that will be configured in the cluster.
+The SID must follow SAP specifications - see SAP Note 1979280.
+Inherits the value of `sap_hana_sid`, when defined.
+Mandatory for SAP HANA cluster setups.
+ +### sap_ha_pacemaker_cluster_hana_topology_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHanaTop__HDB` + +Customize the cluster resource name of the SAP HANA Topology resource clone.
+ +### sap_ha_pacemaker_cluster_hana_topology_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHanaTop__HDB` + +Customize the cluster resource name of the SAP HANA Topology resource.
+ +### sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_SAPHanaCon__HDB` + +Customize the cluster resource name of the SAP HANA Controller clone.
+ +### sap_ha_pacemaker_cluster_hanacontroller_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPHanaCon__HDB` + +Customize the cluster resource name of the SAP HANA Controller.
+ +### sap_ha_pacemaker_cluster_host_type + +- _Type:_ `list` +- _Default:_ `hana_scaleup_perf` + +The SAP landscape to for which the cluster is to be configured.
+The default is a 2-node SAP HANA scale-up cluster.
+ +### sap_ha_pacemaker_cluster_ibmcloud_api_key + +- _Type:_ `string` + +The API key which is required to allow the control of instances (for example for fencing operations).
+Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_powervs_api_type + +- _Type:_ `string` + +IBM Power Virtual Server API Endpoint type (public or private) dependent on network interface attachments for the target instances.
+Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_powervs_forward_proxy_url + +- _Type:_ `string` + +IBM Power Virtual Server forward proxy url when IBM Power Virtual Server API Endpoint type is set to private.
+When public network interface, can be ignored.
+When private network interface, mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_powervs_workspace_crn + +- _Type:_ `string` + +IBM Power Virtual Server Workspace service cloud resource name (CRN) identifier which contains the target instances
+Mandatory for the cluster setup on IBM Power Virtual Server from IBM Cloud.
+ +### sap_ha_pacemaker_cluster_ibmcloud_region + +- _Type:_ `string` + +The IBM Cloud VS region name in which the instances are running.
+Mandatory for the cluster setup on IBM Cloud Virtual Server instances or IBM Power Virtual Server on IBM Cloud.
+ +### sap_ha_pacemaker_cluster_msazure_resource_group + +- _Type:_ `string` + +Resource group name/ID in which the target instances are defined.
+Mandatory for the cluster setup on MS Azure instances.
+ +### sap_ha_pacemaker_cluster_msazure_subscription_id + +- _Type:_ `string` + +Subscription ID of the MS Azure environment containing the target instances.
+Mandatory for the cluster setup on MS Azure instances.
+ +### sap_ha_pacemaker_cluster_nwas_abap_aas_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP AAS instance.
+Mandatory for NetWeaver AAS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1 + +- _Type:_ `bool` +- _Default:_ `False` + +The standard NetWeaver ASCS/ERS cluster will be set up as ENSA2.
+Set this parameter to 'true' to configure it as ENSA1.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_simple_mount + +- _Type:_ `bool` +- _Default:_ `True` + +Enables preferred method for ASCS ERS ENSA2 clusters - Simple Mount
+Set this parameter to 'true' to configure ENSA2 Simple Mount.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__ASCS` + +Name of the filesystem resource for the ASCS instance.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_group_stickiness + +- _Type:_ `string` +- _Default:_ `3000` + +NetWeaver ASCS resource group stickiness to prefer the ASCS group to stay on the node it was started on.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP ASCS instance.
+Mandatory for NetWeaver ASCS/ERS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_automatic_recover_bool + +- _Type:_ `bool` +- _Default:_ `False` + +NetWeaver ASCS instance resource option "AUTOMATIC_RECOVER".
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_failure_timeout + +- _Type:_ `string` +- _Default:_ `60` + +NetWeaver ASCS instance failure-timeout attribute.
+Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_ensa1_migration_threshold + +- _Type:_ `string` +- _Default:_ `1` + +NetWeaver ASCS instance migration-threshold setting attribute.
+Only used for ENSA1 setups (see `sap_ha_pacemaker_cluster_nwas_abap_ascs_ers_ensa1`). Default setup is ENSA2.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_instance_name + +- _Type:_ `string` + +The name of the ASCS instance, typically the profile name.
+Mandatory for the NetWeaver ASCS/ERS cluster setup
+Recommended format _ASCS_.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPInstance__ASCS` + +Name of the ASCS instance resource.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_resource_stickiness + +- _Type:_ `string` +- _Default:_ `5000` + +NetWeaver ASCS instance resource stickiness attribute.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapinstance_start_profile_string + +- _Type:_ `string` + +The full path and name of the ASCS instance profile.
+Mandatory for the NetWeaver ASCS/ERS cluster setup.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ascs_sapstartsrv_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPStartSrv__ASCS` + +Name of the ASCS SAPStartSrv resource for simple mount.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__ERS` + +Name of the filesystem resource for the ERS instance.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP ERS instance.
+Mandatory for NetWeaver ASCS/ERS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_automatic_recover_bool + +- _Type:_ `bool` +- _Default:_ `False` + +NetWeaver ERS instance resource option "AUTOMATIC_RECOVER".
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_instance_name + +- _Type:_ `string` + +The name of the ERS instance, typically the profile name.
+Mandatory for the NetWeaver ASCS/ERS cluster setup.
+Recommended format _ERS_.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPInstance__ERS` + +Name of the ERS instance resource.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapinstance_start_profile_string + +- _Type:_ `string` + +The full path and name of the ERS instance profile.
+Mandatory for the NetWeaver ASCS/ERS cluster.
+ +### sap_ha_pacemaker_cluster_nwas_abap_ers_sapstartsrv_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_SAPStartSrv__ERS` + +Name of the ERS SAPstartSrv resource for simple mount.
+ +### sap_ha_pacemaker_cluster_nwas_abap_pas_instance_nr + +- _Type:_ `string` + +Instance number of the NetWeaver ABAP PAS instance.
+Mandatory for NetWeaver PAS cluster configuration.
+ +### sap_ha_pacemaker_cluster_nwas_abap_sid + +- _Type:_ `string` + +SID of the NetWeaver instances.
+Mandatory for NetWeaver cluster configuration.
+Uses `sap_swpm_sid` if defined.
+Mandatory for NetWeaver cluster setups.
+ +### sap_ha_pacemaker_cluster_nwas_colocation_ascs_no_ers_name + +- _Type:_ `string` +- _Default:_ `col_ascs_separate_` + +Customize the cluster constraint name for ASCS and ERS separation colocation.
+ +### sap_ha_pacemaker_cluster_nwas_order_ascs_first_name + +- _Type:_ `string` +- _Default:_ `ord_ascs_first_` + +Customize the cluster constraint name for ASCS starting before ERS order.
+ +### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_fs__sapmnt` + +Filesystem resource clone name for the shared filesystem /sapmnt.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_sapmnt_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__sapmnt` + +Filesystem resource name for the shared filesystem /sapmnt.
+Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed + +- _Type:_ `bool` +- _Default:_ `False` + +Change this parameter to 'true' if the 3 shared filesystems `/usr/sap/trans`, `/usr/sap//SYS` and '/sapmnt' shall be configured as cloned cluster resources.
+ +### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_fs__sys` + +Filesystem resource clone name for the shared filesystem /usr/sap//SYS.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_sys_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__sys` + +Filesystem resource name for the transports filesystem /usr/sap//SYS.
+Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_clone_name + +- _Type:_ `string` +- _Default:_ `cln_fs__trans` + +Filesystem resource clone name for the shared filesystem /usr/sap/trans.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_nwas_transports_filesystem_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_fs__trans` + +Filesystem resource name for the transports filesystem /usr/sap/trans.
+Optional, this is typically managed by the OS, but can as well be added to the cluster configuration.
+Enable this resource setup using `sap_ha_pacemaker_cluster_nwas_shared_filesystems_cluster_managed`.
+ +### sap_ha_pacemaker_cluster_operation_defaults + +- _Type:_ `dict` +- _Default:_ `{'record-pending': True, 'timeout': 600}` + +Set default operation parameters that will be valid for all pacemaker resources.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_operation_defaults: + record-pending: true + timeout: 600 +``` + +### sap_ha_pacemaker_cluster_resource_defaults + +- _Type:_ `dict` +- _Default:_ `{'migration-threshold': 5000, 'resource-stickiness': 3000}` + +Set default parameters that will be valid for all pacemaker resources.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_resource_defaults: + migration-threshold: 5000 + resource-stickiness: 1000 +``` + +### sap_ha_pacemaker_cluster_saphanasr_angi_detection + +- _Type:_ `string` +- _Default:_ `True` + +Disabling this variable enables to use Classic SAPHanaSR agents even on server, with SAPHanaSR-angi is available.
+ +### sap_ha_pacemaker_cluster_sbd_devices + +- _Type:_ `list` + +Required if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide list of block devices for Stonith SBD agent
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_devices: +- /dev/disk/by-id/scsi-3600 +``` + +### sap_ha_pacemaker_cluster_sbd_enabled + +- _Type:_ `bool` + +Set this parameter to 'true' to enable workflow to add Stonith SBD resource.
+Stonith SBD resource has to be provided as part of `sap_ha_pacemaker_cluster_stonith_custom`.
+Default SBD agents are: `stonith:external/sbd` for SUSE and `stonith:fence_sbd` for Red Hat.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_devices: +- /dev/disk/by-id/scsi-3600 +sap_ha_pacemaker_cluster_sbd_enabled: true +sap_ha_pacemaker_cluster_stonith_custom: +- agent: stonith:external/sbd + id: stonith_sbd + instance_attrs: + - attrs: + - name: pcmk_delay_max + value: 15 +``` + +### sap_ha_pacemaker_cluster_sbd_options + +- _Type:_ `list` + +Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide list of SBD specific options that are added into SBD configuration file.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_options: +- name: startmode + value: clean +``` + +### sap_ha_pacemaker_cluster_sbd_watchdog + +- _Type:_ `str` +- _Default:_ `/dev/watchdog` + +Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide watchdog name to override default /dev/watchdog
+ +### sap_ha_pacemaker_cluster_sbd_watchdog_modules + +- _Type:_ `list` + +Optional if `sap_ha_pacemaker_cluster_sbd_enabled` is enabled.
+Provide list of watchdog kernel modules to be loaded (creates /dev/watchdog* devices).
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_sbd_watchdog_modules: +- softdog +``` + +### sap_ha_pacemaker_cluster_stonith_custom + +- _Type:_ `list` + +Custom list of STONITH resource(s) to be configured in the cluster.
+This definition override any defaults the role would apply otherwise.
+Definition follows structure of ha_cluster_resource_primitives in linux-system-roles/ha_cluster
+ +- **agent**
+ Resource agent name, must contain the prefix "stonith:" to avoid mismatches or failures. +- **id**
+ Parameter `id` is required.
Name that will be used as the resource ID (name). +- **instance_attrs**
+ Defines resource agent params as list of name/value pairs.
Requires the mandatory options for the particular stonith resource agent to be defined, otherwise the setup will fail.
Example: stonith:fence_sbd agent requires devices option with list of SBD disks.
Example: stonith:external/sbd agent does not require devices option, but `sap_ha_pacemaker_cluster_sbd_devices`. +- **meta_attrs**
+ Defines meta attributes as list of name/value pairs. +- **name**
+ WARNING! This option will be removed in future release. +- **operations**
+ Defines list of resource agent operations. +- **options**
+ WARNING! This option will be removed in future release. + +Example: + +```yaml +sap_ha_pacemaker_cluster_stonith_custom: +- agent: stonith:fence_rhevm + id: my-fence-resource + instance_attrs: + - attrs: + - name: ip + value: rhevm-server + - name: username + value: login-user + - name: password + value: login-user-password + - name: pcmk_host_list + value: node1,node2 + - name: power_wait + value: 3 + meta_attrs: + - attrs: + - name: target-role + value: Started + operations: + - action: start + attrs: + - name: interval + value: 0 + - name: timeout + value: 180 +``` + +### sap_ha_pacemaker_cluster_storage_definition + +- _Type:_ `list` + +List of filesystem definitions used for filesystem cluster resources.
+Options relevant, see example.
+Mandatory for SAP NetWeaver HA cluster configurations.
+Reuse `sap_storage_setup_definition` if defined.
+Reuse `sap_storage_setup_definition` will extract values 'mountpoint', 'nfs_filesystem_type', 'nfs_mount_options', 'nfs_path', 'nfs_server'.
+Reuse `sap_storage_setup_definition` all options are documented under Ansible Role `sap_storage_setup`.
+Note! For this variable, the argument specification does not list options, to avoid errors during reuse of `sap_storage_setup_definition` if defined.
+ +Example: + +```yaml +sap_ha_pacemaker_cluster_storage_definition: +- mountpoint: /usr/sap + name: usr_sap + nfs_path: /usr/sap + nfs_server: nfs-server.example.com:/ +- mountpoint: /usr/sap/trans + name: usr_sap_trans + nfs_path: /usr/sap/trans + nfs_server: nfs-server.example.com:/ +- mountpoint: /sapmnt + name: sapmnt + nfs_filesystem_type: nfs + nfs_mount_options: defaults + nfs_path: /sapmnt + nfs_server: nfs-server.example.com:/ +``` + +### sap_ha_pacemaker_cluster_storage_nfs_filesytem_type + +- _Type:_ `string` +- _Default:_ `nfs` + +Filesystem type of the NFS filesystems that are part of the cluster configuration.
+ +### sap_ha_pacemaker_cluster_storage_nfs_mount_options + +- _Type:_ `string` +- _Default:_ `defaults` + +Mount options of the NFS filesystems that are part of the cluster configuration.
+ +### sap_ha_pacemaker_cluster_storage_nfs_server + +- _Type:_ `string` + +Default address of the NFS server, if not defined individually by filesystem.
+ +### sap_ha_pacemaker_cluster_system_roles_collection + +- _Type:_ `string` +- _Default:_ `fedora.linux_system_roles` + +Set which Ansible Collection to use for the Linux System Roles.
+Available values: +- `fedora.linux_system_roles` - for community/upstream.
+- `redhat.rhel_system_roles` - for the RHEL System Roles for SAP, or for Red Hat Automation Hub.
+ +### sap_ha_pacemaker_cluster_vip_client_interface + +- _Type:_ `string` + +OS device name of the network interface to use for the Virtual IP configuration.
+When there is only one interface on the system, its name will be used by default.
+ +### sap_ha_pacemaker_cluster_vip_hana_primary_ip_address + +- _Type:_ `string` + +The virtual IP of the primary HANA instance.
+Mandatory parameter for HANA clusters.
+ +### sap_ha_pacemaker_cluster_vip_hana_primary_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__HDB_primary` + +Customize the name of the resource managing the Virtual IP of the primary HANA instance.
+ +### sap_ha_pacemaker_cluster_vip_hana_secondary_ip_address + +- _Type:_ `string` + +The virtual IP for read-only access to the secondary HANA instance.
+Optional parameter in HANA clusters.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver AAS instance.
+Mandatory for NetWeaver AAS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_aas_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__AAS` + +Name of the SAPInstance resource for NetWeaver AAS.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver ASCS instance.
+Mandatory for NetWeaver ASCS/ERS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_group_name + +- _Type:_ `string` +- _Default:_ `grp__ASCS` + +Name of the NetWeaver ASCS resource group.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ascs_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__ASCS` + +Name of the SAPInstance resource for NetWeaver ASCS.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver ERS instance.
+Mandatory for NetWeaver ASCS/ERS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_group_name + +- _Type:_ `string` +- _Default:_ `grp__ERS` + +Name of the NetWeaver ERS resource group.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_ers_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__ERS` + +Name of the SAPInstance resource for NetWeaver ERS.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_ip_address + +- _Type:_ `string` + +Virtual IP of the NetWeaver PAS instance.
+Mandatory for NetWeaver PAS cluster setup.
+ +### sap_ha_pacemaker_cluster_vip_nwas_abap_pas_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__PAS` + +Name of the SAPInstance resource for NetWeaver PAS.
+ +### sap_ha_pacemaker_cluster_vip_secondary_resource_name + +- _Type:_ `string` +- _Default:_ `rsc_vip__HDB_readonly` + +Customize the name of the resource managing the Virtual IP of read-only access to the secondary HANA instance.
+ \ No newline at end of file diff --git a/roles/sap_hana_install/INPUT_PARAMETERS.md b/roles/sap_hana_install/INPUT_PARAMETERS.md deleted file mode 100644 index 93f909fb8..000000000 --- a/roles/sap_hana_install/INPUT_PARAMETERS.md +++ /dev/null @@ -1,59 +0,0 @@ -## Input Parameters for sap_ha_pacemaker_cluster Ansible Role - -### sap_hana_install_sid - -- _Type:_ `string` - -Enter SAP HANA System ID (SID). - -### sap_hana_install_number - -- _Type:_ `string` - -Enter SAP HANA Instance number. - -### sap_hana_install_fapolicyd_integrity - -- _Type:_ `string` -- _Default:_ `sha256` - -Select fapolicyd integrity check option out of: `none`, `size`, `sha256`, `ima`. - -### sap_hana_install_check_sidadm_user - -- _Type:_ `bool` -- _Default:_ `True` - -If the variable `sap_hana_install_check_sidadm_user` is set to `False`, the role will install SAP HANA even -if the sidadm user exists. Default is `True`, in which case the installation will not be performed if the -sidadm user exists. - -### sap_hana_install_new_system - -- _Type:_ `bool` -- _Default:_ `True` - -The variable `sap_hana_install_new_system` determines if the role will perform a fresh SAP HANA installation -or if it will add further hosts to an existing SAP HANA system as specified by variable -`sap_hana_install_addhosts`. Default is `True` for a fresh SAP HANA installation. - -### sap_hana_install_update_firewall - -- _Type:_ `bool` -- _Default:_ `False` - -The role can be configured to also set the required firewall ports for SAP HANA. If this is desired, set -the variable `sap_hana_install_update_firewall` to `yes` (default is `no`). The firewall ports are defined -in a variable which is compatible with the variable structure used by Linux System Role `firewall`. -The firewall ports for SAP HANA are defined in member `port` of the first field of variable -`sap_hana_install_firewall` (`sap_hana_install_firewall[0].port`), see file `defaults/main.yml`. If the -member `state` is set to `enabled`, the ports will be enabled. If the member `state` is set to `disabled`, -the ports will be disabled, which might be useful for testing. - -Certain parameters have identical meanings, for supporting different naming schemes in playbooks and inventories. -You can find those in the task `Rename some variables used by hdblcm configfile` of the file `tasks/main.yml`. -Example: The parameter `sap_hana_install_number`, which is used by the role to define the hdblm parameter `number` -(= SAP HANA instance number) can be defined by setting `sap_hana_instance_number`, `sap_hana_install_instance_nr`, -`sap_hana_install_instance_number`, or `sap_hana_install_number`. The order of precedence is from left to right. - - \ No newline at end of file diff --git a/roles/sap_hana_install/README.md b/roles/sap_hana_install/README.md index efd9bc842..265c7f92e 100644 --- a/roles/sap_hana_install/README.md +++ b/roles/sap_hana_install/README.md @@ -5,7 +5,7 @@ ## Description -Ansible Role `sap_hana_install` is used to install SAP HANA database using HDBLCM. +The Ansible role `sap_hana_install` installs SAP HANA using the SAP HANA database lifecycle manager (HDBLCM). @@ -143,7 +143,6 @@ of this file will not be reflected. ## Execution -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. @@ -374,6 +373,8 @@ With the following tags, the role can be called to perform certain activities on +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -386,5 +387,57 @@ Apache 2.0 - [Bernd Finger](https://github.com/berndfinger) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_hana_install/INPUT_PARAMETERS.md) +## Role Variables + +### sap_hana_install_sid + +- _Type:_ `string` + +Enter SAP HANA System ID (SID). + +### sap_hana_install_number + +- _Type:_ `string` + +Enter SAP HANA Instance number. + +### sap_hana_install_fapolicyd_integrity + +- _Type:_ `string` +- _Default:_ `sha256` + +Select `fapolicyd` integrity check option.
+Available values: `none`, `size`, `sha256`, `ima`. + +### sap_hana_install_check_sidadm_user + +- _Type:_ `bool` +- _Default:_ `True` + +Set to `False` to install SAP HANA even if the `sidadm` user exists.
+Default is `True`, in which case the installation will not be performed if the `sidadm` user exists. + +### sap_hana_install_new_system + +- _Type:_ `bool` +- _Default:_ `True` + +Set to `False` to use existing SAP HANA database and add more hosts using variable `sap_hana_install_addhosts`.
+Default is `True`, in which case fresh SAP HANA installation will be performed. + +### sap_hana_install_update_firewall + +- _Type:_ `bool` +- _Default:_ `False` + +The role can be configured to also set the required firewall ports for SAP HANA. If this is desired, set the variable `sap_hana_install_update_firewall` to `yes` (default is `no`).
+The firewall ports are defined in a variable which is compatible with the variable structure used by Linux System Role `firewall`.
+The firewall ports for SAP HANA are defined in member `port` of the first field of variable `sap_hana_install_firewall` (`sap_hana_install_firewall[0].port`), see file `defaults/main.yml`.
+If the member `state` is set to `enabled`, the ports will be enabled. If the member `state` is set to `disabled`, the ports will be disabled, which might be useful for testing.
+ +Certain parameters have identical meanings, for supporting different naming schemes in playbooks and inventories.
+You can find those in the task `Rename some variables used by hdblcm configfile` of the file `tasks/main.yml`.
+Example: The parameter `sap_hana_install_number`, which is used by the role to define the hdblm parameter `number` (= SAP HANA instance number)
+ can be defined by setting `sap_hana_instance_number`, `sap_hana_install_instance_nr`, `sap_hana_install_instance_number`, or `sap_hana_install_number`.
+ The order of precedence is from left to right. + \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md b/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md deleted file mode 100644 index 5cd5c87e9..000000000 --- a/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md +++ /dev/null @@ -1,324 +0,0 @@ -## Input Parameters for sap_hana_preconfigure Ansible Role - -## Role Input Parameters - -#### Minimum required parameters: - -This role does not require any parameter to be set in the playbook or inventory. - - -### sap_hana_preconfigure_config_all -- _Type:_ `bool` - -If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
-Default is to perform installation and configuration steps.
- -### sap_hana_preconfigure_installation -- _Type:_ `bool` - -If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-installation steps of SAP notes.
- -### sap_hana_preconfigure_configuration -- _Type:_ `bool` - -If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
- -Example: - -```yaml -sap_hana_preconfigure_config_all: false -sap_hana_preconfigure_configuration: true -sap_hana_preconfigure_2772999_04: true -sap_hana_preconfigure_2382421: true -``` - -### sap_hana_preconfigure_assert -- _Type:_ `bool` -- _Default:_ `false` - -If set to `true`, the role will run in assertion mode instead of the default configuration mode.
- -### sap_hana_preconfigure_assert_all_config -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will check either tuned or static settings.
-If this parameter is set to to `true`, the role will check both tuned and static settings.
- -### sap_hana_preconfigure_assert_ignore_errors -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will abort when encountering any assertion error.
-If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
-This is useful if the role is used for reporting a system's SAP notes compliance.
- -### sap_hana_preconfigure_system_roles_collection -- _Type:_ `str` -- _Default:_ `'fedora.linux_system_roles'` -- _Possible Values:_
- - `fedora.linux_system_roles` - - `redhat.rhel_system_roles` - -Set which Ansible Collection to use for the Linux System Roles.
-For community/upstream, use 'fedora.linux_system_roles'
-For the RHEL System Roles for SAP, or for Red Hat Automation Hub, use 'redhat.rhel_system_roles'
- -### sap_hana_preconfigure_min_rhel_release_check -- _Type:_ `bool` -- _Default:_ `false` - -Check the RHEL release against parameter `sap_hana_preconfigure_supported_rhel_minor_releases`, which is a list of
-known SAP HANA supported RHEL minor releases. By default, the role will display a message and continue running if
-the RHEL release is not part of that list. If set to `true`, the role will fail in such a case.
- -### sap_hana_preconfigure_supported_rhel_minor_releases -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA supported RHEL minor releases.
- -### sap_hana_preconfigure_enable_sap_hana_repos -- _Type:_ `bool` -- _Default:_ `false` - -Set to 'true' to enable the SAP HANA required RHEL repos.
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_use_hana_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_7_x86_64 -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 7 repos on x86_64'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_7_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 7 repos on ppc64le'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_8_x86_64 -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 8 repos on x86_64'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_8_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 8 repos on ppc64le'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_9_x86_64 -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 9 repos on x86_64'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_req_repos_redhat_9_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Use this parameter to set your own list of SAP HANA required RHEL 9 repos on ppc64le'
-This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
-The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
- -### sap_hana_preconfigure_set_minor_release -- _Type:_ `bool` -- _Default:_ `false` - -Use this parameter to set the RHEL minor release, which is required for SAP HANA.
-The related parameter is `sap_general_preconfigure_set_minor_release`.
- -### sap_hana_preconfigure_create_directories -- _Type:_ `bool` -- _Default:_ `true` - -Set to `false` if you do not want the SAP HANA directories to be created by the role.
-The SAP HANA directories will always be created if `sap_hana_preconfigure_modify_selinux_labels`
-(see below) is set to `true`, no matter how `sap_hana_preconfigure_create_directories` is set.
- -### sap_hana_preconfigure_hana_directories -- _Type:_ `list` with elements of type `str` -- _Default:_ - - /hana - - /lss/shared - -List of SAP HANA directories to be created.
- -### sap_hana_preconfigure_modify_selinux_labels -- _Type:_ `bool` -- _Default:_ `true` - -For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively add
-the `usr_t` label to directories and files in the directories where HANA is installed.
-If relabeling not desired, set this parameter `false`.
-If the variable is set to `true`, the SAP HANA directories will be created no matter
-how the variable `sap_hana_preconfigure_create_directories` (see above) is set.
- -### sap_hana_preconfigure_packages -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -List of RHEL packages to be installed for SAP HANA. For RHEL 8 and later, you can choose to install either the default list
-or a list of the minimum required packages for SAP HANA server (parameter `__sap_hana_preconfigure_packages_min_install`).
- -### sap_hana_preconfigure_min_package_check -- _Type:_ `bool` -- _Default:_ `true` - -SAP HANA requires certain minimum package versions to be supported. These minimum levels are listed in SAP Note 2235581.
-Set this parameter to `false` if you want to ignore these requirements.
- -### sap_hana_preconfigure_update -- _Type:_ `bool` -- _Default:_ `false` - -Set this parameter to `true` to update the system to the latest package levels.
-By setting the parameter `sap_general_preconfigure_set_minor_release` of the
-role `sap_general_preconfigure` to `true`, you can install the most recent package updates
-without updating to a more recent RHEL minor release.
- -### sap_hana_preconfigure_reboot_ok -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` if you want to perform a reboot at the end of the role, if necessary.
- -### sap_hana_preconfigure_fail_if_reboot_required -- _Type:_ `bool` -- _Default:_ `true` - -If `sap_hana_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
-remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
-Can be useful if you want to implement your own reboot handling.
- -### sap_hana_preconfigure_kernel_parameters -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Network related linux kernel parameter settings for SAP HANA on all hardware platforms.
- -### sap_hana_preconfigure_kernel_parameters_ppc64le -- _Type:_ `list` with elements of type `str` -- _Default:_ (set by platform/environment specific variables) - -Network related linux kernel parameter settings for platform ppc64le.
- -### sap_hana_preconfigure_use_netapp_settings_nfs -- _Type:_ `bool` -- _Default:_ `false` - -Set to `true` to also set NetApp NFS required kernel parameters.
- -### sap_hana_preconfigure_install_ibm_power_tools -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
- -### sap_hana_preconfigure_add_ibm_power_repo -- _Type:_ `bool` -- _Default:_ `true` - -Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
-are already available on the local network). The IBM Power Systems service and productivity tools will only
-be installed if the variable `sap_hana_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
- -### sap_hana_preconfigure_ibm_power_repo_url -- _Type:_ `str` -- _Default:_ (set by platform/environment specific variables) - -URL of the IBM Power tools repository.
- -### sap_hana_preconfigure_ppcle_mtu9000_if -- _Type:_ `str` -- _Default:_ `''` - -List of interfaces for which the MTU size will be set to `9000`.
- -### sap_hana_preconfigure_ppcle_tso_if -- _Type:_ `list` with elements of type `str` -- _Default:_ - '{{ ansible_interfaces | difference([''lo'']) }}' - -List of interfaces for which the tso flag will be set.
- -### sap_hana_preconfigure_use_tuned -- _Type:_ `bool` -- _Default:_ `true` - -Use tuned for configuring most of the kernel settings for SAP HANA
-Set this parameter to `false` to use static kernel settings
- -### sap_hana_preconfigure_tuned_profile -- _Type:_ `str` -- _Default:_ `'sap-hana'` - -Name of the SAP HANA tuned tuned profile to enable (RHEL).
- -### sap_hana_preconfigure_modify_grub_cmdline_linux -- _Type:_ `bool` -- _Default:_ `false` - -Set this parameter to `true` to modify the Grub boot command line.
- -### sap_hana_preconfigure_run_grub2_mkconfig -- _Type:_ `bool` -- _Default:_ `true` - -By default, the role will run `grub2-mkconfig` to update the Grub configuration if necessary.
-Set this parameter to `false` if this is not desired.
- -### sap_hana_preconfigure_db_group_name -- _Type:_ `str` - -Use this parameter to specify the name of the RHEL group which is used for the database processes.
-It will be used to configure process limits as per step "Configuring Process Resource Limits" of SAP note 2772999.
- -Example: - -```yaml -sap_hana_preconfigure_db_group_name: dba -``` - -### sap_hana_preconfigure_saptune_version -- _Type:_ `str` -- _Default:_ `''` - -Version of saptune to install (SLES for SAP Applications).
-This will replace the current installed version if present, even downgrade if necessary.
- -### sap_hana_preconfigure_saptune_solution -- _Type:_ `str` -- _Default:_ `'HANA'` -- _Possible Values:_
- - `HANA` - - `NETWEAVER+HANA` - - `S4HANA-APP+DB` - - `S4HANA-DBSERVER` - -The saptune solution to apply (SLES for SAP Applications).
- -### sap_hana_preconfigure_saptune_azure -- _Type:_ `bool` -- _Default:_ `false` - -On Azure, TCP timestamps, reuse and recycle should be disabled (SLES for SAP Applications).
-If the variable is set, an override file for saptune will be created (/etc/saptune/override/2382421) to set net.ipv4.tcp_timestamps and net.ipv4.tcp_tw_reuse to 0.
-Set this parameter to `true` on Azure.
- - \ No newline at end of file diff --git a/roles/sap_hana_preconfigure/README.md b/roles/sap_hana_preconfigure/README.md index f141faac4..d96e075b0 100644 --- a/roles/sap_hana_preconfigure/README.md +++ b/roles/sap_hana_preconfigure/README.md @@ -5,9 +5,7 @@ ## Description -Ansible Role `sap_hana_preconfigure` is used to ensure that Managed nodes are configured to host SAP HANA systems according to SAP Notes after [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) role was executed. - -This role performs installation of required packages for running SAP HANA systems and configuration of Operating system parameters. +The Ansible role `sap_hana_preconfigure` installs additional required packages and performs additional OS configuration steps according to applicable SAP notes for installing and running SAP HANA after the role [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) has been executed. @@ -86,8 +84,6 @@ Managed nodes: **:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.** **NOTE: It is recommended to execute `timesync` role from Ansible Collection `fedora.linux_system_roles` before or after executing this role.** - -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. @@ -130,6 +126,8 @@ Example of execution together with prerequisite role [sap_general_preconfigure]( +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -142,5 +140,313 @@ Apache 2.0 - [Bernd Finger](https://github.com/berndfinger) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_hana_preconfigure/INPUT_PARAMETERS.md) +## Role Variables + +### sap_hana_preconfigure_config_all +- _Type:_ `bool` + +If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
+Default is to perform installation and configuration steps.
+ +### sap_hana_preconfigure_installation +- _Type:_ `bool` + +If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+installation steps of SAP notes.
+ +### sap_hana_preconfigure_configuration +- _Type:_ `bool` + +If `sap_hana_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+configuration steps of SAP notes for which the corresponding SAP notes parameters have been set to `true`.
+ +Example: + +```yaml +sap_hana_preconfigure_config_all: false +sap_hana_preconfigure_configuration: true +sap_hana_preconfigure_2772999_04: true +sap_hana_preconfigure_2382421: true +``` + +### sap_hana_preconfigure_assert +- _Type:_ `bool` +- _Default:_ `false` + +If set to `true`, the role will run in assertion mode instead of the default configuration mode.
+ +### sap_hana_preconfigure_assert_all_config +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will check either tuned or static settings.
+If this parameter is set to to `true`, the role will check both tuned and static settings.
+ +### sap_hana_preconfigure_assert_ignore_errors +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will abort when encountering any assertion error.
+If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
+This is useful if the role is used for reporting a system's SAP notes compliance.
+ +### sap_hana_preconfigure_system_roles_collection +- _Type:_ `str` +- _Default:_ `'fedora.linux_system_roles'` + +Set which Ansible Collection to use for the Linux System Roles.
+Available values: +- `fedora.linux_system_roles` - for community/upstream.
+- `redhat.rhel_system_roles` - for the RHEL System Roles for SAP, or for Red Hat Automation Hub.
+ +### sap_hana_preconfigure_min_rhel_release_check +- _Type:_ `bool` +- _Default:_ `false` + +Check the RHEL release against parameter `sap_hana_preconfigure_supported_rhel_minor_releases`, which is a list of
+known SAP HANA supported RHEL minor releases. By default, the role will display a message and continue running if
+the RHEL release is not part of that list. If set to `true`, the role will fail in such a case.
+ +### sap_hana_preconfigure_supported_rhel_minor_releases +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA supported RHEL minor releases.
+ +### sap_hana_preconfigure_enable_sap_hana_repos +- _Type:_ `bool` +- _Default:_ `false` + +Set to 'true' to enable the SAP HANA required RHEL repos.
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_use_hana_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_7_x86_64 +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 7 repos on x86_64'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_7_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 7 repos on ppc64le'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_8_x86_64 +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 8 repos on x86_64'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_8_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 8 repos on ppc64le'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_9_x86_64 +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 9 repos on x86_64'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_req_repos_redhat_9_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Use this parameter to set your own list of SAP HANA required RHEL 9 repos on ppc64le'
+This parameter is deprecated because the role sap_general_preconfigure can be used for this purpose.
+The related parameters are `sap_general_preconfigure_enable_repos` and `sap_general_preconfigure_req_repos`.
+ +### sap_hana_preconfigure_set_minor_release +- _Type:_ `bool` +- _Default:_ `false` + +Use this parameter to set the RHEL minor release, which is required for SAP HANA.
+The related parameter is `sap_general_preconfigure_set_minor_release`.
+ +### sap_hana_preconfigure_create_directories +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` if you do not want the SAP HANA directories to be created by the role.
+The SAP HANA directories will always be created if `sap_hana_preconfigure_modify_selinux_labels`
+(see below) is set to `true`, no matter how `sap_hana_preconfigure_create_directories` is set.
+ +### sap_hana_preconfigure_hana_directories +- _Type:_ `list` with elements of type `str` +- _Default:_ + - /hana + - /lss/shared + +List of SAP HANA directories to be created.
+ +### sap_hana_preconfigure_modify_selinux_labels +- _Type:_ `bool` +- _Default:_ `true` + +For compatibility of SAP HANA with SELinux in enforcing mode, the role will recursively add
+the `usr_t` label to directories and files in the directories where HANA is installed.
+If relabeling not desired, set this parameter `false`.
+If the variable is set to `true`, the SAP HANA directories will be created no matter
+how the variable `sap_hana_preconfigure_create_directories` (see above) is set.
+ +### sap_hana_preconfigure_packages +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +List of RHEL packages to be installed for SAP HANA. For RHEL 8 and later, you can choose to install either the default list
+or a list of the minimum required packages for SAP HANA server (parameter `__sap_hana_preconfigure_packages_min_install`).
+ +### sap_hana_preconfigure_min_package_check +- _Type:_ `bool` +- _Default:_ `true` + +SAP HANA requires certain minimum package versions to be supported. These minimum levels are listed in SAP Note 2235581.
+Set this parameter to `false` if you want to ignore these requirements.
+ +### sap_hana_preconfigure_update +- _Type:_ `bool` +- _Default:_ `false` + +Set this parameter to `true` to update the system to the latest package levels.
+By setting the parameter `sap_general_preconfigure_set_minor_release` of the
+role `sap_general_preconfigure` to `true`, you can install the most recent package updates
+without updating to a more recent RHEL minor release.
+ +### sap_hana_preconfigure_reboot_ok +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` if you want to perform a reboot at the end of the role, if necessary.
+ +### sap_hana_preconfigure_fail_if_reboot_required +- _Type:_ `bool` +- _Default:_ `true` + +If `sap_hana_preconfigure_reboot_ok` is set to `false`, which is the default, a reboot requirement should not
+remain unnoticed. For this reason, we let the role fail. Set this parameter to `false` to override this behavior.
+Can be useful if you want to implement your own reboot handling.
+ +### sap_hana_preconfigure_kernel_parameters +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Network related linux kernel parameter settings for SAP HANA on all hardware platforms.
+ +### sap_hana_preconfigure_kernel_parameters_ppc64le +- _Type:_ `list` with elements of type `str` +- _Default:_ (set by platform/environment specific variables) + +Network related linux kernel parameter settings for platform ppc64le.
+ +### sap_hana_preconfigure_use_netapp_settings_nfs +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to also set NetApp NFS required kernel parameters.
+ +### sap_hana_preconfigure_install_ibm_power_tools +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` to not install the IBM Power Systems service and productivity tools.
+ +### sap_hana_preconfigure_add_ibm_power_repo +- _Type:_ `bool` +- _Default:_ `true` + +Set this parameter to `false` if you do not want to add the IBM Power tools repository (e.g. because the packages
+are already available on the local network). The IBM Power Systems service and productivity tools will only
+be installed if the variable `sap_hana_preconfigure_install_ibm_power_tools` is set to `true`, which is the default.
+ +### sap_hana_preconfigure_ibm_power_repo_url +- _Type:_ `str` +- _Default:_ (set by platform/environment specific variables) + +URL of the IBM Power tools repository.
+ +### sap_hana_preconfigure_ppcle_mtu9000_if +- _Type:_ `str` +- _Default:_ `''` + +List of interfaces for which the MTU size will be set to `9000`.
+ +### sap_hana_preconfigure_ppcle_tso_if +- _Type:_ `list` with elements of type `str` +- _Default:_ + '{{ ansible_interfaces | difference([''lo'']) }}' + +List of interfaces for which the tso flag will be set.
+ +### sap_hana_preconfigure_use_tuned +- _Type:_ `bool` +- _Default:_ `true` + +Use tuned for configuring most of the kernel settings for SAP HANA
+Set this parameter to `false` to use static kernel settings
+ +### sap_hana_preconfigure_tuned_profile +- _Type:_ `str` +- _Default:_ `'sap-hana'` + +Name of the SAP HANA tuned tuned profile to enable (RHEL).
+ +### sap_hana_preconfigure_modify_grub_cmdline_linux +- _Type:_ `bool` +- _Default:_ `false` + +Set this parameter to `true` to modify the Grub boot command line.
+ +### sap_hana_preconfigure_run_grub2_mkconfig +- _Type:_ `bool` +- _Default:_ `true` + +By default, the role will run `grub2-mkconfig` to update the Grub configuration if necessary.
+Set this parameter to `false` if this is not desired.
+ +### sap_hana_preconfigure_db_group_name +- _Type:_ `str` + +Use this parameter to specify the name of the RHEL group which is used for the database processes.
+It will be used to configure process limits as per step "Configuring Process Resource Limits" of SAP note 2772999.
+ +Example: + +```yaml +sap_hana_preconfigure_db_group_name: dba +``` + +### sap_hana_preconfigure_saptune_version +- _Type:_ `str` +- _Default:_ `''` + +(SUSE specific) Specifies the saptune version.
+This will replace the current installed version if present, even downgrade if necessary.
+ +### sap_hana_preconfigure_saptune_solution +- _Type:_ `str` +- _Default:_ `'HANA'` + +(SUSE specific) Specifies the saptune solution to apply.
+Available values: `HANA`, `NETWEAVER+HANA`, `S4HANA-APP+DB`, `S4HANA-DBSERVER` + +### sap_hana_preconfigure_saptune_azure +- _Type:_ `bool` +- _Default:_ `false` + +(SUSE specific) On Azure, TCP timestamps, reuse and recycle should be disabled.
+If the variable is set, an override file for saptune will be created (/etc/saptune/override/2382421) to set net.ipv4.tcp_timestamps and net.ipv4.tcp_tw_reuse to 0.
+Set this parameter to `true` on Azure.
+ \ No newline at end of file diff --git a/roles/sap_hostagent/INPUT_PARAMETERS.md b/roles/sap_hostagent/INPUT_PARAMETERS.md deleted file mode 100644 index 1b10434b8..000000000 --- a/roles/sap_hostagent/INPUT_PARAMETERS.md +++ /dev/null @@ -1,130 +0,0 @@ -## Input Parameters for sap_hostagent Ansible Role - - -### sap_hostagent_installation_type - -- _Type:_ `string` -- _Default:_ `rpm` - -Select type of installation source for SAPHOSTAGENT.
-Available options: `sar`, `sar-remote`, `bundle`, `rpm` - - -## Input Parameters for SAR -Following input parameters are used by both Local SAR and Remote SAR. - -### sap_hostagent_sar_file_name - -- _Type:_ `string` - -Name of SAR file containing SAPHOSTAGENT. - -### sap_hostagent_sapcar_file_name - -- _Type:_ `string` - -Name of SAR file containing SAPCAR. - -## Input Parameters for Local SAR - -### sap_hostagent_sar_local_path - -- _Type:_ `string` - -Local directory path where SAR file is located. Do not use together with `sap_hostagent_sar_remote_path`. - -### sap_hostagent_sapcar_local_path - -- _Type:_ `string` - -Local directory path where SAPCAR file is located. Do not use together with `sap_hostagent_sapcar_remote_path`. - -## Input Parameters for Remote SAR - -### sap_hostagent_sar_remote_path - -- _Type:_ `string` - -Remote directory path where SAR file is located. Do not use together with `sap_hostagent_sar_local_path`. - -### sap_hostagent_sapcar_remote_path - -- _Type:_ `string` - -Local directory path where SAPCAR file is located. Do not use together with `sap_hostagent_sapcar_local_path`. - - -## Input Parameters for RPM - -### sap_hostagent_rpm_local_path - -- _Type:_ `string` - -Local directory path where RPM file is located. Do not use together with `sap_hostagent_rpm_remote_path`. - -### sap_hostagent_rpm_remote_path - -- _Type:_ `string` - -Remote directory path where RPM file is located. Do not use together with `sap_hostagent_rpm_local_path`. - -### sap_hostagent_rpm_file_name - -- _Type:_ `string` - -Name of RPM package containing SAPHOSTAGENT. - - -## Input Parameters for SAP Bundle - -### sap_hostagent_bundle_path - -- _Type:_ `string` - -Remote directory path where SAP Bundle file is located after being extracted. - - -## Input Parameters for SSL setup - -### sap_hostagent_config_ssl - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to configure PSE and create CSR.
-Adding signed certificates from a valid CA is not supported yet. - -### sap_hostagent_ssl_passwd - -- _Type:_ `string` - -Enter password for the CSR. It is used when `sap_hostagent_config_ssl` is set. - -### sap_hostagent_ssl_org - -- _Type:_ `string` - -Enter Organization information for the CSR. It is used when `sap_hostagent_config_ssl` is set. - -### sap_hostagent_ssl_country - -- _Type:_ `string` - -Enter Country information for the CSR. It is used when `sap_hostagent_config_ssl` is set. - - -### sap_hostagent_agent_tmp_directory - -- _Type:_ `string` -- _Default:_ `/tmp/hostagent` - -Temporary directory for processing of source file. - -### sap_hostagent_clean_tmp_directory - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to remove temporary directory after installation. - - \ No newline at end of file diff --git a/roles/sap_hostagent/README.md b/roles/sap_hostagent/README.md index 400395153..e72fc7cc7 100644 --- a/roles/sap_hostagent/README.md +++ b/roles/sap_hostagent/README.md @@ -4,7 +4,7 @@ ## Description -Ansible Role `sap_hostagent` is used install SAP Host Agent. +The Ansible Role `sap_hostagent` is used install SAP Host Agent. SAP Host Agent is an agent that can accomplish several life-cycle management tasks, such as operating system monitoring, database monitoring, system instance control and provisioning. @@ -130,5 +130,137 @@ Apache 2.0 - [Bernd Finger](https://github.com/berndfinger) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_hostagent/INPUT_PARAMETERS.md) +## Role Variables + +### sap_hostagent_installation_type + +- _Type:_ `string` +- _Default:_ `rpm` + +Select type of installation source for SAPHOSTAGENT.
+Available options: `sar`, `sar-remote`, `bundle`, `rpm` + + +### Input Parameters for SAR +Following input parameters are used by both Local SAR and Remote SAR. + +#### sap_hostagent_sar_file_name + +- _Type:_ `string` + +Name of SAR file containing SAPHOSTAGENT. + +#### sap_hostagent_sapcar_file_name + +- _Type:_ `string` + +Name of SAR file containing SAPCAR. + +### Input Parameters for Local SAR + +#### sap_hostagent_sar_local_path + +- _Type:_ `string` + +Local directory path where SAR file is located.
+**Do not use together with `sap_hostagent_sar_remote_path`.** + +#### sap_hostagent_sapcar_local_path + +- _Type:_ `string` + +Local directory path where SAPCAR file is located.
+**Do not use together with `sap_hostagent_sapcar_remote_path`.** + +### Input Parameters for Remote SAR + +#### sap_hostagent_sar_remote_path + +- _Type:_ `string` + +Remote directory path where SAR file is located.
+**Do not use together with `sap_hostagent_sar_local_path`.** + +#### sap_hostagent_sapcar_remote_path + +- _Type:_ `string` + +Local directory path where SAPCAR file is located.
+**Do not use together with `sap_hostagent_sapcar_local_path`.** + + +### Input Parameters for RPM + +#### sap_hostagent_rpm_local_path + +- _Type:_ `string` + +Local directory path where RPM file is located.
+**Do not use together with `sap_hostagent_rpm_remote_path`.** + +#### sap_hostagent_rpm_remote_path + +- _Type:_ `string` + +Remote directory path where RPM file is located.
+**Do not use together with `sap_hostagent_rpm_local_path`.** + +#### sap_hostagent_rpm_file_name + +- _Type:_ `string` + +Name of RPM package containing SAPHOSTAGENT. + + +### Input Parameters for SAP Bundle + +#### sap_hostagent_bundle_path + +- _Type:_ `string` + +Remote directory path where SAP Bundle file is located after being extracted. + + +### Input Parameters for SSL setup + +#### sap_hostagent_config_ssl + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to configure PSE and create CSR.
+Adding signed certificates from a valid CA is not supported yet. + +#### sap_hostagent_ssl_passwd + +- _Type:_ `string` + +Enter password for the CSR. It is used when `sap_hostagent_config_ssl` is set. + +#### sap_hostagent_ssl_org + +- _Type:_ `string` + +Enter Organization information for the CSR. It is used when `sap_hostagent_config_ssl` is set. + +#### sap_hostagent_ssl_country + +- _Type:_ `string` + +Enter Country information for the CSR. It is used when `sap_hostagent_config_ssl` is set. + + +#### sap_hostagent_agent_tmp_directory + +- _Type:_ `string` +- _Default:_ `/tmp/hostagent` + +Temporary directory for processing of source file. + +#### sap_hostagent_clean_tmp_directory + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to remove temporary directory after installation. + \ No newline at end of file diff --git a/roles/sap_install_media_detect/INPUT_PARAMETERS.md b/roles/sap_install_media_detect/INPUT_PARAMETERS.md deleted file mode 100644 index 67beaf028..000000000 --- a/roles/sap_install_media_detect/INPUT_PARAMETERS.md +++ /dev/null @@ -1,181 +0,0 @@ -## Input Parameters for sap_install_media_detect Ansible Role - -### sap_install_media_detect_rar_handling - -- _Type:_ `bool` -- _Default:_ `True` - -Set this parameter to `false` for skipping the handling of RAR files. In this case, also no `unar` or other RAR handling software will be installed. - - -### sap_install_media_detect_rar_package - -- _Type:_ `str` -- _Default:_ `EPEL` - -Set this parameter to use either the `unar` package from `EPEL` or another software package for handling RAR files.
-Based on this setting, the commands for listing and extracting RAR files are being set in tasks/prepare/enable_rar_handling.yml - -### sap_install_media_detect_epel_gpg_key_url - -- _Type:_ `str` -- _Default:_ `https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}` - -URL for the EPEL GPG key - -### sap_install_media_detect_use_rpm_key_module_for_removing_the_key - -- _Type:_ `bool` -- _Default:_ `True` - -The `EPEL` GPG key can be removed with the rpm_key module and the URL for the key, or by using the `rpm -e` command.
-For using the rpm -e command, set this variable to 'false'. - -### sap_install_media_detect_file_server_only - -- _Type:_ `bool` -- _Default:_ `False` - -If this role is running on a file server on which the SAP software is not to be installed, set the following to true.
-If this role is running on a system on which the SAP software is to be installed, set the following to false. - -### sap_install_media_detect_rar_list - -- _Type:_ `str` -- _Default:_ `/usr/bin/unrar lb` - -Fully qualified path to the program for listing RAR files, including the argument for listing files.
-If not specified, the `lsar` program (or a link with the name `lsar`, pointing to the actual `lsar` program) is expected to be located in one of the PATH directories.
-If sap_install_media_detect_rar_package is set to `EPEL`, this variable is not used. - -### sap_install_media_detect_rar_extract - -- _Type:_ `str` -- _Default:_ `/usr/bin/unrar x` - -Fully qualified path to the program for extracting RAR files, including the argument for extracting files.
-If not specified, the `unar` program (or a link with the name `unar`, pointing to the actual `unar` program) is expected to be located in one of the PATH directories.
-If sap_install_media_detect_rar_package is set to `EPEL`, this variable is not used. - -### sap_install_media_detect_rar_extract_directory_argument - -- _Type:_ `str` - -Fully qualified path to an additional argument to the program for extracting RAR files, for specifying the directory into which the archive is to be extracted. Needs to be empty or start with a space character.
-If sap_install_media_detect_rar_package is set to 'EPEL', this variable is not used. - -### sap_install_media_detect_source_directory - -- _Type:_ `str` -- _Default:_ `/software` - -Directory where the SAP software is located - -### sap_install_media_detect_target_directory - -- _Type:_ `str` - -Directory where the SAP software is located after the role is run, if different from `sap_install_media_detect_source_directory` - -### sap_install_media_detect_create_target_directory - -- _Type:_ `bool` -- _Default:_ `True` - -Create target directory if it does not yet exist. If set to false, perform a check only - -### sap_install_media_detect_rename_target_file_exists - -- _Type:_ `str` -- _Default:_ `skip` - -If there are two files of the same RAR or ZIP type, one with and one without suffix, the following parameter will determine what the role will do for such a file: `skip` the file renaming, `fail`, or `overwrite` the file with the suffix by the file without suffix - -### sap_install_media_detect_extract_archives - -- _Type:_ `bool` -- _Default:_ `True` - -If you want the role to not extract archives which have the extract flag set, set the following parameter to `false`. - -### sap_install_media_detect_move_or_copy_archives - -- _Type:_ `bool` -- _Default:_ `True` - -If you want the role to not move or copy archive files to the `target_dir` subdirectories, set the following parameter to `false`. - -### sap_install_media_detect_assert_after_sapfile - -- _Type:_ `bool` -- _Default:_ `True` - -By default, the presence of at least one file for each file type according to the configured role parameters is asserted. Set the following parameter to 'false' to skip this step. - -### sap_install_media_detect_db - -- _Type:_ `str` - -Select which database type to detect: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2` - -### sap_install_media_detect_db_client - -- _Type:_ `str` - -Select which database client to detect: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2` - -### sap_install_media_detect_swpm - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to detect SWPM. - -### sap_install_media_detect_hostagent - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to detect SAP Hostagent. - -### sap_install_media_detect_igs - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to detect SAP IGS. - -### sap_install_media_detect_kernel - -- _Type:_ `bool` -- _Default:_ `False` - -Enable to detect SAP Kernel files. - -### sap_install_media_detect_kernel_db - -- _Type:_ `str` - -Select which database kernel to detect: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2`
\ No newline at end of file diff --git a/roles/sap_install_media_detect/README.md b/roles/sap_install_media_detect/README.md index 45e739bd6..1c0a100c5 100644 --- a/roles/sap_install_media_detect/README.md +++ b/roles/sap_install_media_detect/README.md @@ -5,7 +5,7 @@ ## Description -Ansible Role `sap_install_media_detect` is used to detect and extract SAP installation media. +The Ansible Role `sap_install_media_detect` is used to detect and extract SAP installation media. This role searches provided source directory, sorts files based on type and extracts them to target directory. Extraction can be further adjusted to create individual folders based on defined inputs. @@ -23,7 +23,6 @@ Managed nodes: ## Execution -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. @@ -118,6 +117,8 @@ Note: After running the role with the following four tags, the SAP archive files +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -130,5 +131,192 @@ Apache 2.0 - [Bernd Finger](https://github.com/berndfinger) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_install_media_detect/INPUT_PARAMETERS.md) +## Role Variables + +### sap_install_media_detect_rar_handling + +- _Type:_ `bool` +- _Default:_ `True` + +Set this parameter to `false` for skipping the handling of RAR files. In this case, also no `unar` or other RAR handling software will be installed. + + +### sap_install_media_detect_rar_package + +- _Type:_ `str` +- _Default:_ `EPEL` + +Set this parameter to use either the `unar` package from `EPEL` or another software package for handling RAR files.
+Based on this setting, the commands for listing and extracting RAR files are being set in tasks/prepare/enable_rar_handling.yml + +### sap_install_media_detect_epel_gpg_key_url + +- _Type:_ `str` +- _Default:_ `https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}` + +URL for the EPEL GPG key + +### sap_install_media_detect_use_rpm_key_module_for_removing_the_key + +- _Type:_ `bool` +- _Default:_ `True` + +The `EPEL` GPG key can be removed with the rpm_key module and the URL for the key, or by using the `rpm -e` command.
+For using the rpm -e command, set this variable to 'false'. + +### sap_install_media_detect_file_server_only + +- _Type:_ `bool` +- _Default:_ `False` + +If this role is running on a file server on which the SAP software is not to be installed, set the following to true.
+If this role is running on a system on which the SAP software is to be installed, set the following to false. + +### sap_install_media_detect_rar_list + +- _Type:_ `str` +- _Default:_ `/usr/bin/unrar lb` + +Fully qualified path to the program for listing RAR files, including the argument for listing files.
+If not specified, the `lsar` program (or a link with the name `lsar`, pointing to the actual `lsar` program) is expected to be located in one of the PATH directories.
+If sap_install_media_detect_rar_package is set to `EPEL`, this variable is not used. + +### sap_install_media_detect_rar_extract + +- _Type:_ `str` +- _Default:_ `/usr/bin/unrar x` + +Fully qualified path to the program for extracting RAR files, including the argument for extracting files.
+If not specified, the `unar` program (or a link with the name `unar`, pointing to the actual `unar` program) is expected to be located in one of the PATH directories.
+If sap_install_media_detect_rar_package is set to `EPEL`, this variable is not used. + +### sap_install_media_detect_rar_extract_directory_argument + +- _Type:_ `str` + +Fully qualified path to an additional argument to the program for extracting RAR files, for specifying the directory into which the archive is to be extracted.
+Needs to be empty or start with a space character.
+If sap_install_media_detect_rar_package is set to 'EPEL', this variable is not used. + +### sap_install_media_detect_source_directory + +- _Type:_ `str` +- _Default:_ `/software` + +Directory where the SAP software is located + +### sap_install_media_detect_target_directory + +- _Type:_ `str` + +Directory where the SAP software is located after the role is run, if different from `sap_install_media_detect_source_directory` + +### sap_install_media_detect_create_target_directory + +- _Type:_ `bool` +- _Default:_ `True` + +Create target directory if it does not yet exist. If set to false, perform a check only + +### sap_install_media_detect_rename_target_file_exists + +- _Type:_ `str` +- _Default:_ `skip` + +If there are two files of the same RAR or ZIP type, one with and one without suffix, the following parameter will determine what the role will do for such a file:
+- `skip` the file renaming. +- `fail` execution. +- `overwrite` the file with the suffix by the file without suffix. + +### sap_install_media_detect_extract_archives + +- _Type:_ `bool` +- _Default:_ `True` + +If you want the role to not extract archives which have the extract flag set, set the following parameter to `false`. + +### sap_install_media_detect_move_or_copy_archives + +- _Type:_ `bool` +- _Default:_ `True` + +If you want the role to not move or copy archive files to the `target_dir` subdirectories, set the following parameter to `false`. + +### sap_install_media_detect_assert_after_sapfile + +- _Type:_ `bool` +- _Default:_ `True` + +By default, the presence of at least one file for each file type according to the configured role parameters is asserted. Set the following parameter to 'false' to skip this step. + +### sap_install_media_detect_db + +- _Type:_ `str` + +Select which database type to detect.
+Available values: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2` + +### sap_install_media_detect_db_client + +- _Type:_ `str` + +Select which database client to detect.
+Available values: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2` + +### sap_install_media_detect_swpm + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SWPM. + +### sap_install_media_detect_hostagent + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP Hostagent. + +### sap_install_media_detect_igs + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP IGS. + +### sap_install_media_detect_kernel + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP Kernel files. + +### sap_install_media_detect_kernel_db + +- _Type:_ `str` + +Select which database kernel to detect.
+Available values: `saphana`, `sapase`, `sapmaxdb`, `oracledb`, `ibmdb2`
+Only necessary if there is more than one SAPEXEDB file in the source directory + +### sap_install_media_detect_webdisp + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP Web Dispatcher. + +### sap_install_media_detect_mpstack + +- _Type:_ `bool` +- _Default:_ `False` + +Enable to detect SAP Maintenance Planner stack file. + +### sap_install_media_detect_export + +- _Type:_ `str` + +Select which database export to detect.
+Available values: `saps4hana`, `sapbw4hana`, `sapecc`, `sapecc_ides`, `sapnwas_abap`, `sapnwas_java`, `sapsolman_abap`, `sapsolman_java` + \ No newline at end of file diff --git a/roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md b/roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md deleted file mode 100644 index 959447a1f..000000000 --- a/roles/sap_maintain_etc_hosts/INPUT_PARAMETERS.md +++ /dev/null @@ -1,78 +0,0 @@ -## Input Parameters for sap_maintain_etc_hosts Ansible Role - - -This role requires the dictionary `sap_maintain_etc_hosts_list` which contains the parameters for the `/etc/hosts` file. - -The default value is the definition of the cluster nodes like in the role [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster). If the value `sap_hana_cluster_nodes`or `sap_ha_pacemaker_cluster_cluster_nodes` is not defined, then the role creates a default value from `ansible_facts`. - -**NOTE: If you want to use this role to remove entries from /etc/hosts it is a good practice to do this before adding entries. The adding/removal is done in the order the entries are listed.** - -### sap_maintain_etc_hosts_list - -- _Type:_ `list` with elements of type `dict` - -Mandatory list of nodes in form of dictionaries to be added or removed in `/etc/hosts` file. - -Following dictionary keys can be defined: -- **node_ip**
- IP address of the managed node.
- **Required** for adding new entries to `/etc/hosts`.
- _Optional_ for removing entries, where `node_name` and `node_domain` can be used instead. - - - _Type:_ `string` - -- **node_name**
- Hostname of the managed node.
- **Required** for adding new entries to `/etc/hosts`.
- _Optional_ for removing entries, when `node_ip` is not used. - - - _Type:_ `string` - -- **node_domain**
- Domain name of the managed node. Defaults to `sap_domain` if set or `ansible_domain`.
- **Required** for adding new entries to `/etc/hosts`.
- _Optional_ for removing entries, when `node_name` is used. - - - _Type:_ `string` - - _Default:_ `sap_domain` - -- **aliases**
- List of aliases for the managed node.
- _Optional_ for adding new entries to `/etc/hosts`. - - - _Type:_ `list` with elements of type `string` - -- **alias_mode**
- Select method of updating `/etc/hosts` file:
- - `merge` : merges the list of aliases with the exiting aliases of the node.
- - `overwrite` : overwrites the aliases of the node. - _Optional_ for adding new entries to `/etc/hosts`. - - - _Type:_ `string` - - _Default:_ `merge` - -- **node_comment**
- Node comment is appended at end of line of managed node.
- _Optional_ for adding new entries to `/etc/hosts`. - - - _Type:_ `string` - - _Default:_ `managed by ansible sap_maintain_etc_hosts role` - -- **hana_site**
- Used by [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) and it is appended to `node_comment`
- _Optional_ for adding new entries to `/etc/hosts`. - - - _Type:_ `string` - -- **node_role**
- Not used, but mentioned for compatibility reasons for [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) role.
- - - _Type:_ `string` - -- **state**
- Select `present` for adding new entries, `absent` for removing them.
- **Required** for removing entries, otherwise default `present` is used. - - - _Type:_ `string` - - _Default:_ `present` - \ No newline at end of file diff --git a/roles/sap_maintain_etc_hosts/README.md b/roles/sap_maintain_etc_hosts/README.md index e822ae55e..a308d2042 100644 --- a/roles/sap_maintain_etc_hosts/README.md +++ b/roles/sap_maintain_etc_hosts/README.md @@ -4,7 +4,7 @@ ## Description -Ansible Role `sap_maintain_etc_hosts` is used to maintain `/etc/hosts` file. +The Ansible role `sap_maintain_etc_hosts` is used to maintain the `/etc/hosts` file.. @@ -15,7 +15,6 @@ Ansible Role `sap_maintain_etc_hosts` is used to maintain `/etc/hosts` file. ## Execution -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. @@ -75,6 +74,8 @@ Example playbook when executed together with [sap_ha_pacemaker_cluster](https:// +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -88,5 +89,82 @@ Apache 2.0 - [Bernd Finger](https://github.com/berndfinger) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_sap_maintain_etc_hosts/INPUT_PARAMETERS.md) +## Role Variables + + +This role requires the dictionary `sap_maintain_etc_hosts_list` which contains the parameters for the `/etc/hosts` file. + +The default value is the definition of the cluster nodes like in the role [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster).
+If the value `sap_hana_cluster_nodes`or `sap_ha_pacemaker_cluster_cluster_nodes` is not defined, then the role creates a default value from `ansible_facts`. + +**NOTE: If you want to use this role to remove entries from /etc/hosts it is a good practice to do this before adding entries. The adding/removal is done in the order the entries are listed.** + +### sap_maintain_etc_hosts_list + +- _Type:_ `list` with elements of type `dict` + +Mandatory list of nodes in form of dictionaries to be added or removed in `/etc/hosts` file. + +Following dictionary keys can be defined: +- **node_ip**
+ IP address of the managed node.
+ **Required** for adding new entries to `/etc/hosts`.
+ _Optional_ for removing entries, where `node_name` and `node_domain` can be used instead. + + - _Type:_ `string` + +- **node_name**
+ Hostname of the managed node.
+ **Required** for adding new entries to `/etc/hosts`.
+ _Optional_ for removing entries, when `node_ip` is not used. + + - _Type:_ `string` + +- **node_domain**
+ Domain name of the managed node. Defaults to `sap_domain` if set or `ansible_domain`.
+ **Required** for adding new entries to `/etc/hosts`.
+ _Optional_ for removing entries, when `node_name` is used. + + - _Type:_ `string` + - _Default:_ `sap_domain` + +- **aliases**
+ List of aliases for the managed node.
+ _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `list` with elements of type `string` + +- **alias_mode**
+ Select method of updating `/etc/hosts` file:
+ - `merge` : merges the list of aliases with the exiting aliases of the node.
+ - `overwrite` : overwrites the aliases of the node. + _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `string` + - _Default:_ `merge` + +- **node_comment**
+ Node comment is appended at end of line of managed node.
+ _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `string` + - _Default:_ `managed by ansible sap_maintain_etc_hosts role` + +- **hana_site**
+ Used by [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) and it is appended to `node_comment`
+ _Optional_ for adding new entries to `/etc/hosts`. + + - _Type:_ `string` + +- **node_role**
+ Not used, but mentioned for compatibility reasons for [sap_ha_pacemaker_cluster](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_ha_pacemaker_cluster) role.
+ + - _Type:_ `string` + +- **state**
+ Select `present` for adding new entries, `absent` for removing them.
+ **Required** for removing entries, otherwise default `present` is used. + + - _Type:_ `string` + - _Default:_ `present` + \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md b/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md deleted file mode 100644 index bdaf4cdf6..000000000 --- a/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md +++ /dev/null @@ -1,92 +0,0 @@ -## Input Parameters for sap_netweaver_preconfigure Ansible Role - -## Role Input Parameters - -Minimum required parameters: -This role does not require any parameter to be set in the playbook or inventory. - - -### sap_netweaver_preconfigure_config_all -- _Type:_ `bool` -- _Default:_ `true` - -If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
-Default is to perform installation and configuration steps.
- -### sap_netweaver_preconfigure_installation -- _Type:_ `bool` -- _Default:_ `false` - -If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-installation steps of SAP notes.
- -### sap_netweaver_preconfigure_configuration -- _Type:_ `bool` -- _Default:_ `false` - -If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
-configuration steps of SAP notes.
- -### sap_netweaver_preconfigure_assert -- _Type:_ `bool` -- _Default:_ `false` - -If set to `true`, the role will run in assertion mode instead of the default configuration mode.
- -### sap_netweaver_preconfigure_assert_ignore_errors -- _Type:_ `bool` -- _Default:_ `false` - -In assertion mode, the role will abort when encountering any assertion error.
-If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
-This is useful if the role is used for reporting a system's SAP notes compliance.
- -### sap_netweaver_preconfigure_min_swap_space_mb -- _Type:_ `str` -- _Default:_ `20480` - -Specifies the minimum amount of swap space on the system required by SAP NetWeaver.
-If this requirement is not met, the role will abort.
-Set your own value to override the default of `20480`.
- -### sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured -- _Type:_ `bool` -- _Default:_ `true` - -If the system does not have the minimum amount of swap space configured as defined
-in parameter `sap_netweaver_preconfigure_min_swap_space_mb`, the role will abort.
-By setting this parameter to `false`, the role will not abort in such cases.
- -### sap_netweaver_preconfigure_rpath -- _Type:_ `str` -- _Default:_ `/usr/sap/lib` - -Specifies the SAP kernel's `RPATH`. This is where the SAP kernel is searching for libraries, and where the role
-is creating a link named `libstdc++.so.6` pointing to `/opt/rh/SAP/lib64/compat-sap-c++-10.so`,
-so that newer SAP kernels which are built with GCC10 can find the required symbols.
- -### sap_netweaver_preconfigure_use_adobe_doc_services -- _Type:_ `bool` -- _Default:_ `false` - -Set this parameter to `true` when using Adobe Document Services, to ensure all required packages are installed.
- -### sap_netweaver_preconfigure_saptune_version -- _Type:_ `str` -- _Default:_ `3.0.2` - -On SLES systems, specifies the saptune version
- -### sap_netweaver_preconfigure_saptune_solution -- _Type:_ `str` -- _Default:_ `NETWEAVER` -- _Possible Values:_
- - `NETWEAVER` - - `NETWEAVER+HANA` - - `S4HANA-APP+DB` - - `S4HANA-APPSERVER` - - `S4HANA-DBSERVER` - -On SLES systems, specifies the saptune solution to apply.
- - \ No newline at end of file diff --git a/roles/sap_netweaver_preconfigure/README.md b/roles/sap_netweaver_preconfigure/README.md index 4375bfeca..fc321756a 100644 --- a/roles/sap_netweaver_preconfigure/README.md +++ b/roles/sap_netweaver_preconfigure/README.md @@ -4,9 +4,7 @@ ## Description -Ansible Role `sap_netweaver_preconfigure` is used to ensure that Managed nodes are configured to host SAP Netweaver systems according to SAP Notes after [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) role was executed. - -This role performs installation of required packages for running SAP Netweaver systems and configuration of Operating system parameters. +The Ansible role `sap_netweaver_preconfigure` installs additional required packages and performs additional OS configuration steps according to applicable SAP notes for installing and running SAP ABAP Application Platform (formerly known as SAP NetWeaver) after the role [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) has been executed. @@ -23,8 +21,6 @@ Managed nodes: **:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.** **NOTE: It is recommended to execute `timesync` role from Ansible Collection `fedora.linux_system_roles` before or after executing this role.** - -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. @@ -68,6 +64,8 @@ Example of execution together with prerequisite role [sap_general_preconfigure]( +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -80,5 +78,82 @@ Apache 2.0 - [Bernd Finger](https://github.com/berndfinger) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_netweaver_preconfigure/INPUT_PARAMETERS.md) +## Role Variables + +### sap_netweaver_preconfigure_config_all +- _Type:_ `bool` +- _Default:_ `true` + +If set to `false`, the role will only execute or verify the installation or configuration steps of SAP notes.
+Default is to perform installation and configuration steps.
+ +### sap_netweaver_preconfigure_installation +- _Type:_ `bool` +- _Default:_ `false` + +If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+installation steps of SAP notes.
+ +### sap_netweaver_preconfigure_configuration +- _Type:_ `bool` +- _Default:_ `false` + +If `sap_netweaver_preconfigure_config_all` is set to `false`, set this variable to `true` to perform only the
+configuration steps of SAP notes.
+ +### sap_netweaver_preconfigure_assert +- _Type:_ `bool` +- _Default:_ `false` + +If set to `true`, the role will run in assertion mode instead of the default configuration mode.
+ +### sap_netweaver_preconfigure_assert_ignore_errors +- _Type:_ `bool` +- _Default:_ `false` + +In assertion mode, the role will abort when encountering any assertion error.
+If this parameter is set to `false`, the role will *not* abort when encountering an assertion error.
+This is useful if the role is used for reporting a system's SAP notes compliance.
+ +### sap_netweaver_preconfigure_min_swap_space_mb +- _Type:_ `str` +- _Default:_ `20480` + +Specifies the minimum amount of swap space on the system required by SAP NetWeaver.
+If this requirement is not met, the role will abort.
+Set your own value to override the default of `20480`.
+ +### sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured +- _Type:_ `bool` +- _Default:_ `true` + +If the system does not have the minimum amount of swap space configured as defined
+in parameter `sap_netweaver_preconfigure_min_swap_space_mb`, the role will abort.
+By setting this parameter to `false`, the role will not abort in such cases.
+ +### sap_netweaver_preconfigure_rpath +- _Type:_ `str` +- _Default:_ `/usr/sap/lib` + +Specifies the SAP kernel's `RPATH`. This is where the SAP kernel is searching for libraries, and where the role
+is creating a link named `libstdc++.so.6` pointing to `/opt/rh/SAP/lib64/compat-sap-c++-10.so`,
+so that newer SAP kernels which are built with GCC10 can find the required symbols.
+ +### sap_netweaver_preconfigure_use_adobe_doc_services +- _Type:_ `bool` +- _Default:_ `false` + +Set this parameter to `true` when using Adobe Document Services, to ensure all required packages are installed.
+ +### sap_netweaver_preconfigure_saptune_version +- _Type:_ `str` + +(SUSE specific) Specifies the saptune version. + +### sap_netweaver_preconfigure_saptune_solution +- _Type:_ `str` +- _Default:_ `NETWEAVER` + +(SUSE specific) Specifies the saptune solution to apply.
+Available values: `NETWEAVER`, `NETWEAVER+HANA`, `S4HANA-APP+DB`, `S4HANA-APPSERVER`, `S4HANA-DBSERVER` + \ No newline at end of file diff --git a/roles/sap_storage_setup/INPUT_PARAMETERS.md b/roles/sap_storage_setup/INPUT_PARAMETERS.md deleted file mode 100644 index f4de99ad2..000000000 --- a/roles/sap_storage_setup/INPUT_PARAMETERS.md +++ /dev/null @@ -1,140 +0,0 @@ - -## Input Parameters for sap_netweaver_preconfigure Ansible Role - - -Minimum required parameters: - -- [sap_storage_setup_definition](#sap_storage_setup_definition-required) -- [sap_storage_setup_host_type](#sap_storage_setup_host_type-required) -- [sap_storage_setup_sid](#sap_storage_setup_sid-required) - - -### sap_storage_setup_definition required - -- _Type:_ `list` - -Describes list of the filesystems to be configured.
- -- **disk_size**
- Size of the disk device that is used for the filesystem.
For filesystems with no LVM logical volume striping, this is the total size of the filesystem.
For filesystems with LVM LV striping defined (`lvm_lv_stripes`), this is the size of each disk. The resulting filesystem size will be `disk_size` multiplied by `lvm_lv_stripes` (=disks). - - - _Type:_ `int` - -- **filesystem_type**
- The type of filesystem that will be created on the logical volume. - - - _Type:_ `str` - - _Default:_ `xfs` - -- **lvm_lv_name**
- The name of the LVM volume.
The default name is derived from the name value of the filesystem definition entry, for example 'lv_hanalog'. - - - _Type:_ `str` - -- **lvm_lv_stripe_size**
- When setting up a striped volume, the stripe size can be defined.
Example format - "128K". - - - _Type:_ `str` - -- **lvm_lv_stripes**
- Number of disks that will be configured in a striped volume.
This requires the availability of the same amount of unused disks, which must be of the size defined in `disk_size`. - - - _Type:_ `int` - _Default:_ `1` - -- **lvm_vg_name**
- The name of the LVM volume group.
The default name is derived from the name value of the filesystem definition entry, for example 'vg_hanalog'. - - - _Type:_ `str` - -- **lvm_vg_physical_extent_size**
- Adjustable size of the physical extents of the volume group in LVM. - - - _Type:_ `int` - - _Default:_ `4` - -- **mountpoint**
- The path to where the filesystem will be mounted.
This can be left out for the definition of a swap volume. - - - _Type:_ `str` - -- **name**
- A name of the filesystem definition entry.
This name is used to generate volume group name and logical volume name. - - - _Type:_ `str` - -- **nfs_filesystem_type**
- The type of the NFS filesystem, for example `nfs`, `nfs4`. - - - _Type:_ `str` - - _Default:_ `nfs4` - -- **nfs_mount_options**
- Mount options to use for the NFS mount.
Generic default is `hard,acl`.
Defaults depend on the specific platform detected by the role or defined explicitly. - - - _Type:_ `str` - - _Default:_ `hard,acl` - -- **nfs_path**
- When defining an NFS filesystem, this is the directory path of the filesystem to be mounted. - - - _Type:_ `str` - -- **nfs_server**
- When defining an NFS filesystem, this is the address of the NFS server.
The address must contain the root path, in which the mount directories exist or will be created.
For example, `192.168.1.100:/`. - - - _Type:_ `str` - -- **swap_path**
- The path to the swap file.
When this option is defined for a swap filesystem definition, it will create a swap file on an existing filesystem. - - - _Type:_ `str` - -Example: - -```yaml -sap_storage_setup_definition: - - # Block Storage volume - - name: hana_data # required: string, filesystem name used to generate lvm_lv_name and lvm_vg_name - mountpoint: /hana/data # required: string, directory path where the filesystem is mounted - disk_size: 100 # required: integer, size in GB - filesystem_type: xfs # optional: string, value 'xfs'. Use 'swap' to create swap filesystem - - # File Storage volume - - name: hana_shared # required: string, reference name - mountpoint: /hana/shared # required: string, directory path where the filesystem is mounted - nfs_server: nfs.corp:/ # required: string, server and parent directory of the NFS Server; value default from var sap_storage_setup_nfs_server - - # Swap as file instead of Block Storage volume - # See SAP Note 1597355 - Swap-space recommendation for Linux - - name: swap # required: string, reference name - swap_path: /swapfile # required: string, directory path where swap file is created - disk_size: 4 # required: integer, size in GB of swap file - filesystem_type: swap # required: string, must be value 'swap' -``` - -### sap_storage_setup_host_type required - -- _Type:_ `list` - -The type of service the target system is going to be configured for.
-This can be a list of multiple types which apply to a single host.
-If not defined, the default will be inherited from the global parameter `sap_host_type`. One of these parameters must be defined.
-Available values: `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_multipath_enable_and_detect - -- _Type:_ `bool` -- _Default:_ `False` - -Define if multipathing should be enabled and dynamic multipath devices detected and used for the filesystem setup.
- -### sap_storage_setup_sid required - -- _Type:_ `str` - -SID of the SAP service.
-If not defined, the default will be inherited from the global parameter `sap_system_sid`. One of these parameters must be defined.
- - \ No newline at end of file diff --git a/roles/sap_storage_setup/README.md b/roles/sap_storage_setup/README.md index 55231f601..7105d1454 100644 --- a/roles/sap_storage_setup/README.md +++ b/roles/sap_storage_setup/README.md @@ -5,7 +5,7 @@ ## Description -Ansible Role `sap_storage_setup` is used to prepare a host with the storage requirements of an SAP System (prior to software installation). +The Ansible Role `sap_storage_setup` is used to prepare a host with the storage requirements of an SAP System (prior to software installation). This role can prepare host with: - Local block storage volume setup as LVM Logical Volumes, Filesystem formatting and mount to defined directory path @@ -37,8 +37,6 @@ Managed nodes: **:warning: Do not execute this Ansible Role against existing SAP systems unless you know what you are doing and you prepare inputs to avoid unintended changes caused by default inputs.**
:warning: While this Ansible Role has protection against overwrite of existing disks and filesystems - sensible review and care is required for any automation of disk storage. Please review the documentation and samples/examples carefully. It is strongly suggested to initially execute the Ansible Playbook calling this Ansible Role, with `ansible-playbook --check` for Check Mode - this will perform no changes to the host and show which changes would be made. -Role can be executed independently or as part of [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. - **Considerations** - This role does not permit static definition for mountpoint to use a specific device (e.g. `/dev/sdk`). The definition will define the disk size to use for the mountpoint, and match accordingly. - This role enforces that 1 mountpoint will use 1 LVM Logical Volume (LV) that consumes 100% of an LVM Volume Group (VG), with the LVM Volume Group (VG) consuming 100% of 1..n LVM Physical Volumes (PV). @@ -110,6 +108,8 @@ Example playbook to configure SAP HANA OneHost node on AWS that includes: +## Further Information +For more examples on how to use this role in different installation scenarios, refer to the [ansible.playbooks_for_sap](https://github.com/sap-linuxlab/ansible.playbooks_for_sap) playbooks. ## License @@ -122,5 +122,141 @@ Apache 2.0 - [Janine Fuchs](https://github.com/ja9fuchs) -## Role Input Parameters -All input parameters used by role are described in [INPUT_PARAMETERS.md](https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_storage_setup/INPUT_PARAMETERS.md) +## Role Variables + + +Minimum required parameters: + +- [sap_storage_setup_definition](#sap_storage_setup_definition-required) +- [sap_storage_setup_host_type](#sap_storage_setup_host_type-required) +- [sap_storage_setup_sid](#sap_storage_setup_sid-required) + + +### sap_storage_setup_definition required + +- _Type:_ `list` + +Describes list of the filesystems to be configured.
+ +- **disk_size**
+ Size of the disk device that is used for the filesystem.
For filesystems with no LVM logical volume striping, this is the total size of the filesystem.
For filesystems with LVM LV striping defined (`lvm_lv_stripes`), this is the size of each disk. The resulting filesystem size will be `disk_size` multiplied by `lvm_lv_stripes` (=disks). + + - _Type:_ `int` + +- **filesystem_type**
+ The type of filesystem that will be created on the logical volume. + + - _Type:_ `str` + - _Default:_ `xfs` + +- **lvm_lv_name**
+ The name of the LVM volume.
The default name is derived from the name value of the filesystem definition entry, for example 'lv_hanalog'. + + - _Type:_ `str` + +- **lvm_lv_stripe_size**
+ When setting up a striped volume, the stripe size can be defined.
Example format - "128K". + + - _Type:_ `str` + +- **lvm_lv_stripes**
+ Number of disks that will be configured in a striped volume.
This requires the availability of the same amount of unused disks, which must be of the size defined in `disk_size`. + + - _Type:_ `int` + _Default:_ `1` + +- **lvm_vg_name**
+ The name of the LVM volume group.
The default name is derived from the name value of the filesystem definition entry, for example 'vg_hanalog'. + + - _Type:_ `str` + +- **lvm_vg_physical_extent_size**
+ Adjustable size of the physical extents of the volume group in LVM. + + - _Type:_ `int` + - _Default:_ `4` + +- **mountpoint**
+ The path to where the filesystem will be mounted.
This can be left out for the definition of a swap volume. + + - _Type:_ `str` + +- **name**
+ A name of the filesystem definition entry.
This name is used to generate volume group name and logical volume name. + + - _Type:_ `str` + +- **nfs_filesystem_type**
+ The type of the NFS filesystem, for example `nfs`, `nfs4`. + + - _Type:_ `str` + - _Default:_ `nfs4` + +- **nfs_mount_options**
+ Mount options to use for the NFS mount.
Generic default is `hard,acl`.
Defaults depend on the specific platform detected by the role or defined explicitly. + + - _Type:_ `str` + - _Default:_ `hard,acl` + +- **nfs_path**
+ When defining an NFS filesystem, this is the directory path of the filesystem to be mounted. + + - _Type:_ `str` + +- **nfs_server**
+ When defining an NFS filesystem, this is the address of the NFS server.
The address must contain the root path, in which the mount directories exist or will be created.
For example, `192.168.1.100:/`. + + - _Type:_ `str` + +- **swap_path**
+ The path to the swap file.
When this option is defined for a swap filesystem definition, it will create a swap file on an existing filesystem. + + - _Type:_ `str` + +Example: + +```yaml +sap_storage_setup_definition: + + # Block Storage volume + - name: hana_data # required: string, filesystem name used to generate lvm_lv_name and lvm_vg_name + mountpoint: /hana/data # required: string, directory path where the filesystem is mounted + disk_size: 100 # required: integer, size in GB + filesystem_type: xfs # optional: string, value 'xfs'. Use 'swap' to create swap filesystem + + # File Storage volume + - name: hana_shared # required: string, reference name + mountpoint: /hana/shared # required: string, directory path where the filesystem is mounted + nfs_server: nfs.corp:/ # required: string, server and parent directory of the NFS Server; value default from var sap_storage_setup_nfs_server + + # Swap as file instead of Block Storage volume + # See SAP Note 1597355 - Swap-space recommendation for Linux + - name: swap # required: string, reference name + swap_path: /swapfile # required: string, directory path where swap file is created + disk_size: 4 # required: integer, size in GB of swap file + filesystem_type: swap # required: string, must be value 'swap' +``` + +### sap_storage_setup_host_type required + +- _Type:_ `list` + +The type of service the target system is going to be configured for.
+This can be a list of multiple types which apply to a single host.
+If not defined, the default will be inherited from the global parameter `sap_host_type`. One of these parameters must be defined.
+Available values: `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_multipath_enable_and_detect + +- _Type:_ `bool` +- _Default:_ `False` + +Define if multipathing should be enabled and dynamic multipath devices detected and used for the filesystem setup.
+ +### sap_storage_setup_sid required + +- _Type:_ `str` + +SID of the SAP service.
+If not defined, the default will be inherited from the global parameter `sap_system_sid`. One of these parameters must be defined.
+ \ No newline at end of file