Friday 18 June 2021

Install ABAP Platform 1909 – Dev Edition on an Azure Ubuntu instance using docker – Part 1

Introduction

As coders, we run into several situations where we would like to test snippets of code on a local system before even implementing the snippet in a dev system. In certain instances, we as developers would want to use code QA tools like the ABAP Test Cockpit and either do not have the authorizations to access the tool or are not comfortable with setting it up in a customer system.

My goto setup to get a personal system was the SAP Cloud Appliance Library (SAP CAL), It serves the purpose it was designed for perfectly. It is very well built and very intuitive to use while requiring very little interaction with the underlying technologies to get up and running in a test ABAP environment. The only apparent downside with regards to SAP CAL is the fact that it is a bit of an overkill for what a developer might want to use the system for, which warrants its relatively heavy price tag. The cost break down of running an an SAP NetWeaver AS ABAP 7.51 SP02 on HANA Dev system as at the time of writing this post is: 

2.90 USD per hour when Active which evaluates to 2088 USD per month when Active, if my calculations are right.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 1: Cost calculator for running an SAP NetWeaver AS ABAP 7.51 SP02 on HANA Dev system.

As a test system, most developers will not leave their system running 24/7 over the course of the month but I’m sure we all have experiences to share regarding forgetting to shut down our instance for a week or more and having to shell out some “hard” cash to cover the fees. 

With the latest release of the SAP ABAP Platform, we as developers who require just a test system to experiment with our code do not have to generate a CAL instance but can get up and running with a minimalist setup for as little as 60 USD per month when Active, which is a meagre 2.87% of what a developer would have to pay for an equivalent SAP CAL instance.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 2: Azure Pricing for running ABAP Platform 1909 Dev Edition in docker

With the cost-benefit analysis out of the way, let us now focus our attention on how to get up and running in an ABAP Platform 1909 Dev edition on an Azure Ubuntu Instance.


Step 1: Create and login into an ubuntu instance on Azure.

Logon to your microsoft Azure portal and under Azure Services choose Virtual Machines

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 3: Services overview page

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 4: Add virtual machine page

Create an ubuntu instance with the size A4m_v2 or an equivalent 4vcpu and above 28GB RAM instance. Please visit the Pricing Calculator | Microsoft Azure to check out the various instances and the costs based on the region you choose. Also to understand the purpose of each of the types of Azure Virtual Machines, you can visit this link. In the spirit of cost saving, it is very important to choose the Azure Spot instance and select the Eviction Type and Eviction Policy shown in the image below. This will almost halve your monthly fees for the VM.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 5: Create a virtual machine

Fill the rest of the entries as shown below. It is important to take a note of your username and password as this will be used to login into the instance later on. Finally, click the Next : Disks > button at the bottom of the page to create a disk for your instance.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 6: Virtual machine security settings.

On the Disks tab, choose the Standard HDD OS Disk type as it is marginally cheaper and performant enough for what we need it for. With that said, you do not mind splurging a bit more for an SSD, I would definitely recommend that as there is a noticeable increase in speed when using the SSD instead of HDD.  Next, click on the Create and attach a new disk button as shown in the image below.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 7: Create and attach disk

In the detail page that opens up, click the change size button. 

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 8: Create a new disk

Ensure the Disk SKU is still Standard HDD. After choosing the 256 GiB click the OK button at the bottom of the detail page. 

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 9: Select a disk size

Confirm that everything looks good and click the OK button as shown below.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 10: Confirm disk details

We now have the necessary parts of our Virtual Machine setup so the next step is to click the Review + Create button, after making sure the Disk size and Disk type match what is shown in the image below.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 11: Review and create virtual machine

On the review page, ensure that everything looks okay and click the Create button.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 12: Confirm virtual machine details and create

Once the virtual machine and the disks are successfully deployed, you will be presented with a page that looks like the image shown below. Please click the Go to resource button to be sent to the detail page of the provisioned virtual machine.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 13: Go to resource

On the detail page of the virtual machine, what we need is the username you noted down while creating the virtual machine and the public IP address which is highlighted in the image below. We need these details to login into our ubuntu instance via SSH.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 14: Copy public IP address

Now open your terminal in mac or cmd/powershell in windows. No matter which shell you use as your terminal, just enter:

ssh <username>@<ip_address>

An example is 

ssh samdavies@104.214.219.138

As show in the images below.

For a mac terminal:

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 15: SSH into virtual machine

Once you’re logged in you should see.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 16: Mac terminal SSH login

Follow the same steps for both powershell and command prompt in windows as shown below. If you are having issues with ssh in command prompt, it is possible because you don’t have it enabled in your windows installation.

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation

ABAP Development, ABAP Connectivity, ABAP RESTful Application Programming Model, ABAP Testing and Analysis, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Preparation
Image 17: Command prompt successful SSH logon

No comments:

Post a Comment