Introducing Roles for SAP S/4 Deployments
Overview of Installation of S/4 HANA
SAP Applications will be installed with the SAP Software Provisioning Manager (SAP SWPM). The sap_swpm
role creates a configuration file for the SAP SWPM software for unattended installation. The role can install everything that SAP SWPM (or the sapinst
command) can install. It is tested and working for the following scenarios:
- One host installation
- Dual host installation
- Distributed installation
- System restore
- High availability installation
The role is tested and working for the following SAP products:
- SAP S/4HANA 1909, 2020, 2021
- SAP B/4HANA
- SAP Solution Manager 7.2
- SAP NetWeaver Business Suite Applications (ECC, GRC, and so on)
- SAP Web Dispatcher
The role is currently available only in the upstream repository, in the community.sap_install collection
.
To download the installation bundle, which is needed for your installation, you could use the SAP Maintenance Planner, .
The SAP Maintenance Planner helps you to create a list of all installation files for your chosen SAP software. Then, you must download this list of files from the SAP Software Download Center, and place it in a directory. The sap_swpm
role can then install the software in that directory.
Parameters of the sap_swpm
Role
This course focuses on the needed parameters for SAP S/4 HANA. The following table defines the variables for the default installation method of SAP HANA, which is tested and works for S/4HANA 2020 and S/4HANA 2021.
Parameters for Software Installation
Parameter | Description |
---|---|
sap_swpm_product_catalog_id | The mandatory parameter that defines which software SWPM installs. Examples are as follows: Single host installation of S4HANA 2021 Foundation: NW_ABAP_OneHost:S4HANA2021.FNDN.HDB.ABAP Single host installation of S4HANA 2021 full ERP system: NW_ABAP_OneHost:S4HANA2021.CORE.HDB.ABAP |
sap_swpm_update_etchosts | Whether to update the /etc/hosts file (default: true) |
sap_swpm_software_path | Path to the downloaded software bundle (currently must be writable, because the bundle files are unpacked here) |
sap_swpm_sapcar_path | Path to the directory that contains the sapcar utility (looks for the SAPCAR*.EXE pattern) |
sap_swpm_swpm_path | Path to the directory that contains SWPM*.SAR |
Passwords
Parameter | Description |
---|---|
sap_swpm_master_password | Master password: Must contain uppercase, lowercase, numbers, and special characters (must not contain ! ) |
sap_swpm_ddic_000_password | DDIC password: Must contain uppercase, lowercase, numbers, and special characters (must not contain ! ) |
sap_swpm_db_system_password | SAP HANA System password |
sap_swpm_db_systemdb_password | SAP HANA System Database password |
sap_swpm_db_schema_abap_password | SAP HANA System Database ABAP Schema password |
sap_swpm_db_sidadm_password | SAP HANA sidadm password |
NetWeaver Instance Parameters
Parameter | Description |
---|---|
sap_swpm_sid | SID of the NetWeaver instance (such as RHE) |
sap_swpm_pas_instance_nr | Instance number of the primary application server (such as 01 ) |
sap_swpm_ascs_instance_nr | Instance number of the central services (such as 02 ) |
sap_swpm_ascs_instance_hostname | Hostname where the ASCS runs (set to on single-node installations) |
sap_swpm_fqdn | Domain name of the SAP installation, such as . Note that SAP uses the fqdn abbreviation for the domain name only. |
HANA Database Instance Parameters
If your HANA instance is running on a different system, you must define the connection parameters to your HANA system:
Parameter | Description |
---|---|
sap_swpm_db_host | Short hostname of your HANA instance. It must be defined in the /etc/hosts file, or be properly resolved by DNS. |
sap_swpm_db_sid | SAP HANA SID (such as "RHE") |
sap_swpm_db_instance_nr | SAP HANA instance number (such as "00") |
Advanced Installation Methods
If you need special parameters, or you want to replicate an existing running system, you can also pass the configuration files that were created during a previous manual installation, or you can create your own configuration file.
You must set the following parameters:
Parameter | Description |
---|---|
sap_swpm_ansible_role_mode | Installation mode of this role. Possible values are default, default_templates, advanced, advanced_templates, inifile_reuse |
sap_swpm_inifile_custom_values_dictionary | When setting sap_swpm_ansible_role_mode to advanced, this variable must contain the configuration file and the product ID in the third line as the last value. See the following example. |
Example for SAP HANA 1909 Single-Node Installation (Requires Advanced Mode)
# sap_swpm
#----------
sap_swpm_ansible_role_mode: advanced
sap_swpm_sapcar_path: "/software/SAPCAR"
sap_swpm_software_path: "/software/S4HANA_installation"
sap_swpm_swpm_path: "/software/S4HANA_installation"
# Do not touch /etc/hosts
sap_swpm_update_etchosts: false
sap_swpm_master_password: "R3dh4t$123"
sap_swpm_inifile_custom_values_dictionary:
'# Custom Config file created for SAP Workshop': ''
'# Product catalog ID': ''
'# NW_ABAP_OneHost:S4HANA1909.CORE.HDB.ABAP': ''
HDB_Schema_Check_Dialogs.schemaPassword: ""
HDB_Schema_Check_Dialogs.validateSchemaName: "false"
NW_CI_Instance.ascsInstanceNumber: ""
NW_CI_Instance.ascsVirtualHostname : ""
NW_CI_Instance.ciInstanceNumber : ""
NW_CI_Instance.ciVirtualHostname : ""
NW_CI_Instance.scsVirtualHostname : ""
NW_DDIC_Password.ddic000Password : ""
NW_Delete_Sapinst_Users.removeUsers : "true"
NW_GetMasterPassword.masterPwd : ""
NW_GetSidNoProfiles.sid : RHE
NW_HDB_DB.abapSchemaName : ""
NW_HDB_DB.abapSchemaPassword : ""
NW_HDB_DB.javaSchemaName : ""
NW_HDB_DB.javaSchemaPassword : ""
NW_HDB_getDBInfo.dbhost : "hana-1.example.com"
NW_HDB_getDBInfo.dbsid : RHE
NW_HDB_getDBInfo.instanceNumber : '00'
NW_HDB_getDBInfo.systemDbPassword : ""
NW_HDB_getDBInfo.systemPassword : ""
NW_HDB_getDBInfo.systemid : RHE
NW_Recovery_Install_HDB.extractLocation : /usr/sap/RHE/HDB00/backup/data/DB_RHE
NW_Recovery_Install_HDB.extractParallelJobs : '30'
NW_Recovery_Install_HDB.sidAdmName : rheadm
NW_Recovery_Install_HDB.sidAdmPassword : ""
NW_SAPCrypto.SAPCryptoFile : ''
NW_getFQDN.FQDN : ''
NW_getFQDN.setFQDN : "true"
NW_getLoadType.loadType : SAP
archives.downloadBasket : ''
hdb.create.dbacockpit.user : "true"
hostAgent.sapAdmPassword : ""
nwUsers.sidadmPassword : ""
With the advanced method, you do not have to define any of the HDB or NetWeaver instance variables. You manually define the complete configuration file. With this method, do not change the first three lines. Adapt only the Product ID. This ID is also obtained from the configuration file.
Distributed Installation of SAP Netweaver
This section describes the SAP S/4HANA High-Availability Architecture. A typical setup for a High-Available SAP S/4HANA system will consist of 3 major components:
- SAP ASCS and ERS application instances and cluster resources.
- SAP application servers - Primary Application Server (PAS) and Additional Application Servers (AAS)
- SAP HANA Database
The process for configuring the S/4HANA high availability can be divided into three phases:
- Phase #1: Preparing SAP S/4HANA application for clustering
- Phase #2: Installing all instances of High Available SAP S/4HANA application on cluster
- Phase #3: Configuring SAP Clustering via Pacemaker (RHEL) for fail overs
The services that need to be clustered are ASCS and ERS. The concept of high availability in S/4HANA or any new SAP Product is based on Standalone Enqueue Server 2 (ENSA2). It is to be noted starting with ABAP Platform 1809, ENSA2 is installed by default and from ABAP Platform 2020 onwards, Standalone Enqueue Server 2 (and Enqueue Replicator 2 for high-availability scenarios) is the only available option.
To understand all necessary details regarding the concept, implementation considerations, configuration, administration and monitoring of ENSA2, it is highly recommended to check SAP’s standard documentation Standalone Enqueue Server 2.
The S/4 HANA services need some shared directories and some instance specific directories in which the software is installed. For clustering it is important to understand that the directories should be based only on SAN LUN or NFS or else moving resource from one cluster to another will require a lot of manual tasks and workaround. An opinion from your System Admin or Linux Administrator will also help understanding if you need SAN LUN or NFS.
The following directories have to be present on all Application Server nodes
/usr/sap/
SID/SYS
/usr/sap/trans
- `/sapmnt
The following directories have to be present on the node that runs the particular service:
- ASCS:
/usr/sap/
SID/ASCS
## - ERS:
/usr/sap/
SID/ERS
## - PAS/AAS D_##:
/usr/sap/SID/D
##_
When installing SAP S/4 HANA or any other Netweaver based component in a distributed way or for a cluster you have to define virtual IP adresses for the following services
- ASCS (s4ascs)
- ERS (s4ers)
ASCS and ERS should not be installed on the same host. The virtual IP adresses and the instance specific directories of ASCS and ERS will be managed as a cluster resource later on
After this prework you can start installing the SAP S/4 HANA software:
- Install ASCS on nodea : ‘./sapinst SAPINST_USE_HOSTNAME=s4ascs’
- select SAP S/4HANA Server Foundation … ASCS Instance
- select SID & Instancenumber eg.SID S4D, Instance 01
- s4ascs is the hostname whch resolves to the virtual IP
- Install ERS on nodeb: ‘./sapinst SAPINST_USE_HOSTNAME=s4ers’
- select SAP S/4HANA Server Foundation …ERS Instance
- select SID & Instancenumber eg.SID S4D, Instance 02
- s4ers is the hostname whch resolves to the virtual IP
- Install Hana Client using
./sapinst SAPINST_USE_HOSTNAME=hana
(vip from previous inst)- select SAP S/4HANA Server Foundation …Database Instance
- Install PAS Server on nodea:
./sapinst
- SAP S/4HANA Server Foundation …Primary Applcation Server Instance
- Install AAS Server on nodeb and other nodes
- SAP S/4HANA Server Foundation Additional Applcation Server Instance
Additional Information
Upstream sap_swpm Role Description