Skip to content

Commit 277818a

Browse files
author
Kimmo Forss
committed
HA Playbooks
1 parent 3ca2865 commit 277818a

File tree

1 file changed

+166
-5
lines changed

1 file changed

+166
-5
lines changed

articles/sap/automation/run-ansible.md

Lines changed: 166 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
216216

217217
```
218218

219-
### Operating system configuration
219+
## Operating system configuration
220220

221221
The operating system configuration playbook is used to configure the operating system of the SAP virtual machines. The playbook performs the following tasks.
222222

@@ -312,7 +312,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
312312

313313
---
314314

315-
### SAP-specific operating system configuration
315+
## SAP-specific operating system configuration
316316

317317
The SAP-specific operating system configuration playbook is used to configure the operating system of the SAP virtual machines. The playbook performs the following tasks.
318318

@@ -394,7 +394,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
394394

395395
---
396396

397-
### Local software download
397+
## Local software download
398398

399399
This playbook downloads the installation media from the control plane to the installation media source. The installation media can be shared out from the central services instance or from Azure Files or Azure NetApp Files.
400400

@@ -470,7 +470,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
470470
```
471471
---
472472

473-
### SAP Central Services & High Availability Configuration
473+
## SAP Central Services & High Availability Configuration
474474

475475
This playbook will perform the Central Services installation. For High availability scenarios, the playbook will also configure the Pacemaker cluster needed for SAP Central Services for high availability on Linux and Windows Failover Clustering for Windows.
476476

@@ -550,7 +550,7 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
550550

551551
---
552552

553-
### Database Installation
553+
## Database Installation
554554

555555
This playbook will perform the Database server installation.
556556

@@ -626,5 +626,166 @@ ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-a
626626

627627
```
628628

629+
---
630+
631+
## Database Load
632+
633+
This playbook will perform the Database load.
634+
635+
You can either run the playbook using the DevOps Pipeline 'Configuration and SAP installation' choosing 'Database Load', or the configuration menu script 'configuration_menu.sh' or directly from the command line.
636+
637+
638+
639+
# [Linux](#tab/linux)
640+
641+
The following tasks are executed by this play:
642+
643+
- Database load.
644+
645+
```bash
646+
647+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
648+
649+
export sap_sid=L00
650+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
651+
652+
playbook_options=(
653+
--inventory-file="${sap_sid}_hosts.yaml"
654+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
655+
--extra-vars="_workspace_directory=`pwd`"
656+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
657+
--extra-vars="@sap-parameters.yaml"
658+
"${@}"
659+
)
660+
661+
# Run the playbook to retrieve the ssh key from the Azure key vault
662+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
663+
664+
# Run the playbook to download the software from the SAP Library
665+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_01_sap_dbload.yaml
666+
667+
```
668+
669+
670+
# [Windows](#tab/windows)
671+
672+
The following tasks are executed by this play:
673+
674+
- Database load.
675+
676+
```bash
677+
678+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
679+
680+
export sap_sid=L00
681+
export workload_vault_name="LABSECESAP04user###"
682+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
683+
prefix="LAB-SECE-SAP04"
684+
685+
password_secret_name=$prefix-sid-password
686+
687+
password_secret=$(az keyvault secret show --vault-name ${workload_vault_name} --name ${password_secret_name} --query value --output table)
688+
export ANSIBLE_PASSWORD=$password_secret
689+
690+
playbook_options=(
691+
--inventory-file="${sap_sid}_hosts.yaml"
692+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
693+
--extra-vars="_workspace_directory=`pwd`"
694+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
695+
--extra-vars="@sap-parameters.yaml"
696+
"${@}"
697+
)
698+
699+
# Run the playbook to retrieve the ssh key from the Azure key vault
700+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
701+
702+
# Run the playbook to download the software from the SAP Library
703+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_05_01_sap_dbload.yaml
704+
705+
```
706+
707+
708+
---
709+
710+
## Database High Availability Configuration
711+
712+
This playbook will perform the Database server high availability configuration.
713+
714+
You can either run the playbook using the DevOps Pipeline 'Configuration and SAP installation' choosing 'Database High Availability Configuration', or the configuration menu script 'configuration_menu.sh' or directly from the command line.
715+
716+
717+
718+
# [Linux](#tab/linux)
719+
720+
The following tasks are executed by this play:
721+
722+
- Database high availability configuration.
723+
- For HANA, the playbook will also configure the Pacemaker cluster needed for SAP HANA for high availability on Linux and configure HANA System replication.
724+
- For Oracle, the playbook will also configure Oracle Data Guard.
725+
726+
```bash
727+
728+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
729+
730+
export sap_sid=L00
731+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
732+
733+
playbook_options=(
734+
--inventory-file="${sap_sid}_hosts.yaml"
735+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
736+
--extra-vars="_workspace_directory=`pwd`"
737+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
738+
--extra-vars="@sap-parameters.yaml"
739+
"${@}"
740+
)
741+
742+
# Run the playbook to retrieve the ssh key from the Azure key vault
743+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
744+
745+
# Run the playbook to download the software from the SAP Library
746+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_04_00_01_db_ha.yaml
747+
748+
```
749+
750+
751+
# [Windows](#tab/windows)
752+
753+
The following tasks are executed by this play:
754+
755+
- Database high availability configuration.
756+
- SQL Server Always On Availability Group configuration.
757+
758+
```bash
759+
760+
cd ${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/LAB-SECE-SAP04-L00/
761+
762+
export sap_sid=L00
763+
export workload_vault_name="LABSECESAP04user###"
764+
export ANSIBLE_PRIVATE_KEY_FILE=sshkey
765+
prefix="LAB-SECE-SAP04"
766+
767+
password_secret_name=$prefix-sid-password
768+
769+
password_secret=$(az keyvault secret show --vault-name ${workload_vault_name} --name ${password_secret_name} --query value --output table)
770+
export ANSIBLE_PASSWORD=$password_secret
771+
772+
playbook_options=(
773+
--inventory-file="${sap_sid}_hosts.yaml"
774+
--private-key=${ANSIBLE_PRIVATE_KEY_FILE}
775+
--extra-vars="_workspace_directory=`pwd`"
776+
--extra-vars ansible_ssh_pass='{{ lookup("env", "ANSIBLE_PASSWORD") }}'
777+
--extra-vars="@sap-parameters.yaml"
778+
"${@}"
779+
)
780+
781+
# Run the playbook to retrieve the ssh key from the Azure key vault
782+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/pb_get-sshkey.yaml
783+
784+
# Run the playbook to download the software from the SAP Library
785+
ansible-playbook "${playbook_options[@]}" ~/Azure_SAP_Automated_Deployment/sap-automation/deploy/ansible/playbook_04_00_01_db_ha.yaml
786+
787+
```
788+
629789

630790
---
791+

0 commit comments

Comments
 (0)