Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,4 @@ WORKSPACES/*
VMWPASSWORD
.coverage.*
*.ini
.ansible/
46 changes: 40 additions & 6 deletions docs/HIGH_AVAILABILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ Currently SAP Testing Automation Framework is supported for below Linux distros
|-----------|------|--------------|---------|
| SAP Central Services | ENSA1 or ENSA2 | Azure Fencing Agent | Azure Files or ANF |
| SAP Central Services | ENSA1 or ENSA2 | ISCSI (SBD device) | Azure Files or ANF |
| SAP Central Services | ENSA1 or ENSA2 | Azure Shared Disks (SBD device) | Azure Files or ANF |
| SAP HANA | Scale-up | Azure Fencing Agent | Azure Managed Disk or ANF |
| SAP HANA | Scale-up | ISCSI (SBD device) | Azure Managed Disk or ANF |
| SAP HANA | Scale-up | Azure Shared Disks (SBD device) | Azure Managed Disk or ANF |

For SAP Central Services on SLES, both the simple mount approach and the classic method are supported.

Expand Down Expand Up @@ -238,9 +240,10 @@ db_high_availability: true

# The high availability configuration of the SCS and DB instance. Supported values are:
# - AFA (for Azure Fencing Agent)
# - ISCSI (for SBD devices)
scs_cluster_type: "AFA" # or "ISCSI"
database_cluster_type: "AFA" # or "ISCSI"
# - ISCSI (for SBD devices with ISCSI target servers)
# - ASD (for SBD devices with Azure Shared Disks)
scs_cluster_type: "AFA" # or "ISCSI" or "ASD"
database_cluster_type: "AFA" # or "ISCSI" or "ASD"

# The instance number of the SCS, ERS and DB instance.
scs_instance_number: "00"
Expand Down Expand Up @@ -273,23 +276,54 @@ key_vault_id: /subscriptions/<subscription-id>/resourceGroups/<
secret_id: https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<id>
```

2.2.3. Credential Files
2.2.3. **Credential Files** (Available locally)

The required credential files depend on the authentication method used to connect to the SAP system:

1. SSH Key Authentication: If connecting via SSH key, place the private key inside `WORKSPACE/SYSTEM/<DIRECTORY>` and name the file "ssh_key.ppk".
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.
1. **SSH Key Authentication**: If connecting via SSH key, place the private key inside `WORKSPACE/SYSTEM/<DIRECTORY>` and name the file "ssh_key.ppk".
1. **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.

```bash
echo "password" > WORKSPACES/SYSTEM/<DIRECTORY>/password
```

2.2.4. **Credential Files** (From Azure Key Vault)

When using Azure Key Vault to store credentials, the framework retrieves authentication details directly from the key vault using the configured managed identity.

**Authentication Methods:**

1. **SSH Key Authentication**: Store the private SSH key content in Azure Key Vault as a secret.
2. **Password Authentication**: Store the password in Azure Key Vault as a secret. The username is taken from the `hosts.yaml` file.

**Setup:**

1. Ensure the managed identity has "Key Vault Secrets User" role on the key vault.

2. Configure `key_vault_id` and `secret_id` parameters in `sap-parameters.yaml` as shown in section 2.2.2.

**Important**: When using Key Vault authentication, do NOT create local credential files (`ssh_key.ppk` or `password` files).


### 3. Test Execution

To execute the script, run following command:

```bash
# Run all the tests with default parameters
./scripts/sap_automation_qa.sh

# Run specific test cases from HA_DB_HANA group
./scripts/sap_automation_qa.sh --test_groups=HA_DB_HANA --test_cases=[ha-config,primary-node-crash]

# Run all enabled tests in HA_DB_HANA group
./scripts/sap_automation_qa.sh --test_groups=HA_DB_HANA

# Run all enabled tests in HA_SCS group
./scripts/sap_automation_qa.sh --test_groups=HA_SCS

# Run with verbose output
./scripts/sap_automation_qa.sh --test_groups=HA_DB_HANA --test_cases=[ha-config] -vv
```

### 4. Viewing Test Results
Expand Down
55 changes: 29 additions & 26 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
#
# pip-compile requirements.in
#
ansible-compat==25.1.5
ansible-compat==25.5.0
# via ansible-lint
ansible-core==2.17.11
ansible-core==2.17.12
# via
# -r requirements.in
# ansible-compat
# ansible-lint
ansible-lint==25.4.0
ansible-lint==25.5.0
# via -r requirements.in
ansible-runner==2.4.1
# via -r requirements.in
astroid==3.3.9
astroid==3.3.10
# via pylint
attrs==25.3.0
# via
Expand All @@ -30,7 +30,7 @@ azure-core==1.34.0
# azure-mgmt-core
# azure-storage-blob
# azure-storage-queue
azure-identity==1.21.0
azure-identity==1.23.0
# via
# -r requirements.in
# azure-kusto-data
Expand All @@ -42,7 +42,7 @@ azure-kusto-ingest==5.0.3
# via -r requirements.in
azure-mgmt-core==1.5.0
# via azure-mgmt-network
azure-mgmt-network==28.1.0
azure-mgmt-network==29.0.0
# via -r requirements.in
azure-storage-blob==12.23.0
# via
Expand All @@ -64,15 +64,15 @@ cffi==1.17.1
# via cryptography
charset-normalizer==3.4.2
# via requests
click==8.1.8
click==8.2.1
# via
# -r requirements.in
# black
coverage[toml]==7.8.0
coverage[toml]==7.9.0
# via
# -r requirements.in
# pytest-cov
cryptography==44.0.3
cryptography==45.0.4
# via
# ansible-core
# azure-identity
Expand All @@ -82,13 +82,13 @@ cryptography==44.0.3
# pyjwt
dill==0.4.0
# via pylint
exceptiongroup==1.2.2
exceptiongroup==1.3.0
# via pytest
filelock==3.18.0
# via ansible-lint
idna==3.10
# via requests
ijson==3.3.0
ijson==3.4.0
# via azure-kusto-data
importlib-metadata==8.7.0
# via ansible-lint
Expand All @@ -107,7 +107,7 @@ jinja2==3.1.6
# ansible-core
jmespath==1.0.1
# via -r requirements.in
jsonschema==4.23.0
jsonschema==4.24.0
# via
# ansible-compat
# ansible-lint
Expand All @@ -132,7 +132,7 @@ msal-extensions==1.3.1
# via azure-identity
mypy-extensions==1.1.0
# via black
numpy==2.2.5
numpy==2.2.6
# via
# -r requirements.in
# pandas
Expand All @@ -144,7 +144,7 @@ packaging==25.0
# ansible-runner
# black
# pytest
pandas==2.2.3
pandas==2.3.0
# via -r requirements.in
pathspec==0.12.1
# via
Expand All @@ -153,32 +153,34 @@ pathspec==0.12.1
# yamllint
pexpect==4.9.0
# via ansible-runner
platformdirs==4.3.7
platformdirs==4.3.8
# via
# black
# pylint
pluggy==1.5.0
pluggy==1.6.0
# via pytest
ptyprocess==0.7.0
# via pexpect
pycparser==2.22
# via cffi
pygments==2.19.1
# via rich
# via
# pytest
# rich
pyjwt[crypto]==2.10.1
# via
# msal
# pyjwt
pylint==3.3.7
# via -r requirements.in
pytest==8.3.5
pytest==8.4.0
# via
# -r requirements.in
# pytest-cov
# pytest-mock
pytest-cov==6.1.1
pytest-cov==6.2.0
# via -r requirements.in
pytest-mock==3.14.0
pytest-mock==3.14.1
# via -r requirements.in
python-daemon==3.1.2
# via ansible-runner
Expand All @@ -201,7 +203,7 @@ referencing==0.36.2
# ansible-lint
# jsonschema
# jsonschema-specifications
requests==2.32.3
requests==2.32.4
# via
# -r requirements.in
# azure-core
Expand All @@ -211,11 +213,11 @@ resolvelib==1.0.1
# via ansible-core
rich==14.0.0
# via -r requirements.in
rpds-py==0.24.0
rpds-py==0.25.1
# via
# jsonschema
# referencing
ruamel-yaml==0.18.10
ruamel-yaml==0.18.14
# via ansible-lint
ruamel-yaml-clib==0.2.12
# via ruamel-yaml
Expand All @@ -235,9 +237,9 @@ tomli==2.2.1
# coverage
# pylint
# pytest
tomlkit==0.13.2
tomlkit==0.13.3
# via pylint
typing-extensions==4.13.2
typing-extensions==4.14.0
# via
# astroid
# azure-core
Expand All @@ -246,6 +248,7 @@ typing-extensions==4.13.2
# azure-storage-blob
# azure-storage-queue
# black
# exceptiongroup
# referencing
# rich
tzdata==2025.2
Expand All @@ -256,5 +259,5 @@ wcmatch==10.0
# via ansible-lint
yamllint==1.37.1
# via ansible-lint
zipp==3.21.0
zipp==3.23.0
# via importlib-metadata
Loading