SAP on MS SQL to AWS Migration

Background

IT-Conductor has developed a comprehensive solution that streamlines the SAP installation process and ensures a smooth and successful outcome with the automation of SAP installation on Windows Server 2019 and MSSQL on AWS. Using Terraform for VM provisioning and Ansible for SAP Installation.

On this page, we will walk you through each step of the installation process, from preparing the disk to installing MSSQL, and SAP NetWeaver, transferring and restoring the database, and finally cleaning up the server.

Moreover, we will highlight the flexibility of our solution by emphasizing that these Terraform and Ansible codes are fully customizable and can be adapted to meet the specific requirements of any customer.

Process Definition

To access the process definition developed for this demo scenario, navigate to the Tenant Service Grid > Process Definitions > Windows-MSSQL on AWS-ag.

Figure 1: SAP on MS SQL Migration to AWS Process Definition

Also, we used our tenant called “OZSoft” but the process can be cloned and applied to any customer after being onboarded to IT-Conductor as a tenant. IT-Conductor creates and clones the Git repository for each tenant who needs to leverage these types of automation runbooks.

We also used multiple data files like:  

  • aws_vm_windows.json: contains information related to windows VM provisioning

  • hosts.yml: file contains host details that will be used by Ansible

  • /ID_RSA and /ID_RSA.pub: used for authentication

 

Figure 2: Process Automation Data Files in IT-Conductor

 

Variables

At IT-Conductor, we believe in making the SAP installation process as simple and straightforward for our customers as possible. That is why we developed the IT-Conductor Form, a simple and user-friendly interface through which users can enter all of the variables required for the Ansible playbook required for the SAP installation. Customers can use this form to adapt the installation process to their specific needs, ensuring a smooth and successful outcome. Note: This can be used for the blog but is too flowery for a wiki page. So instead:

The IT-Conductor Form that we developed is a simple and user-friendly interface through which users can enter all of the required variables for the Ansible playbook used for the SAP installation. You can use this form to adapt the installation process to your specific needs.

 

We have placed all the playbooks on IT-Conductor’s private GitHub Repository which can be cloned and customized for any projects.

Orchestration Workflow in Detail

Now, let’s look into each step/activity of the process definition in detail.

Step 1: Provision Windows VM on AWS

In this step, we will use Terraform to create a Windows Server 2019 virtual machine on AWS. Terraform is an Infrastructure as Code (IaC) tool that enables us to automate the process of creating, updating, and deleting infrastructure resources.

For this demo scenario, we assumed that the target cloud infrastructure such as VPC and subnets already exists per the AWS best practices blueprint. We update the code in “aws_vm_windows.json” file as shown below.

 

Step 2: Prepare Disk

This step is crucial in setting up the virtual machine for SAP installation. The following tasks will be performed in this step:

  1. Initializing the disk: The first step in preparing the disk is to initialize it so that it is ready for use.

  2. Creating a partition: Once the disk is initialized, a partition will be created.

  3. Formatting and labeling the partition: The next step is to format the partition as NTFS and label it.

  4. Retrieving the Ethernet name: The Ethernet name will be retrieved, which is necessary for the next step.

  5. Disabling IPv6 for Ethernet: As IPv6 can cause compatibility issues with SAP, it will be disabled.

  6. Installing .NET Framework 3.5: SAP requires the .NET Framework 3.5 to be installed, so it will be installed along with all the related features and sub-features.

  7. Renaming the Windows machine: The Windows machine will be renamed to give it a descriptive name.

  8. Restarting the Windows machine: Finally, the Windows machine will be restarted to ensure all changes take effect.

Step 3: Copy Installer

In this step, the SAP installation files will be copied to the virtual machine before the installation can proceed.

Step 4: Install MS-SQL

SAP requires a database to store its data and Microsoft SQL Server 2019 was used for this purpose. In this step, MS SQL will be installed on the virtual machine. To do this, the following tasks will be performed:

  1. Mounting the ISO: The MS SQL ISO file will be mounted to the virtual machine.

  2. Installing MS-SQL 2019: Once the ISO is mounted, the MS-SQL 2019 will be installed on the virtual machine.

Step 5: Prepare for SAP Installation

Before SAP can be installed, some preparations will need to be performed. In this step, a folder named "Export" will be created and the file containing SAP Netweaver will be unzipped to extract the SWPM installation tool.

Step 6: Install SAP NetWeaver

After the preparations are complete, the installation of SAP NetWeaver will proceed. This is the core component of the SAP system, and it will provide the platform for all other SAP applications.

To install SAP Netweaver, the “sapinst.exe” will be executed as a silent installation using a parameter file, which can be customized with SAP-supported variables.

Step 7: Transfer MS SQL Backup Files

Once the installation of SAP NetWeaver is complete, the on-premise MS SQL backup files will be transferred to the virtual machine. This will enable the restoration of the database and get the SAP system up and running. To do this, the source MS SQL backup will be copied from the AWS Gateway to the Windows Server. 

Step 8: Restore Database

After the successful installation of SAP NetWeaver, it is time to restore the database. This is a crucial step as the data is the backbone of any enterprise software and hence its restoration is imperative for the smooth operation of the system. Here are the steps to restore the database:

  1. Stop SAP Central Instance (CI): Before restoring the database starts, it is necessary to stop the SAP Central Instance (CI) to avoid any data loss or corruption during the process.

  2. Stop SAP ASCS instance: In addition to stopping the SAP Central Instance, it is also important to stop the SAP ASCS (Application Server Central Services) instance as it is also involved in the database operations.

  3. Set the database to offline mode: Once the SAP instances have been stopped, it is time to set the database to offline mode. This step is taken to ensure that there are no active connections to the database during the restoration process.

  4. Restore the database: Now that the database is in offline mode, it is time to restore it from the backup files that were transferred from the AWS Gateway to the Windows Server in Step 7. The restore process will involve restoring the database from the backup files to the MS SQL database.

  5. Set the database to online mode: After the restore process has been completed successfully, it is important to set the database to online mode. server’s central services available to the system.

  6. Start the SAP Central Instance (CI): Finally, it is time to start the SAP Central Instance (CI). This will complete the restoration process and bring the SAP system back online for use.

Step 9: Cleanup

Once the restoration of the database is complete, it is important to perform a cleanup of the system. This will help to minimize disk space usage and keep the server clean and organized. The following steps should be taken to perform the cleanup:

  1. Delete the SWPM (Software Provisioning Manager) folder: The SWPM folder contains the software provisioning manager files that were used during the installation process. These files are no longer needed and can be deleted to free up disk space.

  2. Delete the EXPORT folder: Similar to the SWPM folder, the EXPORT folder also contains files that are no longer needed and can be deleted.

  3. Delete all MS SQL installers: After the MS SQL database has been installed, the installers for MS SQL are no longer needed and can be deleted.

  4. Delete the WinRM script: The WinRM script that was used to automate the provisioning of the Windows Server 2019 VM on AWS can also be deleted as it is no longer needed.

  5. Delete all SAP installers: Finally, all SAP installers can be deleted to minimize disk space usage and keep the server clean and organized.

Execute the Automation

Now we will run the process definition. The Removal Age refers to the instance of process orchestration and is not to be mistaken for the removal of the provisioned system.

Once the process definition is in a running state, it will start changing colors. After successful completion, the block color will turn green.

 IT-Conductor Monitoring

Once migration is done, the migrated systems will need to be added to IT-Conductor for monitoring. By doing so, you can get full insights into the system's health and performance.

IT-Conductor Monitoring offers four types of monitoring for the migrated system, which are Hostagent, SAP Application, MS SQL Server, and Windows Server.

  • Hostagent monitoring will provide details on the hardware health of the system, such as CPU usage, disk space, and memory usage.

  • The SAP Application monitoring will show data on the performance and status of the SAP application running on the migrated system.

  • The MS SQL Server monitoring will provide insights into the health and performance of the database server, such as the number of open connections and the query response time.

  • Finally, the Windows Server monitoring will show metrics related to the operating system, such as the event logs, service status, and disk usage.

Conclusion

The installation of SAP on a Windows Server 2019 and MS-SQL on AWS is a complex process that requires a comprehensive understanding of various technologies and tools. By following the steps outlined on this page, you can ensure a smooth and successful installation of SAP. Whether you are a small business looking to implement SAP for the first time, or a large enterprise seeking to modernize your IT infrastructure, IT-Conductor is here to help. Join us as we delve into the world of SAP IT Process automation for higher efficiency and quality cloud migrations.