一步步将 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 的應用。
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的一步步将 SAP Commerce Mock 应用部署到 SAP BTP Kyma Runtime的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 逆水寒红尘一问答案是什么 逆水寒全红尘一
- 下一篇: 怪物猎人崛起狱炎石在哪挖