Skip to content

Commit 33c09db

Browse files
dennispadiahdamecharladevanshjainms
authored
Changes in HA doc (#9)
* Changes in HA doc * Update repository URL in documentation Update URL to point to the actual repository * Refine language and clarity in the High Availability documentation --------- Co-authored-by: hdamecharla <[email protected]> Co-authored-by: devanshjain <[email protected]>
1 parent 077cbc8 commit 33c09db

File tree

1 file changed

+117
-76
lines changed

1 file changed

+117
-76
lines changed

docs/HIGH_AVAILABILITY.md

Lines changed: 117 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,75 @@
11
# SAP High Availability Testing
22

3-
## Overview
3+
A key component of the SAP Testing Automation framework is the SAP High Availability (HA) Testing. This helps in ensuring that an SAP system deployment complies to SAP on Azure best practices and guidelines.
44

5-
One key component of the SAP Testing Automation framework is the SAP High Availability (HA) Testing Framework, which is designed to ensure that your SAP deployments meet strict reliability and availability requirements.
5+
The SAP High Availability Testing scenario executes a series of tests designed to simulate real-world failures, ensuring the system's recovery capabilities. Leveraging Ansible, the framework orchestrates various test cases, including node crashes, network disruptions, and storage failures, to validate the effectiveness of recovery mechanisms. Additionally, the framework captures comprehensive logs and generates detailed reports on the test outcomes.
66

7-
The SAP High Availability Testing component operates by executing a series of carefully designed test scenarios that simulate real-world failure conditions and validate system recovery capabilities. By leveraging Ansible's powerful automation features, it orchestrates complex test scenarios across multiple components, while maintaining detailed logs and generating comprehensive reports of test outcomes.
7+
## Supported Configurations
8+
9+
### Linux distribution
10+
11+
Currently SAP Testing Automation Framework is supported for below Linux distros and version.
12+
13+
| Distribution | Supported Release |
14+
|--------------|-------------------|
15+
| SUSE Linux Enterpise Server (SLES) | 15 SP4, 15 SP5, 15 SP6 |
16+
| Red Hat Enterprise Linux (RHEL) | 8.8, 8.10, 9.2, 9.4 |
17+
18+
### High Availability configuration pattern
19+
20+
| Component | Type | Cluster Type | Storage |
21+
|-----------|------|--------------|---------|
22+
| SAP Central Services | ENSA1 or ENSA2 | Azure Fencing Agent | Azure Files or ANF |
23+
| SAP HANA | Scale-up | Azure Fencing Agent | Azure Managed Disk or ANF |
24+
| SAP HANA | Scale-up | ISCSI (SBD device) | Azure Managed Disk or ANF |
25+
26+
For SAP Central Services on SLES, both the simple mount approach and the classic method are supported.
27+
28+
## Technical Requirements for running Automation Framework
29+
30+
To run the SAP Testing Automation Framework, you must meet certain prerequisites and follow techincal requirements.
31+
32+
### SAP System Deployment on Microsoft Azure
33+
34+
- The SAP system must be hosted on Microsoft Azure Infrastructure-as-a-Service (IaaS).
35+
- The SAP system deploymed should follow SAP on Azure best practices as outlined in:
36+
- [SAP HANA high availability on Azure Virtual Machine](https://learn.microsoft.com/azure/sap/workloads/sap-high-availability-guide-start).
37+
- [SAP Netweaver high availability on Azure Virtual Machine](https://learn.microsoft.com/azure/sap/workloads/sap-high-availability-guide-start)
838

9-
In summary, SAP High Availability testing is an integral part of the overall SAP Testing Automation Framework, complementing other testing modules to provide a robust, end-to-end validation of your SAP environments.
39+
### Management server
1040

11-
### Core Framework
41+
The SAP Testing Automation Framework requires a jumpbox or management server with the following setup:
1242

13-
- **Ansible Playbooks**: Automated test execution and system validation
14-
- **Test Scripts**: Helper utilities for test case management
15-
- **WORKSPACES**: System-specific configuration and credentials management
16-
- **Reporting Engine**: Generates detailed HTML test reports
43+
- **Operating System**: Ubuntu 22.04 LTS.
44+
- **Location**: Must be deployed on Azure.
45+
46+
> [!NOTE]
47+
> Currently, only Ubuntu 22.04 LTS is supported for running the SAP Testing Automation Framework.
1748
18-
### System Requirements
49+
### Azure RBAC
1950

20-
#### Required Components
51+
For the framework to access the properties of the Azure Load Balancer in a high availability SAP system on Azure, the management server must have a Reader role assigned to the Load Balancer. This can be done using either a system-assigned or user-assigned managed identity.
2152

22-
1. **SAP System on Azure Cloud**
23-
- The SAP system must be deployed on Azure infrastructure.
24-
- Configured with supported high availability patterns to ensure system reliability.
25-
- Network connectivity to the testing infrastructure must be established.
53+
#### Configuring access using system-assigned managed identity
2654

27-
2. **Ubuntu Jump Host**
28-
- **Operating System**: Ubuntu 22.04 LTS.
29-
- **Location**: Deployed in Azure.
30-
- **Network**: Must be connected to the SAP system's virtual network.
31-
- **Permissions**: Requires a System Assigned/User Assigned managed identity with Reader Role at the subscription level.
55+
1. Enable system managed identity on the management server by following the steps in [Configure managed identities on Azure VMs](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-to-configure-managed-identities?pivots=qs-configure-portal-windows-vm#system-assigned-managed-identity).
56+
1. Open the Azure Load Balancer used for the high availability deployment of your SAP system on Azure.
57+
1. In the Azure Load Balancer panel, go to Access control (IAM).
58+
1. Follow steps 5 to 10 from [Use managed identity to access Azure Resource](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-to-configure-managed-identities?pivots=qs-configure-portal-windows-vm#system-assigned-managed-identity) to complete the configuration.
3259

33-
#### Optional Components
60+
#### Configuring access using user-assigned managed identity
61+
62+
1. Create user-assigned managed identity as described in [manage user-assigned managed identities](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities?pivots=identity-mi-methods-azp#create-a-user-assigned-managed-identity)
63+
1. Assign user-assigned managed identity to management server as described in [configure managed identities on Azure VMs](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-to-configure-managed-identities?pivots=qs-configure-portal-windows-vm#assign-a-user-assigned-managed-identity-to-an-existing-vm)
64+
1. Open the Azure Load Balancer used for the high availability deployment of your SAP system on Azure.
65+
1. In the Azure Load Balancer panel, go to Access control (IAM).
66+
1. Assign the required role to the user-assigned managed identity by following the steps in [assign roles using Azure portal](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal).
67+
68+
### Network Connectivity
69+
70+
The management server must have network connectivity to the SAP system to perform tests and validations. You can establish this connection by peering the networks as outlined in [manage a virtual network peering](https://learn.microsoft.com/azure/virtual-network/virtual-network-manage-peering?tabs=peering-portal).
71+
72+
### Analytics Integration (optional)
3473

3574
- **Analytics Integration** [Telemetry Setup Information](./TELEMETRY_SETUP.md)
3675
- Azure Log Analytics
@@ -40,35 +79,40 @@ In summary, SAP High Availability testing is an integral part of the overall SAP
4079

4180
### 1. Environment Setup
4281

43-
To set up your environment, follow these steps:
82+
To set up your enviroment in management server, follow these steps:
4483

45-
A. **Login to the Ubuntu Jump Host**:
46-
Ensure you are logged into the Ubuntu Jump Host that is connected to the SAP system's virtual network.
84+
1.1. **Login to the Ubuntu management server**:
4785

48-
B. **Clone the repository**:
86+
Ensure you are logged into the Ubuntu management server that is connected to the SAP system's virtual network.
4987

50-
```bash
51-
git clone https://github.com/devanshjainms/sap-automation-qa.git
52-
cd sap-automation-qa
53-
```
88+
1.2. **Clone the repository**:
5489

55-
C. **Run the initial setup script**:
90+
```bash
91+
# sudo to root
92+
sudo su -
5693

57-
```bash
58-
./scripts/setup.sh
59-
```
94+
# Clone the repository
95+
git clone https://github.com/Azure/sap-automation-qa.git
96+
cd sap-automation-qa
97+
```
98+
99+
1.3. **Run the initial setup script**:
100+
101+
```bash
102+
./scripts/setup.sh
103+
```
60104

61105
### 2. Configuration
62106

63-
#### A. Test Environment Configuration
107+
#### 2.1. Test Environment Configuration
64108

65-
1. Navigate to the root directory
109+
2.1.1. Navigate to the root directory
66110

67111
```bash
68112
cd sap-automation-qa
69113
```
70114

71-
2. Update `vars.yaml` with your test parameters. This file contains the variables used in the test cases:
115+
2.1.2. Update `vars.yaml` with your test parameters. This file contains the variables used in the test cases:
72116

73117
```yaml
74118
# The type of test to be executed. Supported values are:
@@ -81,6 +125,7 @@ TEST_TYPE: "SAPFunctionalTests"
81125
sap_functional_test_type: "DatabaseHighAvailability" # or "CentralServicesHighAvailability"
82126

83127
# The name of the SAP system configuration for which you want to execute the test cases.
128+
# It would be the name of the folder under 'WORKSPACE/SYSTEM/' where it could find hosts.yaml, sap-parameters.yaml files of the SAP system configuration
84129
SYSTEM_CONFIG_NAME: "DEV-WEEU-SAP01-X00"
85130

86131
# The type of authentication to be used for the telemetry data destination. Supported values are: VMPASSWORD and SSHKEY
@@ -104,7 +149,7 @@ adx_database_name: "your-adx-database-name"
104149
ade_client_id: "your-adx-client-id"
105150
```
106151
107-
#### B. System Configuration (WORKSPACES)
152+
#### 2.2. System Configuration (WORKSPACES)
108153
109154
Create your system workspace. This directory contains the configuration files specific to your SAP system, necessary for connecting to the system and executing test scenarios. The `WORKSPACE/SYSTEM/` directory holds sub-directories, each representing a different [SAP system](./WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00).
110155

@@ -114,11 +159,13 @@ mkdir ENV-REGION-VNET-SID
114159
cd ENV-REGION-VNET-SID
115160
```
116161

117-
#### Required Files
162+
The system workspace should include the following files, containing all necessary details about the SAP system.
163+
164+
2.2.1. **hosts.yaml** - System [Inventory file](https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html) (required)
118165

119-
i. **hosts.yaml** - System [Inventory file](https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html) (required)
166+
This file contains the connection details for the SAP system hosts and is used as an inventory file by the Ansible framework to connect to the SAP system. You can find the inventory file in the path [hosts.yaml](../WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00/hosts.yaml).
120167

121-
This file contains the connection properties of the SAP system hosts. This file acts as a inventory file for the ansible framework to connect to the SAP system. [Example of a inventory file](./WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00/hosts.yaml):
168+
Here is an example of the hosts.yaml file format:
122169

123170
```yaml
124171
X00_DB:
@@ -129,7 +176,7 @@ X00_DB:
129176
ansible_connection: "ssh"
130177
connection_type: "key"
131178
virtual_host: "VIRTUAL_HOSTNAME0"
132-
become_user: "root"
179+
become_user: "USERNAME1" #Username with root privilege
133180
os_type: "linux"
134181
vm_name: "AZURE_VM_NAME0"
135182
hostname1:
@@ -138,37 +185,43 @@ X00_DB:
138185
ansible_connection: "ssh"
139186
connection_type: "key"
140187
virtual_host: "VIRTUAL_HOSTNAME1"
141-
become_user: "root"
188+
become_user: "USERNAME1" #Username with root privilege
142189
os_type: "linux"
143190
vm_name: "AZURE_VM_NAME1"
144191
vars:
145192
node_tier: "hana" # or "ers", "scs"
146193
```
147194

148-
X00 is the SAP SID of the SAP system, followed by the host type (DB, ASCS, PAS, etc.). You should provide the SAP SID of the SAP system, regardless of whether you are testing Database High Availability or Central Services High Availability. The `hosts.yaml` file contains the following information:
195+
In the file:
196+
197+
- X00 represents the SAP SID (System ID) of the SAP system, followed by the host type (e.g., DB, ASCS, PAS). You must provide the SAP SID of the system, regardless of whether you are testing Database High Availability or Central Services High Availability.
198+
199+
The file includes the following details:
149200

150201
- **ansible_host**: The IP address of the host.
151-
- **ansible_user**: The user to connect to the host.
152-
- **ansible_connection**: The connection type.
153-
- **connection_type**: The type of connection. Applicable only when using SSH key for connection; when using a password, this should not be specified.
202+
- **ansible_user**: The user for connecting to the host.
203+
- **ansible_connection**: The connection type (usually "ssh").
204+
- **connection_type**: The connection type, used when connecting via SSH key (not needed for password-based connections).
154205
- **virtual_host**: The virtual host name of the SCS/DB host.
155-
- **become_user**: The user with root privileges.
156-
- **os_type**: The operating system type (Linux/Windows).
206+
- **become_user**: The user with root privileges. For example, user "azureadm" must be able to change to root without password.
207+
- **os_type**: The operating system type (e.g., Linux or Windows).
157208
- **vm_name**: The computer name of the Azure VM.
158-
- **node_tier**: This defines the type of node tier. Supported values: hana, ers, scs.
209+
- **node_tier**: The type of node tier. Supported values: hana, ers, scs.
210+
211+
2.2.2. **sap-parameters.yaml** - SAP Configuration (required)
159212

160-
ii. **sap-parameters.yaml** - SAP Configuration (required)
213+
This file contains the SAP system configuration parameters. The parameters are used by the test scenarios to validate the system's high availability configuration. You can find the inventory file in the path [sap-parameters.yaml](../WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00/sap-parameters.yaml).
161214

162-
This file contains the SAP system configuration parameters. The parameters are used by the test scenarios to validate the system's high availability configuration. [Example of a SAP parameters file](./WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00/sap-parameters.yaml):
215+
Here is an example of the sap-parameters.yaml file format:
163216

164217
```yaml
165218
# The SAP and Database SID of the SAP system.
166219
sap_sid: "your-sap-sid"
167220
db_sid: "your-db-sid"
168221
169222
# Boolean indicating if the SCS and database is configured as highly available.
170-
scs_high_availability: false
171-
db_high_availability: false
223+
scs_high_availability: true
224+
db_high_availability: true
172225
173226
# The high availability configuration of the SCS and DB instance. Supported values are:
174227
# - AFA (for Azure Fencing Agent)
@@ -191,37 +244,25 @@ platform: "HANA"
191244
NFS_provider: "ANF" # or "AFS"
192245
```
193246

194-
iii. Optional Files
247+
2.2.3. Credential Files
248+
249+
The required credential files depend on the authentication method used to connect to the SAP system:
195250

196-
- **ssh_key.ppk**: SSH private key (if not using Key Vault)
197-
- **password**: Host credentials (if not using SSH keys)
251+
1. SSH Key Authentication: If connecting via SSH key, place the private key inside `WORKSPACE/SYSTEM/<DIRECTORY>` and name the file "ssh_key.ppk".
252+
1. Username and Password Authentication: If connecting using a username and password, create a password file by running the following command. It takes the username from hosts.yaml file.
253+
254+
```bash
255+
echo "password" > WORKSPACE/SYSTEM/<DIRECTORY>/password
256+
```
198257

199258
### 3. Test Execution
200259

260+
To execute the script, run following command:
261+
201262
```bash
202263
./scripts/sap_automation_qa.sh
203264
```
204265

205-
## Supported Configurations
206-
207-
### High Availability Patterns
208-
209-
| Component | Database | Cluster Type | Storage |
210-
|-----------|----------|--------------|----------|
211-
| Central Services | N/A | Azure Fencing Agent | ANF/AFS |
212-
| HANA Database | HANA | Azure Fencing Agent | ANF/AFS |
213-
| HANA Database | HANA | SBD | ANF/AFS |
214-
215-
### Storage Solutions
216-
217-
- **ANF**: Azure NetApp Files
218-
- **AFS**: Azure File Share
219-
220-
### Cluster Types
221-
222-
- **AFA**: Azure Fencing Agent
223-
- **ISCSI**: SBD devices
224-
225266
## Troubleshooting
226267

227268
Test results and logs can be found in:

0 commit comments

Comments
 (0)