Skip to content

Running a federation

Gergely Varga edited this page Oct 26, 2017 · 3 revisions

Running a federation

System requirements

  • JDK 8 or JDK 9
  • maven 3
  • maven repository set up properly (cpswtng_archiva entry in /etc/hosts)

Environment variables

  • CPSWTNG_ROOT - the directory that acts as cwd
  • RTI_RID_FILE - path to the RTI.rid file

Logging

When running the FederationManager or any federates, a log4j2 configuration file must be set in order to logging properly. In a profile that is set in pom.xml a systemProperty should be set:

<systemProperty>
    <key>log4j.configurationFile</key>
    <value>path/to/log4j2.xml</value>
</systemProperty>

Configuration

There must be a -configFile argument set with the proper configuration file path set as the next argument:

<arguments>
    <argument>-configFile</argument>
    <argument>fedmgrconfig.json</argument>
    ...

In case you want to manually set a parameter, that needs to be added as an additional argument:

    <argument>-stepSize</argument>
    <argument>1.0</argument>

Federation Manager

# command line
mvn exec:java -P FederationManagerExecJava -DconfigFile=/path/to/fedmgrconfig.json
Clone this wiki locally