Distributed OSGI Bundles - Documentation topics on: configuration,osgi,plugins,.

Distributed OSGI Bundles

The following documentation specifies how to override the felix base path and allow the path to be set to a custom directory path, and outside the dotCMS server directory (if desired). This way all OSGI plugin customizations can be externalized from the WAR deployment.

The only required action for customers is to set a new property inside the dotmarketing-config-ext.properties file (and then deploy plugins). This new property needs to be defined as felix.base.dir. It will specify the path of the felix folder (e.g. felix.base.dir = /usr/deploy/felix).

This folder will be created on startup and it will contain the following subdirectories. For example, if felix.base.dir = /usr/deploy/felix then the following folder structure would be created inside /user/deploy directory:

  • /felix (as defined by felix.base.dir property)
    • /bundle
    • /felix-cache
    • /load
    • /undeployed

The property can be also set by using an environmental variable (e.g.: felix.base.dir={env:customFelixBaseDir})

If for some reason, the specified location/path is unable to be created (permissions/unreadable or invalid path), the felix base path will be defaulted to WEB-INF/felix (from the root of the installation).

The following examples below show how to over-ride properties including, and in addition to, the felix directory:

FELIX BASE DIRECTORY (felix.base.dir): This property specifies the base path of the felix directory. By default it is located in {DOTCMS_ROOT_PATH}/WEB-INF/felix.

#FELIX BASE DIR
felix.base.dir = /usr/local/shared/felix
#felix.base.dir = {env:felixBaseDir}

FELIX BUNDLE (felix.felix.auto.deploy.dir): This property defines where all bundle files will be stored. If not overridden, the default location will be {DOTCMS_ROOT_PATH}/WEB-INF/felix/bundle.

#FELIX BUNDLE
felix.felix.auto.deploy.dir = /usr/local/shared/felix/bundle

FELIX CACHE (felix.org.osgi.framework.storage): Similar to the previous property, the felix cache specifies where the cache files the felix directory will live. If not overridden, the default path will be {DOTCMS_ROOT_PATH}/WEB-INF/felix/felix-cache.

#FELIX CACHE
felix.org.osgi.framework.storage = /usr/local/shared/felix/cache

FELIX LOAD (felix.felix.fileinstall.dir): This property defines where the folder where the dynamic plugins will be updated. By default the path of this folder is {DOTCMS_ROOT_PATH}/WEB-INF/felix/load.

#FELIX LOAD
felix.felix.fileinstall.dir = /usr/local/shared/felix/load

FELIX UNDEPLOYED (felix.felix.undeployed.dir): Just like the previous description, this property specifies where the undeployed plugins will be stored. The default path is {DOTCMS_ROOT_PATH}/WEB-INF/felix/undeployed

#FELIX UNDEPLOYED
felix.felix.undeployed.dir = /usr/local/shared/felix/undeployed

Note: Any of the paths can be referenced using either local paths, symlinks, or even environment variables.