Skip to content

Commit 91051e0

Browse files
author
Kimmo Forss
committed
Add the additional tasks
1 parent af70eea commit 91051e0

File tree

2 files changed

+289
-45
lines changed

2 files changed

+289
-45
lines changed

articles/sap/automation/run-ansible.md

Lines changed: 81 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ export ANSIBLE_PRIVATE_KEY_FILE=sshkey
195195
export ANSIBLE_COLLECTIONS_PATHS=/opt/ansible/collections${ANSIBLE_COLLECTIONS_PATHS:+${ANSIBLE_COLLECTIONS_PATHS}}
196196
export ANSIBLE_REMOTE_USER=azureadm
197197

198-
# Ref: https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html
199-
# Silence warnings about Python interpreter discovery
200198
export ANSIBLE_PYTHON_INTERPRETER=auto_silent
201199

202200
# Set of options that will be passed to the ansible-playbook command
@@ -209,8 +207,6 @@ playbook_options=(
209207
"${@}"
210208
)
211209

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

216212

@@ -289,12 +285,6 @@ cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
289285
export sap_sid=L00
290286
export workload_vault_name="LABSECESAP04user###"
291287
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
292-
prefix="LAB-SECE-SAP04"
293-
294-
password_secret_name=$prefix-sid-password
295-
296-
password_secret=$(az keyvault secret show --vault-name ${workload_vault_name} --name ${password_secret_name} --query value --output table)
297-
export ANSIBLE_PASSWORD=$password_secret
298288

299289
playbook_options=(
300290
--inventory-file="${sap_sid}_hosts.yaml"
@@ -305,9 +295,6 @@ playbook_options=(
305295
"${@}"
306296
)
307297

308-
# Run the playbook to retrieve the ssh key from the Azure key vault
309-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
310-
311298
# Run the playbook to perform the Operating System configuration
312299
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_01_os_base_config.yaml
313300

@@ -389,9 +376,6 @@ playbook_options=(
389376
"${@}"
390377
)
391378

392-
# Run the playbook to retrieve the ssh key from the Azure key vault
393-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
394-
395379
# Run the playbook to perform the SAP Specific Operating System configuration
396380
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_02_os_sap_specific_config.yaml
397381

@@ -469,9 +453,6 @@ playbook_options=(
469453
"${@}"
470454
)
471455

472-
# Run the playbook to retrieve the ssh key from the Azure key vault
473-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
474-
475456
# Run the playbook to download the software from the SAP Library
476457
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_03_bom_processing.yaml
477458

@@ -550,9 +531,6 @@ playbook_options=(
550531
"${@}"
551532
)
552533

553-
# Run the playbook to retrieve the ssh key from the Azure key vault
554-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
555-
556534
# Run the playbook to download the software from the SAP Library
557535
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_00_00_sap_scs_install.yaml
558536

@@ -630,9 +608,6 @@ playbook_options=(
630608
"${@}"
631609
)
632610

633-
# Run the playbook to retrieve the ssh key from the Azure key vault
634-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
635-
636611
# Run the playbook to download the software from the SAP Library
637612
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_04_00_00_db_install.yaml
638613

@@ -710,9 +685,6 @@ playbook_options=(
710685
"${@}"
711686
)
712687

713-
# Run the playbook to retrieve the ssh key from the Azure key vault
714-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
715-
716688
# Run the playbook to download the software from the SAP Library
717689
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_01_sap_dbload.yaml
718690

@@ -794,9 +766,6 @@ playbook_options=(
794766
"${@}"
795767
)
796768

797-
# Run the playbook to retrieve the ssh key from the Azure key vault
798-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
799-
800769
# Run the playbook to download the software from the SAP Library
801770
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_04_00_01_db_ha.yaml
802771

@@ -810,7 +779,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
810779
This playbook performs the installation of the primary application server.
811780

812781
You can either run the playbook using:
813-
- the DevOps Pipeline 'Configuration and SAP installation' choosing 'PAS Installation.'
782+
- the DevOps Pipeline 'Configuration and SAP installation' choosing 'Primary Application Server Installation.'
814783
- the configuration menu script 'configuration_menu.sh.'
815784
- directly from the command line.
816785

@@ -875,9 +844,6 @@ playbook_options=(
875844
"${@}"
876845
)
877846

878-
# Run the playbook to retrieve the ssh key from the Azure key vault
879-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
880-
881847
# Run the playbook to download the software from the SAP Library
882848
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_02_sap_pas_install.yaml
883849

@@ -891,7 +857,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
891857
This playbook performs the installation of the application servers.
892858

893859
You can either run the playbook using:
894-
- the DevOps Pipeline 'Configuration and SAP installation' choosing 'APP Installation.'
860+
- the DevOps Pipeline 'Configuration and SAP installation' choosing 'Application Server Installation.'
895861
- the configuration menu script 'configuration_menu.sh.'
896862
- directly from the command line.
897863

@@ -931,7 +897,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
931897

932898
The playbook performs the following tasks:
933899

934-
- Primary Application Server Installation.
900+
- Application Server Installation.
935901

936902
```bash
937903

@@ -956,9 +922,6 @@ playbook_options=(
956922
"${@}"
957923
)
958924

959-
# Run the playbook to retrieve the ssh key from the Azure key vault
960-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
961-
962925
# Run the playbook to download the software from the SAP Library
963926
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_02_sap_app_install.yaml
964927

@@ -971,7 +934,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
971934
This playbook performs the installation of the Web Dispatchers.
972935

973936
You can either run the playbook using:
974-
- the DevOps Pipeline 'Configuration and SAP installation' choosing 'WebDispatcher Installation.'
937+
- the DevOps Pipeline 'Configuration and SAP installation' choosing 'Web Dispatcher Installation.'
975938
- the configuration menu script 'configuration_menu.sh.'
976939
- directly from the command line.
977940

@@ -1011,7 +974,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
1011974

1012975
The playbook performs the following tasks:
1013976

1014-
- Primary Application Server Installation.
977+
- Web Dispatcher Installation.
1015978

1016979
```bash
1017980

@@ -1036,11 +999,86 @@ playbook_options=(
1036999
"${@}"
10371000
)
10381001

1002+
1003+
# Run the playbook to download the software from the SAP Library
1004+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_04_sap_web_install.yaml
1005+
1006+
```
1007+
1008+
---
1009+
1010+
## ACSS Registration
1011+
1012+
This playbook performs the ACSS registration.
1013+
1014+
You can either run the playbook using:
1015+
- the DevOps Pipeline 'Configuration and SAP installation' choosing 'Register System in ACSS.'
1016+
- the configuration menu script 'configuration_menu.sh.'
1017+
- directly from the command line.
1018+
1019+
1020+
# [Linux](#tab/linux)
1021+
1022+
The playbook performs the following tasks:
1023+
1024+
- ACSS registration.
1025+
1026+
```bash
1027+
1028+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
1029+
1030+
export sap_sid=L00
1031+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
1032+
1033+
playbook_options=(
1034+
--inventory-file="${sap_sid}_hosts.yaml"
1035+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
1036+
--extra-vars="_workspace_directory=`pwd`"
1037+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
1038+
--extra-vars="@sap-parameters.yaml"
1039+
"${@}"
1040+
)
1041+
10391042
# Run the playbook to retrieve the ssh key from the Azure key vault
10401043
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
10411044

10421045
# Run the playbook to download the software from the SAP Library
1043-
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_04_sap_web_install.yaml
1046+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_06_00_acss_registration.yaml
1047+
1048+
```
1049+
1050+
1051+
# [Windows](#tab/windows)
1052+
1053+
The playbook performs the following tasks:
1054+
1055+
- ACSS registration.
1056+
1057+
```bash
1058+
1059+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
1060+
1061+
export sap_sid=L00
1062+
export workload_vault_name="LABSECESAP04user###"
1063+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
1064+
prefix="LAB-SECE-SAP04"
1065+
1066+
password_secret_name=$prefix-sid-password
1067+
1068+
password_secret=$(az keyvault secret show --vault-name ${workload_vault_name} --name ${password_secret_name} --query value --output table)
1069+
export ANSIBLE_PASSWORD=$password_secret
1070+
1071+
playbook_options=(
1072+
--inventory-file="${sap_sid}_hosts.yaml"
1073+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
1074+
--extra-vars="_workspace_directory=`pwd`"
1075+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
1076+
--extra-vars="@sap-parameters.yaml"
1077+
"${@}"
1078+
)
1079+
1080+
# Run the playbook to download the software from the SAP Library
1081+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_06_00_acss_registration.yaml
10441082

10451083
```
10461084

0 commit comments

Comments
 (0)