Chapter 4. RHEL System Roles for SAP
The RHEL System Roles for SAP provide a quick, easy, and consistent method for preparing your local system or any number of remote systems according to applicable SAP notes for SAP software. The Ansible roles sap_general_preconfigure, sap_netweaver_preconfigure and sap_hana_preconfigure are used for this purpose.
In this document, the configuration of the local system is described. For configuring any number of remote systems using the RHEL System Roles for SAP, including from an Ansible Automation Platform host, refer to Red Hat Enterprise Linux System Roles for SAP.
4.1. Installing RHEL System Roles for SAP Copy linkLink copied to clipboard!
RHEL System Roles for SAP is available in the RHEL for SAP Solutions repository. It requires certain functionality delivered in the RHEL System Roles, which are available in the AppStream repository.
Prerequisites
- You have system administrator access.
Procedure
Install RHEL System Roles for SAP (this will install certain dependent packages, e.g.
ansible-core,rhel-system-rolesand certain requiredpython3packages):# dnf install rhel-system-roles-sap
4.2. Configuring the system for SAP HANA with RHEL System Roles for SAP Copy linkLink copied to clipboard!
For preparing the system, you must first create a yml file with certain parameter settings. Then, use the ansible-playbook command to configure the system.
Prerequisites
- You have system administrator access.
Procedure
- Make a backup of the system if you would like to preserve the original configuration of the server.
-
Configure your name resolution and
/etc/hostssettings according to your desired configuration. The RHEL System Roles for SAP can also be used to maintain your/etc/hostsfile (using the parameterssap_domainandsap_general_preconfigure_modify_etc_hosts) but for simplicity, we assume that your name resolution and the content of/etc/hostsare configured already. - Ensure that your release lock is set according to your needs and that you have enabled the desired repositories. The RHEL System Roles for SAP can also be used to set the release lock and enable the repos but for simplicity, we assume that these configuration settings are already done.
Create a file named
sap-vars.ymlwith the content in the code block below. It updates your system to the latest patch level. If this is not desired, setsap_general_preconfigure_updateandsap_hana_preconfigure_updatetofalse, comment out these lines by prepending them with#, or remove these two lines:--- sap_general_preconfigure_update: true sap_general_preconfigure_fail_if_reboot_required: false sap_netweaver_preconfigure_fail_if_reboot_required: false sap_hana_preconfigure_update: true sap_hana_preconfigure_fail_if_reboot_required: falseRun the following command:
# ansible-playbook redhat.sap_install.sap_hana_preconfigure_exec.yml -e @sap-vars.ymlThis configures this system according to the applicable SAP notes for SAP HANA on RHEL 10.
After the ansible-playbook command has finished, reboot the system:
# reboot
4.3. Configuring the system for SAP ABAP Platform with RHEL System Roles for SAP Copy linkLink copied to clipboard!
For configuring the system for SAP ABAP Platform, you must create a second yml file in addition to the file sap-vars.yml mentioned above and then, use the ansible-playbook command again to configure the system.
Prerequisites
- You have system administrator access.
Procedure
- Make a backup of the system if you would like to preserve the original configuration of the server.
-
Configure your name resolution and
/etc/hostssettings according to your desired configuration. The RHEL System Roles for SAP can also be used to maintain your/etc/hostsfile (using the parameterssap_domainandsap_general_preconfigure_modify_etc_hosts) but for simplicity, we assume that your name resolution and the content of/etc/hostsare configured already. - Ensure that your release lock is set according to your needs and that you have enabled the desired repositories. The RHEL System Roles for SAP can also be used to set the release lock and enable the repos but for simplicity, we assume that these configuration settings are already done.
-
Create a file named
sap-vars.ymlwith the content shown in the previous section. It updates your system to the latest patch level. If this is not desired, setsap_general_preconfigure_updateandsap_hana_preconfigure_updatetofalse, comment out these lines by prepending them with#, or remove these two lines: Create a file named
sap-abap.ymlwith the following content:--- - hosts: localhost collections: - redhat.sap_install become: true roles: - sap_general_preconfigure - sap_netweaver_preconfigureRun the following command:
# ansible-playbook sap-abap.yml -e @sap-vars.ymlThis configures this system according to the applicable SAP notes for SAP HANA on RHEL 10.
After the ansible-playbook command has finished, reboot the system:
# reboot
4.4. Configuring the system for SAP HANA and SAP ABAP Platform on the same host with RHEL System Roles for SAP Copy linkLink copied to clipboard!
For configuring the system for SAP HANA and ABAP Platform, the steps are nearly identical to the steps described in the previous chapter.
Prerequisites
- You have system administrator access.
Procedure
- Make a backup of the system if you would like to preserve the original configuration of the server.
-
Configure your name resolution and
/etc/hostssettings according to your desired configuration. The RHEL System Roles for SAP can also be used to maintain your/etc/hostsfile (using the parameterssap_domainandsap_general_preconfigure_modify_etc_hosts) but for simplicity, we assume that your name resolution and the content of/etc/hostsare configured already. - Ensure that your release lock is set according to your needs and that you have enabled the desired repositories. The RHEL System Roles for SAP can also be used to set the release lock and enable the repos but for simplicity, we assume that these configuration settings are already done.
-
Create a file named
sap-vars.ymlwith the content shown in the previous section. It updates your system to the latest patch level. If this is not desired, setsap_general_preconfigure_updateandsap_hana_preconfigure_updatetofalse, comment out these lines by prepending them with#, or remove these two lines: Create a file named
sap-hana_abap.ymlwith the following content:--- - hosts: localhost collections: - redhat.sap_install become: true roles: - sap_general_preconfigure - sap_netweaver_preconfigure - sap_hana_preconfigureRun the following command:
# ansible-playbook sap-hana_abap.yml -e @sap-vars.ymlThis configures this system according to the applicable SAP notes for SAP HANA on RHEL 10. Run the role
sap_hana_preconfigureafter the rolesap_netweaver_preconfigureto ensure the configuration of certain specific settings for SAP HANA (e.g.kernel tunables).After the ansible-playbook command has finished, reboot the system:
# reboot