DEV Community

Prakash Rao
Prakash Rao

Posted on

SAP NetWeaver Migration from On-Prem to AWS

This post provides the necessary documentation for migrating a simulated deployment of SAP NetWeaver OnPrem (simulated) to a different AWS environment.

sap

Overview

The migration process involves the following high-level steps:

  1. Launch an EC2 instance and install SAP NetWeaver on it.
  2. Create a simulation as in on-prem, the SAP NetWeaver deployment in the AWS environment.
  3. Convert the EC2 instance into an OVA file and store it in Amazon S3.
  4. Create an Amazon Machine Image (AMI) and EBS snapshot.
  5. Launch a new EC2 instance from the AMI and EBS snapshot in the new AWS environment.

Prerequisites

Before you can begin the migration process, you will need to have the following:

  • An AWS account with sufficient privileges to create and manage the necessary resources.
  • Access to the AWS Management Console and AWS CLI.
  • Familiarity with AWS services and concepts such as EC2, S3, and VPC.

Migration Process

Step 1,2: Launch an EC2 instance and install SAP NetWeaver on it

Launch an EC2 instance in the AWS environment and install SAP NetWeaver on it. Ensure that the instance is properly configured and that SAP NetWeaver is running correctly.
Snipaste_2023-03-22_22-03-37_1

Snipaste_2023-03-22_22-07-22
Snipaste_2023-03-22_22-10-07

Now, let's install the necessary packages require for the SAP:

sudo apt-get install libaio1
sudo apt-get install csh
sudo apt install libc6
sudo apt-get install uuid
sudo service uuidd start
sudo update-locale LANG=”en_US.UTF-8"
Enter fullscreen mode Exit fullscreen mode

For setting up VNC:

sudo apt update && sudo apt upgrade
sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo /etc/init.d/ssh restart
sudo passwd ubuntu
sudo apt install xrdp xfce4 xfce4-goodies tightvncserver
echo xfce4-session> /home/ubuntu/.xsession
sudo cp /home/ubuntu/.xsession /etc/skel
sudo sed -i '0,/-1/s//ask-1/' /etc/xrdp/xrdp.ini
sudo service xrdp restart
tightvncserver
Enter fullscreen mode Exit fullscreen mode

For downloading the SAP netweaver let's install firefox:

sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa
sudo apt-get update
sudo apt-get install firefox
Enter fullscreen mode Exit fullscreen mode

Snipaste_2023-03-22_22-12-43
Snipaste_2023-03-22_22-13-54
Snipaste_2023-03-22_22-33-32
Snipaste_2023-03-22_22-33-58
Snipaste_2023-03-22_22-36-44
Snipaste_2023-03-22_22-37-53
Snipaste_2023-03-22_22-41-20
Snipaste_2023-03-22_23-12-28

Now let's edit system configuration needed for SAP:

Update Hostname
sudo vim /etc/hostname

Check the IP Address
sudo ip addr show
sudo vim /etc/hosts
sudo cat /etc/hosts


Check Hosts and Hostname
sudo cat /etc/hosts
sudo cat /etc/hostname

Restart System after changes and validate the changes
sudo reboot
Enter fullscreen mode Exit fullscreen mode

Snipaste_2023-03-22_23-25-10
Snipaste_2023-03-22_23-26-11
Snipaste_2023-03-22_23-26-32
Snipaste_2023-03-22_23-31-02
Snipaste_2023-03-22_23-36-22
Snipaste_2023-03-22_23-39-54
Snipaste_2023-03-22_23-47-08
Snipaste_2023-03-22_23-56-19
Snipaste_2023-03-23_01-25-24

Now the installation of netWeaver is completed, let's install SAP frontend GUI to access the netweaver.

Snipaste_2023-03-23_10-43-29

Let's add a new connection
Snipaste_2023-03-23_10-44-40

Give the connection a name, and add the public ip address assigned to the SAP and save it.

Snipaste_2023-03-23_10-47-53

Now add the credentials, generally if it is developer ABAP SPO2 7.52 version, the default details are
Client: 001
username: SAP*
password: Appl1ance

Snipaste_2023-03-23_10-48-42

Now, let's add a user, type SU01 in the searchbox, Select create user
Snipaste_2023-03-23_11-05-28

Snipaste_2023-03-23_11-09-12
Snipaste_2023-03-23_11-12-34

Snipaste_2023-03-23_11-15-23
Snipaste_2023-03-23_11-16-48
Snipaste_2023-03-23_11-17-56

Now the user is created.
Snipaste_2023-03-23_11-18-20
we'll use this created user to login to SAP now
Snipaste_2023-03-23_11-19-39
Snipaste_2023-03-23_11-20-01
Now we're logged in as created user.
Snipaste_2023-03-23_11-20-31

Step 3: Convert the EC2 instance into an OVA file and store it in Amazon S3

Use the AWS CLI to convert the EC2 instance into an OVA file and store it in Amazon S3. Ensure that the OVA file is stored in a secure and accessible location.

for this step if we want to convert manually to let's say to VMware platform we can use below cli to convert format and export it.
https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html

But in my case to make it easier, I am just creating image from the current VM in next step utilizing AWS automation to reduce manual overhead.

Step 4: Create an Amazon Machine Image (AMI) and EBS snapshot

Ensure that the AMI and EBS snapshot are properly configured and tagged for easy identification.

Snipaste_2023-03-23_11-49-32
Snipaste_2023-03-23_12-03-50

Wait until the AMI becomes available, it will take a while.
Snipaste_2023-03-23_11-50-57
Snipaste_2023-03-23_12-39-10

Step 5: Launch a new EC2 instance from the AMI and EBS snapshot in the new AWS environment

Now, let's Launch a new EC2 instance from the AMI and EBS snapshot in the new AWS environment with same config as previous instance.

Snipaste_2023-03-23_12-40-12
wait until it comes to active status
Snipaste_2023-03-23_12-40-43
Snipaste_2023-03-23_12-40-57

Now note down the new public ip of the migrated instance
Snipaste_2023-03-23_12-42-07
Now let's create a new connection to the new instance with the noted ip address.
Snipaste_2023-03-23_12-44-43

Now instead of default login credentials, let's use the user and it's credentials we created to check if the migrated VM is same as the previous VM.

Snipaste_2023-03-23_12-53-00
Snipaste_2023-03-23_12-54-05

Now we Ensured that the instance is properly configured and that SAP NetWeaver is running correctly.

Step 6: Cleanup

Now to reduce any further costs, delete the EC2 instances launched, deregister AMI and delete the snapshot.

Top comments (0)