After the EC2 instances are launched by AWS CloudFormation, AWS Launch Wizard for SAP orchestrates the creation and configuration of AWS resources. To configure the SAP applications, a workflow is carried out (by the scripts) on the launched EC2 instances.
The scripts are downloaded on all the instances being launched by AWS CloudFormation. They are executed based on the role and parameters of the instances and the selections made in the Launch Wizard console. In case of SAP deployments across multiple instances, baseline activities are performed on each node. The baseline activities wait for a signal from the orchestration logic to execute the dependent activities.
Below is the workflow:
- Install Python3.
- Install awscli.
- Download the scripts to
/root/install/scripts. main.pyis executed. This is the main program that orchestrates all the activities (described below) based on the info provided by the user in the Launch Wizard console, SAP workload, and deployment type.- Prepare parameters json file based on Launch Wizard console inputs and store in
/root/install/scripts/log/inputs.json. This file is used by scripts to execute the automation. - If proxy information is provided, proxy server will be configured.
- Install SSM Agent.
- Install CloudWatch Agent.
- Install [AWSTOE] (https://docs.aws.amazon.com/imagebuilder/latest/userguide/toe-get-started.html).
- Once all the agents are installed, it is implied that the instances have internet access and an
EgressCheckWaitHandlesignal is sent to AWS CloudFormation. Timeout for this wait handle is configured to 60 mins. If the signal is not received within 60 mins, the deployment will error out. - Initialize workflow DynamoDb table. This table will be used to orchestrate the workflow from the master/primary HANA node.
- [Optional] Execute pre-configuration scripts using AWSTOE.
- OS hardening - install packages and configure OS parameters.
- Get total host count for all nodes to take an inventory in DynamoDb.
- Update
/etc/hostsfile with all the hostnames and private IP addresses. - Storage is built/mounted based on AWS recommended storage layout for the given SAP component.
- [Optional] Install database on the database instances if selected.
- [Optional] Install application on the application instances if selected.
- [Optional] In case of HA setup, configure high availability (HA) cluster for database.
- [Optional] In case of HA setup, configure HA cluster for application.
- [Mandatory] Install AWS Data Provider for SAP.
- [Optional] Execute post-configuration scripts using AWSTOE.
- Cleanup instances. Remove
/root/install/scriptsfolder. Copy/root/install/scripts/log/install.logand/root/install/scripts/log/inputs.json. to/tmpfolder. - Delete the DynamoDB table created in Setup 11.
- Success signal sent back to the AWS CloudFormation stack.
- Deployment status updated and SNS notification sent out.