Prepare SAP BOM
The SAP on Azure Deployment Automation Framework uses a Bill of Materials (BOM). The BOM helps configure your SAP systems.
The automation framework's GitHub repository contains a set of Sample BOMs that you can use to get started. It is also possible to create BOMs for other SAP Applications and databases.
If you want to generate a BOM that includes permalinks, follow the steps for creating this type of BOM.
Note
This guide covers advanced deployment topics. For a basic explanation of how to deploy the automation framework, see the get started guide instead.
Prerequisites
- Get, download, and prepare your SAP installation media and related files if you haven't already done so.
- SAP Application (DB) or HANA media in your Azure storage account.
- A YAML editor for working with the BOM file.
- Application installation templates for:
- SAP Central Services (SCS)
- The SAP Primary Application Server (PAS)
- The SAP Additional Application Server (AAS)
- Downloads of necessary stack files to the folder you created for acquiring SAP media. For more information, see the basic BOM preparation how-to guide.
- A copy of your SAP Download Basket manifest (
DownloadBasket.json
), downloaded to the folder you created for acquiring SAP media.- An installation of the Postman utility.
- An Azure subscription. If you don't already have an Azure subscription, create a free account.
- An SAP account with permissions to work with the database you want to use.
- A system that runs Linux-type commands for validating the BOM. Install the commands
yamllint
andansible-lint
on the system.
Scripted creation process
This process automates the same steps as the manual BOM creation process. Review the script limitations before using this process.
Navigate to your stack files folder.
cd stackfiles
Run the BOM generation script. Replace the example path with the correct path to your utilities folder. For example:
cd ~/Azure_SAP_Automated_Deployment/deploy/scripts/generate_bom.sh >../bom.yml
For the product parameter (
product
), enter the SAP product name. For example,SAP_S4HANA_1809_SP4
. If you don't enter a value, the script attempts to determine the name from the stack XML file.Open the generated
bom.yml
file for review.Review the templates section (
templates
). Make sure thefile
andoverride_target_location
values are correct. If necessary, edit and comment out those lines. For example:templates: # - name: "S4HANA_2020_ISS_v001 ini file" # file: S4HANA_2020_ISS_v001.inifile.params # override_target_location: "{{ target_media_location }}/config"
Review the stack files section (
stackfiles
). Make sure the item names and files are correct. If necessary, edit those lines.
Script limitations
The scripted BOM creation process has the following limitations.
The scripting has a hard-coded dependency on HANA2. Edit your BOM file manually to match the required dependency name. For example:
dependencies:
- name: "HANA2"
There are no defaults for the media parameters override_target_filename:
, override_target_location
, and version:
. Edit your BOM file manually to change these parameters. For example:
- name: SAPCAR
archive: SAPCAR_1320-80000935.EXE
override_target_filename: SAPCAR.EXE
- name: "SWPM20SP07"
archive: "SWPM20SP07_2-80003424.SAR"
override_target_filename: SWPM.SAR
sapurl: "https://softwaredownloads.sap.com/file/0020000001812632020"
The script only generates entries for media files that the SAP Maintenance Planner identifies. This limitation occurs because it processes the stack .xsl
file. If you add any files to your download basket separately, such as through SAP Launchpad, you must add those files to the BOM manually.
Manual creation process
You can create your BOM through the following manual process. Another option is to use the scripted creation process to do the same steps.
Open the downloads folder you created for acquiring SAP media
Create an empty YAML file named
bom.yml
.Open
bom.yml
in an editor.Add a BOM header with names for the build and target. The
name
value must be the same as the BOM folder name in your storage account. For example:name: 'S4HANA_2020_ISS_v001' target: 'ABAP PLATFORM 2020'
Add a defaults section with the target location. Use the path to the folder on the target server where you want to copy installation files. Typically, use
{{ target_media_location }}
as follows:defaults: target_location: "{{ target_media_location }}/download_basket"
Add a product identifiers section. You populate these values later as part of the template preparation. For example:
product_ids: scs: db: pas: aas: web:
Add a materials section to specify the list of required materials. Add any dependencies on other BOMs in this section. For example:
materials: dependencies: - name: HANA2
Get a list of media to include in your BOM.
Open your download basket spreadsheet. This file renders as XML.
Format the XML content to be human readable, if necessary.
For each item in the download basket, note the
String
andNumber
data. TheString
data provides the file name (for example,igshelper_17-10010245.sar
) and a friendly description (for example,SAP IGS Fonts and Textures
). You'll record theNumber
data after each entry in your BOM.
Add the list of media to
bom.yml
. The order of these items doesn't matter, however, you might want to group related items together for readability. AddSAPCAR
separately, even though your SAP download basket contains this utility. For example:media: - name: SAPCAR archive: SAPCAR_1320-80000935.EXE name: "SAP IGS Fonts and Textures" archive: "igshelper_17-10010245.sar" # 61489 <...>
Optionally, if you need to override the target media location, add the parameter
override_target_location
to a media item. For example,override_target_location: "{{ target_media_location }}/config"
.Add a blank templates section.
templates:
Create a stack files section. For example:
stackfiles: - name: Download Basket JSON Manifest file: downloadbasket.json - name: Download Basket Spreadsheet file: MP_Excel_2001017452_20201030_SWC.xls
Save your changes to
bom.yml
.
Permalinks
You can automatically generate a basic BOM that functions. However, the BOM doesn't create permanent URLs (permalinks) to the SAP media by default. If you want to create permalinks, you need to do more steps before you acquire the SAP media.
Note
Manual generation of a full SAP BOM with permalinks takes about twice as long as preparing a basic BOM manually.
To generate a BOM with permalinks:
Open
DownloadBasket.json
in your editor.For each result, note the contents of the
Value
line. For example:"Value": "0020000000703122018|SP_B|SAP IGS Fonts and Textures|61489|1|20201023150931|0"
Copy down the first and fourth values separated by vertical bars.
The first value is the file number. For example,
0020000000703122018
.The fourth value is the number you'll use to match with your media list. For example,
61489
.Optionally, copy down the second value, which denotes the file type. For example,
SP_B
for kernel binary files,SPAT
for non-kernel binary files, andCD
for database exports.
Use the fourth value as a key to match your download basket to your media list. Match the values (for example,
61489
) with the values you added as comments for the media items (for example,# 61489
).For each matching entry in
bom.yml
, add a new value for the SAP URL. For the URL, usehttps://softwaredownloads.sap.com/file/
plus the third value for that item (for example,0020000000703122018
). For example:- name: "SAP IGS Fonts and Textures" archive: "igshelper_17-10010245.sar" sapurl: "https://softwaredownloads.sap.com/file/0020000000703122018"
Example BOM file
The following sample is a small part of an example BOM file for S/4HANA 1909 SP2.
step|BOM Content
---
name: 'S4HANA_2020_ISS_v001'
target: 'ABAP PLATFORM 2020'
defaults:
target_location: "{{ target_media_location }}/download_basket"
product_ids:
scs:
db:
pas:
aas:
web:
materials:
dependencies:
- name: HANA2
media:
- name: SAPCAR
archive: SAPCAR_1320-80000935.EXE
- name: SWPM
archive: SWPM20SP06_6-80003424.SAR
- name: SAP IGS HELPER
archive: igshelper_17-10010245.sar
- name: SAP HR 6.08
archive: SAP_HR608.SAR
- name: S4COREOP 104
archive: S4COREOP104.SAR
templates:
- name: "S4HANA_2020_ISS_v001 ini file"
file: S4HANA_2020_ISS_v001.inifile.params
override_target_location: "{{ target_media_location }}/config"
stackfiles:
- name: Download Basket JSON Manifest
file: downloadbasket.json
override_target_location: "{{ target_media_location }}/config"
- name: Download Basket Spreadsheet
file: MP_Excel_2001017452_20201030_SWC.xls
override_target_location: "{{ target_media_location }}/config"
- name: Download Basket Plan doc
file: MP_Plan_2001017452_20201030_.pdf
override_target_location: "{{ target_media_location }}/config"
- name: Download Basket Stack text
file: MP_Stack_2001017452_20201030_.txt
override_target_location: "{{ target_media_location }}/config"
- name: Download Basket Stack XML
file: MP_Stack_2001017452_20201030_.xml
override_target_location: "{{ target_media_location }}/config"
- name: Download Basket permalinks
file: myDownloadBasketFiles.txt
override_target_location: "{{ target_media_location }}/config"
Validate BOM
You can validate your BOM structure from any OS that runs Linux-type commands. For Windows, use Windows Subsystem for Linux (WSL). Another option is to run the validation from your deployer if there's a copy of the BOM file there.
Run the validation script
check_bom.sh
from the directory containing your BOM. For example:cd ~/Azure_SAP_Automated_Deployment/deploy/scripts/check_bom.sh bom.yml
Review the output.
Successful validation
A successful validation shows the following output. You already installed yamllint
and ansible-lint
commands in the prerequisites.
... yamllint [ok]
... ansible-lint [ok]
... bom structure [ok]
Unsuccessful validation
An unsuccessful validation contains error information. For example:
../documentation/ansible/system-design-deployment/examples/S4HANA_2020_ISS_v001/bom_with_errors.yml
178:16 error too many spaces after colon (colons)
179:16 error too many spaces after colon (colons)
180:16 error too many spaces after colon (colons)
... yamllint [errors]
... ansible-lint [ok]
- Expected to find key 'defaults' in 'bom' (Check name: S4HANA_2020_ISS_v001)
- Unexpected key 'default in 'bom' (Check name: S4HANA_2020_ISS_v001)
- Unexpected key 'overide_target_location in 'bom.materials.stackfiles' (Check name: Download Basket Stack text)
... bom structure [errors]
Upload your BOM
To use the BOM with permalinks:
Sign in to the Azure portal.
Under Azure services, select Resource groups. Or, enter
resource groups
in the search bar.Select the resource group for your SAP Library.
On the resource group page, select the storage account
saplib
in the Resources table.On the storage account page's menu, select Containers under Data storage.
Select the
sap bits
container.On the container page, upload your archives and tools.
Select the Upload button.
Select Select a file.
Navigate to the download directory that you created previously.
Next steps
Feedback
Submit and view feedback for