SAP Commerce Cloud Build Manifest Components
官方幫助文檔:
https://help.sap.com/viewer/1be46286b36a4aa48205be5a96240672/v2011/en-US/2be55790d99e4a1dad4caa7a1fc1738f.html
The components of the build manifest enable you to configure a number of build attributes by modifying various extensions, properties, aspects, and tests.
build manifest 組件允許我們通過修改各種 extensions,properties,aspects,來定義一系列 build 屬性。
定義應用版本
The application version defines the exact version of the SAP Commerce Cloud artifact to download. It is recommended to use the latest version of the application, but if necessary, you can define a patch version. The application version is a mandatory component of the manifest.
此處指定自動下載 SAP Commerce Cloud 的版本號:
“commerceSuiteVersion”: “2011”
Extension Packs
Extension packs allow you to identify more versioned software artifacts to combine with SAP Commerce Cloud during installation.
Extension pack 允許我們定義更多具有版本號的軟件 artifacts,伴隨 SAP Commerce Cloud 一起安裝。
例子:
{"commerceSuiteVersion": "2011","extensions": ["modeltacceleratorservices","electronicsstore","yacceleratorstorefront","backoffice"],In the extended manifest.json file, the extension-packs section contains a list of named and versioned artifacts:
{"commerceSuiteVersion" : "2011","extensionPacks" : [{"name" : "media-telco","version" : "a.b.c.d"}],"extensions": ["customerstorefront"] }Extension packs are downloaded during the build process.
Extension packs download extra software artifacts.
extension packs 會下載額外的軟件 artifacts.
In the extension-packs section, define which artifacts should be downloaded. List all specific extensions required for the build in the extensions section.
Extensions
You can expand SAP Commerce Cloud functionality with extensions.
通過 Extensions, SAP Commerce Cloud 功能得以擴展。
Some of these extensions are bundled and distributed as part of a module.
部分 Extensions 以 module 的一部分被打包和發布。
An extension can contain business logic, type definitions, a web application, or a Backoffice Administration Cockpit configuration.
extension 可以包含業務邏輯,類型定義,web 應用,或者包含 Backoffice 管理工具的配置信息。
Extensions 的可能來源:
Extensions are drawn from the following potential sources:
The manifest is a list of requested extensions. The final list of enabled extensions can differ from the set defined in the manifest. To view all enabled extensions, refer to either the SAP Commerce Cloud Administration Console or SAP Commerce Cloud logs at startup.
注意,最終運行時啟用的 Extensions 列表,可能和 manifest.json 里定義的不一樣。以運行時在 HAC 或者 startup log 里看到的 Extensions 列表為準。
Extensions that are always enabled in all SAP Commerce Cloud deployments are handled automatically and hence aren’t included in the manifest. An example of an extension that is always enabled is azurecloud.
在所有 SAP Commerce Cloud 部署里都永遠啟用的 Extensions,比如 azurecloud,不需要羅列在 manifest.json 里。
Addons
AddOns are a type of extension that allows you to add front-end files, such as JSP, HTML, CSS, JavaScript files, or images, from within your own AddOn. When you use AddOns, you do not need to modify the storefront front-end file directly.
Addon 是一種特殊的 Extensions,能夠添加前端應用使用的文件,比如 JSP,HTML,CSS,JavaScript 文件等等。使用 Addons,不需要直接修改 Storefront 的標準實現。
The ant addoninstall command automatically installs storefront AddOns to SAP Commerce Cloud during the build process. If your code repository contains a storefront that is generated from a template with AddOns already installed, there is no need to configure it in the manifest.
ant addoninstall 命令,在 SAP Commerce Cloud build 過程中,自動安裝 Storefront addon.
If your code repository contains a storefront that is generated from a template with AddOns already installed, there is no need to configure it in the manifest.
如果代碼倉庫包含了一個 Storefront, 是基于一個 template 生成的,而該 template 對應的 addons 已經安裝了,此時不需要再將其配置到 manifest.json 里。
Aspect
Aspects contribute to containerization support by defining the roles of SAP Commerce Cloud instances in a Kubernetes cluster.
Aspects 的作用是,通過定義 SAP Commerce Cloud 實例在 Kubernetes 集群里運行時扮演的角色,提供容器化支持。
You can enhance the overall performance of the cluster by independently enabling different roles and settings on individual nodes.
通過分別為不同的節點啟用不同的角色和設置,可以提高集群整體的性能。
All aspects include properties and webapps.
所有的 aspect 都包含 properties 和 webapps.
The webapps identify the web applications that are available to the aspect, as well as the contextPath to use when accessing the web application.
webapps 屬性標識了對該 aspect 可用的 web 應用,以及 contextPath,即訪問該 web 應用應該使用的路徑。
構建流程自動配置下列五個 aspects:
Webapps Aspect
Web applications (web module part of extensions) that are enabled in a given aspect.
aspect 里啟用的 Web Application, 即 Extensions 對應的 web module 部分。
These web applications influence the Tomcat server configuration for a given aspect. Only these extensions are installed as web applications in the Tomcat server.
這些 web 應用能夠影響某個 aspect 對應的 tomcat server 配置。只有這些 Extensions 才會以 web 應用的方式,安裝到 tomcat 服務器上。
It only controls the web part of extensions, while the extension list is the same for all aspects. You can’t enable or disable a particular extension in a particular aspect, because all Platform instances in the cluster must run the same business logic.
web aspect 只能控制 Extensions 的 web 部分,對于所有 aspect 來說 Extension list 都是一樣的。
我們不能為某個特定的 aspect 啟用或者禁用某個特定的 extension, 因為一個集群上所有平臺實例都必須運行同樣的業務邏輯。
The effective list of enabled web applications may differ from those defined in the manifest due to mandatory web applications that are always enabled by SAP Commerce Cloud, like mediaweb.
最終運行時啟用的 web 應用可能會和 manifest.json 里定義的 web 應用條目數不一致,因為有的 web 應用,比如 mediaweb,默認會總是啟用。
The administration aspect can’t define any web application because it’s intended to be headless (no Tomcat server is started).
administration aspect 無法定義任何 web 應用,因為原則上說,Administration aspect 的設計就是 headless 的,沒有 tomcat 服務器啟動。
Properties
每個 aspect 都可以設定一定數量的 properties.
Set the properties in the local.properties file. The deployment process can force some properties, such as db.url.
在 local.properties 里定義 properties.
每個 Properties 可以定義四個 屬性(attributes):
key: Defines the property key. This attribute is required.
value: Defines the property value. This attribute is required.
persona: Sets a given property for a specific environment type (development, staging, and production).
secret: Indicates a property value that is secret, for example, a password. Values set to secret are excluded from build logs.
例子:
],"properties": [{"key": "test.property.1","value": "test.property.1.value","persona": "production"},{"key": "test.property.2","value": "test.property.2.value","persona": "development"},{"key": "test.property.2","value": "test.property.2.value.in.prod.only","persona": "production"}],下列兩個 Properties 對提高 SAP Commerce Cloud 數據庫性能有所幫助:
},{"key": "auditing.enabled","value": "false"},{"key": "default.session.timeout","value": "360",},auditing.enabled=false prevents the auditing of changes to items within SAP Commerce Cloud. For more information, see Generic Audit.
default.session.timeout=360 limits the storage time for a session in the database to 360 seconds. For more information, see Jalo Session.
在 Commerce Cloud build 階段,下列這些 Properties 會被填充上默認值。
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的SAP Commerce Cloud Build Manifest Components的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C语言中三目运算符_c语言中的单目运算符
- 下一篇: 别误用IsDigit与IsNumber函