Professional Documents
Culture Documents
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.
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.
Contents
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 the SAP HANA installation media (requires an SAP Online Service
System account)
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/
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
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.
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 Region: The name of the Azure region you identified in the Before the
Hands-on Lab session
o Username: demouser
o Password: demo@pass123
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
7. On the Create a virtual machine blade, on the Networking tab, specify the
following settings, and click Next: Management >:
Name: hana-s03-RG-vnet
8. On the Create a virtual machine blade, on the Management tab, specify the
following settings, and click Next: Guest config >:
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.
2. On the hana-s03-RG resource group blade, in the list of resources, click hana-
s03-RG-vnet.
5. On the Add subnet blade, specify the following, and click OK:
o Name: subnet-1
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 Dbtype: HANA
o System Availability: HA
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):
o Location: [resourceGroup().location]
7. Wait for the deployment to complete. This might take about 5 minutes.
2. On the hana-s03-RG resource group blade, in the list of resources, click s03-nic-
db-0.
5. On the ipconfig1 blade, specify the following settings and click Save:
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.
12. On the ipconfig1 blade, specify the following settings and click Save:
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.
38. Register the SUSE image by using the trial registration code from your SUSE trial
subscription:
2. s03-db-0:~ # yast
3. In YaST Control Center, select Software -> Add-On Products and press Enter.
This will load Package Manager.
7. Select Accept.
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:~ #
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
6. systemctl daemon-reload
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
2. s03-db-1:~ # vi /etc/hosts
3. 172.16.1.10 s03-db-0
4. 172.16.1.11 s03-db-1
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
In this exercise, you will configure clustering on Azure VMs running Linux.
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:
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:
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. [...]
27. expected_votes: 2
28. two_node: 1
29. Save the file, and restart the corosync service by running service corosync
restart:
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 Do you want to add additional hosts to the system? (y/n) [n]: accept the
default
o Enter Certificate Host Name for Host 's03-db-0' [s03-db-0]: accept the
default
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.
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"'
4. From the SSH session on s03-db-0, create the primary site by running hdbnsutil
--sr_enable ---name=SITE1:
10. From the SSH session on s03-db-0, switch to the privileged mode by typing exit:
14. From the SSH session on s03-db-1, switch to the security context of the s03adm
account by running su - s03adm:
17. From the SSH session on s03-db-1, stop the HANA DB instance by
running sapcontrol -nr 00 -function StopWait 600 10:
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:
37. From the SSH session on s03-db-1, switch to the privileged mode by typing exit:
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.
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:
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.
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:
4. On the Add role assignment blade, specify the following settings and click Save:
10. From the SSH session on s03-db-0, apply the settings in the file by running::
27. From the SSH session on s03-db-0, apply the settings in the file by running 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:
31. From the SSH session on s03-db-0, turn off the maintenance mode and configure
rsc_defaults by running:
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 ]
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.
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.
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 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.
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.
2. Wait until the status of the resource changes from the question mark.
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:
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:
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:
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:
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:
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:
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.
2. If prompted, in the Welcome to Azure Cloud Shell window, click Bash (Linux).
You should follow all steps provided after the Hands-on lab.