Skip to content

Commit e998951

Browse files
author
Kimmo Forss
committed
Update SAP Deployment Automation tutorial with new configuration menu screenshots and playbook instructions
1 parent aa8bfe8 commit e998951

File tree

3 files changed

+146
-31
lines changed

3 files changed

+146
-31
lines changed
55.3 KB
Loading

articles/sap/automation/run-ansible.md

Lines changed: 90 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ When you use [SAP Deployment Automation Framework](deployment-framework.md), you
2323
| `playbook_04_00_00_hana_db_install` | SAP HANA database installation |
2424
| `playbook_05_00_00_sap_scs_install.yaml` | SAP central services (SCS) installation |
2525
| `playbook_05_01_sap_dbload.yaml` | Database loader |
26+
| `playbook_04_00_01_hana_hsr.yaml` | SAP HANA high-availability configuration |
2627
| `playbook_05_02_sap_pas_install.yaml` | SAP primary application server (PAS) installation |
2728
| `playbook_05_03_sap_app_install.yaml` | SAP application server installation |
2829
| `playbook_05_04_sap_web_install.yaml` | SAP web dispatcher installation |
29-
| `playbook_04_00_01_hana_hsr.yaml` | SAP HANA high-availability configuration |
3030

3131
## Prerequisites
3232

@@ -47,12 +47,12 @@ upgrade_packages: false
4747
# TERRAFORM CREATED
4848
sap_fqdn: sap.contoso.net
4949
# kv_name is the name of the key vault containing the system credentials
50-
kv_name: DEVWEEUSAP01user###
50+
kv_name: LABSECESAP01user###
5151
# secret_prefix is the prefix for the name of the secret stored in key vault
52-
secret_prefix: DEV-WEEU-SAP01
52+
secret_prefix: LAB-SECE-SAP01
5353

5454
# sap_sid is the application SID
55-
sap_sid: X01
55+
sap_sid: L00
5656
# scs_high_availability is a boolean flag indicating
5757
# if the SAP Central Services are deployed using high availability
5858
scs_high_availability: false
@@ -79,53 +79,53 @@ db_high_availability: false
7979
db_lb_ip: 10.110.96.13
8080

8181
disks:
82-
- { host: 'x01dxdb00l0538', LUN: 0, type: 'sap' }
83-
- { host: 'x01dxdb00l0538', LUN: 10, type: 'data' }
84-
- { host: 'x01dxdb00l0538', LUN: 11, type: 'data' }
85-
- { host: 'x01dxdb00l0538', LUN: 12, type: 'data' }
86-
- { host: 'x01dxdb00l0538', LUN: 13, type: 'data' }
87-
- { host: 'x01dxdb00l0538', LUN: 20, type: 'log' }
88-
- { host: 'x01dxdb00l0538', LUN: 21, type: 'log' }
89-
- { host: 'x01dxdb00l0538', LUN: 22, type: 'log' }
90-
- { host: 'x01dxdb00l0538', LUN: 2, type: 'backup' }
91-
- { host: 'x01app00l538', LUN: 0, type: 'sap' }
92-
- { host: 'x01app01l538', LUN: 0, type: 'sap' }
93-
- { host: 'x01scs00l538', LUN: 0, type: 'sap' }
82+
- { host: 'l00dxdb00l0538', LUN: 0, type: 'sap' }
83+
- { host: 'l00dxdb00l0538', LUN: 10, type: 'data' }
84+
- { host: 'l00dxdb00l0538', LUN: 11, type: 'data' }
85+
- { host: 'l00dxdb00l0538', LUN: 12, type: 'data' }
86+
- { host: 'l00dxdb00l0538', LUN: 13, type: 'data' }
87+
- { host: 'l00dxdb00l0538', LUN: 20, type: 'log' }
88+
- { host: 'l00dxdb00l0538', LUN: 21, type: 'log' }
89+
- { host: 'l00dxdb00l0538', LUN: 22, type: 'log' }
90+
- { host: 'l00dxdb00l0538', LUN: 2, type: 'backup' }
91+
- { host: 'l00app00l538', LUN: 0, type: 'sap' }
92+
- { host: 'l00app01l538', LUN: 0, type: 'sap' }
93+
- { host: 'l00scs00l538', LUN: 0, type: 'sap' }
9494

9595
...
9696
```
9797

98-
The `X01_hosts.yaml` file is the inventory file that Ansible uses for configuration of the SAP infrastructure. The `X01` label might differ for your deployments.
98+
The `L00_hosts.yaml` file is the inventory file that Ansible uses for configuration of the SAP infrastructure. The `L00` label might differ for your deployments.
9999

100100
```yaml
101-
X01_DB:
101+
L00_DB:
102102
hosts:
103-
x01dxdb00l0538:
103+
l00dxdb00l0538:
104104
ansible_host : 10.110.96.12
105105
ansible_user : azureadm
106106
ansible_connection : ssh
107107
connection_type : key
108108
vars:
109109
node_tier : hana
110110

111-
X01_SCS:
111+
L00_SCS:
112112
hosts:
113-
x01scs00l538:
113+
l00scs00l538:
114114
ansible_host : 10.110.32.25
115115
ansible_user : azureadm
116116
ansible_connection : ssh
117117
connection_type : key
118118
vars:
119119
node_tier : scs
120120

121-
X01_ERS:
121+
L00_ERS:
122122
hosts:
123123
vars:
124124
node_tier : ers
125125

126-
X01_PAS:
126+
L00_PAS:
127127
hosts:
128-
x01app00l538:
128+
l00app00l538:
129129
ansible_host : 10.110.32.24
130130
ansible_user : azureadm
131131
ansible_connection : ssh
@@ -134,9 +134,9 @@ X01_PAS:
134134
vars:
135135
node_tier : pas
136136

137-
X01_APP:
137+
L00_APP:
138138
hosts:
139-
x01app01l538:
139+
l00app01l538:
140140
ansible_host : 10.110.32.15
141141
ansible_user : azureadm
142142
ansible_connection : ssh
@@ -145,7 +145,7 @@ X01_APP:
145145
vars:
146146
node_tier : app
147147

148-
X01_WEB:
148+
L00_WEB:
149149
hosts:
150150
vars:
151151
node_tier : web
@@ -156,6 +156,17 @@ X01_WEB:
156156

157157
Make sure that you [download the SAP software](software.md) to your Azure environment before you run this step.
158158

159+
One way you can run the playbooks is to use the **Configuration** menu.
160+
161+
Run the `configuration_menu` script.
162+
163+
```bash
164+
${HOME}/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/configuration_menu.sh
165+
```
166+
167+
:::image type="content" source="./media/tutorial/configuration-menu.png" alt-text="Diagram that shows the SAP Deployment Automation Ansible configuration menu.":::
168+
169+
159170
To run a playbook or multiple playbooks, use the following `ansible-playbook` command. This example runs the operating system configuration playbook.
160171

161172
```bash
@@ -176,7 +187,7 @@ kv_name="$(awk '$1 == "kv_name:" {print $2}' ${sap_params_file})"
176187
prefix="$(awk '$1 == "secret_prefix:" {print $2}' ${sap_params_file})"
177188
password_secret_name=$prefix-sid-password
178189

179-
password_secret=$(az keyvault secret show --vault-name ${kv_name} --name ${password_secret_name} | jq -r .value)
190+
password_secret=$(az keyvault secret show --vault-name ${kv_name} --name ${password_secret_name} --query value --output table )
180191

181192
export ANSIBLE_PASSWORD=$password_secret
182193
export ANSIBLE_INVENTORY="${sap_sid}_hosts.yaml"
@@ -198,8 +209,11 @@ playbook_options=(
198209
"${@}"
199210
)
200211

212+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
213+
201214
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml
202215

216+
203217
```
204218

205219
### Operating system configuration
@@ -221,6 +235,30 @@ The following tasks are executed on Linux virtual machines:
221235
- Configures the banners displayed when signed in
222236
- Configures the services required
223237

238+
```bash
239+
240+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
241+
242+
export sap_sid=L00
243+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
244+
245+
playbook_options=(
246+
--inventory-file="${sap_sid}_hosts.yaml"
247+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
248+
--extra-vars="_workspace_directory=`pwd`"
249+
--extra-vars="@sap-parameters.yaml"
250+
"${@}"
251+
)
252+
253+
# Run the playbook to retrieve the ssh key from the Azure key vault
254+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
255+
```
256+
257+
# Run the playbook to perform the Operating System configuration
258+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml
259+
260+
```
261+
224262
# [Windows](#tab/windows)
225263
226264
- Ensures that all the components are installed:
@@ -255,6 +293,30 @@ The following tasks are executed on Linux virtual machines:
255293
- Configures the SAP-specific services
256294
- Implements configurations defined in the relevant SAP Notes
257295
296+
```bash
297+
298+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
299+
300+
export sap_sid=L00
301+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
302+
303+
playbook_options=(
304+
--inventory-file="${sap_sid}_hosts.yaml"
305+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
306+
--extra-vars="_workspace_directory=`pwd`"
307+
--extra-vars="@sap-parameters.yaml"
308+
"${@}"
309+
)
310+
311+
# Run the playbook to retrieve the ssh key from the Azure key vault
312+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
313+
```
314+
315+
# Run the playbook to perform the SAP Specific Operating System configuration
316+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_02_os_sap_specific_config.yaml
317+
318+
```
319+
258320
# [Windows](#tab/windows)
259321
260322
- Adds local groups and permissions

articles/sap/automation/tutorial.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,25 +923,78 @@ Make sure you have the following files in the current folders: `sap-parameters.y
923923
924924
For a standalone SAP S/4HANA system, there are eight playbooks to run in sequence. One way you can run the playbooks is to use the **Configuration** menu.
925925
926-
:::image type="content" source="./media/deployment-framework/automation-diagram-full.png" alt-text="Diagram that shows the SAP Deployment Automation Framework environment.":::
927-
928-
929926
Run the `configuration_menu` script.
930927
931928
```bash
932929
${HOME}/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/configuration_menu.sh
933930
```
934931
932+
:::image type="content" source="./media/tutorial/configuration-menu.png" alt-text="Diagram that shows the SAP Deployment Automation Ansible configuration menu.":::
933+
934+
935935
Choose the playbooks to run.
936936
937937
### Playbook: Base Operating System configuration
938938
939939
This playbook performs the generic OS configuration setup on all the machines, which includes configuration of software repositories, packages, and services.
940940
941+
You can either run the playbook using the configuration menu or directly from the command line.
942+
943+
```bash
944+
945+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
946+
947+
export sap_sid=L00
948+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
949+
950+
playbook_options=(
951+
--inventory-file="${sap_sid}_hosts.yaml"
952+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
953+
--extra-vars="_workspace_directory=`pwd`"
954+
--extra-vars="@sap-parameters.yaml"
955+
"${@}"
956+
)
957+
958+
# Run the playbook to retrieve the ssh key from the Azure key vault
959+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
960+
```
961+
962+
# Run the playbook to perform the Operating System configuration
963+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml
964+
965+
```
966+
967+
941968
### Playbook: SAP specific Operating System configuration
942969
943970
This playbook performs the SAP OS configuration setup on all the machines. The steps include creation of volume groups and file systems and configuration of software repositories, packages, and services.
944971
972+
You can either run the playbook using the configuration menu or directly from the command line.
973+
974+
```bash
975+
976+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
977+
978+
export sap_sid=L00
979+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
980+
981+
playbook_options=(
982+
--inventory-file="${sap_sid}_hosts.yaml"
983+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
984+
--extra-vars="_workspace_directory=`pwd`"
985+
--extra-vars="@sap-parameters.yaml"
986+
"${@}"
987+
)
988+
989+
# Run the playbook to retrieve the ssh key from the Azure key vault
990+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
991+
```
992+
993+
# Run the playbook to perform the SAP Specific Operating System configuration
994+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_02_os_sap_specific_config.yaml
995+
996+
```
997+
945998
### Playbook: BOM Processing
946999
9471000
This playbook downloads the SAP software to the SCS virtual machine.

0 commit comments

Comments
 (0)