Skip to content

Commit 9f73ef6

Browse files
authored
Merge pull request #314326 from Xelu86/extensesap
[Update] Extend SAP Deployment Automation Framework
2 parents c9b309b + 2b30df4 commit 9f73ef6

1 file changed

Lines changed: 62 additions & 87 deletions

File tree

articles/sap/automation/extensibility.md

Lines changed: 62 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,46 @@
11
---
2-
title: Extensibility for the SAP Deployment Automation Framework
3-
description: Describe how to extend the SAP Deployment Automation Framework.
2+
title: Extend SAP Deployment Automation Framework
3+
description: Learn how to extend SAP Deployment Automation Framework by adding custom Ansible playbooks, repositories, packages, kernel parameters, and more.
44
author: kimforss
55
ms.author: kimforss
6-
ms.reviewer: kimforss
7-
ms.date: 10/29/2023
8-
ms.topic: concept-article
6+
ms.date: 04/06/2026
7+
ms.topic: how-to
98
ms.service: sap-on-azure
109
ms.subservice: sap-automation
1110
ms.custom: devx-track-ansible, linux-related-content
1211
# Customer intent: "As a cloud engineer, I want to extend the SAP Deployment Automation Framework by incorporating custom configurations and Ansible playbooks, so that I can tailor the deployment to meet specific operational requirements efficiently."
1312
---
1413

15-
# Extending the SAP Deployment Automation Framework
14+
# Extend SAP Deployment Automation Framework
1615

16+
[SAP Deployment Automation Framework](deployment-framework.md) (SDAF) provides default configurations for deploying SAP environments on Azure. When your deployment requires custom OS settings, extra pipeline stages, or organization-specific Ansible playbooks, you can extend the framework to match your operational needs.
1717

18-
Within the SAP Deployment Automation Framework (SDAF), we recognize the importance of adaptability and customization to meet the unique needs of various deployments. This document describes the ways to extend the framework's capabilities, ensuring that it aligns with your specific requirements.
18+
In this article, you learn about the extensibility options available in SDAF, including custom Ansible playbooks, configuration-based extensions for repositories, packages, kernel parameters, and more.
1919

20-
Some of the common scenarios for extending the framework include:
20+
Common scenarios for extending the framework include:
2121

22-
- Forking the Source Code Repository: One method of extending SDAF is by forking the source code repository. This approach grants you the flexibility to make tailored modifications within your own forked version of the code. By doing so, you gain control over the framework's core functionality, enabling you to tailor it precisely to your deployment objectives.
23-
24-
- Adding Stages to the SAP Configuration Pipeline: Another way to customization is by adding stages to the SAP configuration pipeline. This approach allows you to integrate specific processes or steps that are integral to your deployment workflows into the automation pipeline.
25-
26-
- Streamlined Extensibility: This capability allows you to effortlessly incorporate your existing Ansible playbooks directly into the SDAF. By using this feature, you can seamlessly integrate your Ansible automation scripts with the framework, further enhancing its versatility.
27-
28-
- Configuration extensibility: This feature allows you to extend the framework's configuration capabilities by adding custom repositories, packages, kernel parameters, logical volumes, mounts, and exports without the need to write any code.
29-
30-
Throughout this documentation, we provide comprehensive guidance on each of these extensibility options, ensuring that you have the knowledge and tools needed to tailor the SAP Deployment Automation Framework to your specific deployment needs.
22+
- **Fork the source code repository** - Make tailored modifications in your own forked version of the code, giving you control over the framework's core functionality.
23+
- **Add stages to the SAP configuration pipeline** - Integrate specific processes or steps that are part of your deployment workflows into the automation pipeline.
24+
- **Run custom Ansible playbooks** - Incorporate your existing Ansible playbooks directly into SDAF so they run automatically as part of the deployment.
25+
- **Extend configuration without code** - Add custom repositories, packages, kernel parameters, logical volumes, mounts, and exports by editing the `sap-parameters.yaml` file.
3126

3227
> [!NOTE]
33-
> If you fork the source code repository, you must maintain your fork of the code. You must also merge the changes from the source code repository into your fork of the code whenever there is a new release of the SDAF codebase.
28+
> If you fork the source code repository, you must maintain your fork. You must also merge changes from the source code repository into your fork whenever there's a new release of the SDAF codebase.
3429
35-
## Executing your own Ansible playbooks as part of the Azure DevOps orchestration
30+
## Prerequisites
3631

37-
You can implement your own Ansible playbooks, which are automatically be called as part of the Azure DevOps 'OS Configuration and SAP Installation' pipeline.
32+
- SAP Deployment Automation Framework [deployed and configured](get-started.md).
33+
- An [Azure DevOps project configured for SDAF](configure-devops.md), if you plan to run custom Ansible playbooks in the pipeline.
34+
- Access to the `sap-parameters.yaml` file in your SDAF workspace directory.
35+
- Familiarity with [Ansible playbook syntax](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_intro.html), if you plan to create custom playbooks.
3836

39-
The Ansible playbooks must be located in a folder called 'Ansible' located in the root folder in your configuration repository. They're called with the same parameter files as the SDAF playbooks so you have access to all the configuration.
37+
## Run custom Ansible playbooks in Azure DevOps
4038

39+
You can implement your own Ansible playbooks, which are automatically called as part of the Azure DevOps `OS Configuration and SAP Installation` pipeline.
4140

42-
The Ansible playbooks must be named according to the following naming convention:
41+
The Ansible playbooks must be in a folder called `Ansible` in the root folder of your configuration repository. They're called with the same parameter files as the SDAF playbooks, so you have access to the entire configuration.
4342

44-
'Playbook name_pre' for playbooks to be run before the SDAF playbook and 'Playbook name_post' for playbooks to be run after the SDAF playbook.
43+
The Ansible playbooks must follow this naming convention: `Playbook name_pre` for playbooks that run before the SDAF playbook and `Playbook name_post` for playbooks that run after the SDAF playbook.
4544

4645
| Playbook name | Playbook name for 'pre' tasks | Playbook name for 'post' tasks | Description |
4746
| ------------------------------------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------- |
@@ -58,11 +57,11 @@ The Ansible playbooks must be named according to the following naming convention
5857
| `playbook_08_00_00_post_configuration_actions.yaml` | `playbook_08_00_00_post_configuration_actions_pre.yml` | `playbook_08_00_00_post_configuration_actions_post.yml` | Post Configuration Actions |
5958

6059
> [!NOTE]
61-
> The playbook_08_00_00_post_configuration_actions.yaml step has no SDAF provided roles/tasks, it's only there to facilitate `_pre` and `_post` hooks after SDAF has completed the installation and configuration.
60+
> The `playbook_08_00_00_post_configuration_actions.yaml` step has no SDAF-provided roles or tasks. It's only there to facilitate `_pre` and `_post` hooks after SDAF completes the installation and configuration.
6261
6362
### Sample Ansible playbook
6463

65-
```yaml
64+
```yaml
6665
---
6766
# /*---------------------------------------------------------------------------8
6867
# | |
@@ -106,26 +105,24 @@ The Ansible playbooks must be named according to the following naming convention
106105
- name: "Show how to run a command on just the 'SCS' and 'ERS' hosts"
107106
ansible.builtin.command: "whoami"
108107
register: whoami_results
109-
when:
108+
when:
110109
- "'scs' in supported_tiers or 'ers' in supported_tiers "
111110
...
112-
113111
```
114112

115-
## Updating the user and group IDs (Linux)
113+
## Update user and group ID (Linux)
116114

117-
If you want to change the user and group IDs used by the framework, you can add the following section to the sap-parameters.yaml file.
115+
If you want to change the user and group ID numbers used by the framework, add the following section to the `sap-parameters.yaml` file.
118116

119117
```yaml
120118
# User and group IDs
121119
sapadm_uid: "3000"
122120
sidadm_uid: "3100"
123121
sapinst_gid: "300"
124122
sapsys_gid: "400"
125-
126123
```
127124
128-
You can use the `configuration_settings` variable to let Terraform add them to sap-parameters.yaml file.
125+
You can use the `configuration_settings` variable to let Terraform add them to the `sap-parameters.yaml` file.
129126

130127
```terraform
131128
configuration_settings = {
@@ -134,12 +131,11 @@ configuration_settings = {
134131
sapinst_gid = "300",
135132
sapsys_gid = "400"
136133
}
137-
138134
```
139135

140-
## Adding custom host names for instances (Linux)
136+
## Add custom host names for instances (Linux)
141137

142-
In addition to the host names generated by the framework, you can add custom host names for the instances in your SAP deployment. To do so, add the following section to the sap-parameters.yaml file.
138+
In addition to the host names generated by the framework, you can add custom host names for the instances in your SAP deployment. To do so, add the following section to the `sap-parameters.yaml` file.
143139

144140
```yaml
145141
custom_scs_virtual_hostname: "myscshostname"
@@ -148,111 +144,95 @@ custom_db_virtual_hostname: "mydbhostname"
148144
custom_pas_virtual_hostname: "mypashostname"
149145
```
150146

151-
You can use the `configuration_settings` variable to let Terraform add them to sap-parameters.yaml file.
147+
You can use the `configuration_settings` variable to let Terraform add them to the `sap-parameters.yaml` file.
152148

153149
```terraform
154150
configuration_settings = {
155151
custom_scs_virtual_hostname = "myscshostname",
156152
custom_ers_virtual_hostname = "myershostname",
157153
custom_db_virtual_hostname = "mydbhostname",
158154
custom_pas_virtual_hostname = "mypashostname"
159-
160155
}
161-
162156
```
163157

158+
## Add custom repositories (Linux)
164159

165-
## Adding custom repositories (Linux)
160+
If you need to register extra Linux package repositories on the virtual machines deployed by the framework, add the following section to the `sap-parameters.yaml` file.
166161

167-
If you need to register extra Linux package repositories to the Virtual Machines deployed by the framework, you can add the following section to the sap-parameters.yaml file.
168-
169-
In this example, the repository 'epel' is registered on all the hosts in your SAP deployment that are running RedHat 8.2.
162+
In this example, the repository `epel` is registered on all the hosts in your SAP deployment that are running Red Hat 8.2.
170163

171164
```yaml
172-
173165
custom_repos:
174166
redhat8.2:
175167
- { tier: 'ha', repo: 'epel', url: 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm', state: 'present' }
176-
177168
```
178169

179-
## Adding custom packages (Linux)
170+
## Add custom packages (Linux)
180171

181-
If you need to install more Linux packages to the Virtual Machines deployed by the framework, you can add the following section to the sap-parameters.yaml file.
172+
If you need to install more Linux packages on the virtual machines deployed by the framework, add the following section to the `sap-parameters.yaml` file.
182173

183-
In this example, the package 'openssl' is installed on all the hosts in your SAP deployment that are running SUSE Enterprise Linux for SAP Applications version 15.3.
174+
In this example, the package `openssl` is installed on all the hosts in your SAP deployment that are running SUSE Linux Enterprise Server for SAP Applications version 15.3.
184175

185176
```yaml
186-
187177
custom_packages:
188178
sles_sap15.3:
189179
- { tier: 'os', package: 'openssl', node_tier: 'all', state: 'present' }
190-
191180
```
192181

193-
If you want to install a package on a specific server type (`app`, `ers`, `pas`, `scs`, `hana`) you can add the following section to the sap-parameters.yaml file.
182+
If you want to install a package on a specific server type (`app`, `ers`, `pas`, `scs`, `hana`), add the following section to the `sap-parameters.yaml` file.
194183

195184
```yaml
196-
197185
custom_packages:
198186
sles_sap15.3:
199187
- { tier: 'ha', package: 'pacemaker', node_tier: 'hana', state: 'present' }
200-
201188
```
202189

203-
## Adding custom kernel parameters (Linux)
190+
## Add custom kernel parameters (Linux)
204191

205192
You can extend the SAP Deployment Automation Framework by adding custom kernel parameters to the SDAF installation.
206193

207-
When you add the following section to the sap-parameters.yaml file, the parameter 'fs.suid_dumpable' is set to 0 on all the hosts in your SAP deployment.
194+
When you add the following section to the `sap-parameters.yaml` file, the parameter `fs.suid_dumpable` is set to 0 on all the hosts in your SAP deployment.
208195

209196
```yaml
210-
211197
custom_parameters:
212198
common:
213199
- { tier: 'os', node_tier: 'all', name: 'fs.suid_dumpable', value: '0', state: 'present' }
214-
215200
```
216201

217-
## Adding custom services (Linux)
202+
## Add custom services (Linux)
218203

219-
If you need to manage other services on the Virtual Machines deployed by the framework, you can add the following section to the sap-parameters.yaml file.
204+
If you need to manage other services on the virtual machines deployed by the framework, add the following section to the `sap-parameters.yaml` file.
220205

221-
In this example, the 'firewalld' service is stopped and disabled on all the hosts in your SAP deployment that are running RedHat 7.x.
206+
In this example, the `firewalld` service is stopped and disabled on all the hosts in your SAP deployment that are running Red Hat 7.x.
222207

223208
```yaml
224-
225209
custom_services:
226210
redhat7:
227211
- { tier: 'os', service: 'firewalld', node_tier: 'all', state: 'stopped' }
228212
- { tier: 'os', service: 'firewalld', node_tier: 'all', state: 'disabled' }
229-
230-
231213
```
232214

233-
## Adding custom logical volumes (Linux)
215+
## Add custom logical volumes (Linux)
234216

235217
You can extend the SAP Deployment Automation Framework by adding logical volumes based on extra disks in your SDAF installation.
236218

237-
When you add the following section to the sap-parameters.yaml file, a logical volume 'lv_custom' is created on all Virtual machines with a disk with the name 'custom' in your SAP deployment. A filesystem is mounted on the logical volume and available on '/custompath.'
238-
219+
When you add the following section to the `sap-parameters.yaml` file, a logical volume `lv_custom` is created on all virtual machines with a disk named `custom` in your SAP deployment. A file system is mounted on the logical volume and available at `/custompath`.
239220

240221
```yaml
241-
242222
custom_logical_volumes:
243223
- tier: 'sapos'
244224
node_tier: 'all'
245225
vg: 'vg_custom'
246226
lv: 'lv_custom'
247227
size: '100%FREE'
248228
fstype: 'xfs'
249-
path: '/custompath'
229+
path: '/custompath'
250230
```
251231

252232
> [!NOTE]
253-
> In order to use this functionality you need to add an extra disk named 'custom' to one or more of your Virtual machines. For more information, see [Custom disk sizing](configure-extra-disks.md).
233+
> To use this functionality, you need to add an extra disk named `custom` to one or more of your virtual machines. For more information, see [Custom disk sizing](configure-extra-disks.md).
254234

255-
You can use the `configuration_settings` variable to let Terraform add them to sap-parameters.yaml file.
235+
You can use the `configuration_settings` variable to let Terraform add them to the `sap-parameters.yaml` file.
256236

257237
```terraform
258238
configuration_settings = {
@@ -264,30 +244,29 @@ configuration_settings = {
264244
lv = 'lv_custom'
265245
size = '100%FREE'
266246
fstype = 'xfs'
267-
path = '/custompath'
247+
path = '/custompath'
268248
}
269249
]
270250
}
271251
```
272252

273-
## Adding custom mount (Linux)
253+
## Add custom mounts (Linux)
274254

275-
You can extend the SAP Deployment Automation Framework by mounting extra mount points in your installation.
255+
You can extend the SAP Deployment Automation Framework by adding extra mount points in your installation.
276256

277-
When you add the following section to the sap-parameters.yaml file, a filesystem '/usr/custom' is mounted from an NFS share on 'xxxxxxxxx.file.core.windows.net:/xxxxxxxxx/custom.'
257+
When you add the following section to the `sap-parameters.yaml` file, a file system at `/usr/custom` is mounted from a Network File Share (NFS) on `xxxxxxxxx.file.core.windows.net:/xxxxxxxxx/custom`.
278258

279259
```yaml
280-
281260
custom_mounts:
282261
- path: "/usr/custom"
283262
opts: "vers=4,minorversion=1,sec=sys"
284263
mount: "xxxxxxxxx.file.core.windows.net:/xxxxxxxx/custom"
285264
target_nodes: "scs,pas,app"
286265
```
287266

288-
The `target_nodes` attribute defines which nodes have the mount defined. Use 'all' if you want all nodes to have the mount defined.
267+
The `target_nodes` attribute specifies which nodes have the mount. Use `all` to apply the mount to all nodes.
289268

290-
You can use the `configuration_settings` variable to let Terraform add them to sap-parameters.yaml file.
269+
You can use the `configuration_settings` variable to let Terraform add them to the `sap-parameters.yaml` file.
291270

292271
```terraform
293272
configuration_settings = {
@@ -302,20 +281,18 @@ configuration_settings = {
302281
}
303282
```
304283

305-
## Adding custom export (Linux)
284+
## Add custom exports (Linux)
306285

307286
You can extend the SAP Deployment Automation Framework by adding extra folders to be exported from the Central Services virtual machine.
308287

309-
When you add the following section to the sap-parameters.yaml file, a filesystem '/usr/custom' is exported from the Central Services virtual machine and available via NFS.
288+
When you add the following section to the `sap-parameters.yaml` file, a file system at `/usr/custom` is exported from the Central Services virtual machine and available via NFS.
310289

311290
```yaml
312-
313291
custom_exports:
314292
path: "/usr/custom"
315-
316293
```
317294

318-
You can use the `configuration_settings` variable to let Terraform add them to sap-parameters.yaml file.
295+
You can use the `configuration_settings` variable to let Terraform add them to the `sap-parameters.yaml` file.
319296

320297
```terraform
321298
configuration_settings = {
@@ -328,14 +305,14 @@ configuration_settings = {
328305
```
329306

330307
> [!NOTE]
331-
> This applies only for deployments with NFS_Provider set to 'NONE' as this makes the Central Services server an NFS Server.
308+
> Applicable only to deployments with `NFS_Provider` set to `NONE`, because this configuration makes the Central Services server an NFS server.
332309

333-
## Custom Stripe sizes (Linux)
310+
## Custom stripe sizes (Linux)
334311

335-
If you want to the stripe sizes used by the framework when creating the disks, you can add the following section to the sap-parameters.yaml file with the values you want.
312+
If you want to change the stripe sizes used by the framework when creating the disks, add the following section to the `sap-parameters.yaml` file with the values you want.
336313

337314
```yaml
338-
# User and group IDs
315+
# Stripe sizes
339316
hana_data_stripe_size: 256
340317
hana_log_stripe_size: 64
341318
@@ -349,15 +326,13 @@ sybase_temp_stripe_size: 128
349326
350327
oracle_data_stripe_size: 256
351328
oracle_log_stripe_size: 128
352-
353329
```
354330

355331
## Custom volume sizes (Linux)
356332

357-
If you want to the default volume sizes used by the framework, you can add the following section to the sap-parameters.yaml file with the values you want.
333+
If you want to change the default volume sizes used by the framework, add the following section to the `sap-parameters.yaml` file with the values you want.
358334

359335
```yaml
360-
361336
sapmnt_volume_size: 32g
362337
usrsap_volume_size: 32g
363338
hanashared_volume_size: 32g

0 commit comments

Comments
 (0)