一步步将 SAP Commerce Mock 应用部署到 SAP BTP Kyma Runtime
发布日期:2021-06-30 14:48:35 浏览次数:3 分类:技术文章

本文共 2411 字,大约阅读时间需要 8 分钟。

The Kyma mock application contains lightweight substitutes for SAP applications to ease the development and testing of extension and integration scenarios based on Varkes.

什么是 Kyma Mock 应用?它们是 SAP 应用轻量级的替代物,为了便于开发和测试基于 Varkes 的扩展和集成场景而生。

Together with SAP BTP, Kyma runtime, it allows for efficient implementation of application extensions without the need to access the real SAP applications during development.

使用 Mock 应用,我们在应用扩展实现时,就无需访问真实的 SAP 应用了。

Mock 应用的代码仓库地址:https://github.com/SAP-samples/xf-application-mocks

进入 Kyma ,创建一个新的 namespace,取名 dev:

Namespaces separate objects inside a Kubernetes cluster. The concept is similar to folders in a file system. Each Kubernetes cluster has a default namespace to begin with.

Kyma namespace 相当于文件系统里文件夹的概念,ABAP 里的 package.

进入 dev namespace,Deploy new workload->Upload YAML:

YAML 文件选择如下路径的 k8s.yaml:

采用同样的方法,将 kyma.yaml 也进行 deploy:

刚才我们 deploy 到 Kyma runtime 的 kyma.yaml 里,定义了一条 API Rule,部署成功后,可以在 Kyma console 的 Discovery and Network 里看到:

点击 host 列的超链接:https://commerce.c-46d70f2.kyma.shoot.live.k8s-hana.ondemand.com/

能看到如下页面:

In this step, you will create a System in the SAP BTP which will be used to pair the mock application to the Kyma runtime. This step will be performed at the Global account level of your SAP BTP account.

使用 Global 账号,创建一个系统。

点击 Register System 按钮:

系统名称维护成 commerce-mock, 系统类型选择为 SAP Commerce Cloud:

Create a Formation

In this step, you will create a Formation. A Formation is used to connect one or more Systems created in the SAP BTP to a runtime. This step will be performed at the Global account level of your SAP BTP account.

创建一个 Formation,用于将 SAP BTP 里创建的系统同某个 runtime 连接起来。

Select Subaccount 字段选择自己的 subaccount,System 选择刚刚创建的 commerce-mock:

Step 6: Pair an application

The pairing process will establish a trust between the Commerce mock application and in this case the SAP Kyma runtime.

Pairing 流程将在 Commerce mock 应用和 SAP Kyma runtime 建立 trust.

Once the pairing is complete, the registration of APIs and business events can be performed.

Pairing 流程完成后,API 和 业务事件的注册就可以开展了。

This process allow developers to utilize the APIs and business events with the authentication aspects handled automatically.

回到 SAP Commerce mock 应用的界面。点击 Connect,这里需要输入一个 token:

Token 从 System 面板里可以获得:

成功建立连接:

点击 Register All 按钮,注册来自 Mock 应用的所有 API 和事件:

注册成功:

现在回到 Kyma console,能看到 Applications/Systems 面板下多出来一个状态为 SERVING 的应用。

更多Jerry的原创文章,尽在:“汪子熙”:

转载地址:https://jerry.blog.csdn.net/article/details/117191546 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:答网友问:如果用 OData 就能直接和 SAP 系统互通,BTP 和 CPI 这样的平台意义在哪里呢?
下一篇:SAP BTP Kyma Runtime dashboard 打开报缺少缺陷的错误消息该如何解决

发表评论

最新留言

很好
[***.229.124.182]2024年04月08日 22时35分23秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章