Skip to content

Commit 9ba6b87

Browse files
committed
Update documentation and improve configuration check reporting; enhance error handling in validation logic
1 parent 468f84f commit 9ba6b87

File tree

6 files changed

+34
-24
lines changed

6 files changed

+34
-24
lines changed

README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,42 @@
1111

1212
## 🔍 Overview
1313

14-
The SAP Testing Automation Framework is an open-source orchestration tool designed to validate SAP deployments on Microsoft Azure. It enables you to assess system configurations against SAP on Azure best practices and guidelines. Additionally, the framework facilitates automation for various testing scenarios, including High Availability (HA) functional testing.
14+
The SAP Testing Automation Framework is an open-source orchestration tool designed to validate SAP deployments on Microsoft Azure. It enables you to assess system configurations against SAP on Azure best practices and guidelines, and facilitates automation for various testing scenarios.
1515

1616
> **NOTE**: This repository is currently in public preview and is intended for testing and feedback purposes. As this is an early release, it is not yet production-ready, and breaking changes can be introduced at any time.
1717
1818
![SAP Testing Automation Framework](./docs/images/sap-testing-automation-framework.png)
1919

20-
## Supported Configuration Matrix
21-
22-
The following SAP components are supported in a two-node Pacemaker cluster running on SUSE Linux Enterprise Server (SLES) or Red Hat Enterprise Linux (RHEL):
23-
24-
- **SAP HANA Scale-Up**
25-
- **SAP Central Services**
26-
27-
For additional information on supported configuration patterns, such as cluster types (Azure Fence Agent or SBD) and storage options (Azure Files or Azure NetApp Files) in this automated testing framework, refer to [supported high availability configuration](./docs/HIGH_AVAILABILITY.md).
28-
2920
## 📊 Key Features
3021

3122
- **High Availability Testing** - Thorough validation of the SAP HANA scale-up and SAP Central Services failover mechanism in a two node pacemaker cluster, ensuring the system operates correctly across various test cases.
3223
- **Configuration Validation** - Ensures that SAP HANA scale-up and SAP Central Services configurations comply with SAP on Azure best practices and guidelines.
3324
- **Functional Testing** - Executes test scenarios on the high availability setup to identify potential issues, whether during a new system deployment or before implementing cluster changes in a production environment.
25+
- **Configuration Checks** - Validates OS parameters, database settings, Azure resources, and storage configurations against SAP and Azure best practices for supported databases. Performs comprehensive validation including kernel parameters, filesystem mounts, VM sizing, and network setup to ensure compliance with recommended guidelines.
3426
- **Detailed Reporting** - Generates comprehensive reports, highlighting configuration mismatch or deviations from recommended best practices. Includes failover test outcomes, any failures encountered, and logs with insights to aid in troubleshooting identified issues.
3527

3628
## 🏆 Purpose
3729

3830
Testing is crucial for keeping SAP systems running smoothly, especially for critical business operations. This framework helps by addressing key challenges:
3931

40-
- **Preventing Risks** - It simulates system failures like node crashes, network issues, and storage failures to check if recovery mechanisms work properly, helping to catch problems before they affect real operations.
41-
- **Meeting Compliance Requirements** - Many businesses need to prove their SAP systems are reliable. This framework provides detailed reports and logs that help with audits and ensure compliance with internal and regulatory standards.
42-
- **Ensuring Quality** - The framework runs automated tests to verify whether the failover behavior of SAP components functions as expected on Azure across various test scenarios. It also ensures that the cluster and resource configurations are set up correctly, helping to maintain system reliability.
43-
- **Automating Testing**: Manually testing high availability (HA) setups is slow and error-prone. This framework automates the process—from setup to reportingsaving time and ensuring more accurate and consistent results.
32+
- **Preventing Risks** - Identifies configuration issues and validates system behavior before problems affect production operations. It simulates system failures like node crashes, network issues, and storage failures to check if recovery mechanisms work properly, helping to catch potential issues early.
33+
- **Meeting Compliance Requirements** - Provides detailed reports and logs that help with audits and ensure compliance with internal and regulatory standards.
34+
- **Ensuring Quality** - The framework runs automated tests to verify whether the failover behavior of SAP components functions as expected on Azure across various test scenarios. It also ensures that the cluster and resource configurations are set up correctly, helping to maintain system reliability.
35+
- **Automating Testing** - Automates validation processes from configuration checks to reporting, saving time and ensuring consistent results.
4436

4537
## 🚦 Get Started
4638

4739
There are two primary ways to get started with the SAP Testing Automated Framework. Choose the path that best fits your current environment and objectives:
4840

49-
### Option 1: [Integration with SAP Deployment Automation Framework (SDAF)](./docs/SDAF_INTEGRATION.md)
41+
### Option 1: Integration with SAP Deployment Automation Framework (SDAF)
5042

5143
If you already have [SDAF](https://github.com/Azure/sap-automation) environment set up, integrating the SAP Testing Automation Framework is a natural extension that allows you to leverage existing deployment pipelines and configurations.
5244

53-
### Option 2: [Getting Started with High Availability Testing (Standalone)](./docs/HIGH_AVAILABILITY.md)
45+
### Option 2: Getting Started with High Availability Testing (Standalone)
5446

5547
For users focused solely on validating SAP functionality and configurations, the standalone approach offers a streamlined process to test critical SAP components without the complexity of full deployment integration.
48+
- For High Availability testing details, see the [High Availability documentation](./docs/HIGH_AVAILABILITY.md).
49+
- For Configuration Checks and Testing details, see the [Configuration Checks documentation](./docs/CONFIGURATION_CHECKS.md).
5650

5751
## 🏗️ Architecture and Components
5852

@@ -68,7 +62,8 @@ For support and questions, please:
6862
## 📚 Additional Resources
6963

7064
- [Azure SAP Documentation](https://docs.microsoft.com/azure/sap)
71-
- [SAP on Azure: High Availability Guide](https://docs.microsoft.com/azure/sap/workloads/sap-high-availability-guide-start)
65+
- [Configuration Checks Guide](./docs/CONFIGURATION_CHECKS.md)
66+
- [High Availability Testing Guide](./docs/HIGH_AVAILABILITY.md)
7267

7368
## 🤝 Contributing
7469

docs/CONFIGURATION_CHECKS.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,16 @@ Follow the steps (2.1 - 2.2) in [Setup Guide for SAP Testing Automation Framewor
5858

5959
> **Note**: High Availability (HA) configuration checks and functional tests are currently supported only for SAP HANA databases. For IBM DB2 databases, only non-HA configuration checks are available.
6060
61+
### 3. Required Access and Permissions
6162

62-
### 3. Test Execution
63+
Ensure that the managed identity or service principal used by the controller virtual machine has the necessary permissions to access Azure resources and SAP systems for configuration validation.
64+
1. "Reader" role to the user-assigned managed identity on the resource group containing the SAP VMs and the Azure Load Balancer.
65+
1. "Reader" role to the user-assigned managed identity on the resource group containing the Azure NetApp Files account (if using Azure NetApp Files as shared storage).
66+
1. "Reader" role to the user-assigned managed identity on the resource group containing the storage account (if using Azure File Share as shared storage).
67+
1. "Reader" role to the user-assigned managed identity on the resource group containing the managed disks (if using Azure Managed Disks for SAP HANA data and log volumes).
68+
1. "Reader" role to the user-assigned managed identity on the resource group containing the shared disks (if using Azure Shared Disks for SBD devices).
69+
70+
### 4. Test Execution
6371

6472
To execute the script, run following command:
6573

@@ -83,7 +91,7 @@ To execute the script, run following command:
8391
./scripts/sap_automation_qa.sh --extra-vars='{"configuration_test_type":"ApplicationInstances"}'
8492
```
8593

86-
### 4. Viewing Test Results
94+
### 5. Viewing Test Results
8795

8896
After the test execution completes, a detailed HTML report is generated that summarizes the PASS/FAIL status of each test case and includes detailed execution logs for every step of the automation run.
8997

@@ -101,12 +109,11 @@ After the test execution completes, a detailed HTML report is generated that sum
101109
The report file is named using the following format:
102110

103111
```
104-
HA_{SAP_TIER}_{DATABASE_TYPE}_{OS_DISTRO_NAME}_{INVOCATION_ID}.html
112+
CONFIG_{SAP_SID}_{DATABASE_TYPE}_{INVOCATION_ID}.html
105113
```
106114

107-
- `SAP_TIER`: The SAP tier tested (e.g., DB, SCS)
115+
- `SAP_SID`: The SAP system ID (e.g., HN1, NWP)
108116
- `DATABASE_TYPE`: The database type (e.g., HANA)
109-
- `OS_DISTRO_NAME`: The operating system distribution (e.g., SLES15SP4)
110117
- `INVOCATION_ID`: A unique identifier (Group invocation ID) for the test run which is logged at the end of test execution. Find example screenshot below:
111118

112119
![Test Execution Completion Screenshot](./images/execution_screenshot.png)

docs/SETUP.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ For the framework to access the properties of the Azure Load Balancer in a high
4444
**Permissions required for Configuration Checks:**
4545
1. "Reader" role to the user-assigned managed identity on the resource group containing the SAP VMs and the Azure Load Balancer.
4646
1. "Reader" role to the user-assigned managed identity on the resource group containing the Azure NetApp Files account (if using Azure NetApp Files as shared storage).
47-
1. "Storage Account Reader" role to the user-assigned managed identity on the resource group containing the storage account (if using Azure File Share as shared storage).
47+
1. "Reader" role to the user-assigned managed identity on the resource group containing the storage account (if using Azure File Share as shared storage).
4848
1. "Reader" role to the user-assigned managed identity on the resource group containing the managed disks (if using Azure Managed Disks for SAP HANA data and log volumes).
4949
1. "Reader" role to the user-assigned managed identity on the resource group containing the shared disks (if using Azure Shared Disks for SBD devices).
5050

src/modules/configuration_check_module.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ def validate_min_list(self, check: Check, collected_data: str) -> Dict[str, Any]
547547
}
548548
except Exception as ex:
549549
self.log(logging.ERROR, f"Error while validating min list {ex}")
550+
return {
551+
"status": TestStatus.ERROR.value,
552+
}
550553

551554
def validate_vm_support(self, check: Check, collected_data: str) -> Dict[str, Any]:
552555
"""

src/playbook_00_configuration_checks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,3 +438,8 @@
438438
ansible.builtin.include_tasks: "./roles/misc/tasks/render-html-report.yml"
439439
vars:
440440
html_template_name: "./templates/config_checks_report.html"
441+
report_file_name: "CONFIG_{{ sap_sid | upper }}_{{ platform | upper }}_{{ test_group_invocation_id }}"
442+
443+
- name: "Debug the file name of the report generated"
444+
ansible.builtin.debug:
445+
msg: "Report file CONFIG_{{ sap_sid | upper }}_{{ platform | upper }}_{{ test_group_invocation_id }} generated."

src/roles/misc/tasks/render-html-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- name: "Read the log file and create a HTML report"
1717
render_html_report:
1818
test_group_invocation_id: "{{ test_group_invocation_id }}"
19-
test_group_name: "{{ test_group_name }}_{{ ansible_os_family | upper }}"
19+
test_group_name: "{{ report_file_name | default(test_group_name + '_' + ansible_os_family | upper) }}"
2020
report_template: "{{ html_report_template }}"
2121
workspace_directory: "{{ _workspace_directory }}"
2222
test_case_results: "{{ all_results | default([]) }}"

0 commit comments

Comments
 (0)