Exercise - Install the SAP software

Completed

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.

Supplemental options for this lesson include:

  • An Interactive Guide with clickable simulations is available for Task 2: Install the SAP software - (start at 4:29). The clickthrough simulates the ACSS SAP software installation experience in the U.S. version of the Azure portal (currently English only).
  • If SAP software installation is outside of Azure Center for SAP solutions use the article: Install SAP through outside method

Note

An SAP subscription with access to download SAP media is required to complete the SAP software installation.

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_064_v0001ms.yaml, SUM20SP15_latest.yaml, SWPM20SP13_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.

Get SAP installation media - 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 where you'll download the SAP components later.

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

  2. Sign in to the virtual machine.

  3. Install the Azure CLI on the virtual machine.

    curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
    
  4. If the Azure CLI version isn't 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 virtual machine.

    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 virtual machine 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.

  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, like root.

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

Install SAP with Azure Center for SAP solutions

To install the SAP software directly, use the Azure Center for SAP solutions installation wizard.

  1. Sign in to the Azure portal.

  2. Search for and select Virtual Instance for SAP solutions.

  3. Select your Virtual Instance for SAP solutions instance.

  4. On the Overview page for the Virtual Instance for SAP solutions resource, select Install SAP software.

  5. In the Prerequisites tab of the wizard, review the prerequisites. Then, select Next.

  6. On the Software tab, provide information about your SAP media:

    1. For Have you uploaded the software to an Azure storage account?, select Yes.
    2. For Software version, use the SAP S/4HANA 1909 SPS03 or SAP S/4HANA 2020 SPS 03 or SAP S/4HANA 2021 ISS 00 or S/4 HANA 2022 ISS 00 . Note only those versions light up that are supported with the OS version that was used to deploy the infrastructure previously.
    3. For BOM directory location, select Browse and find the path to your BOM file. For example, https://<your-storage-account>.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0010ms.yaml.
    4. For High Availability (HA) systems only, enter the client identifier for the STONITH Fencing Agent service principal for Fencing client ID.
    5. For High Availability (HA) systems only, enter the password for the Fencing Agent service principal for Fencing client password.
    6. Select Next.
  7. On the Review + install tab, review the software settings.

  8. Select Install to proceed with installation.

  9. Wait for the installation to complete. The process takes approximately three hours. You can see the progress, along with estimated times for each step, in the wizard.

  10. After the installation completes, sign in with your SAP system credentials. To find the SAP system and HANA DB credentials for the newly installed system, see Manage a Virtual Instance for SAP solutions.