Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: https://github.com/wso2/docs-apim/issues/3198

When a WSO2 product starts, it starts all components, features and related artifacts bundled with it. Multi-profile support allows you to run the product on a selected profile so that only the features specific to that profile along with common features start up with the server.

Tip

Starting a product on a preferred profile only blocks/allows the relevant OSGI bundles. As a result, even if you start the server on a profile such as the api-store for example, you can still access the API Publisher web application.

Info
titleOSGI Bundle

OSGI bundle is a tightly coupled, dynamically loadable collection of classes, jars, and configuration files that explicitly declare their external dependencies (if any). In OSGi, a bundle is the primary deployment format. Bundles are applications that are packaged in JARs, and can be installed, started, stopped, updated, and removed.

Table of Contents

API-M Profiles

...

  1. Run the <PRODUCT_HOME>/bin/profileSetup.sh script or <PRODUCT_HOME>/bin/profileSetup.bat script based on your operating system, with the profile flag. 

    Localtabgroup
    Localtab
    titleSample commands
    Code Block
    sh <PRODUCT_HOME>/bin/profileSetup.sh  -Dprofile=<preferred-profile>
    Localtab
    titleExample
    Code Block
    titleStarting the Publisher profile
    sh <PRODUCT_HOME>/bin/profileSetup.sh  -Dprofile=api-publisher 
  2. Start the server with the specified profile. A sample command is shown below.

    The pack in place is updated after the initial optimization, and the product pack would have fetched irrelevant files for this profile. The --optimize option is used to optimize the pack again.

    Configuration optimization is one of the steps in profile optimization process. This replaces the deployment.toml file with a pre-configured profile-specific TOML file that exists in the pack. If required, you can skip this step from the profile optimization process via passing the additional --skipConfigOptimization option. This prevents the existing deployment.toml file in the pack from being overridden.

    Localtabgroup
    Localtab
    titleSample commands
    Code Block
    sh <PRODUCT_HOME>/bin/wso2server.sh -Dprofile=<preferred-profile> --optimize --skipConfigOptimization
    Localtab
    titleExample
    Code Block
    titleStarting the Publisher profile
    sh <PRODUCT_HOME>/bin/wso2server.sh -Dprofile=api-publisher --optimize --skipConfigOptimization

Method 2 - Optimizing while starting the server

...