Exercise - Install the SAP software
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
versionpip-21.3.1.tar.gz
wheel
version 0.38.1jq
version 1.6ansible
version 2.11.12netaddr
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
)
- The full name of the SAP package (
- 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.
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.
Create a container within the Azure Storage account named
sapbits
.On the storage account's sidebar menu, select Containers under Data storage.
Select + Container.
On the New container pane, for Name, enter
sapbits
.Select Create.
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.
Create an Ubuntu 20.04 virtual machine in Azure. For more information, see how to create a Linux virtual machine in the Azure portal.
Sign in to the virtual machine.
Install the Azure CLI on the virtual machine.
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
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
Sign in to Azure.
az login
Install PIP3
sudo apt install python3-pip
Install Ansible 2.11.12 on the virtual machine.
sudo pip3 install ansible-core==2.11.12
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
Clone the SAP automation samples repository from GitHub.
git clone https://github.com/Azure/SAP-automation-samples.git
Clone the SAP automation repository from GitHub.
git clone https://github.com/Azure/sap-automation.git
Switch to sap-automation directory
cd sap-automation/
Change the branch to
main
.git checkout main
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.
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 thes_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}"
If prompted that if you have a storage account, enter
Y
.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.yamlFor
<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_v0001msFor
<s_user>
, use your SAP username.For
<s_password>
, use your SAP password.For
<storageAccountAccessKey>
, use your storage account's access key. To find the storage account's key:Find the storage account in the Azure portal that you created.
On the storage account's sidebar menu, select Access keys under Security + networking.
For key1, select Show key.
Copy the Key value.
For
<containerBasePath>
, use the path to yoursapbits
container. To find the container path:Find the storage account that you created in the Azure portal.
Find the container named
sapbits
.On the container's sidebar menu, select Properties under Settings.
Copy down the URL value. The format is
https://<your-storage-account>.blob.core.windows.net/sapbits
.
Where
BOM_directory_path
is the absolute path to SAP-automation-samples/SAP. e.g. /home/loggedinusername/SAP-automation-samples/SAPWhere
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.
Sign in to the Azure portal.
Search for and select Virtual Instance for SAP solutions.
Select your Virtual Instance for SAP solutions instance.
On the Overview page for the Virtual Instance for SAP solutions resource, select Install SAP software.
In the Prerequisites tab of the wizard, review the prerequisites. Then, select Next.
On the Software tab, provide information about your SAP media:
- For Have you uploaded the software to an Azure storage account?, select Yes.
- 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.
- 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
. - For High Availability (HA) systems only, enter the client identifier for the STONITH Fencing Agent service principal for Fencing client ID.
- For High Availability (HA) systems only, enter the password for the Fencing Agent service principal for Fencing client password.
- Select Next.
On the Review + install tab, review the software settings.
Select Install to proceed with installation.
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.
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.