Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
quovadis
Product and Topic Expert
Product and Topic Expert
























Gardener1.52.2


Universal Kubernetes at Scale



2.00.061.00.20220519.1


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 internal audience only - 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.

  • Alternatively, set up your own open source Gardener Project k8s cluster (on any infrastructure of your choice. see https://gardener.cloud/docs/gardener/#setting-up-your-own-gardener-landscape-in-the-cloud for more information).

  • 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.


Putting it all together


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 internal audience only.

  • Alternatively, set up your own open source Gardener Project k8s cluster (on any infrastructure of your choice.)

  • In lieu, and for all, a SAP BTP free-tier kyma cluster can be used as well. Please refer to public SAP Help pages for guidance.



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.












What? -- Activities


How? -- Instructions (gists)


Here goes a single deployment file with a persistent volume claim declaration for /hana/mounts volume mapping.

The deployment should not take more than five minutes. While it is in progress you may:

The last step is to create an API rule to get HTTP access to the webdispatcher service on port 80xx (8090 in this case)



















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







After successful deployment you may need to:

  • check your deployment

  • download and populate some content and then reconfigure the webdispatcher,

  • create an admin user on the tenant database with a never expiring password and assign it selected admin roles.


Last but not least, pretty much everything can be done in-place, from within the hana express container itself, using a terminal pod in a browser.




























Disclaimer.

  • All the above steps were rehearsed on Gardener k8s trial cluster with Kyma 2.0. (They may not work "as is" on a BTP free-tier managed kyma cluster.)

  • Please note that a BTP free-tier managed 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











SAP Analytics Cloud: create a tunnel connection via SAP Cloud Connector




 







The above story is embedded in an iframe and can be securely accessed from anywhere by authorised business users.


A business user identity propagation and resources access has been implemented with the OAuth2SAMLBearerAssertion flow as explained in SAP Analytics Cloud App Integration with OAuth2SAMLBearerAssertion flow. 




  • 2597946 - How to enable iframe embedding with SAP Analytics Cloud?




Conclusion


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.

 




 

Troubleshooting


Please refer to this gist for details on:

  • Port forwarding and

  • Managing Persistent volume claim






 

Additional resources





 

6 Comments