Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
hiddentrue

settings.xml

The settings.xml file holds environmental information and properties about the Aspire installation as a whole.

Separation of Scope and Portability


The settings.json file holds environmental information (server addresses, passwords, system properties, repository settings, etc.) for your Aspire installation.

What goes in the Settings File?

Appropriate for the settings.xml Configuration File:

  • Node configuration
  • Security configuration
  • Maven repositories
  • App Bundle properties
  • Applications to launch on startup
Panel
titleOn this page

Table of Contents
maxLevel3

Settings File Location


On startup, the Aspire application will automatically attempt to load the settings from the configured provider. Aspire by default uses Elasticsearch as a provider and the settings is expected to be in the aspire-settings index.

The settings file can be uploaded by using the aspire.bat/aspire.sh file with the command "-upload_settings <absolute_settings_path>"  or "-us<absolute_settings_path>" or in the case of using containers it will be uploaded automatically on the startup. 


Structure of settings.json


The settings.json file contains sections for automatically starting system configuration files, setting Aspire system properties, and setting Apache Felix system properties. The overall structure is as follows:

Code Block
languagejs
{
  "settings": {
    "authentication": {
      "tokenExpiration" : "30m",
      "refreshExpiration" : "1h",
      "type": "Ldap",
      "ldap": {
        "server": "ldap://oldap:389",
        "authentication": "simple",
        "bindDN": "cn=admin,dc=accenture,dc=com",
        "searchBase": "dc=accenture,dc=com",
        "userDNQuery": "(uid={user})",
        "groupsHoldMembers": "true",
        "memberAttr": "uniqueMember",
        "connectTimeout": "3000",
        "roles": [
          {
            "dn": "cn=administrators,ou=Groups,dc=accenture,dc=com",
            "group": "true",
            "roles": [
              "ADMINISTRATOR"
            ]
          },
          {
            "dn": "cn=operators,ou=Groups,dc=accenture,dc=com",
            "group": "true",
            "roles": [
              "OPERATOR"
            ]
          }
        ]
      }
    },
    "configAdmin": {
      "properties": {
        "@pid": "org.apache.felix.webconsole.internal.servlet.OsgiManager",
        "property": [
          {
            "@name": "username",
            "$": "admin"
          },
          {
            "@name": "password",
            "$": "admin"
          },
          {
            "@name": "manager.root",
            "$": "/osgi"
          }
        ]
      }
    },
    "repositories": {
      "defaultVersion": "5.0-SNAPSHOT",
      "allowAutoUpdate": "true",
      "repository": [
        {
          "@type": "distribution",
          "directory": "bundles/aspire"
        },
        {
          "@type": "maven",
          "remoteRepositories": {
            "remoteRepository": {
              "id": "stPublic",
              "url": "https://repository.sca.accenture.com/artifactory/st-snapshot/"
            }
          }
        }
      ]
    },
    "encryptionProvider": {
      "implementation": "com.accenture.aspire:aspire-encryption-provider",
      "jarName": "aspire-encryption-provider-5.0-SNAPSHOT.jar",
      "jarPath": "/bundles/aspire/",
      "className": "com.accenture.aspire.encryption.providers.AspireEncryptionProvider"
    },
    "properties": {
      "property": [
        {
          "@name": "sampleProperty1",
          "$": "http://localhost:8983"
        },
        {
          "@name": "sampleProperty2",
          "$": "false"
        },
        {
          "@name": "sampleProperty3",
          "$": "data/crawler"
        },
        {
          "@name": "sampleProperty4",
          "$": "data"
        }
      ]
    },
    "nodesProperties": {
        "worker": {
          "maxMemQueueSize": "1000",
          "queueSizeThreshold": "0.75",
          "cleanUpWaitTime": "300000",
          "cleanUpThreshold": "3600000",
          "maxEnqueueRetries": "5",
          "debug": "false",
          "appCleanUpWaitTime": "60000",
          "appCleanUpThreshold": "3600000",
          "tags" : "",
          "entryProcessorBaseSleep" : "200",
          "entryProcessorMaxSleep" : "10000",
          "entryProcessorMaxIterations" : "5",
          "entryProcessorMultiplier" : "2",
          "batchLoaderBaseSleep" : "200",
          "batchLoaderMaxSleep" : "10000",
          "batchLoaderMaxIterations" : "5",
          "batchLoaderMultiplier" : "2",
          "connectionTimeout" : "60000",
          "socketTimeout" : "60000",
          "maxRetries" : "3",
          "proxyHost" : "",
          "proxyPort" : "0",
          "proxyUser" : "",
          "proxyPassword" : "",
          "pingFrequency" : "15000",
          "nodeFailureTimeout" : "30000"
        },
        "manager": {
          "scanBatchCreatorBaseSleep" : "200",
          "scanBatchCreatorMaxSleep" : "10000",
          "scanBatchCreatorMaxIterations" : "10",
          "scanBatchCreatorMultiplier" : "2",
          "processBatchCreatorBaseSleep" : "200",
          "processBatchCreatorMaxSleep" : "10000",
          "processBatchCreatorMaxIterations" : "10",
          "processBatchCreatorMultiplier" : "2",
          "crawlProgressManagerBaseSleep" : "500",
          "schedulerBaseSleep" : "10000",
          "maxBatches" : "1000",
          "maxBatchItems" : "100",
          "connectionTimeout" : "60000",
          "socketTimeout" : "60000",
          "maxRetries" : "3",
          "proxyHost" : "",
          "proxyPort" : "0",
          "proxyUser" : "",
          "proxyPassword" : "",
          "pingFrequency" : "15000",
          "nodeFailureTimeout" : "30000"
        }
    },
    "autoStart": {
      "application": [
        {
          "@config": "com.accenture.aspire:app-cf-bootloader"
        },
        {
          "@enable": false,
          "@config": "com.accenture.aspire:app-admin-ui"
        }
      ]
    }
  }
}

Auto Start Section


The "autoStart" section will automatically load applications when Aspire is initialized. It contains a simple list of application files to load, for example:

Code Block
languagexml
"autoStart": {
      "application": [
        {
          "@config": "com.accenture.aspire:app-cf-bootloader"
        },
        {
          "@enable": false,
          "@config": "com.accenture.aspire:app-admin-ui"
        }
      ]
    }

Applications are loaded in the order specified. However, since Aspire has component-dependency checking built-in, the order of load is usually not that important.

Both Application XML/Json Files and App Bundles

Each application can be launched either from an application XML file or an App Bundle.

  • For application XML files: The @config attribute should hold the file name of the Application XML/Json file to load.
  • For App Bundles: The @config attribute should hold the Maven coordinates of the App Bundle to start.

Rename Auto-Started Applications

In general, the name of the application will be taken as the "default name" as specified at the top of the application.xml file. 

However, you can specify other names for the configuration file using the @name attribute, as shown below:

Code Block
languagexml
   {
  "@name": "RDBConnector2",
  "@config": "com.searchtechnologies.appbundles:cs-rdbms-connector:2.0",
  "properties": {
    "property": [
      {
        "@name": "rdbmsHasDefaults",
        "$" : "false"
      },{
        "@name": "debug",
        "$" : "true"
      }
    ]      
  }
}

This lets you install the same App Bundle multiple times, but with different top-level names.

Application Properties

Finally, as shown above, applications can have a nested "properties" section which holds properties that are defined just for that application. These properties can then be used with the ${propName} substitution pattern within the application.xml file.

Repositories Section


The "repositories" identifies where to find component code to load into Aspire. 

Code Block
languagexml
"repositories": {
  "defaultVersion": "5.0",
  "allowAutoUpdate": "true",
  "offline": "false",
  "maxVersion": "5.0.2"
  "repository": [
    {
      "@type": "distribution",
      "directory": "bundles/aspire"
    },
    {
      "@type": "maven",
      "remoteRepositories": {
        "localRepository": "~search/.m2/repository", 
        "remoteRepository": {
          "id": "stPublic",
          "url": "https://repository.sca.accenture.com/artifactory/st-snapshot/"
        }
      }
    }
  ]
}


The following options are available for the repositories section:

Element

Type

Default

Description

defaultVersion

string

LATEST

(Strongly Recommended) Specifies the default version for all artifacts for which no version is specified. Note that this defaults to a version of "LATEST" - but unfortunately this has some odd behavior between the local and remote repositories (it only checks the local repository if the version is available on the remote repository, and the remote repository has been "scanned").

offline

boolean

false

(optional) Specifies if the system is "offline" - in which case the repositories will only ever look to the local repository for artifacts, and never the remote repositories.

allowAutoUpdate

boolean

true

(optional) Enables updating the artifacts to the latest minor version available. The latest version depends on the version configured in the maxVersion option 

maxVersion

string

none

(optional) The max version supported for the artifacts.


The are two types of repositories that can be configured in the "repository" section:

Distribution Repository

The Distribution Repository will load the component Jar files in a directory within your Aspire distribution, typically the "bundles/aspire" directory.

It is configured as follows:

Code Block
languagexml
    {
      "@type": "distribution",
      "directory": "bundles/aspire"
    }

On startup, Aspire will scan through the entire directory looking for bundles to load. If at any time you add new bundles (or update bundles) in this directory, then click on "Check for Updates" on the Aspire application home page. This will cause Aspire to re-scan the directory so that the new files are available. The "directory" tag identifies the directory where the bundles can be located.

Maven Repository

The Maven Repository loads the component Jar files directly from Maven. The Maven Repository allows Aspire to share the same Jars as Eclipse and the Maven command-line program. Therefore, any newly 'install'ed or 'deploy'ed Jar file artifacts will be automatically available to Aspire.

It is configured as follows:

Code Block
languagexml
     {
      "@type": "maven",
      "remoteRepositories": {
        "localRepository": "~search/.m2/repository", 
        "remoteRepository": {
          "id": "stPublic",
          "url": "https://repository.sca.accenture.com/artifactory/st-snapshot/"
        }
      }
    }

The following options are available for the maven repository:

Element

Type

Default

Description

localRepository

string

(user home directory)/.m2/repository

(optional) Specifies the location of the Maven local repository, where Jars will reside locally once they are downloaded from the remote repository. This is also the location where Maven "install" will install new or updated artifacts.

defaultVersion

string

LATEST

(Strongly Recommended) Specifies the default version for all artifacts for which no version is specified. Note that this defaults to a version of "LATEST" - but unfortunately this has some odd behavior between the local and remote repositories (it only checks the local repository if the version is available on the remote repository, and the remote repository has been "scanned").

offline

boolean

false

(optional) Specifies if the system is "offline" - in which case the Maven repository will only ever look to the local repository for artifacts, and never the remote repositories.

Use Specific Versions of Bundle

If required, you can force the Maven repository to give you a specific version of a bundle if you don't specify it in the factoryName in application.xml files or in the config attribute in the autoStart section of the settings file.

Normally in Aspire, if references to Maven artifacts to not give the version, then the defaultVersion (see above) is used. However, you may add a bundleVersions section to the settings file to give more precise control over the versions of bundles loaded. The parameters are shown below:

Element

Type

Default

Description

bundleVersions\bundle\@groupId

String

com.accenture.aspire

The (optional) group id for the bundle to version

bundleVersions\bundle\@artifactId

String


MANDATORY: The artifact id for the bundle to version

bundleVersions\bundle\@version

String


MANDATORY: The version of the bundle to request from Maven


Note

If a requested bundle is not configured in the bundleVersions section, then the defaultVersion (as configured above) of that bundle will be requested.


Note

If the version specified is not located in Maven, an error will occur.

Example:

The following snippet will load all requested bundles at version 5.0, except the three specified, which will be loaded at the requested version

Code Block
"bundleVersions":{
  "bundle":[
    {
      "@artifactId":"aspire-tools",
      "@groupId":"com.accenture.aspire",
      "@version":"5.0.0.2-SNAPSHOT"
    },
    {
      "@artifactId":"aspire-dbserver-source",
      "@groupId":"com.accenture.aspire",
      "@version":"5.0.0.1-SNAPSHOT"
    },
    {
      "@artifactId":"aspire-adobe-experience-source",
      "@groupId":"com.accenture.aspire",
      "@version":"5.0.0.1-SNAPSHOT"
    }
  ]
}


Proxy Settings

You can configure Maven remote repositories to use a HTTP proxy for outgoing communications. This is useful when your Aspire server has restricted access to the Internet, and you want to be able to fetch bundles as normal from the configured repository. To do this add a <proxy> section to your remote repository and set the following properties:

Element

Type

Default

Description

host

string

null

(optional) Proxy server hostname or IP address.

port

string

0

(optional) Proxy server port number.

user

string

null

(optional) User required for authentication against the proxy server.

password

string

null

(optional) Password for authenticating against the proxy server. You can encrypt it following the instructions here.

Example:

Code Block
languagexml
"remoteRepository": {
  "id": "stPublic",
  "url": "https://repository.sca.accenture.com/artifactory/st-snapshot/"
  "proxy": {
    "host": "127.0.0.1",
    "port": 8888,
    "user": "PROXY-USER",
    "password": "PROXY-PASSWORD"
  }
}

Properties
Anchor
properties
properties


Properties are specified as name/value pairs. For example:

Code Block
languagexml
   <properties>
    <property name="solrServer">http://localhost:8080</property>
    <property name="autoStart">false</property>
    <property name="crawlDataBase">data/crawler</property>
    <property name="ccdBase">data</property>
  </properties>

Once specified in the settings.xml file, these properties become available for use in Application XML files. Careful use of such properties will make your system configuration files portable to multiple Aspire installations without modification.

You can use these properties from the UI when configuring content sources, services and workflow applications:

For example, you might use "http://localhost:8080" as your SOLR server on your personal laptop, but then use "http://customer.searchtechnologies.com:8983" for the production site. Using a property will allow the exact same system configuration file to be tested on one machine and then installed on another machine without modification.

Properties & Environment Variables in Application XML Files

Properties declared in the settings.xml file can be used in application XML files with the ${propertyName} syntax. As an example:

Code Block
languagexml
<component name="feed2Solr" subType="default" factoryName="aspire-post-xml">
  <postXsl>config/aspire2solr.xsl</solrXsl>
  <postUrl>${solrServer}/solr/update</postUrl>
</component>

In the above example, the "solrServer" property was defined in the settings.xml file and then referenced with ${solrServer} in the application XML file.

This property value substitution occurs automatically on the component configurations by the Component Manager. It does not require any further intervention or programming on the part of any individual component.

The ${XXX} syntax can also be used for substitution of environment variables and Java system properties (i.e., those defined on the command line with -Dxxx=yyy). Substitution prefers properties defined in the settings.xml file. If the property is not found in the settings.xml file, the system properties are checked and if still not found, the system environment is checked. Also, in these versions, properties may be defined from other properties:

Code Block
languagexml
<property name="baseDir">/home/user/aspire</property>
<property name="configDir">${baseDir}/cfg</property> 

Note: Property references for properties that are not in the settings.xml file will be left as-is. This allows for other configurations that use the same syntax (specifically, the Groovy Scripting component) to continue to operate properly.

XML Property Expansion

You can also use properties to add entire XML structures to a component configuration. To achieve this, define a property containing XML in a <![CDATA[..]]> section. Then, when expanding this property, you prefix the property name with xml: and the contents of the property will be interpreted as XML and added to the structure.

For example:

Code Block
languagexml
<settings>
  <properties>
    <property name="expanders"><![CDATA[<expanders><expander>${prop1}</expander><expander>two</expander></expanders>]]></property>
    <property name="prop1">Lincoln</property>
    <property name="testProp">testVal</property>
    <property name="testDoc"><![CDATA[<doc><title/></doc>]]></property>
    <property name="testDoc1"><![CDATA[<doc1><title1/></doc1>]]></property>
  </properties>
</settings>

and

Code Block
languagexml
 <config>
  ${xml:expanders}
  XXX
  ${xml:testDoc}
  <expanders2>${xml:expanders}</expanders2>
  <expanders_text>${expanders}</expanders_text>
  <test>${testProp}</test>
  ${xml:testDoc1}
  YYY
</config>

expands to

Code Block
languagexml
 <config>XXX<expanders2>
    <expanders>
      <expander>Lincoln</expander>
      <expander>two</expander>
    </expanders>
  </expanders2>
  <expanders_text><expanders><expander>Lincoln</expander><expander>two</expander></expanders></expanders_text>
  <test>testVal</test>YYY<expanders>
    <expander>Lincoln</expander>
    <expander>two</expander>
  </expanders>
  <doc>
    <title/>
  </doc>
  <doc1>
    <title1/>
  </doc1>
</config>

Property Escaping (for Groovy Scripts)

If you need to insert a property into a Groovy script, assigning it to a String that contains the \ character (such as ${aspire.home} would), will cause Groovy to raise an error as it sees invalid escaped characters. To avoid this, you can prefix the property name with escape: and any \ characters in the contents of the property will be replaced with \\.

For example:

Code Block
languagexml
<settings>
 <properties>
   <property name="file">c:\top-directory\directory\file.html</property>
 </properties>
</settings>

and

Code Block
languagexml
<config>
 <file>${file}</file>
 <escapefile>${escape:file}</escapefile>
 <fileattr attr="${file}">somevalue</fileattr>
 <escapefileattr escapeattr="${escape:file}">somevalue</escapefileattr>
 <cdata>
   <![CDATA[
      def a = "${file}";
   ]]>
 </cdata>
 <escapecdata>
   <![CDATA[
      def a = "${escape:file}";
   ]]>
 </escapecdata>
</config>

expands to

Code Block
languagexml
<config>
 <file>c:\top-directory\directory\file.html</file>
 <escapefile>c:\\top-directory\\directory\\file.html</escapefile>
 <fileattr attr="c:\top-directory\directory\file.html">somevalue</fileattr>
 <escapefileattr escapeattr="c:\\top-directory\\directory\\file.html">somevalue</escapefileattr>
 <cdata>
   <![CDATA[
     def a = "c:\top-directory\directory\file.html";                <<<< THIS LINE WOULD ERROR IN A GROOVY SCRIPT
   ]]>
 </cdata>
 <escapecdata>
   <![CDATA[
     def a = "c:\\top-directory\\directory\\file.html";
   ]]>
 </escapecdata>
</config>

Properties for Applications


You can specify properties that apply to a specific application (rather than the properties above which apply to all components).

Code Block
languagexml
<autoStart>
  <application config="config/system.xml">
    <properties>
      <property name="debug">true</property>
      <property name="managerExternalRDB">false</property>
      <property name="managerRDB">CSRDB</property>
    </properties>
  </application>
  <application config="com.searchtechnologies.appbundles:cs-manager:4.0">
    <properties>
      <property name="debug">true</property>
      <property name="managerExternalRDB">false</property>
      <property name="managerRDB">CSRDB</property>
      <property name="managerExternalJDBCUrl"></property>
      <property name="managerExternalJDBCDriverJar"></property>
      <property name="managerExternalJDBCUser"></property>
      <property name="managerExternalJDBCPassword"></property>
    </properties>
  </application>
</autoStart>


These properties are passed to all components (and only those components) that exist "under" the component manager. If the same property names are used both at the global level and the component manager level, the component manager definition will be used for components "under" that manager, whilst the global value would be used for other components.

Apache Felix Configuration


Some Apache Felix configuration parameters can also be placed in the settings.xml file, as follows:

Code Block
languagexml
<configAdmin>
   <properties pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
     <property name="username">admin</property>
     <property name="password">admin1</property>
     <property name="manager.root">/osgi</property>
   </properties>
</configAdmin>

Although, before using this approach, check to see if these parameters can be stored in the Apache Felix system properties file (called "felix.properties" for most Aspire installations). That may be the better location for these properties.

Inside <configAdmin>, each <property> tag contains a "pid" attribute which is the "persistent ID" of the configuration element. The nested properties are the OSGi Configuration properties

See the following for more information about OSGi and Apache Felix configuration properties:

Security Configuration


This is the configuration to use the Login page. The type options are (ConfigFile or Ldap). For more details see Security Page.

Options for authentication are 'None' (default), 'ConfigFile', 'Ldap'

Code Block
languagexml
<authentication>
   <type>none</type> 
</authentication>


LDAP authentication options are 'none', 'simple'(default), 'DIGEST-MD5'. If none was selected, anonymous access will be attempted

Code Block
languagexml
 <ldapConfig>
   <config>
     <server>ldap://localhost:389</server>
     <authentication>simple</authentication>
     <searchBase>dc=localhost, dc=com</searchBase>
     <group>OU=Users,OU=Group</group>
   </config>
 </ldapConfig>

Entitlements


This is the server site where entitlements will be located. This is used to populate the config/entitlements.xml file used to fill the Home Page connector list and the Workflow section publisher and application lists.

Code Block
languagexml
  <entitlementsServer online="true">https://entitlements.searchtechnologies.com</entitlementsServer>

The online attribute can be set to false if you have no internet access from the Aspire Server. In this case if you want to populate the connector list of the Home Page, and the publishers and applications list of the Workflow Section you will have to edit the entitlements.xml file (also in the config directory) by yourself. You can generate the file contents for your user by visiting Entitlements and following the instructions.