一步步将 SAP Commerce Mock 应用部署到 SAP BTP Kyma Runtime
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 的应用。
- 点赞
- 收藏
- 关注作者
评论(0)