CodeNewbie Community

Cover image for Automating SAP setup using open-source software
shyam
shyam

Posted on

Automating SAP setup using open-source software

Introduction

In our previous post, we've demonstrated how to specify the features for SAP applications using Terraform. In our next article, we discussed the automated process of SAP software installation by using Systems Manager. It's time to dive deeper using specific open-source software such as Jenkins or Ansible to make the SAP configuration in one comprehensible pipe. This method has a few advantages that are on top of alternatives: You can take the AWS certification via an online learning platform. Support team is always available 24X7 to help out.

Helps clients teams be conform to auditable guidelines that are associated with configuration as code because in this post we will automate each one of the SAP software installations.

Changes the SAP setup into a repeatable procedure, making the results much simpler to improve as it is able to be replaced and repeated with the same source of data.

Another option to launch SAP can be the AWS Launch Wizard. Consumers can develop SAP systems that are compatible with AWS best practices using AWS Console. AWS Console, which is in line with the specialized experience created specifically for SAP administrators.

To help achieve goals like increasing efficiency of implementation as well as ensuring quality Many users are automating as much repeatable procedures as they can. Jenkins is a pattern in the market that provides one orchestrator setting that allows you to combine all of the required items. It uses exactly the same scripts we probably do manually using BASH to run Linux.

Understanding the pipeline's actions

Take a look at SCM-This is the time the moment that Jenkins is trying to locate the source code on GitHub
Preparefor the run. Jenkins determines if the necessary variables needed for the run are in place (variables are described in the Section "Preparing Jenkins").

Examine ENV states. Check whether there's an S3 pail available for saving all final Terraform state documents , and also whether there's an existing in operation with this automated system.

Vital: this procedure will result in a container that you've provided on your account. The pail name will undoubtedly be "sap-install-bucket-" adhered to by a random number. Terraform will surely preserve its state documents in the pail.

Create ENV-- This facility automation built on Terraform provides all the needed framework needed for this set-up. To fully understand what will be constructed, go through our initial article.

Set up Hana and ASCSIt is a placeholder to suggest that the two subsequent activities (6 seven) are executed in parallel.

Mount Hana-Sets in place Hana on the Terraform instance. by Terraform.

Set up ASCS- Installs ASCS according to the conditions.

Set up PAS- Installs PAS on its committed instance once Hana and ASCS are finished.

Notify -- an important inexpensive notice that outlines the termination of processing.

Article actions- Jenkins auto-generated steps that mention the complete pipe.
Utilizing a single Ansible command, you can state a variety of things.

Course-- describes the directory path that I would like to be sure to create.

State-- advises the command to create directory sites, not documents.
Setting -- the approvals I would like for those folders.

Loophole-- suggests that this duplicates X times, in accordance with the various values I've got in my variable "folders_to_create," as well as creating the "item" along the way to get it to work.

The best feature of Ansible is the state affirmation. You specify the state you'd like to attain and Ansible examines and taking the actions needed in order to achieve the state you've described. Let us say that there are three folders in the variable "folders_to_create" is present. There's nothing to worry about. It is possible to make the continuance to have two, and also handle the agreement of three members in the event that it is required to.

What is the best way to execute the program.

This setup-automation database contains many folders, creating at minimum, 12 repos that could be divided for better understanding. Review the README information on each of the twelve folders listed on the main README to understand how they function.

1. The process of setting in place the prerequisites.

You can access the terminal of an Linux or Mac computer system.
Install Vagrant and VirtualBox on your system.
Create the SAP installment media documents in a pail within your AWS account to make use of. Follow Launch Wizard's instructions for separating the files in the pails.
In the time there is a limitation to the number of times HANA 1909 has been tested in this scenario. It is possible to utilize a different variant of that , however, be aware that you might need to tweak the code to allow it to work.

2. Set up Jenkins.

After you have cloned the installment automation repo, using an terminal, likely into the directory "Jenkins-as-code," and type "Sudo vagrant up." Allow this process to run. This could take up to ten minutes, depends the speed of you web speed.
Once you're done you can start the web browser window , and enter "localhost:5555," and also you'll be able to access your personal Jenkins. Log in using the default user/password: admin/my _ secret_pass_from_vault.

3. Configuring the parameters.

After you log in to Jenkins After logging in, head into Manage Jenkins >> Manage Credentials. Here, you'll need to complete the information for each of the specifications that are required. There are other parameters that you may want to examine.

AWS_ACCOUNT_CREDENTIALS-- The AWS accessibility crucial ID and secret accessibility secret for the IAM User you will undoubtedly use with Jenkins. You should ensure you use an alternative brand for the demonstration, and give administrators the opportunity to manage this customer to avoid errors that result from initial approvals.

Instance access crucial ID AKIA3EEGHLDKU6NTJYNZ and remote gain access to the trick: nSrpAhTsPL81jVmFYjlYRtIVsKTHlFN82wyONh7X.

AMI_ID-Search to find an AMI ID for the image "Red Enterprise Linux for SAP with Update Services and HA 8.2" on the AWS Marketplace to the region you'd like to work in (AMI IDs are specified in the specific AWS area). Sign up to it and learn about the AMI ID by pressing "Brand-new Launch instance."

Example: ami-0e459d519030c2bd7.

KMS_KEY_ARN -- Create one client that handles the most important aspects of Your Key Management Service (KMS) and remove the ARN.

Example: arn: aws: kilometres: us-east-1:764948313645: key/09fb3dfd-e 0fa-4a78-aa12-8d69d96fce1e.

SSH_KEYPAIR_NAME- The name for the key pair that you use to ssh directly in to AWS instances. You can create a new one by using the AWS CLI or within the AWS Console, under the EC2 console, select Key Pairs. IMPORTANT! Omit ". Pem" in the last line of your file. Use only the first part (before"the dot).

Keypair.

SSH_KEYPAIR_FILE-the actual creds.pem information. Send the file to Jenkins.
The "keypair. pem" data in itself.

S3_ROOT_FOLDER_INSTALL_FILES-- the S3 container and folder, if suitable, consists of all your SAP media data. Be sure to follow instructions for the AWS Launch Wizard's folder pecking procedure for S/4HANA as described within the Launch Wizard guideline.

Instance: s3:// my-media-bucket/S4H1909.

PRIVATE_DNS_ZONE_NAME-- an exclusive DNS area name from Route53 for your SAP installation.

Example: myprivatecompanyurl.net.

VPC_ID -- VPC ID where to put the infrastructure.
Instance: vpc-b2fa0ddf.

SUBNET_IDS -- 2 PUBLIC subnet IDs should be made available below (for future HA capabilities). The use of public subnets is not advised depending on your particular situations.

We're using the public to simplify the demonstration. Based on your specific circumstances it is recommended to utilize all subnets, using a Bastion or another method of getting them to work and increase security.
Instance: subnet-fec01a12, subnet-a615b465.
SECURITY_GROUP_ID-an in existence security group that is currently in existence. Important: ensure that you add your IP in the form of the resource CIDR in a rule that permits access on the port 22 (SSH) to this security group.

Example: sg-831778bb.

It's time to take an examination of the alternative options. You could change your SIDs of the conditions and default passwords and names, tags and additional crucial information regarding your payment.

4. The setup is running.

Return to Jenkins home, select "SAP Hana+ ASCS+PAS3 Incidents" >> "Spin up, and install" then "Build Now".

Additionally when you are done you'll have three EC2 instances that have an software program that is set up to run the first as PAS The second one as ASCS and the final to be the HANA data source, within Your AWS account.

The final result will be the picture you've seen in the intro portion of this blog post.
In the last step of the set-up the three of the instances (ASCS in addition to HANA) conduct an exam to discover whether the transaction was executed correctly or not. Entering right into the scenario and then running "sapcontrol -nr 000 --function GetProcessList," making use of the adm client (ad0adm in case you're using an SID that is the standard) using the terminal.

To help users to try rotating backwards and forwards in your SAP, there's an option to pipeline "SAP Hana+ ASCS+PAS3 instances" > "Ruin Env." When you activate this pipe, Jenkins searches for the state file for the current Terraform state file and then remove anything that the previous implementation resulted in.

The next step.

Ready to start? Go straight to the repo for installation automation and start examining your environment.

When your tests are completed, you can rate to make the repo more customized to meet your particular requirements. The repo's folders include READMEs that provide additional information about how each is used to put all the pieces together . You will also are equipped with SAP running in the final.

If you're seeking expert advice and assistance in the process of moving to upgrade your SAP systems to an DevOps version that is available, this AWS Specialist Services Global SAP Specialty Practice can help.

More often, SAP on AWS customerssuch as CHS along with Phillips 66-- are making engagements with our team in order to boost the efficiency of their SAP transformation.

Discussion (0)