This week Jerry attended a 4-day Kubernetes training in SAP Shanghai Research Institute, and spent a busy and fulfilling 4 days. Jason, Benny and Peng have been doing a lot of training. Jerry: Well, I took the opportunity to catch up with Patrick and Evan and meet some of the big names in the SAP community in Shanghai. I heard the name for a long time on the network before, and finally saw the big guys themselves, but I have a wish.

Why is Kubernetes training in SAP? Launched in July 2015, Kubernetes is an open source version of Borg, a container cluster management system used internally by Google for many years. Thanks to Google’s years of expertise in container choreography, it quickly took off after launch and is now the de facto standard and leader in container cluster management.

We know the logo of Docker is “cute”, a whale swimming freely in the IT world with a container loaded with software images.

The logo of Kubernetes reflects the wisdom and atmosphere of Google, an established IT enterprise. Kubernetes comes from ancient Greek, meaning “helmsman”, and Google’s intention is clear: Kubernentes is Google’s embodiment of leading the whole IT world in the cloud era in the field of container scheduling and management.

As a software company transforming to the cloud, Jerry knows that the continuous integration/continuous delivery processes and systems of many development teams within SAP have been migrated to Kubernetes, benefiting from Kubernetes’ high degree of automation and high availability. The delivery process of SAP’s product development team based on microservices architecture is greatly simplified, while the workload of operations personnel is greatly reduced. Along with SAP’s internal use of Kubernetes came a number of Kubernetes technologists like **Jason Gu, Benny Gu and (in no particular order) Peng Wang **.

Is Kubernetes only used inside SAP? Of course not. Jerry’s previous article covered Neo and CloudFoundry programming environments on the SAP cloud platform:

  • Call functions in ABAP on-premise system using Java+SAP Cloud Platform Neo environment +SAP Cloud Connector
  • Consume ABAP on-premise OData services in the CloudFoundry environment of SAP cloud platform

Now (November 2018), open the OFFICIAL website of SAP Cloud platform and you will find this news:

Cloudplatform.sap.com/enterprise-…

According to the information provided on the web page, Kubernetes will also be one of the operating environments supported by SAP cloud platform in the future. Applications that SAP Partners previously deployed and ran on a Cluster of Kubernetes containers can be easily migrated to the SAP cloud platform’s Kubernetes environment by Gardener, another open source tool.

The homepage of Gardener is also interesting, with The slogan “The Kubernetes Botanist”. Jerry wanted to use Gardener’s one-stop service to create a Kubernetes cluster for trial purposes and found it really convenient. Its simple steps shield application developers from the low-level setup and configuration details of the Kubernetes cluster and enable them to get a usable Kubernetes cluster in just a few minutes:

The characteristics of Kubernetes-as-A-Service are consistent with the “Botanist” in its slogan, Gardener is like A hard Gardener, planting the seeds of Kubernetes cluster on the laptop of Kubernetes beginners all over the world.

gardener.cloud/

In addition to continuous integration and continuous delivery of SAP’s internal products that already use Kubernetes, and SAP Cloud Platform will add support for Kubernetes, Jerry knows of at least one product released by SAP that is based on Kubernetes: Kyma.

As a child, Jerry heard Newton say this modestly: “If I have seen farther than others, it is by standing on the shoulders of giants. If I have seen further, it is by standing on the shoulders of giants. I heard it at the time. In the first half of this year, I approached Kyma without knowing anything about Kubernetes. After listening to the Kubernetes training course taught by three teachers from SAP Shanghai Research Institute, I looked back at Kyma and suddenly understood the meaning of Newton’s words.

What is Kyma? 叒 yi is a SAP open source project, which comes from the Greek word, meaning wave, Jerry’s personal guess, this means SAP wants to use Kyma to make a big difference in the already busy cloud native development world?

Kyma is a Kubernetes-based enterprise software extension platform that extends on-premise or cloud applications in a Serverless/ microservices architecture, according to Kyma’s website.

kyma-project.io/

When you read a lot of SAP C/4HANA promotional materials, such as the following illustration of five SAP C/4HANA clouds, you will see another term, SAP Cloud Platform Extension Factory. The relationship between Kyma and SAP Cloud Platform Extension Factory is just like the relationship between Open UI5 and Fiori. Open UI5 is an Open source UI development framework and UI control library launched by SAP, and Fiori is a commercial product developed by SAP based on Open UI5 technology framework (of course, Fiori also represents a UI style recommended by SAP). Similarly, SAP Cloud Platform Extension Factory is a commercial product that SAP adds additional functions and implementation based on Kyma, an open source project, according to some standards (such as SAP product standards and special regional requirements) that enterprise applications must meet.

Moritz Zimmermann, THE CTO of SAP’s Customer Experience division where Jerry works, wrote about Kyma in a blog post on his linkedin:

www.linkedin.com/pulse/yaas-…

It was also in this blog post that Mortiz gave an important indication that Kyma(SAP Cloud Platform Extension Factory) would become a unified Extension tool for all microservices architecture based products in SAP C/4HANA suite.

What’s so powerful about Kyma that it can scale up to five clouds in SAP C/4HANA? Here’s what Kyma’s official website has to say:

As a developer, what caught my attention most about Kyma was Jerry’s highlighted “Kyma allows developers to extend applications using any technology stack that has nothing to do with the original application being extended.”

So how exactly does Kyma work? Let’s use a concrete example to illustrate.

Since so far there have been many new terms: container, Kubernetes, Gardener, Kyma, etc., which may seem strange to Netweaver secondary development partners, we choose a familiar scenario as an example.

Suppose there is a data synchronization requirement: whenever a sales order is created or modified in the SAP Cloud for Customer(C4C), the order is synchronized to S/4HANA.

SAP recommends using SAP PI or SAP HANA Cloud Integration as the data synchronization middleware for this data synchronization requirement across multiple SAP products.

Since this article is about Kyma, Jerry introduces a third solution.

C4C systems provide a mechanism called OData event notification:

The following configuration page defines the publishing mechanism for the Create and Update events of the Business Object: Whenever a new salesorder is generated or an existing salesorder is modified, C4C automatically issues events to listeners of both events through the OData service ZJerrysalesOrder that I defined.

Listeners of events, or consumers, are registered in the following interface. I developed a Restful API in S/4HANA system, A6P/213, which is responsible for receiving sales order events issued by C4C system and creating sales orders in S/4HANA according to the data provided by C4C Odata. This is another lightweight data synchronization solution.

At the heart of this solution is the publisher/subscriber pattern. In fact, this is Kyma’s extension principle.

1. Through Application Connector, you can connect Kyma to SAP C/4HANA products and register events.

2. After the event is registered, the listener (consumer) of the event is implemented using the microservice architecture. This is what Kyma’s website says: “Developers can scale with any technology stack.” For example, after we created an order in the SAP Commerce Cloud, the customer proposed some special validation logic based on the enterprise process. The Commerce Cloud publishes an “Order Create” event, and the event payload contains the fields that Create the Order. The microservice we developed and deployed on Kyma listens for this event. The internal implementation of the microservice can take any technology stack. The Commerce Cloud invokes the microservice that contains the enterprise’s custom order verification logic through HTTP, and performs subsequent processing according to the verification result returned.

In this way, the secondary development of Kyma microservices is decoupled from SAP standard products. Compare this to ABAP Netweaver’s traditional process extension approach **Business Addin(****BAdI)**, which also decouples enhanced logic from standard products, It’s just that BAdI enhancements and SAP standard logic run in the same ABAP session on the same physical machine. With Kyma, standard products consume microservices with enhanced logic deployed on Kyma through HTTP calls. Although the overhead of network calls is increased, the Servless feature brought by Kubernetes, the underlying Kyma, can ensure the high availability of the extension without additional effort. High scalability and high scalability of node processing capacity.

3. To ensure that application developers can really focus on the development of enhanced logic, Kyma also introduces the concept of Lambda functions. Those of you who have used JavaScript ES6’s arrow functions and Java 8’s Lambda expressions will be familiar with this concept.

With Kyma Lambda functions, application developers do not need to implement a microservice from scratch. Kyma automatically injects events and contexts from SAP standard product releases into Lambda functions via input parameters. All enhanced logic is present in Lambda functions.

The top half of the figure below is a Lambda function in Kyma, based on nodeJS implementation, The lower part is a fully equivalent ABAP SICF service implementation. Event.extensions. Request and Response in Kyma correspond to server-> Request and server-> Response in ABAP respectively.

Once Lambda functions are called, they can be directly bound to an Event as a consumer, which is triggered by Kyma’s Event Bus module to enhance SAP products. Of course, because Kyma is based on Kubernetes, we can also use Kubectl create -f directly to create a service and bind it to an event, or we can use service Broker to import third-party services for consumption.

I hope this article gives you a conceptual understanding of the relationship between Kubernetes and SAP Kyma. Thank you for reading.

Read more

  • SAP Cloud Platform Kubernetes Environment:

    Cloudplatform.sap.com/enterprise-…

  • Consume SAP Leonardo’s machine learning API using Java programs

  • Call functions in ABAP on-premise system using Java+SAP Cloud Platform +SAP Cloud Connector

  • Use JDBC to operate HANA databases on SAP cloud platform

  • What should I do if I have cross-domain problems accessing services on the SAP cloud platform with JavaScript

  • Consume ABAP on-premise OData services in the CloudFoundry environment of SAP cloud platform

  • Overview of SAP data Center

For more of Jerry’s original articles, please follow the public account “Wang Zixi “: