Get SAP installation media

After you've created infrastructure for your new SAP system using Azure Center for SAP solutions, you need to install the SAP software on your SAP system. However, before you can do this installation, you need to get and upload the SAP installation media for use with Azure Center for SAP solutions.

In this how-to guide, you'll learn how to get the SAP software installation media through different methods. You'll also learn how to upload the SAP media to an Azure Storage account to prepare for installation.

Prerequisites

  • An Azure subscription.
  • An Azure account with Contributor role access to the subscriptions and resource groups in which the Virtual Instance for SAP solutions exists.
  • A User-assigned managed identity with Storage Blob Data Reader or Reader and Data Access roles on the storage account which has the SAP software.
  • A network set up for your infrastructure deployment.
  • A deployment of S/4HANA infrastructure.
  • The SSH private key for the virtual machines in the SAP system. You generated this key during the infrastructure deployment.
  • If you're installing a Highly Available (HA) SAP system, get the Service Principal identifier (SPN ID) and password to authorize the Azure fence agent (fencing device) against Azure resources.
    • For more information, see Use Azure CLI to create a Microsoft Entra app and configure it to access Media Services API.
    • For an example, see the Red Hat documentation for Creating a Microsoft Entra Application.
    • To avoid frequent password expiry, use the Azure Command-Line Interface (Azure CLI) to create the Service Principal identifier and password instead of the Azure portal.

Required components

The following components are necessary for the SAP installation.

  • SAP software installation media (part of the sapbits container described later in this article)
    • All essential SAP packages (SWPM, SAPCAR, etc.)
    • SAP software (for example, S/4HANA 2021 ISS 00)
  • Supporting software packages for the installation process. (These packages are downloaded automatically and used by Azure Center for SAP solutions during the installation.)
    • pip3 version pip-21.3.1.tar.gz
    • wheel version 0.38.1
    • jq version 1.6
    • ansible version 2.11.12
    • netaddr version 0.8.0
  • The SAP Bill of Materials (BOM), as generated by Azure Center for SAP solutions. These YAML files list all required SAP packages for the SAP software installation. There's a main BOM (S41909SPS03_v0011ms.yaml, S42020SPS03_v0003ms.yaml, S4HANA_2021_ISS_v0001ms.yaml, S42022SPS00_v0001ms.yaml) and dependent BOMs (HANA_2_00_059_v0004ms.yaml, HANA_2_00_067_v0005ms.yaml, SUM20SP18_latest.yaml, SWPM20SP16_latest.yaml). They provide the following information:
    • The full name of the SAP package (name)
    • The package name with its file extension as downloaded (archive)
    • The checksum of the package as specified by SAP (checksum)
    • The shortened filename of the package (filename)
    • The SAP URL to download the software (url)
  • Template or INI files, which are stack XML files required to run the SAP packages.

Scripted upload method

To prepare for SAP installation, you can upload the SAP components to your Azure Storage account using script.

Set up storage account

Before downloading the SAP software, set up an Azure Storage account to store the components.

  1. Create an Azure Storage account through the Azure portal. Make sure to create the storage account in the same subscription as your SAP system infrastructure.

  2. Create a container within the Azure Storage account named sapbits.

    1. On the storage account's sidebar menu, select Containers under Data storage.

    2. Select + Container.

    3. On the New container pane, for Name, enter sapbits.

    4. Select Create.

  3. Grant the User-assigned managed identity, which was used during infrastructure deployment, Storage Blob Data Reader and Reader and Data Access role access on this storage account.

Create virtual machine

Next, set up a virtual machine (VM) where you will download the SAP components later.

  1. Create an Ubuntu 20.04 VM in Azure. For more information, see how to create a Linux VM in the Azure portal.

  2. Sign in to the VM.

  3. Install the Azure CLI on the VM.

    curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
    
  4. If the Azure CLI version is not version 2.30.0 or higher, Update the Azure CLI. You can run below command to check the version

    az --version
    
  5. Sign in to Azure.

    az login
    
  6. Install PIP3

    sudo apt install python3-pip
    
  7. Install Ansible 2.11.12 on the VM.

    sudo pip3 install ansible-core==2.11.12
    
  8. Install Ansible galaxy collection modules

    sudo ansible-galaxy collection install ansible.netcommon:==5.0.0 -p /opt/ansible/collections
    sudo ansible-galaxy collection install ansible.posix:==1.5.1 -p /opt/ansible/collections
    sudo ansible-galaxy collection install ansible.utils:==2.9.0 -p /opt/ansible/collections
    sudo ansible-galaxy collection install ansible.windows:==1.13.0 -p /opt/ansible/collections
    sudo ansible-galaxy collection install community.general:==6.4.0 -p /opt/ansible/collections
    
  9. Clone the SAP automation samples repository from GitHub.

    git clone https://github.com/Azure/SAP-automation-samples.git
    
  10. Clone the SAP automation repository from GitHub.

    git clone https://github.com/Azure/sap-automation.git
    
  11. Switch to sap-automation directory

    cd sap-automation/
    
  12. Change the branch to main.

    git checkout main
    
  13. Optionally, check that your current branch is main.

    git status
    

Download SAP media with script

Next, download the SAP installation media to the VM using a script.

  1. Run the Ansible script playbook_bom_download with your own information. With the exception of the s_password variable, enter the actual values within double quotes but without the triangular brackets. For the s_password variable, use single quotes. The Ansible command that you run should look like:

    export bom_base_name="<Enter bom base name>"
    export s_user="<s-user>"
    export s_password='<password>'
    export storage_account_access_key="<storageAccountAccessKey>"
    export sapbits_location_base_path="<containerBasePath>"
    export BOM_directory="<BOM_directory_path>"
    export orchestration_ansible_user="root"
    export playbook_path="<playbook_bom_downloader_yaml_path>"
    sudo ansible-playbook ${playbook_path} \
    -e "bom_base_name=${bom_base_name}" \
    -e "deployer_kv_name=dummy_value" \
    -e "s_user=${s_user}" \
    -e "s_password=${s_password}" \
    -e "sapbits_access_key=${storage_account_access_key}" \
    -e "sapbits_location_base_path=${sapbits_location_base_path}" \
    -e "BOM_directory=${BOM_directory}" \
    -e "orchestration_ansible_user=${orchestration_ansible_user}"
    
  2. If prompted that if you have a storage account, enter Y.

  3. Where playbook_bom_downloader_yaml_path is the absolute path to sap-automation/deploy/ansible/playbook_bom_downloader.yaml. e.g. /home/loggedinusername/sap-automation/deploy/ansible/playbook_bom_downloader.yaml

  4. For <bom_base_name>, use the SAP Version you want to install i.e. S41909SPS03_v0011ms or S42020SPS03_v0003ms or S4HANA_2021_ISS_v0001ms or S42022SPS00_v0001ms

  5. For <s_user>, use your SAP username.

  6. For <s_password>, use your SAP password.

  7. For <storageAccountAccessKey>, use your storage account's access key. To find the storage account's key:

    1. Find the storage account in the Azure portal that you created.

    2. On the storage account's sidebar menu, select Access keys under Security + networking.

    3. For key1, select Show key.

    4. Copy the Key value.

  8. For <containerBasePath>, use the path to your sapbits container. To find the container path:

    1. Find the storage account that you created in the Azure portal.

    2. Find the container named sapbits.

    3. On the container's sidebar menu, select Properties under Settings.

    4. Copy down the URL value. The format is https://<your-storage-account>.blob.core.windows.net/sapbits. The format is https://<your-storage-account>.blob.core.windows.net/sapbits.

  9. Where BOM_directory_path is the absolute path to SAP-automation-samples/SAP. e.g. /home/loggedinusername/SAP-automation-samples/SAP

  10. Where orchestration_ansible_user is the user with admin privileges, e.g. root.

Now you can install the SAP software through Azure Center for SAP solutions.

Manual upload method

To prepare for SAP installation, you can upload the SAP components to your Azure Storage account manually.

Set up storage account manually

First, set up an Azure Storage account for the SAP components:

Note

Don't change the folder name structure for any steps in this process. Otherwise, the installation process fails.

  1. Create a new Azure Storage account for storing the software components.

  2. Grant the roles Storage Blob Data Reader and Reader and Data Access to the user-assigned managed identity, which you used during infrastructure deployment.

  3. Create a container within the storage account. You can choose any container name, such as sapbits.

  4. Create a folder within the container, named sapfiles.

  5. Go to the sapfiles folder.

  6. Create two subfolders named archives and boms.

  7. In the boms folder, create four subfolders with the following names, depending on the SAP version that you're using:

    1. For S/4HANA 1909 SPS 03:

      1. HANA_2_00_059_v0003ms

      2. S41909SPS03_v0011ms

      3. SWPM20SP12_latest

      4. SUM20SP14_latest

    2. For S/4HANA 2020 SPS 03:

      1. HANA_2_00_064_v0001ms

      2. S42020SPS03_v0003ms

      3. SWPM20SP12_latest

      4. SUM20SP14_latest

    3. For S/4HANA 2021 ISS 00:

      1. HANA_2_00_067_v0005ms

      2. S4HANA_2021_ISS_v0001ms

      3. SWPM20SP16_latest

      4. SUM20SP18_latest

    4. For S/4HANA 2022 ISS 00:

      1. HANA_2_00_071_v0001ms

      2. S42022SPS00_v0001ms

      3. SWPM20SP15_latest

      4. SUM20SP17_latest

Upload SAP media

Next, upload the SAP software files to the storage account:

  1. Upload the following YAML files to the folders with the same name. Make sure to use the files that correspond to the SAP version that you're using.

    1. For S/4HANA 1909 SPS 03:

      1. S41909SPS03_v0011ms.yaml

      2. HANA_2_00_059_v0004ms.yaml

    2. For S/4HANA 2020 SPS 03:

      1. S42020SPS03_v0003ms.yaml

      2. HANA_2_00_064_v0001ms.yaml

  2. Depending on your SAP version, go to the folder S41909SPS03_v0011ms or S42020SPS03_v0003ms or S4HANA_2021_ISS_v0001ms or S42022SPS00_v0001ms.

  3. Create a subfolder named templates.

  4. Download the following files, depending on your SAP version.

    1. For S/4HANA 1909 SPS 03:

      1. HANA_2_00_055_v1_install.rsp.j2

      2. S41909SPS03_v0011ms-app-inifile-param.j2

      3. S41909SPS03_v0011ms-dbload-inifile-param.j2

      4. S41909SPS03_v0011ms-ers-inifile-param.j2

      5. S41909SPS03_v0011ms-generic-inifile-param.j2

      6. S41909SPS03_v0011ms-pas-inifile-param.j2

      7. S41909SPS03_v0011ms-scs-inifile-param.j2

      8. S41909SPS03_v0011ms-scsha-inifile-param.j2

      9. S41909SPS03_v0011ms-web-inifile-param.j2

    2. For S/4HANA 2020 SPS 03:

      1. HANA_2_00_055_v1_install.rsp.j2

      2. HANA_2_00_install.rsp.j2

      3. S42020SPS03_v0003ms-app-inifile-param.j2

      4. S42020SPS03_v0003ms-dbload-inifile-param.j2

      5. S42020SPS03_v0003ms-ers-inifile-param.j2

      6. S42020SPS03_v0003ms-generic-inifile-param.j2

      7. S42020SPS03_v0003ms-pas-inifile-param.j2

      8. S42020SPS03_v0003ms-scs-inifile-param.j2

      9. S42020SPS03_v0003ms-scsha-inifile-param.j2

  5. Upload all the files that you downloaded to the templates folder.

  6. Go back to the sapfiles folder, then go to the archives subfolder.

  7. Download all packages that aren't labeled as download: false from the main BOM URL. Choose the packages based on your SAP version. You can use the URL mentioned in the BOM to download each package. Make sure to download the exact package versions listed in each BOM.

    1. For S/4HANA 1909 SPS 03:

      1. HANA_2_00_059_v0004ms.yaml
    2. For S/4HANA 2020 SPS 03:

      1. HANA_2_00_064_v0001ms.yaml
  8. Repeat the previous step for the main and dependent BOM files.

  9. Upload all the packages that you downloaded to the archives folder. Don't rename the files.

  10. Optionally, install other packages that aren't required.

    1. Download the package files.

    2. Upload the files to the archives folder.

    3. Open the S41909SPS03_v0011ms or S42020SPS03_v0003ms or S4HANA_2021_ISS_v0001ms or S42022SPS00_v0001ms YAML file for the BOM.

    4. Edit the information for each optional package to download:true.

    5. Save and reupload the YAML file. Make sure you only have one YAML file in the subfolder (S41909SPS03_v0011ms or S42020SPS03_v0003ms or S4HANA_2021_ISS_v0001ms or S42022SPS00_v0001ms) of the boms folder.

Now you can install the SAP software through Azure Center for SAP solutions.

Next steps