|
1 | | -**SAP HANA Storage Deplyment through Ansible Pipeline** |
2 | | - |
3 | | -Hitachi Vantara developed a comprehensive pipeline encapsulated in **main.yml**, to automate the initial creation of SAP HANA scale-up volumes on the VSP Block storage system. These two pipelines have been created and thoroughly tested for all creation tasks: |
4 | | - |
5 | | -**sap-hana-tdi-su-single-pool**: Designed for the latest VSPs |
6 | | - |
7 | | -**sap-hana-tdi-su-two-pool**s: Designed for older VSPs |
8 | | - |
9 | | -Above pipeline efficiently orchestrates the following tasks: |
10 | | - |
11 | | -**Configure Storage Port**: Sets up the necessary storage ports on the Hitachi VSP system using 1_storage_port_create.yml |
12 | | - |
13 | | -**Configure Hostgroups:** Establishes host groups and adds WWNs of hosts using 2_hostgroup_create.yml |
14 | | - |
15 | | -**Parity Group Creation:** Creates parity groups with the required RAID type for data redundancy with 4_paritygroup_create.yml, after retrieving the parity group ids with 3_paritygroup_get_pg_id.yml |
16 | | - |
17 | | -**Single or Two Storage Pool with Pool volumes Creation**: Create a storage pool with approx. 4 or 8 Pool Volumes (PVOLs) with 5_storagepool_create.yml |
18 | | - |
19 | | -**VVOLs Creation and Mapping**: Provisions for Virtual Volumes (VVOLs) are made for operating system and SAP HANA components, including shared, log, and data volumes, utilizing the 6_vvol_creation_in_pool.yml configuration file. These volumes are then mapped to the host groups that contain the host WWNs. The creation process adheres to Hitachi Vantara's best practices for SAP HANA, ensuring optimal performance and reliability. |
20 | | - |
21 | | -**Variables:** To manage variables effectively, we have utilized two below variables: |
22 | | - |
23 | | -vsp_direct_variables_create.yml: A file containing global variables for the storage provisioning process, there would be a separate file for modification and deletion. |
24 | | - |
25 | | -ansible_vault_storage_var.yml: An Ansible Vault file to securely store sensitive VSP credentials and connection information. |
26 | | - |
27 | | -**Run the ansible playbook command to use pipeline:** |
28 | | - |
29 | | -ansible-playbook main.yml -e "vsp_storage=e1090" -J |
30 | | - |
31 | | - -e EXTRA_VARS or --extra-vars EXTRA_VARS set additional variables for the Storage which will be use |
32 | | - |
33 | | - -J or --ask-vault-password or--ask-vault-pass ask for vault password |
34 | | - |
| 1 | +# Hitachi Storage Provisioning Pipelines for SAP HANA |
| 2 | + |
| 3 | +**Author:** Hitachi Vantara SAP Engineering Team |
| 4 | +**Date:** November 2025 |
| 5 | +**Tested on:** Hitachi Virtual Storage Platform One Block Storage Modules for Red Hat Ansible 4.4.2 |
| 6 | + |
| 7 | +## Overview |
| 8 | +This repository contains a collection of Ansible playbooks designed to automate the provisioning, management, and decommissioning of storage resources on Hitachi Virtual Storage Platform (VSP) systems, specifically tailored for SAP HANA environments. |
| 9 | + |
| 10 | +The repository includes: |
| 11 | +1. **End-to-End Pipelines:** Fully automated workflows for setting up new SAP HANA environments. |
| 12 | +2. **Individual Task Playbooks:** Standalone playbooks for performing specific, granular tasks like creating a single LDEV or deleting a hostgroup. |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +## 1. End-to-End Pipelines |
| 17 | +These are fully automated workflows for setting up new SAP HANA environments from start to finish. |
| 18 | + |
| 19 | +### 1.1. SAP HANA Scale-Out (VSP E/F/G Series - Two Pools) |
| 20 | +**Directory:** `sap-hana-scale-out-vsp-efg` |
| 21 | +**Version:** v1.0 |
| 22 | +**Description:** Automated storage provisioning for SAP HANA Scale-Out servers using a **Two HDP Storage Pool** method (Data & Log volumes separation). |
| 23 | + |
| 24 | +**Workflow:** |
| 25 | +1. `0_storagesystem_validate.yml`: Validates VSP system support. |
| 26 | +2. `1_load_nodes.yml`: Loads SAP HANA node details from `nodes_info.csv`. |
| 27 | +3. `2_storage_port_create.yml`: Configures VSP storage ports. |
| 28 | +4. `3_hostgroup_add-wwn_create.yml`: Creates hostgroups and registers WWNs. |
| 29 | +5. `4_paritygroup_get_pg_id.yml`: Checks existing Parity Groups and determines IDs. |
| 30 | +6. `5_paritygroup_create.yml`: Creates Parity Groups for storage pools. |
| 31 | +7. `6_storagepool_create.yml`: Creates two distinct storage pools (Data and Log). |
| 32 | +8. `7_vvol_creation_mapping.yml`: Creates required VVols and maps them to hostgroups. |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +### 1.2. SAP HANA Scale-Out (VSP One Block Storage) |
| 37 | +**Directory:** `sap-hana-scale-out-vsp-one` |
| 38 | +**Version:** v1.0 |
| 39 | +**Description:** Automated storage provisioning for SAP HANA Scale-Out servers using a **Single DDP Storage Pool** method on VSP One Block Storage. |
| 40 | + |
| 41 | +**Workflow:** |
| 42 | +1. `0_storagesystem_validate.yml`: Validates VSP One system support. |
| 43 | +2. `1_disk_drives_fact.yml`: Checks for required free disk drives. |
| 44 | +3. `2_ddp_pool_create.yml`: Creates a Dynamic Provisioning (DDP) Pool. |
| 45 | +4. `3_load_nodes.yml`: Loads SAP HANA node details from `nodes_info.csv`. |
| 46 | +5. `4_vsp_one_storage_port_create.yml`: Configures storage ports. |
| 47 | +6. `5_vsp_one_server_profile_create_so.yml`: Creates server profiles, adds WWNs, and connects ports. |
| 48 | +7. `6_vsp_one_volume_creation_mapping.yml`: Creates volumes in the DDP pool and attaches them to server profiles. |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +### 1.3. SAP HANA Scale-Up (VSP E/F/G Series - Single Pool) |
| 53 | +**Directory:** `sap-hana-scale-up-vsp-efg-single-pool` |
| 54 | +**Version:** v1.1 |
| 55 | +**Description:** Automated storage provisioning for a SAP HANA Scale-Up server using a **Single HDP Storage Pool**. |
| 56 | + |
| 57 | +**Workflow:** |
| 58 | +1. `0_storagesystem_validate.yml`: Validates VSP system support. |
| 59 | +2. `1_storage_port_create.yml`: Configures storage ports. |
| 60 | +3. `2_hostgroup_create.yml`: Creates hostgroups and registers WWNs. |
| 61 | +4. `3_paritygroup_get_pg_id.yml`: Determines Parity Group IDs. |
| 62 | +5. `4_paritygroup_create.yml`: Creates Parity Group with required RAID type. |
| 63 | +6. `5_storagepool_create.yml`: Creates a single HDP storage pool. |
| 64 | +7. `6_vvol_creation_in_pool.yml`: Creates Virtual Volumes and maps LUNs to the hostgroup. |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +### 1.4. SAP HANA Scale-Up (VSP E/F/G Series - Two Pools) |
| 69 | +**Directory:** `sap-hana-scale-up-vsp-efg-two-pools` |
| 70 | +**Version:** v1.1 |
| 71 | +**Description:** Automated storage provisioning for a SAP HANA Scale-Up server using **Two HDP Storage Pools** (Data & Log separation). |
| 72 | + |
| 73 | +**Workflow:** |
| 74 | +1. `0_storagesystem_validate.yml`: Validates VSP system support. |
| 75 | +2. `1_storage_port_create.yml`: Configures storage ports. |
| 76 | +3. `2_hostgroup_create.yml`: Creates hostgroups and registers WWNs. |
| 77 | +4. `3_paritygroup_get_pg_id.yml`: Determines Parity Group IDs. |
| 78 | +5. `4_paritygroup_create.yml`: Creates Parity Groups with required RAID type. |
| 79 | +6. `5_storagepool_create.yml`: Creates two separate HDP storage pools. |
| 80 | +7. `6_vvol_creation_in_pool.yml`: Creates Virtual Volumes in respective pools and maps LUNs. |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +## 2. Individual Task Playbooks |
| 85 | +**Directory:** `individual_playbooks_for_tasks/` |
| 86 | + |
| 87 | +This folder contains standalone playbooks for performing specific, granular tasks outside of the main provisioning pipelines. They are ideal for one-off operations, troubleshooting, or reporting. |
| 88 | + |
| 89 | +### 2.1. Modification Playbooks |
| 90 | +| Playbook File | Summary | |
| 91 | +| :--- | :--- | |
| 92 | +| `modify_storage_pool_expand.yml` | Expands storage pool capacity by adding a new PVOL from an existing parity group and auto-assigns a sequential name based on existing volume naming convention. | |
| 93 | +| `modify_ldev_resize.yml` | Expands the capacity of specified LDEVs to a new size and displays a summary of the resized volumes. | |
| 94 | +| `modify_storage_port_config.yml` | Configures storage port settings including security, fabric mode, connection type, and port speed. | |
| 95 | + |
| 96 | +**Configuration:** Use `vsp_direct_variables_modify.yml` to specify targets. |
| 97 | + |
| 98 | +### 2.2. Deletion Playbooks |
| 99 | +**⚠️ WARNING:** These playbooks perform destructive actions. Use with caution. |
| 100 | +| Playbook File | Summary | |
| 101 | +| :--- | :--- | |
| 102 | +| `delete_all_existing_hostgroups.yml` | Deletes ALL custom hostgroups from the storage system after unpresenting all associated LDEVs. | |
| 103 | +| `delete_hostgroup.yml` | Deletes a specific hostgroup from multiple ports, forcibly removing all mapped LDEVs. | |
| 104 | +| `delete_ldevs_by_name.yml` | Finds and forcibly deletes all LDEVs that match a specific name pattern (prefix). | |
| 105 | +| `delete_ldevs_id_list.yml` | Forcibly deletes a specific list of LDEV IDs provided in a variable list. | |
| 106 | +| `delete_luns_from_host.yml` | Identifies LDEVs by name pattern and detaches (unpresents) them from their connected hostgroups. | |
| 107 | +| `delete_paritygroup_id.yml` | Deletes a specific Parity Group by ID. | |
| 108 | +| `delete_storage_pool_pg_by_name.yml` | Deletes storage pools matching a name pattern, including all their pool volumes, and subsequently deletes the associated parity groups. | |
| 109 | +| `delete_vsp_one_all_servers.yml` | Retrieves all server profiles from VSP One and deletes them by ID. | |
| 110 | + |
| 111 | +**Configuration:** Use `vsp_direct_variables_delete.yml` to specify targets. |
| 112 | + |
| 113 | +### 2.3. Custom Facts Gathering Playbooks |
| 114 | +| Playbook File | Summary | |
| 115 | +| :--- | :--- | |
| 116 | +| `get_ddp_pool_custom_facts.yml` | Retrieves and displays a detailed summary for all Dynamic Provisioning Pools (DDP). | |
| 117 | +| `get_ldevs_facts_name_keyword.yml` | Searches for LDEVs whose names start with a specific keyword (prefix) and displays their details. | |
| 118 | +| `get_pvol_from_pool.yml` | Retrieves all LDEVs (PVOLs) belonging to storage pools that match a specific name pattern. | |
| 119 | +| `get_storage_pools_custom_facts.yml` | Retrieves detailed facts for all storage pools and displays a custom summary. | |
| 120 | +| `hostgroup_custom_facts_all_ports.yml` | Retrieves information for ALL hostgroups on the system, displaying a summary of Name, Port, WWNs, and LUNs. | |
| 121 | +| `hostgroup_facts_custom_ports.yml` | Retrieves hostgroup information for specific ports defined in variables. | |
| 122 | +| `ldev_pool_id_custom_facts.yml` | Retrieves and lists all LDEVs (PVOLs) residing in a specific storage pool identified by its Pool ID. | |
| 123 | +| `paritygroup_custom_facts.yml` | Retrieves and displays configuration facts for a single specified Parity Group ID. | |
| 124 | +| `pvol-vvol_by_name_custom_facts.yml` | Filters and displays LDEVs (PVOLs/VVOLs) that contain a specific keyword in their name. | |
| 125 | +| `storagesystem_custom_facts.yml` | Retrieves general storage system information including Model, Serial Number, and Microcode version. | |
| 126 | +| `get_ddp_pool_custom_facts.yml` | Retrieves volume facts for a specific DDP pool by name using the VSP One API. | |
| 127 | + |
| 128 | +**Configuration:** Use `vsp_direct_variables_facts.yml` to specify targets. |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +## Configuration Files |
| 133 | + |
| 134 | +Each pipeline and task folder contains specific configuration files that must be updated before execution: |
| 135 | + |
| 136 | +* **`vsp_direct_global_variables.yml`**: |
| 137 | + * Contains global variables specific to the selected pipeline (e.g., Pool Names, RAID levels, LDEV sizing). |
| 138 | + |
| 139 | +* **`nodes_info.csv`** (Scale-Out Pipelines only): |
| 140 | + * A CSV file containing details for the SAP HANA nodes. |
| 141 | + * **Format:** `Hostname,Storage_Port_1,Storage_Port_2,WWPN_1,WWPN_2` |
| 142 | + |
| 143 | +* **`vsp_direct_variables_*.yml`** (Individual Tasks): |
| 144 | + * Variable files within the `individual_playbooks_for_tasks` directory used to define targets and parameters for modify, delete, or fact-gathering operations. |
| 145 | + |
| 146 | + |
| 147 | +## Prerequisites |
| 148 | +* Red Hat Ansible Core - 2.16, 2.17, 2.18 |
| 149 | +* Python - 3.9 or higher |
| 150 | +* Hitachi Virtual Storage Platform One Block Storage Modules for Red Hat Ansible 4.3 or later |
| 151 | +* Network connectivity to Hitachi VSP Storage |
| 152 | +* Valid credentials configured in `ansible_vault_storage_var.yml` |
| 153 | + |
| 154 | + |
| 155 | +## Usage |
| 156 | +1. Update the relevant `.yml` and `.csv` configuration files with your specific environment details. |
| 157 | +2. Run the desired playbook using `ansible-playbook`, providing the vault password if necessary: |
| 158 | + ``` |
| 159 | + ansible-playbook sap-hana-scale-out-vsp-efg/main.yml --ask-vault-pass |
| 160 | + ``` |
| 161 | + ``` |
| 162 | + ansible-playbook individual_playbooks_for_tasks/modify/modify_ldev_resize.yml --ask-vault-pass |
| 163 | + ``` |
| 164 | + Option: -J or --ask-vault-password or --ask-vault-pass ask for vault password, use this only if vault file is encrypted. |
35 | 165 |
|
36 | 166 | ################################################################################################### |
37 | 167 |
|
38 | | -**DISCLAIMER: ** |
39 | | -_All materials provided in this repository, including but not limited to Ansible Playbooks and Terraform Configurations, are made available as a courtesy. These materials are intended solely as examples, which may be utilized in whole or in part. Neither the contributors nor the users of this platform assert or are granted any ownership rights over the content shared herein. It is the sole responsibility of the user to evaluate the appropriateness and applicability of the materials for their specific use case. |
40 | | - |
| 168 | +**DISCLAIMER: ** _All materials provided in this repository, including but not limited to Ansible Playbooks and Terraform Configurations, are made available as a courtesy. These materials are intended solely as examples, which may be utilized in whole or in part. Neither the contributors nor the users of this platform assert or are granted any ownership rights over the content shared herein. It is the sole responsibility of the user to evaluate the appropriateness and applicability of the materials for their specific use case. |
| 169 | +
|
41 | 170 | Use of the material is at the sole risk of the user and the material is provided “AS IS,” without warranty, guarantees, or support of any kind, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Unless specified in an applicable license, access to this material grants you no right or license, express or implied, statutorily or otherwise, under any patent, trade secret, copyright, or any other intellectual property right of Hitachi Vantara LLC (“HITACHI”). HITACHI reserves the right to change any material in this document, and any information and products on which this material is based, at any time, without notice. HITACHI shall have no responsibility or liability to any person or entity with respect to any damages, losses, or costs arising from the materials contained herein._ |
0 commit comments