头图

Official help document:
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.

The build manifest component allows us to define a series of build properties by modifying various extensions, properties, and aspects.

Define application version

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.

Specify here the version number of the SAP Commerce Cloud to be automatically downloaded:

"commerceSuiteVersion": "2011"

Extension Packs

Extension packs allow you to identify more versioned software artifacts to combine with SAP Commerce Cloud during installation.

Extension pack allows us to define more software artifacts with version numbers to be installed along with SAP Commerce Cloud.

example:

{
    "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 will download additional software 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.

Through Extensions, SAP Commerce Cloud functions can be extended.

Some of these extensions are bundled and distributed as part of a module.

Part of Extensions are packaged and released as part of a module.

An extension can contain business logic, type definitions, a web application, or a Backoffice Administration Cockpit configuration.

An extension can contain business logic, type definitions, web applications, or configuration information for Backoffice management tools.

Possible sources of Extensions:

Extensions are drawn from the following potential sources:
  1. Your code or Git repository.
  2. SAP Commerce Cloud (as defined by the application version).
  3. MT Module, which provides the SAP internal extensions that were developed to run on SAP Commerce Cloud in the public cloud.
  4. Extensions packs.
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.

Note that the list of Extensions enabled at the final runtime may be different from the one defined in manifest.json. The list of Extensions seen in HAC or startup log at runtime shall prevail.

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.

Extensions that are always enabled in all SAP Commerce Cloud deployments, such as azurecloud, do not need to be listed in 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 is a special kind of Extensions that can add files used by front-end applications, such as JSP, HTML, CSS, JavaScript files and so on. With Addons, there is no need to directly modify Storefront's standard implementation.

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.

The ant addoninstall command automatically installs Storefront addon during the SAP Commerce Cloud 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.

If the code repository contains a Storefront, it is generated based on a template, and the addons corresponding to the template have already been installed, and there is no need to configure it in manifest.json at this time.

Aspect

Aspects contribute to containerization support by defining the roles of SAP Commerce Cloud instances in a Kubernetes cluster.

The role of Aspects is to provide containerization support by defining the role that SAP Commerce Cloud instances play when running in a Kubernetes cluster.

You can enhance the overall performance of the cluster by independently enabling different roles and settings on individual nodes.

By enabling different roles and settings for different nodes, the overall performance of the cluster can be improved.

All aspects include properties and webapps.

All aspects include properties and 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.

The webapps attribute identifies the web applications available for the aspect, and the contextPath, which is the path that should be used to access the web application.

The build process automatically configures the following five aspects:

  1. accstorefront: Configures the storefront
  2. backoffice: Configures Backoffice
  3. backgroundProcessing: Executes tasks in the background
  4. admin: Performs ant administration tasks, such as initialization and updatesystem
  5. api: Modifies webservices for increased security and to support different configurations. If there’s no webapps aspect in manifest.json, then only default webapps are included (mediaweb, hac and oauth2).
     "aspects": [
        {
            "name": "backoffice",
            "properties": [
                {
                    "key": "test.property.1",
                    "value": "test.property-1-value-prod-backoffice",
                    "persona": "production"
                },
                {
                    "key": "test.property.2",
                    "value": "test.property-2-value-backoffice"
                }
            ],
            "webapps": [
                {
                    "name": "hac",
                    "contextPath": "/hac"
                },
                {
                    "name": "mediaweb",
                    "contextPath": "/medias"
                },
                {
                    "name": "backoffice",
                    "contextPath": ""
                }
            ]
        },
        {
            "name": "accstorefront",
            "properties": [
                {
                    "key": "spring.session.enabled",
                    "value": "true"
                },
                {
                    "key": "spring.session.yacceleratorstorefront.save",
                    "value":"async"
                },
                {
                    "key": "spring.session.yacceleratorstorefront.cookie.name",
                    "value": "JSESSIONID"
                },
                {
                    "key": "spring.session.yacceleratorstorefront.cookie.path",
                    "value": "/"
                },
                {
                    "key":"storefrontContextRoot",
                    "value":""
                }
            ],
            "webapps": [
                {
                    "name": "mediaweb",
                    "contextPath": "/medias"
                },
                {
                    "name": "mycustomstorefront",
                    "contextPath": ""
                },
                {
                    "name": "acceleratorservices",
                    "contextPath": "/acceleratorservices"
                }
            ]
        },
        {
            "name": "backgroundProcessing",
            "properties": [],
            "webapps": [
                {
                    "name": "hac",
                    "contextPath": ""
                },
                {
                    "name": "mediaweb",
                    "contextPath": "/medias"
                } 
           ]
        },
        {
            "name": "api",
            "properties": [
                    {
                        "key":"xss.filter.header.X-Frame-Options",
                        "value":""
                    }
            ],
            "webapps": [
                {
                    "name": "ycommercewebservices",
                    "contextPath": "/rest"
                },
                {
                    "name": "oauth2",
                    "contextPath": "/authorizationserver"
                },
                {
                    "name": "cmswebservices",
                    "contextPath": "/cmswebservices"
                },
                {
                    "name": "permissionswebservices",
                    "contextPath": "/permissionswebservices"
                }
            ]
        }
    ],

Webapps Aspect

Web applications (web module part of extensions) that are enabled in a given aspect.

The Web Application enabled in the aspect is the web module part corresponding to Extensions.

These web applications influence the Tomcat server configuration for a given aspect. Only these extensions are installed as web applications in the Tomcat server.

These web applications can affect the configuration of the tomcat server corresponding to an aspect. Only these extensions will be installed on the tomcat server as a web application.

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.

The web aspect can only control the web part of Extensions, and the Extension list is the same for all aspects.

We cannot enable or disable a specific extension for a specific aspect, because all platform instances on a cluster must run the same business logic.

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.

The number of web applications enabled at the final runtime may be inconsistent with the number of web application entries defined in manifest.json, because some web applications, such as mediaweb, are always enabled by default.

The administration aspect can’t define any web application because it’s intended to be headless (no Tomcat server is started).

The administration aspect cannot define any web applications, because in principle, the administration aspect is designed to be headless and no tomcat server is started.

Properties

Each aspect can set a certain number of properties.

Set the properties in the local.properties file. The deployment process can force some properties, such as db.url.

Define properties in local.properties.

Each Properties can define four attributes (attributes):

  1. key: Defines the property key. This attribute is required.
  2. value: Defines the property value. This attribute is required.
  3. persona: Sets a given property for a specific environment type (development, staging, and production).
  4. secret: Indicates a property value that is secret, for example, a password. Values set to secret are excluded from build logs.

example:

 ],
    "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"
        }
    ],

The following two Properties are helpful to improve the performance of SAP Commerce Cloud database:

 },
        {
            "key": "auditing.enabled",
            "value": "false"
        },
        {
            "key": "default.session.timeout",
            "value": "360",
        },
        
  1. auditing.enabled=false prevents the auditing of changes to items within SAP Commerce Cloud. For more information, see Generic Audit.
  2. default.session.timeout=360 limits the storage time for a session in the database to 360 seconds. For more information, see Jalo Session.

During the Commerce Cloud build phase, the following Properties will be filled with default values.

More original articles by Jerry, all in: "Wang Zixi":


注销
1k 声望1.6k 粉丝

invalid