AWS Partner Network (APN) Blog

Migrating SAP HANA to AWS Faster with Red Hat Ansible Automation Platform

By Vas Mitra, SAP Solutions Architect – Red Hat
By Jim Garrett, Principal Solutions Architect – Red Hat
By Archana Kuppuswamy, Sr. Partner Solutions Architect, SAP Specialist – AWS

Red-Hat-AWS-Partners
Red Hat
Connect with Red Hat-1

For SAP customers aiming to cut costs, a popular option is replatforming to the Amazon Web Services (AWS) cloud, which can be done seamlessly using various migration tools and methodologies.

One scenario is migrating SAP HANA systems with SAP HANA system replication, where you can replicate an on-premises SAP HANA server to a secondary SAP HANA server on AWS without incurring any database or application downtime on the source.

In this post, Red Hat shares how to more quickly migrate SAP HANA from on-premises environments to the AWS cloud using the Red Hat Ansible Automation Platform. This solution offers a fast, user-friendly migration with expert guidance along the way.

Red Hat is an AWS Specialization Partner and AWS Marketplace Seller with the Containers Competency. Red Hat provides added security, reporting, analytics, and technical support to help organizations scale their automation programs. Together, Red Hat and AWS offer you the tools to reduce complexity, innovate faster, and scale your infrastructure in any direction.

About Red Hat Ansible Automation Platform

Red Hat Ansible Automation Platform (AAP) is an end-to-end automation platform to configure and manage systems, deploy software, and orchestrate advanced workflows. It’s based on Ansible, a command line tool for automation.

The platform leverages Ansible Content Collections, which include certified content developed by Red Hat and its partners to help users quickly automate the provisioning and management of servers, storage, networks, and security. Collections are available to automate AWS infrastructure operations, as well as Day 1 and Day 2 SAP operations. Day 1 represents the installing and building phase, while Day 2 is the maintaining and optimizing phase.

Collections include the following software components:

  • Playbooks: Top-level specification for a group of tasks, and playbooks call roles.
  • Roles: Repeatable set of tasks that perform a specific function and are used within playbooks.
  • Modules: Pieces of code that can execute system commands or interact with an API. Modules are called by playbooks and roles, and official modules shipped with Ansible are written in Python.

Note that roles and playbooks are written in YAML syntax.

The certified collections are available in the Ansible Automation Hub, a central repository where users can discover and download Ansible Content Collections to automate new projects faster, as the automation code has been pre-built and tested. Hence, users can automate their work faster, improve productivity, and accelerate time to value.

SAP HANA Migration Procedure

Figure 1 below depicts the architecture for migrating SAP HANA from on-premises to AWS and makes reference to the following:

  • SAP HANA: Column-oriented, relational database management system used to store and retrieve data.
  • SAP HANA System Replication: Method to ensure the high availability of an SAP HANA system.
  • RHEL: Red Hat Enterprise Linux is an enterprise Linux platform certified on/with many cloud providers and hardware/software vendors.
  • Ansible AWS Collection: Content to help automate the management of AWS services.
  • Ansible SAP Day 1 Collection: Content to help automate SAP software installation in various deployment configurations.

Red-Hat-SAP-HANA-Migration-1

Figure 1 – Migration architecture from SAP HANA on-premises to AWS.

The figure above highlights the four steps of building an SAP HANA system migration architecture:

Step 1: Evaluate On-Premises SAP HANA Systems

Evaluate and assess your environment to decide which SAP HANA applications would most benefit from migration and create a plan. For example, you can start with your development/test environments, followed by the quality assurance and production environments. Migrating a non-production environment first enables you to test and validate the procedure before proceeding to the more important production systems.

Step 2: Deploy AWS Infrastructure

Deploying AWS infrastructure and instances to host the new SAP HANA system requires knowing the necessary AWS resources (such as CPU, memory, or storage). See the SAP on AWS sizing documentation for more information.

Once the sizing specifications are clear, use Ansible Automation Platform to automate the provisioning of the infrastructure. The Ansible Amazon AWS Collection includes a variety of Ansible content to help automate management of AWS instances.

Figure 2 shows some of the functions available in Ansible Automation Hub.

Red-Hat-SAP-HANA-Migration-2

Figure 2 – Range of Ansible AWS functions available in Ansible Automation Hub.

You can include the different AWS modules shown above in a playbook to deploy the required AWS infrastructure for the target SAP HANA system in AWS. The modules use the AWS Software Development Kit (AWS SDK) to interact with AWS services.

Note that the complete Ansible steps to create an AWS environment for an SAP HANA system is out-of-scope for this post. As an example, we’ll show one of the modules that needs to be executed: the “Create & Manage EC2 Instances” module.

An example playbook for creating an Amazon Elastic Compute Cloud (Amazon EC2) instance is available in the community version of the Ansible documentation. Below is an example of the Ansible code.

Red-Hat-SAP-HANA-Migration-3

Figure 3 – Example Ansible code to deploy a new EC2 instance.

In the example above, the Ansible code launches an AWS instance type r4.16xlarge, which is an SAP HANA certified instance.

Step 3: Install SAP HANA System on AWS

For this migration scenario, it’s necessary to create a secondary SAP HANA system and set of application servers on AWS. This can be automated using the SAP Day 1 Ansible collection, as shown in Figure 4.

Red-Hat-SAP-HANA-Migration-4.1

Figure 4 – SAP Day 1 roles available in Ansible Automation Hub.

Run the following three Ansible roles to automate the deployment of the required Red Hat Enterprise Linux operating system (OS) settings and packages for SAP:

  • sap_general_preconfigure: Prepares RHEL with common configurations required for either SAP NetWeaver or SAP HANA installation; executed on the HANA and application server hosts.
  • sap_hana_preconfigure: Prepares RHEL with specific configurations required for SAP HANA installation; executed on the HANA host.
  • sap_netweaver_preconfigure: Prepares RHEL with specific configurations required for SAP NetWeaver installation; executed on the application server hosts.

Next, run the following Ansible roles to install the secondary SAP HANA system on AWS:

  • sap_hana_install: HANA installation files need to be downloaded first from SAP. The role utilizes the SAP HANA Database Lifecycle Manager (HDBLCM) command to install the HANA instance. The secondary SAP HANA system needs to be installed with the same version (or higher) and configuration as the source SAP HANA database on-premises. The SAP System ID (SID) and instance number must be the same.
  • sap_swpm: Uses SAP Software Provisioning Manager (SWPM ) to install SAP software. It can be used to install application servers for an S/4HANA system.

Step 4: Configure SAP HANA System Replication

This step involves setting up SAP HANA system replication between the primary SAP HANA database on-premises and secondary SAP HANA database On AWS.

Run the following role:

  • sap_ha_install_hana_hsr: Uses the SAP HANA command “hdbnsutil” to set up SAP HANA system replication between two nodes.

Complete the migration with a takeover of the secondary SAP HANA system on AWS, achieved via SAP HANA commands. This is covered in the SAP HANA documentation.

Conclusion

Migrating SAP HANA from on-premises to the AWS cloud is a common way for businesses to reduce costs. Various AWS-proven migration tools and methodologies are available to facilitate this migration.

The Red Hat Ansible Automation Platform is one such tool that enables users to seamlessly automate the migration process, making it faster and simpler for users. Using the steps included in this post, SAP customers can deploy the correct infrastructure and install and configure SAP HANA and application servers on AWS quickly and efficiently.

Benefits of Ansible Automation Platform for SAP HANA migration to AWS cloud include:

  • Pre-built automation code allows users to automate their work faster, and accelerate time to value.
  • Increased reliability and confidence as Ansible roles and modules have been pre-tested to work with SAP HANA and AWS infrastructure.
  • Automation content is fully supported and maintained by Red Hat.
  • Automation enables a faster and more accurate and simplified migration experience.
  • Common automation platform that can be used on-premises and on AWS (for hybrid cloud scenarios).

.
Red-Hat-APN-Blog-Connect-2023
.


Red Hat – AWS Partner Spotlight

Red Hat is an AWS Partner that provides added security, reporting, analytics, and technical support to help organizations scale their automation programs. Together, Red Hat and AWS offer you the tools to reduce complexity, innovate faster, and scale your infrastructure in any direction.

Contact Red Hat | Partner Overview | AWS Marketplace