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.
Given below are the different profiles available in WSO2 API Manager.
Profile | Command Option with Profile Name | Description |
---|---|---|
Gateway manager | -Dprofile=gateway-manager | Starts only the components related to the API Gateway. You use this when the API Gateway acts as a manager node in a cluster. This profile starts frontend/UI features such as login as well as backend services that allow the product instance to communicate with other nodes in the cluster. |
Gateway worker | -Dprofile=gateway-worker | Starts only the components related to the API Gateway. You use this when the API Gateway acts as a worker node in a cluster. This profile only starts the backend features for data processing and communicating with the manager node. |
Key Validator | -Dprofile=api-key-validator | Starts only the features relevant to the Key Validator component of the API Manager. |
API Publisher | -Dprofile=api-publisher | Starts only the front end/backend features relevant to the API Publisher. |
API Store | -Dprofile=api-store | Starts only the front end/backend features relevant to the API Store. |
Note that the WSO2 products platform currently doesn't block/allow Web applications depending on profiles. 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 will still be able to access the API Publisher Web application.
If the profile that you prefer doesn't exist, you can manually remove the unwanted components. For example, if you want to have the Key Validator and Gateway components together, as we don't have a product profile for that combination, you can take the API Manager and manually remove the API Store and Publisher from it. That will start the Gateway and the Key Validator in one VM.
Execute the following commands to start a product on any profile:
OS | Command |
---|---|
Windows | <PRODUCT_HOME>/bin/wso2server.bat -Dprofile=<preferred-profile> --run |
Linux/Solaris | sh <PRODUCT _HOME>/bin/wso2server.sh -Dprofile=<preferred-profile> |
How multi-profiling works
Starting a product on a preferred profile starts only a subset of features bundled in the product. In order to identify what feature bundles apply to which profile, each product maintains a set of
files in bundles.info
directories. The <PRODUCT_HOME>/repository/components/<profile-name>/configuration/org.eclipse.equinox.simpleconfigurator
bundles.info
files contain references to the actual bundles. Note that
in the directory path refers to the name of the profile. For example, when there's a product profile named webapp, references to all the feature bundles required for webapp profile to function are in a <profile-name>
bundles.info
file saved in <PRODUCT_HOME>/repository/components/webapp/configuration/org.eclipse.equinox.simpleconfigurator
directory.
Note that when you start the server without using a preferred profile, the server refers to <PRODUCT_HOME>/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/
file by default. This file contains references to all bundles in bundles.info
<PRODUCT_HOME>/repository/components/plugins
directory, which is where all components/bundles of a product are saved.