Anti-aircraft guns to fight mosquitoes, break a Mighty Sword: UI5 applications running on SAP Kyma

People in the expression "overkill" This scene, always like to use the analogy of some kind, such as: anti-aircraft guns to fight mosquitoes.

British QF 3.7 Yingcun (94mm) anti-aircraft artillery, combat weight of over 9.3 tons, a total length of nearly five meters and a maximum range of about 18 kilometers, the maximum shot high over 9000 meters, weight 12.7 kg shells, artificial semi-automatic loading, firing rate 20 per minute hair, gun number of classes for 7 people. Developed by the British company Vickers, in World War II during the 1930s of the last century a lot of equipment.

clipboard1,1

According to legend, the Sky Goddess left after four rocks, thousands of years in which the "Cold Black" won by the sword Villa worship, its time. Phoenix was four havoc, so thanks to the sword Villa is committed to research on how to "Cold Black" made a sword to cold, hot to exercise restraint to Phoenix.

In the final step to complete the swords, the blood of three drugs "greedy" (sword greedy blood), "aversion" (bujingyun blood), "crazy" (Duanlang blood) sword into the furnace, the Mighty sword has finally come out. In the first "situation" in charge of holding the sword with bujingyun dominated, Juewu Shen and other first-class master PK.

clipboard2,2

Jerry is also a small "situation" fans, Ma Wing Shing has also from time to time to this masterpiece out looking. Zinc alloy sold on a treasure 1: 1 imitation of the Mighty Sword price is too expensive, Jerry can not afford it, afford only the following proportions:

clipboard3,3

Another thing the picture, is the first in Mighty Sword and famous, known as "South Mountain lit Lin Lie, North Sea superficial, deep snow, cold drink" magic: Snow Blade.

Jerry also has a real thing: God catching small Longquan used, not night bujingyun Square prevent revenge battle, a fight to the death to prevent bujingyun, with a sword (dagger to be exact), instead of compete with a fight, after bujingyun kill.

Longquan small, full-length about 48cm, handle length 10cm, blade length 30cm, width 3.3cm blades, blade thickness: 0.8cm.

Indeed, with anti-aircraft guns to fight mosquitoes, break a Mighty Sword, even though SAP Kyma Kubernetes also based, but if only as an ordinary Kubernetes Kyma cluster use, maybe even Kyma 1% have no access to functions.

As an extension tool for SAP C / 4HANA product line, Kyma is to the importance of the C / 4HANA, just as SAP cloud platform of the importance of SAP, then how can not be overstated.

clipboard4,4

既然SAP Kyma主要的用途是做C/4HANA的扩展,为什么这篇文章还是要介绍如何在上面跑SAP UI5应用呢?

像程序员学习任何新技术总是喜欢从最简单的Hello World开始,在SAP Kyma上运行UI5应用,就是我们一步步从舒适区迈向学习区,熟悉Kyma操作方法的最佳手段之一。

在开始之前,您也许需要温习一下Jerry之前介绍过的内容:

下面跟着Jerry一起一步步在Kyma上运行一个UI5应用。

作为一个前提条件,您得有一个在本地正常运行的UI5应用,然后将其同某个Web服务器比如Nginx一起打成一个Docker镜像。

Jerry在之前的公众号文章 在Kubernetes上运行SAP UI5应用(上)已经介绍过制作Docker镜像的详细方法。

Jerry已经把包含了测试用的UI5应用的镜像上传到了Docker hub网站上,名称为i042416 / ui5-nginx:
https://hub.docker.com/

clipboard5,5

(1) 进入Kyma的控制台,下载config文件到本地。

clipboard6,6

这个文件拿来做什么的?回忆下Kyma的架构图,Jerry强调过,Kyma底层是基于Kubernetes的:

clipboard7,7

而作为Kubernetes的使用者,我们要么用Kubernetes的工作台cockpit,要么用命令行工具同Kubernetes集群的主节点交互,就好比我们用SAP云平台的cockpit或者cf命令行工具同SAP Cloud Platform的CloudFoundry环境交互一样。

clipboard8,8

我们用cf login登录SAP Cloud Platform CloudFoundry环境时,要指定一个API endpoint,那么使用命令行操作Kubernetes同样,需要告诉命令行远端的Kubernetes API server的连接信息,这个信息就维护在刚刚从Kyma控制台里下载的config文件里。

打开这个config文件,发现里面确实维护了Kubernetes API服务器的地址,以及下载config文件的用户名和OAuth 2.0的Bearer token. 有了这个token,每次我们用Kubernetes命令行工具执行命令操作Kubernetes主节点时,实际上是向这个config文件里维护的API server发起Restful的请求。通过这个OAuth 2.0的Bearer token进行认证,我们免去了每次敲命令都得输入用户名和密码的麻烦。

搜索引擎上搜索关键字“kubectl”,下载这个命令行工具到本地,在用户文件夹下新建一个.kube文件夹,把配置文件放进去。

执行命令行kubectl cluster-info, 如果看到下列打印信息,说明本地kubectl已经成功同API server建立通信连接了。

clipboard9,9

(2) 在Kyma上运行这个Docker镜像:

kubectl run jerry-kyma-ui5 --image=i042416/ui5-nginx:v2.0

clipboard10,10

在默认的namespace下面成功创建了一个pod,状态为Running:

clipboard11,11

同时创建了一个命令行指定的名为jerry-kyma-ui5的deployment:

clipboard12,12

这个pod和deployment也能在Kyma web控制台里看见:

clipboard13,13
clipboard14,14

把这个deploymen以service的方式暴露出来:

kubectl expose deployment jerry-kyma-ui5 --type=LoadBalancer --port=80 --target-port=80

clipboard15,15
clipboard16,16
clipboard17,17

Get this service through kubectl get service External-IP, namely access to external address:

clipboard18,18

Browser, enter the IP address, this is deployed on SAP Kyma's UI5 application on the show in front of us.

clipboard19,19

More SAP Kyma share of actual combat, so stay tuned.

Read more

clipboard3

For more Jerry's original article, please pay attention to the public number "Wang Zixi":
No public Screenshot

Guess you like

Origin www.cnblogs.com/sap-jerry/p/11241282.html