Skip to Content

Introduction

Recently, we have updated a number of SAP HANA Academy tutorial videos for the playlist

In this blog, I will provide some references and background information about installation automation with the SAP HANA platform lifecycle management tools.

This blog is part of a series:

 

SAP HANA Academy – SAP HANA Installation and Update (YouTube Playlist)

 

Tutorial Video

SAP HANA Academy – SAP HANA Installation and Update: Installation Automation

 

Create the Configuration File

In the previous blogs about SAP HANA 2.0 platform lifecycle management and SAP HANA 2.0 Server Installation, I already briefly mentioned installation automation. Using a combination of configuration files together with optional command line options, you can automate installations, that is, create a repeatable process that can be scheduled without any further human intervention.

The process is simple. First, you create a configuration or response file by running the hdblcm installation tool with the dump_configfile_template and action parameter.

The location and name of the file, including the extension (if any), are for you to choose.

./hdblcm --action=install \
--dump_configfile_template=/tmp/install.rsp

This command will generate both the configuration template file and a password template file.

 

Configure the Configuration File

Next, we need to edit the installation parameters. There are a bit over 100 parameters available so it might take a bit time to get this right, depending on the requirements. However, the good news is that all parameters have a default value, except for the sid (system identifier) and password parameters.

For the parameter reference, see

 

General and Action

In the General section, you specify where the installation media is located (component_medium, _dirs, _root), whether to use a master password – for the operating system accounts <sid>adm and sapadm and database users SYS and SYSTEM (amongst others, see below) and which components to install.

It also includes the configuration of remote execution which concerns a distributed (multi-host) installation which itself is configured in the AddHosts section (see below).

For remote execution of multiple-host system operations, see

 

The Action section only has a single parameter, action, which will have been already set with the value you provided on the command line when running the hdblcm command.

As I explained in the SAP HANA 2.0 platform lifecycle management blog, hdblcm is a ‘wrapper’ tool that calls other executables for the different actions. Action=install will call hdbinst and action=update will call hdbupd. In the Client section below, you can see that we can run these tools independently as well with a response file, for example, when installing the SAP HANA client on a client computer.

 

Server

In the Server section, all the parameters specific to the HANA database server are specified. The sid is required, all others are optional.

For more information about these parameters, see

 

Storage

The storage_cfg parameter points to the directory where you have placed the customized global.ini file. This makes it possible to set up a storage connector, allowing SAP HANA to use hardware vendor-specific scripts for automated resource allocation and input/output fencing during failover.

For an example of such an implementation, see

For the documentation, see

Note that the hdbparam utility is no longer included with SAP HANA 2.0 and has been deprecated.

 

Storage Configuration Best Practices for SAP HANA TDI on Dell EMC VMAX 33 Solution Guide

Implementing High Availability and Disaster Recovery Solutions with SAP HANA on IBM Power Systems

The AddHosts section covers the parameters relevant to distributed (multi-host) systems: the hostname of the hosts and the host role.

Optional Components

There is a dedicated section for each of the different host roles (Streaming Analytics, Dynamic Tiering, Accelerator for ASE and Remote Data Synch. When these components are not listed in the General section, these sections are ignored by the installer.

For more information about these features, see

 

XS Advanced

For the XS Advanced runtime, there is another dedicated parameter section.

For more information about these parameters and about installing XSA, see

 

Client and Studio

Finally, there is a section about the SAP HANA client and studio. See

 

Configure the Password File

As we have seen, there are several locations where passwords can be specified in the configuration file. Master password in the General section, operating system accounts (root, sapadm, <sid>adm) and database users in the Server section, accounts for features, and for XS Advanced.

Typically, a security administrator will not be amused when passwords are specified in text files.

For this reason, the  read_password_from_stdin=xml parameter is available to indicate to hdblcm when running in batch mode to get the passwords from ‘standard input’, which for UNIX refers to commands entered on the command line.

However, as we still want to automate the installation, we are now going to set the passwords in another configuration file, this time in XML format, which we can secure and include in the installation process as appropriate.

In the vi editor, you can use the substitute command to easily change the asterisks to a new master password.

:%s/\*\*\*/your-master-password/

 

For more information, see

 

Install in Batch Mode

When we are done with editing the configuration and password file, we can simply run the install in batch mode with the -b (or –batch) parameter together with —configfile.

Parameters passed as call options to the installer take precedence over parameter defined in the configuration file.

You could, for example, generate the SID parameter using a script and pass it to the installer in case you need unique values.

#!/bin/bash
# sample script to explain the concept
# do not try this at home or at work

for i in {0..9} do
./hdblcm -b --sid=EZ$i –-configfile=server.cfg
done
exit 0

 

To include our password parameter file, we are going to make use of more UNIX magic: the pipe. This allows us to pass the passwords to the installer without displaying them on the console or in command history.

cat ~/passwords.xml | ./hdblcm --sid=DB1 \
--read_password_from_stdin=xml \
--configfile=server.cfg -b

 

SAP HANA Client

To automate installations of the SAP HANA client (or studio) on a system that do not contain an SAP  HANA server installation, we can use the same approach.

First, generate a configuration file and edit the parameters. This time, use the hdbinst or hdbupd executable directly (and hence we no longer need to specify the action= parameter). Again, the name and extension of the response file are irrelevant.

To install, run the command specifying –batch (-b) with configfile.

For the parameter reference, see

 

# Windows in command prompt
hdbinst.exe --dump_configfile_template=c:\temp\client.rsp
hdbinst.exe -b --configfile=c:\temp\client.rsp

# UNIX, Linux, macOS 
./hdbinst --dump_configfile_template=/tmp/client.cfg
./hdbinst -b --configfile=/tmp/client.cfg

 

References

For more information see:

SAP HANA Academy Playlists

SAP Community Blogs

SAP Documentation

Notes

SAP Partner Documentation

 

Thank you for watching

The SAP HANA Academy provides technical enablement, implementation and adoption support for customers and partners with 1000’s of free tutorial videos.

For the full library, see SAP HANA Academy Library – by the SAP HANA Academy

For the full list of blogs, see Blog Posts – by the SAP HANA Academy

 

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member

     

    Hi Denys,

    there are lots of documentations about automation of Installation, but i didn’t find anything about automated update/SPS implementation. Do you know useful links/blogs for me?

     

    thank you,

    Günther

    (0) 

Leave a Reply