This Ansible Collection executes various SAP Software installations and configuration tasks for running SAP software on Linux operating systems; with handlers for SAP HANA database lifecycle manager (HDBLCM) and SAP Software Provisioning Manager (SWPM) for programmatic deployment of any SAP solution scenario.
This can be combined with other Ansible Collections to provide end-to-end automation, from download of SAP software installation media through to technical configuration and burstable SAP NetWeaver application servers (start/stop).
Operating Systems (target machines)
- Red Hat Enterprise Linux for SAP Solutions1
- RHEL 8.2, 8.4 and later
Scenario | Description | Infrastructure Platform |
---|---|---|
SAP HANA single node installation | Installation of a SAP HANA Database Server to a single machine |
|
SAP HANA 2-node pacemaker cluster | Installation of a SAP HANA Database Server with HANA System Replication (HSR) in a basic 2-node Pacemaker Cluster configuration |
|
Key:
- ✔️ Verified compatibility
⚠️ Unverified and untested, expected to be compatible- ❌ Not compatible
Out of Scope
- AWS Classic environment
- Azure Classic environment using Azure Service Manager (ASM)
- IBM Cloud Classic Infrastructure environment
This Ansible Collection executes various SAP Software installations for different SAP solution scenarios, including:
-
SAP HANA installations via SAP HANA database lifecycle manager (HDBLCM)
- Install SAP HANA database server, with any SAP HANA Component (e.g. Live Cache Apps, Application Function Library etc.)
- Configure Firewall rules and Hosts file for SAP HANA database server instance/s
- Apply license to SAP HANA
- Configure storage layout for SAP HANA mount points (i.e. /hana/data, /hana/log, /hana/shared)
- Install SAP Host Agent
- Install Linux Pacemaker, configure Pacemaker Fencing Agents and Pacemaker Resource Agents
- Install SAP HANA System Replication
- Set HA/DR for SAP HANA System Replication
-
Every SAP Software installation via SAP Software Provisioning Manager (SWPM)
- Run software install tasks using easy Ansible Variable to generate SWPM Unattended installations (sap_swpm Ansible Role default mode).
- Optional use of templating definitions for repeated installations (sap_swpm Ansible Role default templates mode).
- Run software install tasks with Ansible Variables one-to-one matched to SWPM Unattended Inifile parameters to generate bespoke SWPM Unattended installations (sap_swpm Ansible Role advanced mode).
- Optional use of templating definitions for repeated installations (sap_swpm Ansible Role advanced templates mode).
- Run previously-defined installations with an existing SWPM Unattended inifile.params (sap_swpm Ansible Role inifile_reuse mode)
- Install Linux Pacemaker, configure Pacemaker Fencing Agents and Pacemaker Resource Agents
- Set HA/DR with distributed SAP System installations (i.e. ERS)
- Run software install tasks using easy Ansible Variable to generate SWPM Unattended installations (sap_swpm Ansible Role default mode).
An Ansible Playbook can call either an Ansible Role, or the individual Ansible Modules:
- Ansible Roles (runs multiple Ansible Modules)
- Ansible Modules (and adjoining Python/Bash Functions)
For further information regarding the development, code structure and execution workflow please read the Development documentation.
Within this Ansible Collection, there are various Ansible Roles and no custom Ansible Modules.
Name | Summary |
---|---|
sap_general_preconfigure | configure general settings for SAP software |
sap_netweaver_preconfigure | configure settings for SAP NetWeaver application server |
sap_hana_preconfigure | configure settings for SAP HANA database server |
sap_hana_install | install SAP HANA via HDBLCM |
sap_swpm | install SAP Software via SWPM |
sap_ha_install_hana_hsr | install SAP HANA System Replication |
sap_ha_prepare_pacemaker | prepare for Linux Pacemaker installation |
sap_ha_install_pacemaker | install and configure Linux Pacemaker |
sap_ha_set_hana | configure HA/DR for SAP HANA |
sap_ha_set_netweaver | configure HA/DR for SAP NetWeaver |
sap_hostagent | install SAP Host Agent |
sap_storage | configure storage for SAP HANA, with LVM partitions and XFS filesystem |
sap_install_media_detect | detect and extract SAP Software installation media |
Notes:
In general the "preconfigure" and "prepare" roles are prerequisites for the corresponding installation roles. The logic has been separated to support a flexible execution of the different steps.
Role Name | Ansible Lint Status |
---|---|
sap_general_preconfigure | |
sap_netweaver_preconfigure | |
sap_hana_preconfigure | |
sap_hana_install |
Notes:
- Ansible Playbook localhost executions may have limitations on SAP Software installations
- Ansible Roles for HA/DR are all designed for execution with Terraform
There are various methods to execute the Ansible Collection, dependant on the use case. For more information, see Execution examples with code samples and the summary below:
Execution Scenario | Use Case | Target |
---|---|---|
Ansible Playbook -> source Ansible Collection -> execute Ansible Task --> run Ansible Role ---> run Ansible Module for Shell (built-in) ---> ... |
Complex executions with various interlinked activities; run in parallel or sequentially |
Localhost or Remote |
Designed for Linux operating systems, e.g. RHEL (7.x and 8.x) and SLES (15.x).
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
- 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
Python 3 from the execution/controller host.
Tests with Ansible Core release versions:
- Ansible Core 2.11.5 community edition
Tests with Python release versions:
- Python 3.9.7 (i.e. CPython distribution)
Tests with Operating System release versions:
- RHEL 8.4
- macOS 11.6 (Big Sur), with Homebrew used for Python 3.x via PyEnv
SAP SWPM Catalog Products which have been tested:
- SAP S/4HANA AnyPremise 1809, 1909, 2020, 2021
- One Host installation
- Dual Host installation
- Distributed installation
- High Availability installation
- System Copy (Homogeneous with SAP HANA Backup / Recovery) installation
- System Rename
- SAP B/4HANA
- SAP Solution Manager 7.2
- SAP Business Suite (i.e. ECC)
- SAP NetWeaver applications (e.g. GRC)
- SAP Web Dispatcher
-
Azure:
-
AWS:
-
Google Cloud:
-
IBM Cloud:
-
RHEL:
Contributors to the Ansible Roles within this Ansible Collection, are shown within /docs/contributors.