Taming SAP HANA Express database Docker edition with k8s – Gardener


Universal Kubernetes at Scale

SAP BTP – an enterprise-grade Business Technology Platform and their eponymous SAP HANA database are now both accessible to indie developers and IT professionals.

And SAP is turning 50 this year:)

This brief is to demonstrate how one could create a technology playground and upscale her or his SAP HANA, linux and cloud native skills with SAP HANA Express database deployed on a kubernetes cluster.

Why so? According to a recent survey by UKISUG,  there is a growing uptake of S/4HANA and at the same time there is a shortage SAP HANA (and linux) skills on the market.

With the Innovation Commitment for SAP S/4HANA set until 2040…And with a very strong appeal of cloud native technologies, with kubernetes leading that appeal…

So what about learning …. two birds with one …..?


Pre-requisites:

  • For SAP and affiliated audience – have access to a trial service plan on SAP Gardener account.
  • For all audiences – have access to SAP BTP free-tier global account with access to a Kyma runtime cluster in a sub-account of this global account.
  • Access to a docker hub account. We shall be using a public SAP HANA express database edition docker image from docker hub and deploy it “as is” on our kubernetes (k8s) gardener trial cluster (or BTP free-tier kyma cluster).
  • A tablet or a laptop browser with internet access (either mobile or broadband).

Disclaimer:

  • The ideas presented in this blog are personal insights thus not necessarily endorsed by SAP.

  • This is a playground only. All k8s deployment examples, code snippets, gists, etc are provided “as is”.
  • Images/data in this blog post is from a Gardener sandbox and/or demo systems. Any resemblance to real data is purely coincidental.
  • Access to some resources referenced in this blog may be subject to a contractual relationship with SAP and a S-user login may be required. Always refer to T&C.

Good to know:

  • if your focus were rather on SAP HANA Cloud I would encourage you take the following free learning module instead.
  • As announced at TechEd 2021, SAP is offering free access to its https://learning.sap.com/ learning hub and learning journeys https://learning.sap.com/learning-journey. Make sure you take advantage of these journeys to get training and up-skill yourself.

In a way this instalment is a follow-up to the previously published Taming SAP HANA Express database Docker edition with MacOS – prepare blog. (I had been even planning to write up a configure part to it but eventually dropped the idea as I got frustrated with the prospect of having to maintain a local docker image on my laptop forever.)

So why kubernetes (k8s)? Well, with k8s one can describe a desired state management as text – a sequence of yaml declarative instructions – and have a k8s cluster fulfil these instructions.

Get your k8s cluster ready.

The rationale.

How to prepare a k8s cluster?

  • have a k8s cluster deploy a public hana express docker image on your behalf using a single deployment text (yaml) file and not spend time on installing it.
  • rather spend time on exploring SAP HANA features like its built-in multi-tenancy model, its linux tooling, its data modelling and analytics, its connectivity via Cloud Connector, etc.
  • Detailed transcripts of all operations are enclosed in gists.
  • Gardener setup.As aforementioned, this is accessible to SAP and affiliated audience. Please follow this gist for instructions.
  • In lieu, a SAP BTP free-tier kyma cluster can be used as well.

Login to your k8s cluster with central kyma dashboard:

First, from your gardener project [https://dashboard.garden.canary.k8s.ondemand.com/] retrieve kubeconfig (for instance, copy to clipboard)

Then, in order to get access to kyma console, access the central kyma dashboard [https://dashboard.kyma.cloud.sap/] and paste the retrieved login data (kubeconfig).

SAP HANA Express Deployment

In order to deploy a public hana express database docker image on your k8s cluster follow the steps below and detailed gist instructions accordingly.

Steps1,2 and 3 relate to k8s cluster; Steps 4 and 5 relate to hxe database

Step1 (k8s) — Create a dedicated namespace hxe to manage the hana express workload…

Step2 (k8s) — Create docker secret in that namespace…

This is a mandatory step. Please make sure you create the secret in the namespace(s) that will be used for the deployment.

$ kubectl create secret docker-registry mydockerregsecret -n hxe --docker-server https://index.docker.io/v1/ --docker-password <Password> --docker-username <username> --docker-email <email_address>
secret/mydockerregsecret created

Step3 (k8s) — Deployment process on k8s cluster

Assuming you have created the docker hub secret you can proceed with the deployment activities.

Step4 (hxe) — Post deployment activities – prepare and configure hana database

https://help.sap.com/viewer/product/SAP_HANA_PLATFORM/latest/en-US?task=discover_task

Disclaimer.

  • All the above steps were rehearsed on Gardener k8s trial cluster with Kyma 2.0.
  • Please note that a managed BTP free-tier kyma cluster has one single node and the gardener trial cluster is a two-node cluster thus deploying hxe on a single node cluster may slightly vary.

Step5 (hxe) — Probes

Probe type

Probe details

HANA Workbench

<API Rule>/sap/hana/ide/

HANA XS Admin

<API Rule>/sap/hana/xs/admin/

Webdispatcher Admin

<API Rule>/sap/hana/xs/wdisp/admin/public/default.html

GetServerInfo
  • <API_Rule>/sap/bc/ina/service/v2/GetServerInfo
Cubes
  • <API_Rule>/sap/bc/ina/service/v2/GetResponse?Request={%22Metadata%22:{%22Expand%22:[%22Cubes%22]}}
SHINE (SAP HANA Interactive Education)

<API_Rule>/sap/hana/democontent/epm/ui/NewLaunchpad.html


  • <API_Rule>/sap/hana/democontent/epm/ui/salesDashboard/index.html

Last but not least, I hope you enjoyed reading this blog. Please provide your feedback in the comments section below.

SAP is about to celebrate its 50th anniversary. Impressive isn’t it!

A birthday card. I started writing this blog roughly half a year ago. In the meantime we got kyma 2.0 and hana express 2.57, so I had to revisit and retest everything.

So be it my birthday card…

Best wishes and Happy Birthday to SAP.


Please refer to this gist for details on:

  • Port forwarding and
  • Managing Persistent volume claim