Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
BiserSimeonov
Product and Topic Expert
Product and Topic Expert

Introduction

In today's fast-paced digital landscape, it is essential for businesses, and their respective ops teams, to maintain a competitive edge. As organizations increasingly rely on SAP HANA Cloud as one of the main elements within their operations, ensuring that it remains updated to the latest patch or QRC (quarterly release cycle) version is crucial considering the benefits it brings in terms of security, performance, functionality, and overall operational efficiency.

This is why, in this blogpost I am super excited to share details on how you can automate the process of updating your HANA Cloud instance and become more efficient in this type of tasks by using SAP Automation Pilot – a low-code/ no-code automation engine available within the SAP Business Technology Platform (SAP BTP) portfolio.

 

What is SAP Automation Pilot?

Among the vast array of available tools, SAP Automation Pilot has emerged as a solid and competitive cloud application within the SAP Business Technology Platform (BTP) DevOps portfolio, revolutionizing the way DevOps team streamline their ops processes. In a nutshell, SAP Automation pilot offers low-code / no-codeautomation capabilities that allow these teams to automate sequences of ops steps, use catalogs of automated commands provided by SAP or build custom executions (if needed), and run scripts in a serverless manner. More details about the product can be found at:

 

Use case explained

The specific use case is related to an outdated SAP HANA Cloud (it might be both: Multi-environment or Cloud Foundry environment setup) that has not been updated with the latest patches and QRC versions. To update the HANA Cloud in question, some manual steps need to be executed by the (Dev)Ops team. Of course, considering this is a manual process, it might require certain effort and time, especially if there are many DB instances that should be checked and updated. Here comes SAP Automation Pilot, which provides the needed capabilities so that the whole process can be automated or semi-automated (in case we want to have a manual confirmation of the update command before executing it).

To visualize better the use case, please see the diagram below:

BiserSimeonov_0-1712228343524.png

Diagram steps explained

  1. There is a command in SAP Automation Pilot which connects to one or more HANA Cloud DBs and checks if these are updated to:
    • the latest patch version;
    • the next or most recent QRC version; 
  2. There is a response from the HANA Cloud which is received by SAP Automation Pilot.
  3. The response provided by HANA Cloud is now evaluated automatically by SAP Automation Pilot (based on Conditions)
  4. In case a condition is met (e.g., a new patch version is available), then SAP Automation Pilot requests a manual confirmation from a (Dev)Ops team member before proceeding with the needed patch / update to the HANA Cloud instance in question.
  5. (Dev)Ops team member checks the specific request and based on his assessment confirms / decline the request. In this use case, the person decides to proceed forward with the update.
  6. SAP Automation Pilot continues with the automated update procedure, connects to the HANA Cloud DB, and applies the update.
  7. HANA Cloud DB is now updated to the needed patch / QRC version.

IMPORTANT: Typically, an update requires the database to restart, resulting in downtime. Given this, the command pauses prior to the update until explicit confirmation is received from your DevOps team. This is also the recommendation from SAP HANA Cloud Ops Team. If downtime is not an issue, or the database is configured to be updated without a restart, this confirmation can be disabled. For more information, visit this page: Upgrading Without Restart.

 

Example command for “Update HANA Cloud Database”

In collaboration with SAP HANA Cloud, the SAP Automation Pilot dev team has prepared and published a sample command that can be found in the SAP Automation Pilot Examples GitHub repository here: Update of HANA Cloud Database

How to import this sample command?

The example commands can be used with little to no changes and can be imported directly into your SAP Automation Pilot instance. Of course, you can import and modify the provided commands in order to better fit your specific needs / use.

Details on how to use and import the provided examples can be found here: Examples - How to use them.

In addition, you can check out this public blogpost: Github repo with examples about SAP Automation Pilot commands in action.

 

Update HANA Cloud Database on Multi-environment: Step-By-Step Guide

In the following section, we will show insights on how to upgrade HANA Cloud on Multi-environment setup and we will go through these steps: 

  1. Validate you have deployed HANA Cloud DB which is a Multi-Environment setup
  2. Validate you have SAP Automation Pilot already provisioned
  3. Set up SAP Service Manager 
  4. Create and Copy a Service Key for your SAP Service Manager
  5. Go to your SAP Automation Pilot
  6. Find and explore the command needed to update your HANA Cloud DB
  7. Triggering the command in SAP Automation Pilot
  8. Running the command in SAP Automation Pilot
  9. After the command is completed in SAP Automation Pilot

Let's start from here: after importing the example command Update of HANA Cloud Database into SAP Automation Pilot (as explained here Examples - How to use them) , let’s proceed with executing the command and applying the needed updates to our HANA Cloud DB. To do so, please follow these steps:

1. Validate you have deployed HANA Cloud DB which is a Multi-Environment setup.

Expected result: In SAP HANA Cloud Central you should be able to see your HANA Cloud instance under Runtime Environment set as “Other Environments” (see below)

BiserSimeonov_1-1712228562209.png

NOTE: In case you need further guidance, refer to these resources:

  1. [help documentation] Subscribing to the SAP HANA Cloud Administration Tools (Multi-Environment)
  2. [help documentation] Creating SAP HANA Cloud Instances
  3. [blog-post] SAP HANA Cloud goes “multi-environment”: Part 2- getting started
  4. [tutorial] Deploy SAP HANA Cloud

At this point, we can also see that our HANA Cloud DB is running in a QRC 3/2023 which is not the latest one.

BiserSimeonov_2-1712228562222.png

2. Validate you have SAP Automation Pilot already provisioned

Go to you SAP BTP Subaccount and in the left-side menu click on “Instances and Subscriptions”. Within the “Subscription” section, you should see “Automation Pilot”.

BiserSimeonov_3-1712228562229.png

NOTE: SAP Automation Pilot can interact with resources in any BTP landscapes. All you need is to have at least one instance of SAP Automation Pilot. In case you need guidance on how to provision the product in you SAP BTP subaccount, please check out these resources: Tutorial: Setup Automation Pilot in SAP BTP and Automation Pilot Initial Setup Documentation

3. Set up  SAP Service Manager 

You need to set up  SAP Service Manager with plan subaccount-admin for any SAP BTP subaccount where you have deployed your one or more SAP HANA Cloud DB instances from step (1).

To do so, please follow these steps:

3.1 Go to you SAP BTP Subaccount. In the left-side menu, click on “Instances and Subscriptions”, followed by the “Create” button:

BiserSimeonov_4-1712228562250.png

3.2 Fill in the “New Instance or Subscription” form followed by clicking the “Create” button:

BiserSimeonov_5-1712228562259.png

3.3. As a result, you should be able to see the Service Manager instance available in your section “Instances” (under “Instances and Subscriptions”):

BiserSimeonov_6-1712228562266.png

4. Create and Copy a Service Key for your SAP Service Manager

Following step (3) now you need to create and keep a unique Service Key for your SAP Service Manager. This Service Key will be used by SAP Automation Pilot on a later stage to authenticate to your SAP HANA Cloud DB from step (1).  To do so, please follow these steps:

4.1. Go to you SAP BTP Subaccount -> click on “Instances and Subscriptions” -> click on the Service Manager Instance created in step (3) -> click on the action button icon -> from the dropdown menu pick the option “Create Service Key”:

BiserSimeonov_7-1712228562284.png

4.2 Fill in the form by providing Service Key name and click on the “Create” button:

BiserSimeonov_8-1712228562292.png

4.3. Within the section “Service Keys” you will find the one created in the previous step. Just click on it and then copy the service key by clicking on the button “Copy JSON”. This key will be used on a later stage by the SAP Automation Pilot command. 

BiserSimeonov_9-1712228562302.png

BiserSimeonov_10-1712228562311.png

5. Go to your SAP Automation Pilot

Just click on the “Automation Pilot” instance from step (2).

BiserSimeonov_11-1712228562319.png

You will be redirected to the SAP Automation Pilot UI, section Dashboard. In the left sidebar menu click on the menu item “Commands”.

BiserSimeonov_12-1712228562330.png

Then, you will see a list of all available commands within your SAP Automation Pilot.

BiserSimeonov_13-1712228562344.png

6. Find and explore the command needed to update your HANA Cloud DB

Considering you had imported the example catalog Update of HANA Cloud Database as already explained, please type within the Name field: “UpdateHanaCloudDatabaseOtherEnv” and click on the name of the command to access it:

BiserSimeonov_14-1712228562351.png

Now you have accessed the needed command:

BiserSimeonov_0-1712233601345.png

To explore it and have a better understanding about the command, we can outline the following main sections:

6.1. Input Keys – need to be provided at command execution:

  • hanaCloudInstance - Technical name or ID of a HANA Cloud instance
  • serviceKey - Service key to the SAP Service Manager (see step #4)
  • updateStrategy - Update strategies that allow you to update in a variety of ways depending on your needs (latest patch version, next QRC version, latest QRC version) – these are to be picked at the triggering of the command
  • shouldConfirmBeforeUpdate - Optional: whether to require confirmation before starting the update, if there's one available. As recommended by SAP HANA Cloud Ops teams, the default is set to “true”, meaning a manual confirmation is needed before applying the update (if any)

BiserSimeonov_53-1712230369112.png

6.2. Output Keys – there’s an output named “summary” which provides the summary of the command after its completion.

BiserSimeonov_54-1712230429494.png

 

6.3. Executors – these are the septs within the command that are to be executed when the command gets triggered. You can explore what it does by clicking on each executor.

BiserSimeonov_50-1712229470179.png

7. Triggering the command in SAP Automation Pilot

As explained in step (1), our HANA Cloud DB is running on version “2023.28.29 (QRC 3/2023)” and there is a newer version for it: “2023.40.18 (QRC 4/2023)”. Thus, I would like to update my DB and to do so I will need to run the command from step (6).

To so, from the command itself (from step 6), click the “Trigger” button.

BiserSimeonov_55-1712230494789.png

Then, provide the needed command inputs for the HANA Cloud and SAP Service Manager (as explained in step 6.1) followed by clicking the “Trigger” button:

BiserSimeonov_56-1712230566274.png

OPTIONAL: Instead of manually adding the inputs, these can be also kept as Input keys and can be provided as such. Just click on the Inputs and from the dropdown pick your predefined input keys (as multi-select is also possible).

BiserSimeonov_21-1712228562445.png

8. Running the command in SAP Automation Pilot

After running the command, in case a new QRC gets detected, you will see this screen with the note “The execution is awaiting user confirmation. Please, confirm it.” :

BiserSimeonov_51-1712230164546.png

To explore more details about the findings, click on the “Show” link just below the Progress Message:

BiserSimeonov_52-1712230217421.png

Then you will see a relevant message about a new HANA Cloud DB version that can be applied to your DB.

BiserSimeonov_24-1712228562465.png

If you would like to proceed with the update, just click on the “Confirm” button:

BiserSimeonov_58-1712230730471.png

Following your confirmation, a pop-up will be displayed, which will show you again the new version that will be applied to your DB. If that is OK, from the dropdown “Options”, choose “Confirm Update” and click on the “Confirm” button.

BiserSimeonov_59-1712230795071.png

Once you do so, the update procedure will continue, and you will see the executor “Update” within the Automation Pilot command being in a progress state (see screenshot below):

BiserSimeonov_60-1712230862320.png

That will take a while. Let’s also check the HANA Cloud DB state in SAP HANA Cloud Central dashboard – the version (2023.40.18 ) has been applied and the HANA Cloud instance in question is starting.

BiserSimeonov_28-1712228562512.png

9. After the command is completed in SAP Automation Pilot

Once the command in SAP Automation Pilot has finished, you should see a screen like this one:

BiserSimeonov_0-1712233332338.png

Click on the link “Show” under “Output Values”:

BiserSimeonov_1-1712233415173.png

Then you will see the summary output after the command has been completed:

BiserSimeonov_31-1712228562526.png

 

Now you also can check out the state of your HANA Cloud DB in SAP HANA Cloud Central dashboard.

Well done - the version 2023.40.18 has been applied successfully and now you are all set!

BiserSimeonov_32-1712228562530.png

Update HANA Cloud Database on Cloud Foundry environment: Step-By-Step Guide

In the following section, we will show insights on how to upgrade HANA Cloud on Cloud Foundry setup and we will go through these steps:

  1. Go to your SAP Automation Pilot
  2. Find and explore the command needed to update your HANA Cloud DB
  3. Triggering the command in SAP Automation Pilot
  4. Running the command in SAP Automation Pilot
  5. Command completed in SAP Automation Pilot

Let's start from here: in case you have a HANA Cloud database running on Cloud Foundry environment there are two prerequisites to be in place before running the update command (see these listed below):

  • Make sure your HANA Cloud database indeed is running on Cloud Foundry environment.
  • Create a platform user with Space Developer role in the CF space where the database resides.

Please note: If you are planning to use SAP Universal ID, please keep SAP Note 3085908 in mind.

As a starting point – we see that our HANA Cloud DB instance is outdated (see below):

BiserSimeonov_33-1712228562537.png

After importing the example command Update of HANA Cloud Database into SAP Automation Pilot (as explained here Examples - How to use them) , please proceed with executing the command and applying the needed updates to our HANA Cloud DB. To have a successful command completion, please follow these steps:

1. Go to your SAP Automation Pilot

Just click on the “Automation Pilot” instance from step (2).

BiserSimeonov_34-1712228562546.png

You will be redirected to the SAP Automation Pilot UI, section Dashboard. In the left sidebar menu click on the menu item “Commands”.

BiserSimeonov_35-1712228562560.png

Then, you will see a list of all available commands within your SAP Automation Pilot.

BiserSimeonov_36-1712228562570.png

2. Find and explore the command needed to update your HANA Cloud DB

Considering you had imported the example catalog Update of HANA Cloud Database as already explained, please type within the Name field: “UpdateHanaCloudDatabaseCF” and click on the name of the command to access it:

BiserSimeonov_37-1712228562576.png

Now you have accessed the needed command:

BiserSimeonov_62-1712231053265.png

To explore it and have a better understanding about the command, we can outline the following main sections:

2.1 Input Keys – need to be provided at command execution:

  • updateStrategy - Update strategies that allow you to update in a variety of ways depending on your needs (latest patch version, next QRC version, latest QRC version)
  • region - Technical name of your SAP BTP region, e.g. cf-eu10, cf-us20, cf-eu10-004
  • org - Name of your Cloud Foundry organization
  • space - Name of your Cloud Foundry space
  • hanaCloudInstance - Name of your HANA Cloud service instance
  • user - Email or ID of your technical user
  • password - Password of your technical user
  • identityProvider - Optional: origin key of your identity provider. Defaults to sap.ids
  • shouldConfirmBeforeUpdate - Optional: whether to require confirmation before starting the update, if there's one available. As recommended by SAP HANA Cloud Ops teams, the default is set to “true”, meaning a manual confirmation is needed before applying the update (if any)

BiserSimeonov_39-1712228562634.png

2.2. Output Keys – there’s an output named “summary” which provides the summary of the command after its completion.

BiserSimeonov_40-1712228562652.png

 

2.3. Executors – these are the septs within the command that are to be executed when the command gets triggered. You can explore what it does by clicking on each executor.

BiserSimeonov_41-1712228562669.png

3. Triggering the command in SAP Automation Pilot

Once you have all inputs in place, please feel free to proceed with the command’s execution, please just click on the “Trigger” button.

BiserSimeonov_63-1712231207740.png

Then, provide the needed command inputs for the HANA Cloud in question , followed by clicking the “Trigger” button.

 

BiserSimeonov_66-1712231312596.png

OPTIONAL: Instead of manually adding the inputs, these can be also kept as Input keys and can be provided as such. Just click on the Inputs and from the dropdown pick your predefined input keys (as multi-select is also possible).

4. Running the command in SAP Automation Pilot

After running the command, in case a new QRC gets detected, you will see this screen with the note “The execution is awaiting user confirmation. Please, confirm it.” :

BiserSimeonov_44-1712228562712.png

Clicking on the Confirm button will display a dialog. We'll need to decide whether we want to continue with the update or abort it. In this use case, we decide to confirm it.

BiserSimeonov_45-1712228562720.png

Once you confirm, the update procedure will continue, and you will see the executor “Update” within the Automation Pilot command being in a progress state (see screenshot below):

BiserSimeonov_46-1712228562726.png

That will take a while as a new version  has been applied to our HANA Cloud instance.

5. Command completed in SAP Automation Pilot

Once the command in SAP Automation Pilot has finished, you should see a screen like this one:

BiserSimeonov_47-1712228562732.png

Click on the link “Show” under “Output Values” and you will see the summary output after the command has been completed:

BiserSimeonov_48-1712228562735.png

Now you also can check out the state of your HANA Cloud DB in SAP HANA Cloud Central dashboard.

Well done – a new version has been applied successfully and now you are all set!

BiserSimeonov_49-1712228562741.png

Wrap-up

In this blog post you have already learned how to use SAP Automation Pilot to speed up the update procedures for your SAP HANA Cloud instances running on both: Multi-Environment or Cloud Foundry environment.

SAP Automation Pilot can help you in other SAP HANA Cloud ops-automation scenarios, so do not hesitate to check out the related section in our GitHub repository: Examples HANA Cloud Automations or just contact us, as with SAP Automation Pilot you can automate any Ops scenario in SAP BTP. 

2 Comments