Configuration Templates

SAP Commerce comes with default configuration templates. A configuration template is a set of configuration files that are optimized for a specific mode of operation.

Available Configuration Templates

Configuration templates provide default settings for SAP Commerce. You can use them to decide whether the system should focus on performance and debugging in a development environment, or on security in a production environment, for example.

We provide the following configuration templates:

  • develop: This template is optimized for use in a development environment, where you use your SAP Commerce installation internally only, and it undergoes frequent changes. In such an environment, performance and debugging aspects generally rank higher than security.

  • production: This template is optimized for use in a production environment, where your SAP Commerce installation is available to external users. In this environment, security is the priority, and the installation requires more system memory than it does in a development configuration. Changes are few in number, usually when deploying software updates. This template does not contain configuration files for debugging operations in your application server.

Configuration Template Structure

A configuration template can consist of the following:

  • A local.properties file

  • Configuration files for Apache Tomcat, such as wrapper.conf or wrapper-debug.conf

  • A license file

Selecting a Configuration Template

When you start a SAP Commerce build and the directory specified by <HYBRIS_CONFIG_DIR> does not exist, the build system prompts you to select a configuration template.

C:\hybris\bin\platform>ant
Buildfile: build.xml
     [echo]
    [input]
    [input]  **** NO CONFIG FOLDER FOUND ****
    [input]
    [input]  No config folder was found at C:\hybris\config.
    [input]  A "fresh" folder containing basic configuration files and the hybris
    [input]  demo license will be created for your convenience.
    [input]  Please adjust and review the configuration files (and license) and
    [input]  call 'ant' again. This directory will never be overridden or
    [input]  touched again. Always use this configuration folder for configuration
    [input]  of platform, do not change anything within the platform folder.
    [input]
    [input]  Please choose the configuration template.
    [input]  Press [Enter] to use the default value ([develop], production)

To select a configuration template:

  1. Enter the name of the template you want to use. If you do not specify a name, SAP Commerce uses the default develop template.

  2. Press the Enter key.

SAP Commerce copies the files of the selected configuration template to the directory specified by <HYBRIS_CONFIG_DIR>. Once this is complete, the build continues.

Adding a Configuration

In cases such as entering production operation, or executing benchmark or performance tests, you may want to use a different configuration than that in the HYBRIS_CONFIG_DIR directory.

To add a new configuration, create another folder with the same structure, but a different name or location. Do one of the following:

  • Copy and rename your existing configuration folder

  • Create a new folder using the configuration templates by following these steps:

    1. Delete or rename your existing configuration folder (the directory specified by the <HYBRIS_CONFIG_DIR> environment variable).

    2. Call ant from the HYBRIS_BIN_DIR/platform directory.

    3. Select a configuration template.

Switching between Configurations

To get a platform running with a configuration folder other than the default, set the path for the <HYBRIS_CONFIG_DIR> for the configuration folder location you want to use.This differs depending on the kind of platform used:

  • Eclipse: For starting the platform from Eclipse by using a main method or a junit test, you can provide the variable by passing it as VM argument to the Run Configuration.

  • Apache Tomcat: Environment variables get defined in the wrapper.conf file. Provide the variable in an ant call, for example: ant -DHYBRIS_CONFIG_DIR=<directory>. The variable is then put into the wrapper.conf file and nothing has to be considered when the batch file is called.