Create a COS instance with SAP installation files
IBM® Power® Virtual Server for SAP HANA requires a COS storage bucket with the SAP HANA installation files. This tutorial describes how to setup a Cloud Object Storage (COS) instance and place the SAP installation files inside. For more information about Cloud object storage, click here.
When is this required?
The IBM® Power® Virtual Server with VPC landing zone comes with a storage bucket that is meant to be used for the installation files. If you deployed IBM® Power® Virtual Server with VPC landing zone without using a stack solution, check the Prerequisites and skip ahead to Upload SAP installation binaries. If you're using a stack solution, you need to create your own storage bucket to provide the installation files. In that case, follow every step in this tutorial.
Prerequisites
SAP Installation Binaries
You need to obtain the HANA and Netweaver installation binaries from SAP. The required installation files depend on the version you're trying to install. To identify which files you need, check out the PowerVS SAP repo and the sap_hana_install community role.
IBMCloud CLI Installation and Setup (optional)
If you'd like to use the IBM Cloud CLI instead of the IBM Cloud console in your browser, you need to install and setup the IBM Cloud CLI and the object storage plugin. For installation instructions for your operating system, please refer to the IBMCloud CLI documentation.
Once you finished installing IBMCloud CLI, install the cloud-object-storage plugin:
ibmcloud plugin install cloud-object-storage
Generate an API key to login with the CLI:
- Login to the IBM Cloud console
- Go to Manage > Access IAM
- On the left, click API keys
- Click Create and follow the instructions. Make sure you store your key somewhere safe.
Login via the IBMCloud CLI:
ibmcloud login --api-key <your-api-key>
Install AWS CLI to upload the binaries (optional)
Once the bucket has been created, you'll need a way to upload your installation binaries. You can do so by using the IBM Cloud console in your browser without the need to install any additional tools. If you don't want to or can't use the IBM Cloud console, this tutorial also describes how to use the AWS CLI. However, it is possible to use many other S3-compatible tools they just aren't covered in this tutorial. For information about uploading objects to COS, you can check out Upload data and Storing large objects in the official IBM Cloud Object Storage documentation.
The easiest way to install AWS CLI is via pip install awscli
.
For more information about using the AWS CLI with the IBM Cloud Object Storage, check out Using the AWS CLI.
Create a COS Service Instance with a Storage Bucket
Before you can create a storage bucket to store the SAP installation files, you need to create a COS service instance. The service instance is where your storage buckets reside.
-
Create a Cloud Object Storage service instance
-
By using the IBM Cloud console:
- Navigate to Cloud Object Storage:
- Click the Navigation menu icon
> Classic Infrastructure > Object Storage
- Click Create an instance
- Click the Navigation menu icon
- Configure a Cloud Object Storage service instance
- Under Choose an Infrastructure, select IBM Cloud.
- Select a pricing plan.
- Configure service name, resource group, and tags.
- Click Create. It will create a service instance and take you to it.
Or
- Navigate to Cloud Object Storage:
-
By using the IBM Cloud CLI:
Make sure you followed the steps in IBMCloud CLI Setup and are logged in. You will need to select a payment plan. Unless you have a custom plan, typical options are
standard
orlite
. For more information, refer here.# select a target resource group for your new service instance ibmcloud target -g <resource-group> # create the service instance. Make sure to save the ID as it´s needed in the next step ibmcloud resource service-instance-create <instance-name> cloud-object-storage <plan> global
-
-
Configure Service Credentials
You need to create service credentials to enable the deployable architecture to log into the COS instance. You also need them if you want to setup your bucket via the CLI. The deployable architecture requires HMAC credentials, you can find more information here.
- By using the IBM Cloud console:
- Navigate to your service instance. You can find it by clicking on the Navigation menu icon
> Resource List > Storage > your COS service instance Name
- In the service instance, select the Service credentials tab on the top.
- Click New Credential.
- Give it a name
- For role, select Manager
- For Service ID, select Create New Service id and remember what you name it
- Make sure you enable Include HMAC Credential
Or
- By using the IBM Cloud CLI:
# Create service credentials. Make sure to save the HMAC keys from the output ibmcloud resource service-key-create <key-name-without-spaces> Manager --instance-name "<service instance name--use quotes if your instance name has spaces>" --parameters '{"HMAC":true}'
-
Create a Storage Bucket:
-
By using the IBM Cloud console:
- Navigate to your service instance. The previous step should've taken you directly to your service instance. If it didn't, you can find it by clicking on the Navigation menu icon
> Resource List > Storage > your COS service instance Name
- Select Create a Custom Bucket.
- Select a Name and Location close to your deployment.
- For the other settings, you can leave the default settings or refer to the Object Storage Documentation for more information about the configuration options and encryption.
- Once done, click Create Bucket
Or
- Navigate to your service instance. The previous step should've taken you directly to your service instance. If it didn't, you can find it by clicking on the Navigation menu icon
-
By using the IBM Cloud CLI:
For detailed documentation, refer here. For a list of endpoints by region, see here.
'''Configure cloud object storage plugin.''' # select HMAC authentication method ibmcloud cos config auth # enter HMAC credentials obtained in previous step ibmcloud cos config hmac # configure the correct endpoint for your region ibmcloud cos config endpoint-url --url <endpoint-url> '''Create a new bucket''' # make sure to pick a region close to your deployment ibmcloud cos bucket-create --bucket <bucket-name> --region <region>
In case you didn't note down your service id in the previous step, you can obtain it with the following command:
ibmcloud resource service-instance <service-instance-name>
oribmcloud resource service-instances --long
You can always list your current cos plugin configuration using
ibmcloud cos config list
-
-
Configure Bucket Access Policies
- Navigate to your bucket. You can find it in the Buckets tab in your service instance.
- Inside your bucket, go to the Permissions tab and open Access policies.
- For Policy type, select Service ID
- For Select a service ID, select the service id generated in the previous step
- For Role for this bucket, select Manager
- Click Create access policy
- You can now obtain and manage this access credential in the IAM console Add how to get there here
Upload SAP installation binaries
-
Place the SAP installation binaries in the same folder structure you'd like in your bucket.
-
Place all your HANA DB files in one directory and all your S/4HANA or BW/4HANA in another one. Do not mix the HANA DB binaries with the S/4HANA or BW/4HANA solution binaries in the same folder, otherwise the ansible playbook execution will fail.
-
Example folder structure:
S4HANA_2023 | |_HANA_DB | |_all IMDB* Files and SAPCAR files (all files similar to listed in point 2 above example file) | |_S4HANA_2023 |_all files similar to listed in point 2 above example file |maintenance planner stack xml file (optional)
-
Upload the files
-
By using the IBM Cloud console:
- Navigate to your bucket like described in the previous steps.
- Click Upload, a new menu should pop up.
- Select your folder and hit Upload.
Or
-
By using the AWS CLI:
'''Configure AWS CLI''' aws configure AWS Access Key ID [None]: <HMAC access_key_id> AWS Secret Access Key [None]: <HMAC secret_access_key> Default region name [None]: <You can leave this as None> Default output format [None]: <You can leave this as None> '''Upload your SAP installation binaries''' aws --endpoint-url <endpoint> --recursive s3 cp <local directory with binaries> s3://<bucket-name>/<destination-directory>
-
You can find the endpoint using the IBM Cloud console in your bucket > Configuration > Endpoints. For documentation on endpoints and storage locations, click here.
Check this documentation for more information and an example of the binaries required for S/4HANA 2023 and BW/4HANA 2021
During deployment, you have to tell IBM® Power® Virtual Server for SAP HANA where to find the installation files through the ibmcloud_cos_configuration variable.