You are on page 1of 83

SAP HANA on Azure

Before the hands-on lab setup guide


December 2018

Information in this document, including URL and other Internet Web site references, is
subject to change without notice. Unless otherwise noted, the example companies,
organizations, products, domain names, e-mail addresses, logos, people, places, and
events depicted herein are fictitious, and no association with any real company,
organization, product, domain name, e-mail address, logo, person, place or event is
intended or should be inferred. Complying with all applicable copyright laws is the
responsibility of the user. Without limiting the rights under copyright, no part of this
document may be reproduced, stored in or introduced into a retrieval system, or
transmitted in any form or by any means (electronic, mechanical, photocopying,
recording, or otherwise), or for any purpose, without the express written permission of
Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other


intellectual property rights covering subject matter in this document. Except as expressly
provided in any written license agreement from Microsoft, the furnishing of this
document does not give you any license to these patents, trademarks, copyrights, or
other intellectual property.

The names of manufacturers, products, or URLs are provided for informational purposes
only and Microsoft makes no representations and warranties, either expressed, implied,
or statutory, regarding these manufacturers or the use of the products with any
Microsoft technologies. The inclusion of a manufacturer or product does not imply
endorsement of Microsoft of the manufacturer or product. Links may be provided to
third party sites. Such sites are not under the control of Microsoft and Microsoft is not
responsible for the contents of any linked site or any link contained in a linked site, or
any changes or updates to such sites. Microsoft is not responsible for webcasting or any
other form of transmission received from any linked site. Microsoft is providing these
links to you only as a convenience, and the inclusion of any link does not imply
endorsement of Microsoft of the site or the products contained therein.

© 2018 Microsoft Corporation. All rights reserved.

Microsoft and the trademarks listed


at https://www.microsoft.com/en-us/legal/intellectualproperty/Trademarks/Usage/
General.aspx are trademarks of the Microsoft group of companies. All other trademarks
are property of their respective owners.

Contents

 SAP HANA on Azure hands-on lab step-by-step


o Abstract and learning objectives
o Overview
o Solution architecture
o Requirements
o Help references
o Exercise 1: Provision Azure infrastructure
 Task 1: Deploy an Azure virtual machine running Windows
 Task 2: Create a virtual network subnet for the HANA database tier
 Task 3: Deploy an Azure Resource Manager QuickStart template
 Task 4: Configure IP settings of Azure VMs running Linux
o Exercise 2: Configure operating system on Azure VMs running Linux
 Task 1: Connect to Azure Linux VMs and register SUSE Linux
Enterprise Server image
 Task 2: Add YaST packages, update the Linux operating system, and
install HA Extensions
 Task 3: Enable cross-node password-less SSH access
 Task 4: Configure name resolution
 Task 5: Configure storage
o Exercise 3: Configure clustering on Azure VMs running Linux
 Task 1: Configure clustering
 Task 2: Configure corosync
o Exercise 4: Install SAP HANA
 Task 1: Copy installation media to Linux VMs
 Task 2: Run hdblcm on both Linux VMs
o Exercise 5: Configure SAP HANA replication
 Task 1: Create HANA DATA ADMIN user account
 Task 2: Configure keystore and perform a backup
 Task 3: Create the primary and the secondary sites
o Exercise 6: Configure cluster framework
 Task 1: Configure STONITH clustering options
 Task 2: Create an Azure AD application for the STONITH device
 Task 3: Grant permissions to Azure VMs to the service principal of
the STONITH app
 Task 4: Configure the STONITH cluster device
 Task 5: Create SAPHanaTopology cluster resource agent
 Task 6: Create SAPHana cluster resource agent
o Exercise 7: Test the deployment
 Task 1: Install SAP HANA Studio Administration on the Azure VM
running Windows
 Task 2: Modify Azure Internal Load Balancer configuration
 Task 3: Connect to HANA cluster by using SAP HANA Studio
Administration
 Task 4: Connect to HANA cluster by using Hawk
 Task 5: Test a manual failover (from s03-db-0 to s03-db-1)
 Task 6: Test a migration (from s03-db-1 to s03-db-0)
 Task 7: Test fencing
o After the Hands-on lab
 Task 1: Remove the resource group containing all Azure resources
deployed in this lab

SAP HANA on Azure hands-on lab step-


by-step
Abstract and learning objectives
In this hands-on lab, you will step through the implementation of a highly available SAP
HANA deployment on Microsoft Azure virtual machines running SUSE Linux Enterprise
Server.

After its completion, you will be able to provision Azure infrastructure components
necessary to support highly available SAP HANA deployments, configure Azure virtual
machines to support highly available SAP HANA installations, implement SUSE Linux
Enterprise clustering, install SAP HANA, configure SAP HANA system replication, and
test failover scenarios.

Overview
In this hands-on lab, you are working with Contoso to develop a process of
implementing a highly available deployment of SAP HANA on Azure virtual machines
(VMs). Your tasks will include the provisioning of Azure infrastructure components of the
deployment, setting up a clustered pair of Azure Linux VMs running SUSE Linux
Enterprise Server to support SAP HANA, installing SAP HANA instance on each of the
Azure VMs, and configuring SAP HANA system replication between them.

Solution architecture

Requirements
 A Microsoft Azure subscription
 A lab computer running Windows 10 or Windows Server 2016 with:

o Access to Microsoft Azure

o Access to the SAP HANA installation media (requires an SAP Online Service
System account)

o An SSH client e.g. PuTTY, available


from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

o WinSCP client available from https://winscp.net/eng/download.php

 SUSE Linux Enterprise Server 60-day free trial subscription (available


from https://www.suse.com/products/sles-for-sap/download/ ) via which you
obtain registration code for an evaluation copy of SUSE Linux Enterprise Server
for SAP Applications 12 SP3 for x86-64.

Help references

Description Links

https://docs.microsoft.com/en-us/azure/
High Availability of SAP HANA on Azure
virtual-machines/workloads/sap/sap-hana-
Virtual Machines (VMs)
high-availability/

Exercise 1: Provision Azure infrastructure


Duration: 30 minutes

In this exercise, you will deploy Azure infrastructure prerequisites for implementing SAP
HANA on Azure virtual machines (VMs). This will include creating such resources as an
Azure virtual network, Azure VMs in the same availability set, an Azure load balancer,
Azure Storage accounts as well as assigning static IPs to each VM. To automate the
deployment, you will use an Azure Resource Manager QuickStart template available
from https://github.com/Azure/azure-quickstart-templates/tree/master/sap-3-tier-
marketplace-image-multi-sid-db-md

Task 1: Deploy an Azure virtual machine running Windows


1. From the lab computer, start a Web browser, and navigate to the Azure portal
at https://portal.azure.com.

2. If prompted, on the Sign in to your account page, type in the user name and
the password of the work or school or personal Microsoft account with the owner
role to the Azure subscription you will be using for this lab, and click Sign in.

3. In the Azure portal interface, click + Create a resource.

4. On the New blade, click Compute and then click Windows Server 2016
Datacenter.

5. On the Create a virtual machine blade, on the Basics tab, specify the following
settings, and click Next: Disks >:

o Subscription: The name of your Azure subscription

o Resource group: The name of a new resource group: hana-s03-RG

o Virtual machine name: s03-hana-0

o Region: The name of the Azure region you identified in the Before the
Hands-on Lab session

o Availability Options: No infrastructure redundancy required

o Image: Windows Server 2016 Datacenter

o Size: Standard DS1 v2

o Username: demouser

o Password: demo@pass123

o Confirm password: demo@pass123

o Public inbound ports: Allow selected ports

o Select inbound ports: RDP

o Already have a Windows license?: No

6. On the Create a virtual machine blade, on the Disks tab, specify the following
settings, and click Next: Networking >:
o OS disk type: Standard HDD

o Use managed disks (ADVANCED): Yes

7. On the Create a virtual machine blade, on the Networking tab, specify the
following settings, and click Next: Management >:

o Virtual network: click (new) hana-s03-RG-vnet. On the Create virtual


network blade, specify the following settings, and click OK:

 Name: hana-s03-RG-vnet

 Address space: 172.16.0.0/20

 Subnet name: subnet-0

 Subnet address range: 172.16.0.0/24

o Public IP: Accept the default value

o Network security group: Basic

o Public inbound ports: Allow selected ports

o Select inbound ports: RDP

o Accelerated networking: Off

o Place this virtual machine behind an existing load balancing solution: No

8. On the Create a virtual machine blade, on the Management tab, specify the
following settings, and click Next: Guest config >:

o Boot diagnostics: Off

o OS guest diagnostics: Off

o Managed service identity: Off

o Enable auto-shutdown: Off

o Enable backup: Off

9. On the Create a virtual machine blade, on the Guest config tab, accept the
default settings and click Next: Tags >.
10. On the Create a virtual machine blade, on the Tags tab, accept the default
settings and click Next: Review + create >.

11. On the Create a virtual machine blade, on the Review + create tab, review the
settings and click Create.

12. Wait for the deployment to complete. This should take a few minutes.

Task 2: Create a virtual network subnet for the HANA database


tier
1. In the Azure portal, navigate to the hana-s03-RG resource group.

2. On the hana-s03-RG resource group blade, in the list of resources, click hana-
s03-RG-vnet.

3. On the hana-s03-RG-vnet blade, click Subnets.

4. On the hana-s03-RG-vnet - Subnets blade, click + Subnet.

5. On the Add subnet blade, specify the following, and click OK:

o Name: subnet-1

o Address range: 172.16.1.0/24

o Network security group: None

o Route table: None

o Service endpoints: 0 selected

o Subnet delegation: None

Task 3: Deploy an Azure Resource Manager QuickStart template


1. From the lab computer, start a Web browser and navigate
to https://github.com/Azure/azure-quickstart-templates/tree/master/sap-3-tier-
marketplace-image-multi-sid-db-md.
2. On the SAP NetWeaver 3-tier multi SID DB (managed disks) page,
click Deploy to Azure.

3. If prompted, on the Sign in to your account page, type in the user name and
the password of the work or school or personal Microsoft account with the owner
role in the Azure subscription you will be using for this lab, and click Sign in. The
Web browser window should automatically redirect to the Azure portal and
display the SAP NetWeaver 3-tier multi SID DB (managed disks) blade.

4. On the SAP NetWeaver 3-tier multi SID DB (managed disks) blade, specify the
following settings:

o Subscription: The name of your Azure subscription

o Resource group: hana-s03-RG

o Sap System Id: S03

o Os Type: SLES 12 BYOS

o Dbtype: HANA

o Sap System Size: Demo

o System Availability: HA

o Admin Username: demouser

o Authentication Type: password

o Admin Password Or Key: demo@pass123

o Subnet id: To identify the value of the subnet id parameter, run the
following three commands from the Cloud Shell's Bash prompt to identify
the value to enter here (use the value that ends with subnet-1):

5. az network vnet subnet list --resource-group hana-s03-RG --vnet-name hana-s03-


RG-vnet --query "[?contains(id,'subnet-1')].{id: id}" --output tsv

o Location: [resourceGroup().location]

o _artifacts Location: accept the default value

o _artifacts Location SaS Token: accept the default value


6. Enable the checkbox labeled I agree to the terms and conditions stated above,
and click Purchase.

7. Wait for the deployment to complete. This might take about 5 minutes.

Task 4: Configure IP settings of Azure VMs running Linux


1. In the Azure portal, navigate to the hana-s03-RG resource group blade.

2. On the hana-s03-RG resource group blade, in the list of resources, click s03-nic-
db-0.

3. On the s03-nic-db-0 blade, click IP configurations.

4. On the s03-nic-db-0 - IP configurations blade, click ipconfig1.

5. On the ipconfig1 blade, specify the following settings and click Save:

o Public IP address settings : Enabled (Note that in a production


environment you would not expose a public IP address.)

o Public IP address: Create a new public IP address resource s03-pip-db-


0 of Basic SKU and Static assignment.

o Private IP address settings assignment: Static.

o Private IP address settings IP address: 172.16.1.10


6. Wait for the change to complete. Next, in the Azure portal, navigate back to
the hana-s03-RG resource group blade, and click s03-db-0.

7. On the s03-db-0 blade, click Configure under the DNS name label.

8. In the DNS name label text box, type a unique name you will use to connect to
the s03-db-0 Azure VM from your lab computer (the name will be in the
format custom-name-0.Azure-region.cloudapp.azure.com), and click Save.
Now configure equivalent settings for the second Azure Linux VM.

9. On the hana-s03-RG resource group blade, in the list of resources, click s03-nic-
db-1.

10. On the s03-nic-db-1 blade, click IP configurations.

11. On the s03-nic-db-1 - IP configurations blade, click ipconfig1.

12. On the ipconfig1 blade, specify the following settings and click Save:

o Public IP address settings : Enabled (Note that in a production


environment you would not expose a public IP address.)

o Public IP address: Create a new public IP address resource s03-pip-db-


1 of Basic SKU and Static assignment.

o Private IP address settings assignment: Static

o Private IP address settings IP address: 172.16.1.11


13. In the Azure portal, navigate back to the hana-s03-RG resource group blade, and
click s03-db-1.

14. On the s03-db-1 blade, click Configure under the DNS name label.

15. In the DNS name label text box, type a unique name you will use to connect to
the s03-db-1 Azure VM from your lab computer (the name will be in the
format custom-name-1.Azure-region.cloudapp.azure.com), and click Save.
Exercise 2: Configure operating system on Azure VMs
running Linux
Duration: 30 minutes

In this exercise, you will configure operating system settings on Azure VMs running
SUSE Linux Enterprise Server to accommodate subsequent clustered installation of SAP
HANA.

Task 1: Connect to Azure Linux VMs and register SUSE Linux


Enterprise Server image
1. On the lab computer, start the PuTTY client. In the Host name (or IP
address) text box, type the fully qualified DNS domain name you assigned to the
public IP address of the s03-db-0 Azure VM in Task 4 of Exercise 1. Ensure
the SSHoption is selected, and click Open. This will start an SSH session to s03-
db-0.
2. When prompted, in the PuTTY Security Alert dialog box, click Yes.

3. When prompted, login as demouser with the password demo@pass123:


4. login as: demouser
5. Using keyboard-interactive authentication.
6. Password:
7. SUSE Linux Enterprise Server 12 SP3 for SAP Applications x86_64 (64-bit)
8.
9. Please register this image using your existing SUSE entitlement.
10.
11. As "root" (sudo or sudo -i) use either one of the following commands:
12. - SUSEConnect --url=https://scc.suse.com -e company@example.com -r
YOUR_CODE
13. - yast scc
14.
15. to register the instance with SCC
16.
17. Without registration this instance does not have access to updates and
security fixes.
18.
19. If you are using extensions consider to enable the auto-update feature of the
extension agent and restarting the service. As root execute:
20. - sed -i s/AutoUpdate.Enabled=n/AutoUpdate.Enabled=y/ /etc/waagent.conf
21. - rcwaagent restart
22.
23. Management and Config: https://www.suse.com/suse-in-the-cloud-basics
24. Documentation: https://www.suse.com/documentation/sles-12/
25. Forum: https://forums.suse.com/forumdisplay.php?93-SUSE-Public-Cloud
26.
27. Have a lot of fun...
28. Elevate privileges by running sudo -i and, when prompted, providing the
password for the demouser user account:
29. demouser@s03-db-0:~> sudo -i
30.
31. We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
32.
33. #1) Respect the privacy of others.
34. #2) Think before you type.
35. #3) With great power comes great responsibility.
36.
37. [sudo] password for demouser: s03-db-0:~ #

38. Register the SUSE image by using the trial registration code from your SUSE trial
subscription:

39. s03-db-0:~ # SUSEConnect --url=https://scc.suse.com -e your-user-name@your-


company-name -r registration-code
40. Registered SLES_SAP 12.3 x86_64
41. To server: https://scc.suse.com
42. Using E-Mail: your-user-name@your-company-name

43. Repeat steps 1-5 for s03-db-1.


Task 2: Add YaST packages, update the Linux operating system,
and install HA Extensions
1. While connected via an SSH session to s03-db-0, launch YaST:

2. s03-db-0:~ # yast

3. In YaST Control Center, select Software -> Add-On Products and press Enter.
This will load Package Manager.

4. In the Package Manager interface, click Add.


5. On the Add on Product screen, select Extensions and Modules from
Registration Server -> Next.
6. On the Extension and Module Selection screen, select Public Cloud Module 12
x86_64. Then, press F10 (Next).

7. Select Accept.

8. On the Automatic Changes screen, click OK.


9. Once the installation has completed, click Finish, select Accept, and click OK.
10. Back in YaST Control Center, click Quit.

11. Update operating system by running zypper update. When prompted, press y:
12. s03-db-0:~ # zypper update
13. Refreshing service 'Public_Cloud_Module_12_x86_64'.
14. Refreshing service
'SUSE_Linux_Enterprise_Server_for_SAP_Applications_12_SP3_x86_64'.
15. Loading repository data...
16. Reading installed packages...
17.
18. The following 11 NEW packages are going to be installed:
19. bash-completion crash-kmp-default crda grub2-systemd-sleep-plugin kernel-
default-4.4.155-
20. systemd-bash-completion wireless-regdb zypper-lifecycle-plugin zypper-log
21.
22. The following 49 packages are going to be upgraded:
23. ca-certificates-mozilla cloud-netconfig-azure cluster-glue cpp48 crmsh
crmsh-scripts curl
24. java-1_7_1-ibm kdump ldirectord libXcursor1 libcurl4 libglue2 libgnutls28
libldap-2_4-2 l
25. libpacemaker3 libstorage-ruby libstorage7 libsystemd0 libtiff5 libudev1
libzypp lsof make
26. openssl pacemaker pacemaker-cli polkit-default-privs python-configobj
resource-agents sap
27. systemd-sysvinit tuned udev xfsprogs yast2-auth-client yast2-bootloader
yast2-network yas
28.
29. 49 packages to upgrade, 11 new.
30. Overall download size: 186.1 MiB. Already cached: 0 B. After the operation,
additional 359.
31. Continue? [y/n/...? shows all options] (y): y
32. Retrieving package libopenssl0_9_8-0.9.8j-106.6.1.x86_64
(1/60
33. Retrieving: libopenssl0_9_8-0.9.8j-
106.6.1.x86_64.rpm .....................................
34. Retrieving package libdlm-4.0.7-1.28.x86_64
(2/60
35. Retrieving: libdlm-4.0.7-
1.28.x86_64.rpm ..................................................
36.
37. (…)
38. Update HA extensions dependencies by running zypper install sle-ha-release
fence-agents. When prompted, press y, read through the SUSE End User License
Agreement, press q, type yes to agree with the terms of the license, and
press Enter.
39. s03-db-0:~ # zypper install sle-ha-release fence-agents
40. Refreshing service 'Public_Cloud_Module_12_x86_64'.
41. Refreshing service
'SUSE_Linux_Enterprise_Server_for_SAP_Applications_12_SP3_x86_64'.
42. Loading repository data...
43. Reading installed packages...
44. 'fence-agents' is already installed.
45. No update candidate for 'fence-agents-4.0.25+git.1485179354.eb43835-
2.19.x86_64'. The highest available version is already installed.
46. Resolving package dependencies...
47.
48. The following 2 NEW packages are going to be installed:
49. sle-ha-release sle-ha-release-POOL
50.
51. The following NEW product is going to be installed:
52. "SUSE Linux Enterprise High Availability Extension 12 SP3"
53.
54. 2 new packages to install.
55. Overall download size: 7.6 KiB. Already cached: 0 B. After the operation,
additional 1.7 KiB will be used.
56. Continue? [y/n/...? shows all options] (y): y
57. Do you agree with the terms of the license? [yes/no] (no): yes
58. Retrieving package sle-ha-release-POOL-12.3-1.53.x86_64
59. (1/2), 3.1 KiB ( 67 B unpacked)
60. Retrieving: sle-ha-release-POOL-12.3-1.53.x86_64.rpm .....................
[done]
61. Retrieving package sle-ha-release-12.3-1.53.x86_64
62. (2/2), 4.5 KiB ( 1.6 KiB unpacked)
63. Retrieving: sle-ha-release-12.3-1.53.x86_64.rpm ..........................
[done]
64. Checking for file conflicts: .............................................
[done]
65. (1/2) Installing: sle-ha-release-POOL-12.3-1.53.x86_64 ...................
[done]
66. (2/2) Installing: sle-ha-release-12.3-1.53.x86_64 ........................
[done]
67. s03-db-0:~ #

68. Repeat the steps 1-12 on s03-db-1.

Task 3: Configure operating system


1. From the SSH session on s03-db-0, edit /etc/systemd/system.conf:

2. s03-db-0:~ # vi /etc/systemd/system.conf
3. In the /etc/systemd/system.conf file, locate the DefaultTasksMax entry and
configure it as follows (remove the leading # character, if present), then save your
change and close the file (by pressing the Escape key, typing :wq!, and pressing
the Enter key):
4. DefaultTasksMax=4096

5. Activate the newly configured setting by running:

6. systemctl daemon-reload

7. From the SSH session on s03-db-0, edit /etc/sysctl.conf:

8. s03-db-0:~ # vi /etc/sysctl.conf
9. In the /etc/sysctl.conf file, add (or modify, if they already exist) the following
entries, then save your change and close the file (by pressing the Escape key,
typing :wq!, and pressing the Enter key):
10. vm.dirty_bytes = 629145600
11. vm.dirty_background_bytes = 314572800

12. Repeat steps 1-5 on s03-db-1.

Task 4: Enable cross-node password-less SSH access


1. From the SSH session on s03-db-0, generate passphrase-less DSA SSH key by
running ssh-keygen -tdsa. When prompted, press Enter three times and then
run cat /root/.ssh/id_dsa.pub to display the key.
2. s03-db-0:~ # ssh-keygen -tdsa
3. Generating public/private dsa key pair.
4. Enter file in which to save the key (/root/.ssh/id_dsa):
5. Created directory '/root/.ssh'.
6. Enter passphrase (empty for no passphrase):
7. Enter same passphrase again:
8. Your identification has been saved in /root/.ssh/id_dsa.
9. Your public key has been saved in /root/.ssh/id_dsa.pub.
10. The key fingerprint is:
11. SHA256:d52jKGzQ7o5+z+EqEcwcoD7rxCz3ld8E7+a6izW6+bE root@s03-db-0
12. The key's randomart image is:
13. +---[DSA 1024]----+
14. | .. |
15. | . . |
16. | . + . |
17. | . =. . . |
18. | o ..S . . + |
19. | o o .= + o . . |
20. |. * o.O = . |
21. | = . ..X.@.. |
22. | . ..B*EOB |
23. +----[SHA256]-----+
24.
25. s03-db-0:~ # cat /root/.ssh/id_dsa.pub
26. ssh-dss
AAAAB3NzaC1kc3MAAACBALZjoS47twSwRPzEeCFtCl2QH/Az5m7HC9tJPavdocjx0RG0CBDj
qdLiQ7IKrEL0FnupoE7LtVYNxXWN8lO1fEEmi4pJxIknLtKC/UgnSmkmqeZznXPztVZUPoHABw4TX9
0z
Wm9YvrnciAnsMIPUBCe0Kg2ZIo2Z1F3kWmCEw6fhAAAAFQCRunrR7MAH/9RzM57qijQ1El7ybQAAAI
EA
lHLIvJnwg8czZv5JXIIL6vOO+GRSHNWeCbcw6auBZpJQWIDJQnCdq6kEMYZUXnBcb5QAxYPMMfD9Fe
dU
mxxuUJznlh4mnko9V0J4imMl28C8e1Lsjkh9TgH6a7jfB1RDOa8+if0speP2IyDxTuSLexJat8yuzC
lc
lB9LnHu1Ep8AAACAa4ZphhcaCQlELcQao2YKu3br+B56Lj+apafFimLNQeiRY5kZQbAlGtBAVPs5gL
pi
3w1kGLzTR3W9WNNwFzw8qpknbQyqSSs0GJmUrwL3PATBkvPn5cUSY+q/ZumCg54a14ooMB00CMQ5Vh
up IpHX66hwXbTD9ja+W8XXJXejs8E= root@s03-db-0
27. From the SSH session on s03-db-1, generate passphrase-less DSA SSH key by
running ssh-keygen -tdsa. When prompted, press Enter three times and then
run cat /root/.ssh/id_dsa.pub to display the key.
28. s03-db-1:~ # ssh-keygen -tdsa
29. Generating public/private dsa key pair.
30. Enter file in which to save the key (/root/.ssh/id_dsa):
31. Enter passphrase (empty for no passphrase):
32. Enter same passphrase again:
33. Your identification has been saved in /root/.ssh/id_dsa.
34. Your public key has been saved in /root/.ssh/id_dsa.pub.
35. The key fingerprint is:
36. SHA256:tziVIs8+N87mb/HObzVO8vasU83kjtMN9XSiAL0WaDE root@s03-db-1
37. The key's randomart image is:
38. +---[DSA 1024]----+
39. | E+ |
40. | +.o |
41. | . . o |
42. | +. . =|
43. | . S.+. . B+|
44. | + = .o..oB|
45. | = . o=*+|
46. | ..o+ ..===|
47. | .*++..=*=|
48. +----[SHA256]-----+
49.
50. s03-db-1:~ # cat /root/.ssh/id_dsa.pub
51.
52. ssh-dss
AAAAB3NzaC1kc3MAAACBAMe+HQgU6RFqBK/VjnMIfJ2Qu/ZzGo6zS/Oteb957shR/DjUQsaBy8UFel
pXLLmsSJ6FFzHQnA4ri8lGW4/
EugmD3536s1Vi6O+zIxaxJF+LNQnKo6xvueLWqQ9sARfKaQgnUrMUusIBY9cxGrsXc3Zfo68NaPPT5
aa1JyYdEsENAAAAFQCzyh/ooTuZRqwRI5/
T7tFOINhsLwAAAIEAlyG92i4h5KDAZ+ftDnVRZJhLlIg7rJf8kFojr87WQ4PpXnR/
zEjI2+UCH2T6Orwdq8J9g7q9dtTO7QWy3Wt9eak5HQA4mpik5ai/
u+ftZf0BLuCdDxWVryFhAFg8CO2GYVrWiqCCP7AIAKs56DqQRsUu6twU5MHJ8f//gUjX//
8AAACBALuwqBbfEpG0lkLFuczIyWDoKLPZJwjocIYXeVOwdYNWJk/LdQ+D/
hv91MJ8GzVhcLUlKFYyCiuRknIjuuOfaEzTuZ+T5Giqvl2xBjkX1ZVMnrBqJSUNXMclem6IVUn0X/
M3GqcFrhi5Jk5at26nH46MaYusw0OMCdNynq2aicHt root@s03-db-1
53. From the SSH session on s03-db-1, use the vi editor to create and open a file
named /root/.ssh/authorized_keys, paste the key you generated on s03-db-0,
save your changes, and close the file (by pressing the Escape key, typing :wq!,
and pressing the Enter key).
54. s03-db-1:~ # vi /root/.ssh/authorized_keys
55. From the SSH session on s03-db-0, use the vi editor to create and open a new
file:/root/.ssh/authorized_keys, paste the key you generated on s03-db-1 into
it, save your changes, and close the file (by pressing the Escape key, typing :wq!,
and pressing the Enter key).
56. s03-db-0:~ # vi /root/.ssh/authorized_keys
57. From the SSH session on s03-db-0, generate passphrase-less RSA SSH key by
running ssh-keygen. When prompted, press Enter three times and then run cat
/root/.ssh/id_rsa.pub to display the key.
58. s03-db-0:~ # ssh-keygen
59. Generating public/private dsa key pair.
60. Enter file in which to save the key (/root/.ssh/id_dsa):
61. Enter passphrase (empty for no passphrase):
62. Enter same passphrase again:
63. Your identification has been saved in /root/.ssh/id_rsa.
64. Your public key has been saved in /root/.ssh/id_rsa.pub.
65. The key fingerprint is:
66. SHA256:BGv5NCePmzP/aHMr5MhMHe75to/cKUG6RAmzrgicBlY root@s03-db-1
67. The key's randomart image is:
68. +---[RSA 2048]----+
69. | ++ |
70. |.+. |
71. |o.+... |
72. |..+*o+ . |
73. |.o+=O . S |
74. |.=X+o+ |
75. |**+B+E. |
76. |+**+o. |
77. |.++.. |
78. +----[SHA256]-----+
79.
80. s03-db-0:~ # cat /root/.ssh/id_rsa.pub
81. ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQDXf3fFwe4qBmyI88xaorItLGXs8wmJsFRg3BaUD/
phBE9Hajxu4pzwLIERyBT+DMW8sbXx6OmVe9bONr+s4GLF9fJ8fDcPlJmiGA5SpooaC33c1IxP1Fa0
Hsva295rz6AkVSu+yw89aaImxs37bjpId2wvjbjGmWhujdKBsfxNkzrwisr+WnFnyPGD0vtP7pZ0Yh
NzPgHN/3IlfRfyILtLtFrFaSoQdJWzjt87Sj9C+SqyIR/R++kX2l55/
q7zuHNXDQ4W4wVXawNC1NVS3UubgSJnwaBbqqZkF0Ijdu0gyM0hczdRA9mcp/
gQ9NFkHYu4GTGLoYT6z2WyV4JyVNtt root@s03-db-0
82. From the SSH session on s03-db-1, generate passphrase-less RSA SSH key by
running ssh-keygen. When prompted, press Enter three times and then run cat
/root/.ssh/id_rsa.pub to display the key.
83. s03-db-1:~ # ssh-keygen
84. Generating public/private dsa key pair.
85. Enter file in which to save the key (/root/.ssh/id_dsa):
86. Enter passphrase (empty for no passphrase):
87. Enter same passphrase again:
88. Your identification has been saved in /root/.ssh/id_rsa.
89. Your public key has been saved in /root/.ssh/id_rsa.pub.
90. The key fingerprint is:
91. SHA256:BGv5NCePmzP/aHMr5MhMHe75to/cKUG6RAmzrgicBlY root@s03-db-1
92. The key's randomart image is:
93. +---[RSA 2048]----+
94. | . |
95. | E +o |
96. | . + =+.. |
97. |.. . +.*+ . |
98. |.o . .S+.+ |
99. | = oo* . |
100. | . . . ==* o . |
101. | . . ++Oo+o . |
102. | .oBB=+ |
103. +----[SHA256]-----+
104.
105. s03-db-1:~ # cat /root/.ssh/id_rsa.pub
106. ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQCyisn1Le0o491/Rw/99W1zuySWmR3iqMeAYG8XwQ5My6wt9z
FHdADQwmw3atd5EgpZjlp/
DZb7zk4wBgRhVaqLwEFfcmlqoTSdS4CG3oLuM8JJNYdKnD4asngWi98q7/+jwR78HmOZ36VK7+qWKb
8l3cecMRsjlDJQF+MRYWknslMRoJgf9O42JG6GcNZ4RtMfq1FZZ8Qy73oKKIydUynSMBtQnPa38g+u
/
ypxtzv4wsVQL16LWA5UW2XylR9qK3VurZA6wrqfSY9jX1nO8pxaZOnVyPDIgW7EhUgdt95MuL0RWLY
CqaHfOeeKDhPwcC3tLyZysZ7dKu2tLbUQJ3kF root@s03-db-1
107. From the SSH session on s03-db-1, use the vi editor to open the file
named /root/.ssh/authorized_keys, paste the RSA SSH key you generated on
s03-db-0 to a new line at the end of the file, save your changes, and close the file
(by pressing the Escape key, typing :wq!, and pressing the Enter key).
108. s03-db-1:~ # vi /root/.ssh/authorized_keys
109. From the SSH session on s03-db-0, use the vi editor to open the file
named /root/.ssh/authorized_keys, paste the RSA key you generated on s03-
db-1 to a new line at the end of the file, save your changes, and close the file (by
pressing the Escape key, typing :wq!, and pressing the Enter key).
110. s03-db-0:~ # vi /root/.ssh/authorized_keys

111. From the SSH session on s03-db-0, edit /etc/ssh/sshd_config file:


112. s03-db-0:~ # vi /etc/ssh/sshd_config

113. In the /etc/ssh/sshd_config file, locate


the PermitRootLogin and AuthorizedKeysFile entries, and configure them as
follows (remove the leading # character, if present):

114. PermitRootLogin yes


115. AuthorizedKeysFile /root/.ssh/authorized_keys
116. Save your changes, close the file, and restart sshd daemon by
running systemctl restart sshd:
117. s03-db-0:/ # systemctl restart sshd

118. Repeat steps 9-11 on s03-db-1.

Task 5: Configure name resolution


1. From the SSH session on s03-db-0, add two entries to the /etc/hosts file in order
to provide name resolution for both hosts within the virtual network:

2. s03-db-1:~ # vi /etc/hosts
3. 172.16.1.10 s03-db-0
4. 172.16.1.11 s03-db-1

5. Repeat step 1 on s03-db-1

Task 6: Configure storage

From the SSH session on s03-db-0, list mounts by running df -h:

1. s03-db-0:~ # df -h
2.
3. Filesystem Size Used Avail Use% Mounted on
4. devtmpfs 2.0G 8.0K 2.0G 1% /dev
5. tmpfs 2.9G 0 2.9G 0% /dev/shm
6. tmpfs 2.0G 18M 2.0G 1% /run
7. tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
8. /dev/sda2 29G 2.0G 25G 8% /
9. /dev/sdh1 128G 33M 128G 1% /usr/sap
10. /dev/sdd1 128G 33M 128G 1% /hana/shared
11. /dev/sda1 976M 70M 856M 8% /boot
12. /dev/mapper/vg--log-lv--log--0 256G 33M 256G 1% /hana/log
13. /dev/mapper/vg--data-lv--data--0 256G 33M 256G 1% /hana/data
14. /dev/mapper/vg--backup-lv--backup--0 256G 33M 256G 1% /hana/backup
15. /dev/sdb1 32G 48M 30G 1% /mnt/resource
16. tmpfs 394M 0 394M 0% /run/user/1000
17. From the SSH session on s03-db-0, create a directory that will be used to host the
SAP HANA installation media by running mkdir --m 777 /hana/shared/media.
18. s03-db-0:~ # mkdir --m 777 /hana/shared/media

19. Repeat steps 1-2 on s03-db-1.

Exercise 3: Configure clustering on Azure VMs running


Linux
Duration: 15 minutes

In this exercise, you will configure clustering on Azure VMs running Linux.

Task 1: Configure clustering


1. From the SSH session on s03-db-0, run ha-cluster-init and follow the prompts:

o Do you want to continue anyway (y/n)? y

o /root/.ssh/id_rsa already exists - overwrite (y/n)? n

o Network address to bind to (e.g.: 192.168.1.0) [172.16.1.0]: ENTER

o Multicast address (e.g.: 239.x.x.x) [239.119.57.183]: ENTER

o Multicast port [5405]: ENTER

o Do you wish to use SBD (y/n)?: n

o Do you wish to configure an administration IP (y/n)?: n

2. s03-db-0:~ # ha-cluster-init
3. ! NTP is not configured to start at system boot.
4. ! No watchdog device found. If SBD is used, the cluster will be unable to
start without a watchdog.
5. Do you want to continue anyway (y/n)? y
6. /root/.ssh/id_rsa already exists - overwrite (y/n)? n
7. Configuring csync2
8. Generating csync2 shared key (this may take a while)...done
9. csync2 checking files...done
10.
11. Configure Corosync:
12. This will configure the cluster messaging layer. You will need
13. to specify a network address over which to communicate (default
14. is eth0's network, but you can use the network address of any
15. active interface).
16.
17. Network address to bind to (e.g.: 192.168.1.0) [172.16.1.0]
18. Multicast address (e.g.: 239.x.x.x) [239.97.16.230]
19. Multicast port [5405]
20.
21. Configure SBD:
22. If you have shared storage, for example a SAN or iSCSI target,
23. you can use it avoid split-brain scenarios by configuring SBD.
24. This requires a 1 MB partition, accessible to all nodes in the
25. cluster. The device path must be persistent and consistent
26. across all nodes in the cluster, so /dev/disk/by-id/* devices
27. are a good choice. Note that all data on the partition you
28. specify here will be destroyed.
29.
30. Do you wish to use SBD (y/n)? n
31. ! Not configuring SBD - STONITH will be disabled.
32. Hawk cluster interface is now running. To see cluster status, open:
33. https://172.16.1.10:7630/
34. Log in with username 'hacluster', password 'linux'
35. ! You should change the hacluster password to something more secure!
36. Waiting for cluster........done
37. Loading initial cluster configuration
38.
39. Configure Administration IP Address:n
40. Optionally configure an administration virtual IP
41. address. The purpose of this IP address is to
42. provide a single IP that can be used to interact
43. with the cluster, rather than using the IP address
44. of any specific cluster node.
45.
46. Do you wish to configure an administration IP (y/n)? n
47. Done (log saved to /var/log/ha-cluster-bootstrap.log)
48.
49. From the SSH session on s03-db-1, run ha-cluster-join and follow the prompts:

o Do you want to continue anyway (y/n)? y

o IP address or hostname of existing node (e.g.: 192.168.1.1) []: s03-db-0

o /root/.ssh/id_rsa already exists - overwrite (y/n)? n

o /root/.ssh/id_dsa already exists - overwrite (y/n)? n

50. s03-db-1:/ # ha-cluster-join


51. ! NTP is not configured to start at system boot.
52. ! No watchdog device found. If SBD is used, the cluster will be unable to
start without a watchdog.
53. Do you want to continue anyway (y/n)? y
54. Join This Node to Cluster:
55. You will be asked for the IP address of an existing node, from which
56. configuration will be copied. If you have not already configured
57. passwordless ssh between nodes, you will be prompted for the root
58. password of the existing node.
59.
60. IP address or hostname of existing node (e.g.: 192.168.1.1) []s03-db-0
61. Retrieving SSH keys - This may prompt for root@s03-db-0:
62. /root/.ssh/id_rsa already exists - overwrite (y/n)? n
63. /root/.ssh/id_dsa already exists - overwrite (y/n)? n
64. No new SSH keys installed
65. Configuring csync2
66. Merging known_hosts
67. ! Failed to get known_hosts from s03-db-1: Exited with error code 255,
Error output: Warning: Permanently added 's03-db-1,172.16.1.11' (ECDSA) to the
list of known hosts.
68. parallax error: SSH requested a password. Please create SSH keys or
69. use the -A option to provide a password.
70. parallax error: SSH requested a password. Please create SSH keys or
71. use the -A option to provide a password.
72. Permission denied (publickey,password,keyboard-interactive).
73.
74. Probing for new partitions...done
75. Hawk cluster interface is now running. To see cluster status, open:
76. https://172.16.1.11:7630/
77. Log in with username 'hacluster', password 'linux'
78. ! You should change the hacluster password to something more secure!
79. Waiting for cluster........done
80. Done (log saved to /var/log/ha-cluster-bootstrap.log)

81. From the SSH session on s03-db-0, run passwd hacluster, and follow the
prompts to change the password of the hacluster account to demo@pass123:

82. s03-db-0:/ # passwd hacluster


83. New password:
84. Retype new password:
85. passwd: password updated successfully

86. Repeat step 3 on s03-db-1.

Task 2: Configure corosync


1. From the SSH session on s03-db-0, modify the /etc/corosync/corosync.conf file.

2. s03-db-1:~ # vi /etc/corosync/corosync.conf

3. Add the following content to the file (add the transport entry following
the interface section and add the entire nodelistsection):

4. [...]
5. interface {
6. [...]
7. }
8. transport: udpu
9. }
10. nodelist {
11. node {
12. ring0_addr: 172.16.1.10
13. }
14. node {
15. ring0_addr: 172.16.1.11
16. }
17. }
18. logging {
19. [...]

20. Modify the totem section by configuring the following entries:

21. token: 30000


22. token_retransmits_before_loss_const: 10
23. join: 60
24. consensus: 36000
25. max_messages: 20

26. Modify the quorum section by configuring the following entries:

27. expected_votes: 2
28. two_node: 1

29. Save the file, and restart the corosync service by running service corosync
restart:

30. s03-db-0:/ # service corosync restart

31. Repeat steps 1-5 on s03-db-1.

Exercise 4: Install SAP HANA


Duration: 60 minutes

In this exercise, you will install SAP HANA.

Task 1: Copy installation media to Linux VMs


1. From the lab computer, start WinSCP and connect to the DNS name you assigned
to the public IP address of the s03-db-0 Azure VM in Exercise 1 Task 4:
2. When prompted whether to continue, click Yes

3. In the left window pane, navigate to the location of the HANA media files on the
lab computer. In the right window pane, navigate to the media directory you
created on s03-db-0 in Exercise 2 Task 5.
4. Drag the folder containing the installation media files from the left window pane
to the right window pane.
5. Wait for the copy to complete.
Task 2: Run hdblcm on both Linux VMs
1. From the SSH session on s03-db-0, change the current directory to the location
of the media files and set permissions on its content:

2. s03-db-0:/ # cd /hana/shared/media
3. s03-db-0:/hana/shared/media/ # chmod -R 744 *

4. From the SSH session on s03-db-0, change the current directory to the location
of the hdblcm binary:

5. s03-db-0:/hana/shared/media # cd ./DATA_UNITS/HDB_SERVER_LINUX_X86_64
6. s03-db-0:/hana/shared/media/DATA_UNITS/HDB_SERVER_LINUX_X86_64 #
7. From the SSH session on s03-db-0, run ./hdblcm --
hdbinst_server_ignore=check_min_mem and follow prompts:

o Enter selected system index [3]: 1


o Enter Installation Path [/hana/shared]: accept the default

o Enter Local Host Name [s03-db-0]: accept the default

o Do you want to add additional hosts to the system? (y/n) [n]: accept the
default

o Enter SAP HANA System ID: S03

o Enter Instance Number [00]: accept the default

o Select Database Mode / Enter Index [1]: accept the default

o Select System Usage / Enter Index [4]: 4

o Enter Location of Data Volumes [/hana/data/S03]: accept the default

o Enter Location of Log Volumes [/hana/log/S03]: accept the default

o Enter Certificate Host Name for Host 's03-db-0' [s03-db-0]: accept the
default

o Enter SAP Host Agent User (sapadm) Password: demo@pass123

o Confirm SAP Host Agent User (sapadm) Password: demo@pass123

o Enter System Administrator (s03adm) Password: demo@pass123

o Confirm System Administrator (s03adm) Password: demo@pass123

o Enter System Administrator Home Directory [/usr/sap/S03/home]: accept


the default

o Enter System Administrator Login Shell [/bin/sh]: accept the default

o Enter System Administrator User ID [1001]: accept the default

o Enter ID of User Group (sapsys) [79]: accept the default

o Enter Database User (SYSTEM) Password: Demo@pass123

o Confirm Database User (SYSTEM) Password: Demo@pass123

o Restart system after machine reboot? [n]: accept the default


o Enter Installation Path for Address Directories and Reference Data
[/hana/shared/S03/global/hdb/IM/reference_data]: accept the default

o Do you want to continue? (y/n): y

8. s03-db-0:/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_SERVER_LINUX_X86_64
# ./hdblcm
9.
10. SAP HANA Lifecycle Management - SAP HANA 1.00.121.00.1466466057
11. ***************************************************************
12.
13. Scanning Software Locations...
14. Detected components:
15. SAP HANA Database (1.00.121.00.1466466057) in
/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_SERVER_LINUX_X86_64/server
16. SAP HANA AFL (incl.PAL,BFL,OFL,HIE) (1.00.121.00.1466480725) in
/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_AFL_LINUX_X86_64/packages
17. SAP TRD AFL FOR HANA (1.00.121.00.1466480725) in
/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_TRD_AFL_LINUX_X86_64/packages
18. SAP HANA Database Client (1.00.120.032.1464894911) in
/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_CLIENT_LINUX_X86_64/client
19. SAP HANA Studio (2.3.6.000000) in
/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_STUDIO_LINUX_X86_64/studio
20. SAP HANA Smart Data Access (1.00.6.001.0) in
/hana/shared/media/HANA_51051151/DATA_UNITS/SAP_HANA_SDA_10_LINUX_X86_64/
packages
21. SAP HANA XS Advanced Runtime (1.0.28.271025) in
/hana/shared/media/HANA_51051151/DATA_UNITS/XSA_RT_10_LINUX_X86_64/packages
22. SAP Web Ide 1 (3.012.0) in
/hana/shared/media/HANA_51051151/DATA_UNITS/XSAC_SAP_WEB_IDE_10/XSACSAPWEBIDE1
2_0.ZIP
23. DI CORE 1 (3.012.0) in
/hana/shared/media/HANA_51051151/DATA_UNITS/XSAC_DI_CORE_10/XSACDEVXDI12_0.ZIP
24. XS Monitoring 1 (1.002.0) in
/hana/shared/media/HANA_51051151/DATA_UNITS/XSA_CONTENT_10/XSACMONITORING02_0.
ZIP
25. XS Services 1 (1.002.0) in
/hana/shared/media/HANA_51051151/DATA_UNITS/XSA_CONTENT_10/XSACSERVICES02_0.ZI
P
26. SAP HANA Runtime Tools 1 (1.002.2) in
/hana/shared/media/HANA_51051151/DATA_UNITS/XSAC_HRTT_10/XSACHRTT02_2.ZIP
27.
28. Choose installation
29.
30. Index | System | Database Properties
31. ------------------------------------------------
32. 1 | Install new system |
33. | |
34. 2 | Extract components |
35. 3 | Exit (do nothing) |
36.
37. Enter selected system index [3]: 1
38.
39. Select additional components for installation:
40.
41. Index | Components | Description
42.
------------------------------------------------------------------------------
-----------------
43. 1 | server | No additional components
44. 2 | all | All components
45. 3 | client | Install SAP HANA Database Client version
1.00.120.032.1464894911
46. 4 | afl | Install SAP HANA AFL (incl.PAL,BFL,OFL,HIE) version
1.00.121.00.1466480725
47. 5 | smartda | Install SAP HANA Smart Data Access version
1.00.6.001.0
48. 6 | studio | Install SAP HANA Studio version 2.3.6.000000
49. 7 | trd | Install SAP TRD AFL FOR HANA version
1.00.121.00.1466480725
50. 8 | xs | Install SAP HANA XS Advanced Runtime version
1.0.28.271025
51.
52. Enter comma-separated list of the selected indices [3]: 1
53. Enter Installation Path [/hana/shared]:
54. Enter Local Host Name [s03-db-0]:
55. Do you want to add additional hosts to the system? (y/n) [n]:
56. Enter SAP HANA System ID: S03
57. Enter Instance Number [00]:
58.
59. Index | Database Mode | Description
60.
------------------------------------------------------------------------------
-----------------
61. 1 | single_container | The system contains one database
62. 2 | multiple_containers | The system contains one system database and
1..n tenant databases
63.
64. Index | System Usage | Description
65.
------------------------------------------------------------------------------
-
66. 1 | production | System is used in a production environment
67. 2 | test | System is used for testing, not production
68. 3 | development | System is used for development, not production
69. 4 | custom | System usage is neither production, test nor
development
70.
71. Select System Usage / Enter Index [4]: 4
72. Enter Location of Data Volumes [/hana/data/S03]:
73. Enter Location of Log Volumes [/hana/log/S03]:
74. Enter Certificate Host Name For Host 's03-db-0' [s03-db-0]:
75. Enter SAP Host Agent User (sapadm) Password:
76. Confirm SAP Host Agent User (sapadm) Password:
77. Enter System Administrator (s03adm) Password:
78. Confirm System Administrator (s03adm) Password:
79. Password confirmation failed
80. Confirm System Administrator (s03adm) Password:
81. Enter System Administrator Home Directory [/usr/sap/S03/home]:
82. Enter System Administrator Login Shell [/bin/sh]:
83. Enter System Administrator User ID [1001]:
84. Enter ID of User Group (sapsys) [79]:
85. Enter Database User (SYSTEM) Password:
86. Confirm Database User (SYSTEM) Password:
87. Restart system after machine reboot? [n]:
88.
89. Summary before execution:
90. =========================
91.
92. SAP HANA Components Installation
93. Installation Parameters
94. Remote Execution: ssh
95. Installation Path: /hana/shared
96. Local Host Name: s03-db-0
97. SAP HANA System ID: S03
98. Instance Number: 00
99. Database Mode: single_container
100. Location of Data Volumes: /hana/data/S03
101. Location of Log Volumes: /hana/log/S03
102. System Administrator Login Shell: /bin/sh
103. System Administrator User ID: 1001
104. ID of User Group (sapsys): 79
105. Software Components
106. SAP HANA Database
107. Install version 1.00.121.00.1466466057
108. Location:
/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_SERVER_LINUX_X86_64/server
109.
110. SAP HANA AFL (incl.PAL,BFL,OFL,HIE)
111. Do not install
112. SAP TRD AFL FOR HANA
113. Do not install
114. SAP HANA Database Client
115. Do not install
116. SAP HANA Studio
117. Do not install
118. SAP HANA Smart Data Access
119. Do not install
120. SAP HANA XS Advanced Runtime
121. Do not install
122.
123. Do you want to continue? (y/n): y
124.
125. Installing components...
126. Installing SAP HANA Database...
127. Preparing package 'Saphostagent Setup'...
128. Preparing package 'Python Support'...
129. Preparing package 'Python Runtime'...
130. Preparing package 'Product Manifest'...
131. Preparing package 'Binaries'...
132. Preparing package 'Data Quality'...
133. Preparing package 'Krb5 Runtime'...
134. Preparing package 'Installer'...
135. Preparing package 'Ini Files'...
136. Preparing package 'HWCCT'...
137. Preparing package 'Emergency Support Package'...
138. Preparing package 'EPM'...
139. Preparing package 'Documentation'...
140. Preparing package 'Delivery Units'...
141. Preparing package 'DAT Languages'...
142. Preparing package 'DAT Configfiles'...
143. Creating System...
144. Extracting software...
145. Installing package 'Saphostagent Setup'...
146. Installing package 'Python Support'...
147. Installing package 'Python Runtime'...
148. Installing package 'Product Manifest'...
149. Installing package 'Binaries'...
150. Installing package 'Data Quality'...
151. Installing package 'Krb5 Runtime'...
152. Installing package 'Installer'...
153. Installing package 'Ini Files'...
154. Installing package 'HWCCT'...
155. Installing package 'Emergency Support Package'...
156. Installing package 'EPM'...
157. Installing package 'Documentation'...
158. Installing package 'Delivery Units'...
159. Installing package 'DAT Languages'...
160. Installing package 'DAT Configfiles'...
161. Creating instance...
162. Starting SAP HANA Database system...
163. Starting 7 processes on host 's03-db-0' (worker):
164. Starting on 's03-db-0': hdbcompileserver, hdbdaemon, hdbindexserver,
hdbnameserver, hdbpreprocessor, hdbwebdispatcher, hdbxsengine
165. Starting on 's03-db-0': hdbcompileserver, hdbdaemon, hdbindexserver,
hdbpreprocessor, hdbwebdispatcher, hdbxsengine
166. Starting on 's03-db-0': hdbdaemon, hdbindexserver, hdbwebdispatcher,
hdbxsengine
167. Starting on 's03-db-0': hdbdaemon, hdbwebdispatcher, hdbxsengine
168. Starting on 's03-db-0': hdbdaemon, hdbwebdispatcher
169. All server processes started on host 's03-db-0' (worker).
170. Importing delivery units...
171. Importing delivery unit HCO_INA_SERVICE
172. Importing delivery unit HANA_DT_BASE
173. Importing delivery unit HANA_IDE_CORE
174. Importing delivery unit HANA_TA_CONFIG
175. Importing delivery unit HANA_UI_INTEGRATION_SVC
176. Importing delivery unit HANA_UI_INTEGRATION_CONTENT
177. Importing delivery unit HANA_XS_BASE
178. Importing delivery unit HANA_XS_DBUTILS
179. Importing delivery unit HANA_XS_EDITOR
180. Importing delivery unit HANA_XS_IDE
181. Importing delivery unit HANA_XS_LM
182. Importing delivery unit HDC_ADMIN
183. Importing delivery unit HDC_BACKUP
184. Importing delivery unit HDC_IDE_CORE
185. Importing delivery unit HDC_SEC_CP
186. Importing delivery unit HDC_XS_BASE
187. Importing delivery unit HDC_XS_LM
188. Importing delivery unit SAPUI5_1
189. Importing delivery unit SAP_WATT
190. Importing delivery unit HANA_BACKUP
191. Importing delivery unit HANA_HDBLCM
192. Importing delivery unit HANA_SEC_BASE
193. Importing delivery unit HANA_SEC_CP
194. Importing delivery unit HANA_ADMIN
195. Importing delivery unit HANA_WKLD_ANLZ
196. Installing Resident hdblcm...
197. Updating SAP HANA Instance Integration on Local Host...
198. Regenerating SSL certificates...
199. Deploying SAP Host Agent configurations...
200. Creating Component List...
201. SAP HANA system installed
202. You can send feedback to SAP with this form:
https://s03-db-0:1129/lmsl/HDBLCM/S03/feedback/feedback.html
203. Log file written to
'/var/tmp/hdb_S03_hdblcm_install_2017-11-12_00.07.22/hdblcm.log' on host 's03-
db-0'.

204. Repeat steps 1-3 on s03-db-1 using the same custom values and
accepting the same default values.

Exercise 5: Configure SAP HANA replication


Duration: 20 minutes

In this exercise, you will configure SAP HANA replication.

Task 1: Create HANA DATA ADMIN user account


1. From the SSH session on s03-db-0, change the current directory to the root, and
modify the path environment variable to include reference to the HANA binaries.

o cd /

o export PATH="/usr/sap/S03/HDB00/exe:$PATH"

2. s03-db-0:/hana/shared/media/HANA_51051151/DATA_UNITS/HDB_SERVER_LINUX_X86_64
# cd /
3.
4. s03-db-0:/ # export PATH="/usr/sap/S03/HDB00/exe:$PATH"

5. From the SSH session on s03-db-0, create the s03hasync HANA DATA ADMIN
user account (when prompted, provide the password for the HANA DB SYSTEM
user which you set in Task2 of Exercise 4 to Demo@pass123):
o hdbsql -u system -i 00 'CREATE USER s03hasync PASSWORD
"C0mpl3xp@55w0rd"'

o hdbsql -u system -i 00 'GRANT DATA ADMIN TO s03hasync'

o hdbsql -u system -i 00 'ALTER USER s03hasync DISABLE PASSWORD


LIFETIME'

6. s03-db-0:/ # hdbsql -u system -i 00 'CREATE USER s03hasync PASSWORD


"C0mpl3xp@55w0rd"'
7. Password:
8. 0 rows affected (overall time 15.504 msec; server time 14.420 msec)
9. s03-db-0:/ # hdbsql -u system -i 00 'GRANT DATA ADMIN TO s03hasync'
10. Password:
11. 0 rows affected (overall time 5163 usec; server time 4054 usec)
12. s03-db-0:/ # hdbsql -u system -i 00 'ALTER USER s03hasync DISABLE PASSWORD
LIFETIME'
13. Password:
14. 0 rows affected (overall time 4733 usec; server time 3694 usec)

15. Repeat step 1 (but not step 2) on s03-db-1.

Task 2: Configure keystore and perform a backup


1. From the SSH session on s03-db-0, configure keystore by running hdbuserstore
SET S03haloc localhost:30015 S03hasync C0mpl3xp@55w0rd:

s03-db-0:/ # hdbuserstore SET S03haloc localhost:30015 S03hasync


C0mpl3xp@55w0rd

2. Repeat step 1 on s03-db-1.

3. From the SSH session on s03-db-0, perform a backup by running hdbsql -u


system -i 00 "BACKUP DATA USING FILE ('initialbackup')" (when prompted,
provide the password for the HANA DB SYSTEM user which you set
to Demo@pass123):

4. s03-db-0:/ # hdbsql -u system -i 00 "BACKUP DATA USING FILE


('initialbackup')"
5. Password:
6. 0 rows affected (overall time 63.961412 sec; server time 63.960173 sec)

Task 3: Create the primary and the secondary sites


1. From the SSH session on s03-db-0, switch to the security context of the s03adm
account by running su - s03adm:
2. s03-db-0:/ # su - s03adm
3. s03adm@s03-db-0:/usr/sap/S03/HDB00>

4. From the SSH session on s03-db-0, create the primary site by running hdbnsutil
--sr_enable ---name=SITE1:

5. s03adm@s03-db-0:/usr/sap/S03/HDB00> hdbnsutil -sr_enable --name=SITE1


6. checking for active nameserver ...
7. nameserver is active, proceeding ...
8. successfully enabled system as system replication source site
9. done.

10. From the SSH session on s03-db-0, switch to the privileged mode by typing exit:

11. s03adm@s03-db-0:/usr/sap/S03/HDB00> exit


12. logout
13. s03-db-0:/ #

14. From the SSH session on s03-db-1, switch to the security context of the s03adm
account by running su - s03adm:

15. s03-db-1:/ # su - s03adm


16. s03adm@s03-db-1:/usr/sap/S03/HDB00>

17. From the SSH session on s03-db-1, stop the HANA DB instance by
running sapcontrol -nr 00 -function StopWait 600 10:

18. s03adm@s03-db-1:/usr/sap/S03/HDB00> sapcontrol -nr 00 -function StopWait 600


10
19.
20. 30.09.2018 11:44:52
21. Stop
22. OK
23.
24. 30.09.2018 11:45:12
25. StopWait
26. OK
27. s03adm@s03-db-1:/usr/sap/S03/HDB00>

28. From the SSH session on s03-db-1, create the secondary site by
running hdbnsutil -sr_register --remoteHost=s03-db-0 --remoteInstance=00
--replicationMode=sync --name=SITE2:

29. s03adm@s03-db-1:/usr/sap/S03/HDB00> hdbnsutil -sr_register --remoteHost=s03-


db-0 --remoteInstance=00 --replicationMode=sync --name=SITE2
30. adding site ...
31. --operationMode not set; using default from
global.ini/[system_replication]/operation_mode: delta_datashipping
32. checking for inactive nameserver ...
33. nameserver s03-db-1:30001 not responding.
34. collecting information ...
35. updating local ini files ...
36. done.

37. From the SSH session on s03-db-1, switch to the privileged mode by typing exit:

38. s03adm@s03-db-1:/usr/sap/S03/HDB00> exit


39. logout
40. s03-db-1:/ #

Exercise 6: Configure cluster framework


Duration: 30 minutes

In this exercise, you will configure cluster framework.

Task 1: Create an Azure AD application for the STONITH device


1. From the lab computer, start Internet Explorer and browse to the Azure portal
at https://portal.azure.com.

2. When prompted, sign in with the account that has the Global Administrator role
in the Azure Active Directory tenant associated with your subscription.

3. In the Azure portal, navigate to the blade displaying your subscription's settings
and note the subscription ID.

4. In the Azure portal, navigate to the Azure Active Directory blade.

5. On the Active Directory blade, click Properties and note the value of Directory
ID. This will be referenced as the tenant id later in the exercise.
6. Click App registrations followed by selecting +New application registration.

7. On the Create blade, specify the following settings, and click Create:

o Name: Stonith app

o Application type: Web app /API

o Sign-on URL: http://localhost


8. On the blade displaying the newly created app, note the value of Application ID.
This will be referenced as the login id later in this exercise:

9. Click Settings and, on the Settings blade, click Keys.

10. On the Keys blade, in the DESCRIPTION column, type STONITH app key. In
the EXPIRES column, select Never expires. Then, click Save.
11. Make sure to record the entry appearing in the VALUE column (this entry is
displayed only once, after you click Save). This will be used as the password for
the corresponding service principal.

12. Close the Keys blade.

Task 2: Create a custom role for the fence agent


1. In the Azure portal, start a Bash session in Cloud Shell. If prompted, configure
storage for Cloud Shell.

2. In the Cloud Shell pane, create a new file named roleDefinition.json with the
following content (replace subscription_id, with the value you identified in the
previous task):

3. {
4. "Name": "Linux Fence Agent Role",
5. "Id": null,
6. "IsCustom": true,
7. "Description": "Allows to deallocate and start virtual machines",
8. "Actions": [
9. "Microsoft.Compute/*/read",
10. "Microsoft.Compute/virtualMachines/deallocate/action",
11. "Microsoft.Compute/virtualMachines/start/action"
12. ],
13. "NotActions": [
14. ],
15. "AssignableScopes": [
16. "/subscriptions/subscription_id"
17. ]
18. }

19. In the Cloud Shell pane, run the following to create the custom role
definition Linux Fence Agent Role:

20. az role definition create --role-definition @roleDefinition.json

Task 3: Grant permissions to Azure VMs to the service principal of


the STONITH app
1. In the Azure portal, navigate to the s03-db-0 VM.
2. On the s03-db-0 blade, click Access control (IAM).

3. Click + Add role assignment.

4. On the Add role assignment blade, specify the following settings and click Save:

o Role: Linux Fence Agent Role

o Assign access to: Azure AD user, group, or service principal

o Select: Stonith App


5. Repeat steps 1 to 4 to assign the Stonith App the Linux Fence Agent Role to the
s03-db-1 Azure VM.

Task 4: Configure the STONITH cluster device


1. From the SSH session on s03-db-0, run the following (replace subscription_id,
resource_group, tenant_id, login_id, and password placeholders with the values
you identified in Exercise 6 Task 2):

2. crm configure primitive rsc_st_azure stonith:fence_azure_arm \


3. params subscriptionId="subscription_id" resourceGroup="hana-s03-RG"
tenantId="tenant_id" login="login_id" passwd="password"
Note: Ignore the error messages listed below and any warning messages when running
the crm commands
```
ERROR: rsc_st_azure: required parameter username not defined
ERROR: rsc_st_azure: required parameter plug not defined
```

2. From the SSH session on s03-db-0, run the following:

3. crm configure property stonith-timeout=900


4. crm configure property stonith-enabled=true

Task 5: Create SAPHanaTopology cluster resource agent


1. From the SSH session on s03-db-0, create a new file named crm-
saphanatop.txt with the following content:

2. primitive rsc_SAPHanaTopology_S03_HDB00 ocf:suse:SAPHanaTopology \


3. operations $id="rsc_sap2_S03_HDB00-operations" \
4. op monitor interval="10" timeout="600" \
5. op start interval="0" timeout="600" \
6. op stop interval="0" timeout="300" \
7. params SID="S03" InstanceNumber="00"
8. clone cln_SAPHanaTopology_S03_HDB00 rsc_SAPHanaTopology_S03_HDB00 \
9. meta is-managed="true" clone-node-max="1" target-role="Started"
interleave="true"

10. From the SSH session on s03-db-0, apply the settings in the file by running::

11. s03-db-0:/ # crm configure property maintenance-mode=true


12. s03-db-0:/ # crm configure load update ./crm-saphanatop.txt

Task 6: Create SAPHana cluster resource agent


1. From the SSH session on s03-db-0, create a new file named crm-
saphana.txt with the following content:

2. primitive rsc_SAPHana_S03_HDB00 ocf:suse:SAPHana \


3. operations $id="rsc_sap_S03_HDB00-operations" \
4. op start interval="0" timeout="3600" \
5. op stop interval="0" timeout="3600" \
6. op promote interval="0" timeout="3600" \
7. op monitor interval="60" role="Master" timeout="700" \
8. op monitor interval="61" role="Slave" timeout="700" \
9. params SID="S03" InstanceNumber="00" PREFER_SITE_TAKEOVER="true" \
10. DUPLICATE_PRIMARY_TIMEOUT="7200" AUTOMATED_REGISTER="false"
11. ms msl_SAPHana_S03_HDB00 rsc_SAPHana_S03_HDB00 \
12. meta is-managed="true" notify="true" clone-max="2" clone-node-max="1" \
13. target-role="Started" interleave="true"
14. primitive rsc_ip_S03_HDB00 ocf:heartbeat:IPaddr2 \
15. meta target-role="Started" is-managed="true" \
16. operations $id="rsc_ip_S03_HDB00-operations" \
17. op monitor interval="10s" timeout="20s" \
18. params ip="172.16.1.4"
19. primitive rsc_nc_S03_HDB00 anything \
20. params binfile="/usr/bin/nc" cmdline_options="-l -k 62500" \
21. op monitor timeout=20s interval=10 depth=0
22. group g_ip_S03_HDB00 rsc_ip_S03_HDB00 rsc_nc_S03_HDB00
23. colocation col_saphana_ip_S03_HDB00 4000: g_ip_S03_HDB00:Started \
24. msl_SAPHana_S03_HDB00:Master
25. order ord_SAPHana_S03_HDB00 Optional: cln_SAPHanaTopology_S03_HDB00 \
26. msl_SAPHana_S03_HDB00

27. From the SSH session on s03-db-0, apply the settings in the file by running crm
configure load update ./crm-saphana.txt:

28. s03-db-0:/ # crm configure load update ./crm-saphana.txt

29. From the SSH session on s03-db-0, clean up the HANA resources by running crm
resource cleanup rsc_SAPHana_S03_HDB00:

30. crm resource cleanup rsc_SAPHana_S03_HDB00

31. From the SSH session on s03-db-0, turn off the maintenance mode and configure
rsc_defaults by running:

32. crm configure property maintenance-mode=false


33. crm configure rsc_defaults resource-stickiness=1000
34. crm configure rsc_defaults migration-threshold=5000

35. From the SSH session on s03-db-0, review the cluster status by running crm_mon
-r and examining the output:

36. crm_mon -r
37. Stack: corosync
38. Current DC: s03-db-0 (version 1.1.16-6.5.1-77ea74d) - partition with quorum
39. Last updated: Sun Sep 30 21:09:06 2018
40. Last change: Sun Sep 30 21:09:00 2018 by root via crm_attribute on s03-db-0
41.
42. 2 nodes configured
43. 7 resources configured
44.
45. Online: [ s03-db-0 s03-db-1 ]
46.
47. Full list of resources:
48.
49. rsc_st_azure (stonith:fence_azure_arm): Started s03-db-0
50. Clone Set: cln_SAPHanaTopology_S03_HDB00 [rsc_SAPHanaTopology_S03_HDB00]
51. Started: [ s03-db-0 s03-db-1 ]
52. Resource Group: g_ip_S03_HDB00
53. rsc_ip_S03_HDB00 (ocf::heartbeat:IPaddr2): Started s03-db-0
54. rsc_nc_S03_HDB00 (ocf::heartbeat:anything): Started s03-db-0
55. Master/Slave Set: msl_SAPHana_S03_HDB00 [rsc_SAPHana_S03_HDB00]
56. Masters: [ s03-db-0 ]
57. Slaves: [ s03-db-1 ]

Exercise 7: Test the deployment


Duration: 30 minutes

In this exercise, you will test the HANA deployment.

Task 1: Install SAP HANA Studio Administration on the Azure VM


running Windows
1. From the Azure portal, establish a Remote Desktop session to the s03-hana-0
Azure VM.

2. Use the drive redirection feature of Remote Desktop session to copy


the DATA_UNITS\HDB_STUDIO_WINDOWS_X86_64folder from the installation
media to the s03-hana-0 Azure VM.

3. From the Remote Desktop session to s03-hana-0 Azure VM, navigate to


the DATA_UNITS\HDB_STUDIO_WINDOWS_X86_64 folder and
run hdbsetup.exe. This will start the SAP HANA Studio Installation wizard.

4. On the Define Studio Properties page, click Next.


5. On the Select Features page, ensure that only SAP HANA Studio
Administration is selected, and click Next.
6. On the Review & Confirm page, click Install.
7. On the Finish page, click Finish.
Task 2: Modify Azure Internal Load Balancer configuration
The template-based deployment of Azure components that form the SAP HANA
infrastructure configures load balancer with the default value of its Health Probe ports
and load balancing rules set for the instance 03 of SAP HANA. In this task, you will
modify the load balancer configuration in order to account for the fact that you
deployed instance 00.

1. From the lab computer, in the Azure portal, navigate to the s03-lb-db load
balancer. Then, on the s03-lb-db blade, click Health probes.
2. On the s03-lb-db -- Health Probes blade, click probe.

3. On the probe blade, set the port to 62500, and click Save.
4. On the probe blade, click the link to the lb03Rule30315. This will display
the l03Rule30315 blade.

5. On the lb03Rule30315 blade, change the name of the rule to lb03Rule30015,


set both the port and the backend port entries to 30015, and click Save.
6. Repeat steps 4 - 5 for the remaining
rules lb03Rule30313, lb03Rule30340, lb03Rule30341, and lb03Rule30342,
replacing for each 03 to 00.

Task 3: Connect to HANA cluster by using SAP HANA Studio


Administration
1. From the Remote Desktop session to s03-hana-0, start Notepad, and open
the hosts file located in C:\Windows\System32\drivers\etc.

2. Add the following entries to the host file, save your changes, and close the file:

3. 172.16.1.10 s03-db-0
4. 172.16.1.11 s03-db-1
5. 172.16.1.4s03-db-ha-01

6. From the Remote Desktop session, start SAP HANA Studio Administration.

7. When prompted to select a workspace, accept the default value, and click OK.

8. When prompted to provide a password hint, click No.


9. On the Overview page, click Open Administration Console.
10. In the SAP HANA Administration Console, expand the Systems menu, and
click Add System.
11. In the Specify System dialog box, specify the following information, and
click Next.

o Host Name: s03-db-ha-01

o Instance number: 00
12. In the Connection Properties dialog box, select the Authentication by
database user option, specify the following information, and click Finish.

o User Name: SYSTEM

o Password: Demo@pass123
13. Once you successfully connected to S03 as SYSTEM, select the S03
(SYSTEM) node and click the System Monitor icon in the Systems toolbar.

14. Review the System Monitor status.


Note: Proceed to the next step even if the Operational State is not reporting that all
services are started, as long as the output of the crm_mon -r command you ran in
Exercise 6, Task 6 was correct. It typically takes a few minutes before the operational
status is fully identified.

12. Right click the S03 (SYSTEM) node and in the right click menu.
Click Configuration and Monitoring followed by Open Administration.
13. In the Configuration and Monitoring view, examine the Overview tab. Verify
that all services are started, active, and in sync. You might need to wait a few
minutes before the operational status is identified.

14. Switch to the Alerts tab, and verify they are not indicating any operational issues.
Task 4: Connect to HANA cluster by using Hawk
1. From the Remote Desktop session, to s03-hana-0 Azure VM, start Internet
Explorer, and browse to https://s03-db-0:7630. On the SUSE Hawk Sign
in page, sign in as hacluster with the password demo@pass123.

2. Once you sign in, review the Nodes tab on the Status page.
3. Next, switch to the Resources tab on the Status page.

4. Examine the state of the HANA resources starting with the SAPHANATopology.

5. Examine the state of the SAPHana resource.


Task 5: Test a manual failover (from s03-db-0 to s03-db-1)
1. From the Remote Desktop session, to s03-hana-0 Azure VM, in the Internet
Explorer window displaying the SUSE Hawkpage, from
the msl_SAPHana_S03_HDB00 page, identify the system currently serving the
master role.
Switch to the SSH session on the node you identified in the previous step (s03-
db-0), and stop the pacemaker service by running service pacemaker stop (This
will trigger the failover of the SAPHana clustered resource.)

s03-db-0:~ # service pacemaker stop

2. Wait until the status of the resource changes from the question mark.

3. Start Internet Explorer, and browse to https://s03-db-1:7630. On the SUSE


Hawk Sign in page, sign in as hacluster with the password demo@pass123.

4. In the Internet Explorer window displaying the SUSE Hawk page, from
the msl_SAPHana_S03_HDB00 page, identify the system currently serving the
master role. Verify that its location changed to s03-db-1:
5. Switch to SAP HANA Administration Console, and refresh the Overview tab in
the Configuration and Monitoring view. Note that SAP HANA is running at this
point on the s03-db-1 node, and it is operational:

6. After the failover, switch to the SSH session on s03-db-0, and start the pacemaker
service by running service pacemaker start.
7. s03-db-0:~ # service pacemaker start

8. Switch to the SUSE Hawk Status page, and note that the SAPHana clustered
resource on s03-db-0 failed to start as secondary (This is
because AUTOMATED_REGISTER property was set to false in Exercise 6 Task 6.):

9. To remediate this, switch to the SSH session on s03-db-0, and reconfigure the
HANA instance as secondary by running the following sequence of commands:

o su -- s03adm (switch to the s03adm security context)

o sapcontrol --nr 00 --function StopWait 600 10 (stop the HANA instance


in case it is running)

o hdbnsutil -sr_register --remoteHost=s03-db-1 --remoteInstance=00 --


replicationMode=sync --name=SITE1(register the local instance as
secondary)

o exit (switch back to the root)

o crm resource cleanup msl_SAPHana_S03_HDB00 s03-db-0 (clean up


the failed state)
10. s03-db-0:~ # su - s03adm
11. s03adm@s03-db-0:/usr/sap/S03/HDB00> sapcontrol -nr 00 -function StopWait 600
10
12. 30.09.2018 21:54:05
13. Stop
14. OK
15.
16. 30.09.2018 21:54:05
17. StopWait
18. OK
19. s03adm@s03-db-0:/usr/sap/S03/HDB00> hdbnsutil -sr_register --remoteHost=s03-
db-1 --remoteInstance=00 --replicationMode=sync --name=SITE1
20. adding site ...
21. --operationMode not set; using default from
global.ini/[system_replication]/operation_mode: delta_datashipping
22. checking for inactive nameserver ...
23. nameserver s03-db-0:30001 not responding.
24. collecting information ...
25. updating local ini files ...
26. done.
27. s03adm@s03-db-0:/usr/sap/S03/HDB00> exit
28. logout
29. s03-db-0:~ # crm resource cleanup msl_SAPHana_S03_HDB00 s03-db-0
30. Cleaned up rsc_SAPHana_S03_HDB00:0 on s03-db-0
31. Waiting for 1 replies from the CRMd. OK

32. Switch to the SUSE Hawk Status page, and note the SAPHana clustered
resource is operational on both s03-db-0 and s03-db-1 with s03-db-1 as the
primary (you might need to wait a few minutes for the interface to refresh):
Task 6: Test a migration (from s03-db-1 to s03-db-0)
1. From the SSH session on s03-db-1, migrate the SAPHana master node and the
group containing the virtual IP address of the cluster to s03-db-0 by running the
following commands:

o crm resource migrate msl_SAPHana_S03_HDB00 s03-db-0

o crm resource migrate g_ip_S03_HDB00 s03-db-0

2. s03-db-1:~ # crm resource migrate msl_SAPHana_S03_HDB00 s03-db-0


3. INFO: Move constraint created for msl_SAPHana_S03_HDB00 to s03-db-0
4. s03-db-1:~ # crm resource migrate g_ip_S03_HDB00 s03-db-0
5. INFO: Move constraint created for g_ip_S03_HDB00 to s03-db-0

6. Switch to the SUSE Hawk Status page and note the SAPHana clustered resource
on s03-db-1 failed to start as secondary. This is
because AUTOMATED_REGISTER property was set to false in Exercise 6 Task 6
(you might need to wait a few minutes for the interface to refresh).
7. To remediate this, switch to the SSH session on s03-db-1, and reconfigure the
HANA instance as secondary by running the following sequence of commands:

8. su - s03adm (switch to the s03adm security context)


9.
10. sapcontrol -nr 00 -function StopWait 600 10 (stop the HANA instance in case it
is running)
11.
12. hdbnsutil -sr_register -remoteHost=s03-db-0 --remoteInstance=00 --
replicationMode=sync --name=SITE2 (register the local instance as secondary)
13.
14. exit (switch back to the root)
15.
16. s03-db-1:~ # su - s03adm
17. s03adm@s03-db-1:/usr/sap/S03/HDB00> sapcontrol -nr 00 -function StopWait 600
10
18. 30.09.2018 22:11:18
19. Stop
20. OK
21.
22. 30.09.2018 22:11:18
23. StopWait
24. OK
25. s03adm@s03-db-1:/usr/sap/S03/HDB00> hdbnsutil -sr_register --remoteHost=s03-
db-0 --remoteInstance=00 --replicationMode=sync --name=SITE2
26. adding site ...
27. --operationMode not set; using default from
global.ini/[system_replication]/operation_mode: delta_datashipping
28. checking for inactive nameserver ...
29. nameserver s03-db-1:30001 not responding.
30. collecting information ...
31. updating local ini files ...
32. done.
33. s03adm@s03-db-1:/usr/sap/S03/HDB00> exit
34. logout

35. Switch to the SUSE Hawk Status page, click Edit Configuration. On Edit
Configuration page, click Constraints.
36. From the Constraints page, delete the cli-prefer-
msl_SAPHana_S03_HDB00 constraint.

Note: Delete any other location constraints that might exist in the current configuration.

6. Switch to the SSH session on s03-db-1, and clean up the failed state by
running crm resource cleanup msl_SAPHana_S03_HDB00 s03-db-1:

7. s03-db-1:~ # crm resource cleanup msl_SAPHana_S03_HDB00 s03-db-1


8. Cleaned up rsc_SAPHana_S03_HDB00:0 on s03-db-1

9. Switch to the SUSE Hawk Status page, and verify the SAPHana clustered
resource is operational on both nodes with s03-db-0 as the master (you might
need to wait a few minutes for the interface to refresh).
10. Switch to SAP HANA Administration Console, and refresh the Overview tab in
the Configuration and Monitoring view. Note that SAP HANA is running at this
point on the s03-db-0 node and is operational.
Task 7: Test fencing
1. From the SSH session on s03-db-0, shut down the eth0 network interface:

2. s03-db-0:~ # ifdown eth0

3. This will trigger restart of the Azure virtual machine, as you can verify it by
checking its status from the Azure portal (you might need to wait a few minutes
for the restart to be initiated).

4. From the Remote Desktop session, switch to the Internet Explorer window
displaying connection to https://s03-db-1:7630. Wait until the status of
the msl_SAPHana_S03_HDB00 resource changes from the question mark to a
blue circle, and verify its location changed to s03-db-1.
5. Switch to SAP HANA Administration Console, and refresh the Overview tab in
the Configuration and Monitoring view. Note that SAP HANA is running at this
point on the s03-db-1 node.
6. From the Azure portal, verify the s03-db-0 virtual machine is running.

7. Restart the SSH session to s03-db-0, and run the following commands in order to
restore its operational status:

8. su - s03adm (switch to the s03adm security context)


9. sapcontrol --nr 00 --function StopWait 600 10 (stop the HANA instance in case
it is running)
10. hdbnsutil -sr_register --remoteHost=s03-db-1 --remoteInstance=00 --
replicationMode=sync --name=SITE1 (register the local instance as secondary)
11. exit(switch back to the root)
12. crm resource cleanup msl_SAPHana_S03_HDB00 s03-db-0 (clean up the failed
state)
13.
14. s03-db-0:~ # su - s03adm
15. s03adm@s03-db-0:/usr/sap/S03/HDB00> sapcontrol -nr 00 -function StopWait 600
10
16.
17. 30.09.2018 22:48:57
18. Stop
19. OK
20.
21. 30.09.2018 22:48:57
22. StopWait
23. OK
24. s03adm@s03-db-0:/usr/sap/S03/HDB00> hdbnsutil -sr_register --remoteHost=s03-
db-1 --remoteInstance=00 --replicationMode=sync --name=SITE1
25. adding site ...
26. --operationMode not set; using default from
global.ini/[system_replication]/operation_mode: delta_datashipping
27. checking for inactive nameserver ...
28. nameserver s03-db-0:30001 not responding.
29. collecting information ...
30. updating local ini files ...
31. done.
32. s03adm@s03-db-0:/usr/sap/S03/HDB00> exit
33. logout
34. s03-db-0:~ # crm resource cleanup msl_SAPHana_S03_HDB00 s03-db-0
35. Cleaned up rsc_SAPHana_S03_HDB00:0 on s03-db-0

36. Switch to the SUSE Hawk Status page, and note that the SAPHana clustered
resource is operational on both s03-db-0 and s03-db-1 with s03-db-1 as the
primary (you might need to wait a few minutes for the interface to refresh).

37. Switch to SAP HANA Administration Console, and on the Overview tab in
the Configuration and Monitoring view, click the System Replication
Status link.

38. From the System Replication tab, verify the replication status is active.
After the Hands-on lab
Duration: 10 minutes

After completing the hands-on lab, you will remove the resource group and all its
resources.

Task 1: Remove the resource group containing all Azure resources


deployed in this lab
1. From the lab computer, in the Azure portal at http://portal.azure.com , click
the Cloud Shell icon.

2. If prompted, in the Welcome to Azure Cloud Shell window, click Bash (Linux).

3. At the Bash prompt, run the following:

az group delete --name s03-hana-RG --no-wait --yes

You should follow all steps provided after the Hands-on lab.

You might also like