Environment requirements
Hardware
Physical or virtual server with:
- 2 core CPU
- 2Gb RAM
- 40G storage
Software
- FIXICC H2 machine:
- RHEL 7 / RHEL 8
- OpenJDK 1.8
- Consul agent in client mode
- FIXEdge Cpp machine:
- Consul agent in client mode
- On the network:
- PostgreSQL Database
- 1 user with DDL privileges (to run the database migration, can also be used to run normal FIXICC H2 operation)
- (Optional) 1 user without DDL privileges (to run normal FIXICC H2 operation)
- Consul cluster (can be deployed on the same machines as FIXEdge Cpp or FIXICC H2)
- PostgreSQL Database
- Client workstations:
- Chrome browser
Preconfiguration
Before you start work with the FIXICC H2 you should install and configure the FIX engine and Consul application.
Consul configuration
To find the Consul installation instructions please follow the link.
For non-production use, you can run Consul in developer mode with the command: consul agent -dev
.
For production use - please follow the link.
To configure the encrypted connection from FIXICC H2 to Consul on the Consul side, please refer to the link.
FIXICC H2 settings
You should choose a directory on your workstation for FIXICC H2 files.
You have your FIXICC H2 instance in app.jar file and to complete the configuration, please create the local.app.properties file.
You can place the app.jar file for the FIXICC H2 application and local.app.properties (FIXICC H2 properties file) in the same directory or store them separately.
Before you start your work, please set the database type for data storage.
FIXICC H2 is compatible with PostgreSQL databases.
Please configure the FIXICC H2 according to the instance of the local.app.properties in your FIXICC H2 package, set the following properties:
Name | Example value | Default Value | Description |
---|---|---|---|
*cuba.dbmsType | postgres |
| Type of the RDBMS |
cuba.dataSourceProvider | application |
| The value indicates that the data source must be configured using application properties |
*cuba.dataSource.username | C##CUBA |
| The user name for the database |
*cuba.dataSource.password | cuba |
| The password for the database |
*cuba.dataSource.dbName | PTGSDB |
| The database name |
*cuba.dataSource.host | 10.68.21.182 |
| Host for the database |
*cuba.dataSource.port | 1521 |
| Port for the database |
| true |
| The property enables the use of HTTPS |
| 8501 |
| The number of the port, configured for Consul |
| false |
| Allows accepting Consul insecure certificate. Is not recommended to set "true" in production mode |
fixicch2.fixServerType | FIXEdge CPP | all | Configures the type of server to work with. Allowed values: FIXEdge CPP, FIXEdge Java, any other value means two types of the supported servers |
* - marks the mandatory parameter |
As well, the following parameters can be configurated through the "Application Properties" page on FIXICC H2:
Name | Example value | Default Value | Description |
---|---|---|---|
fixicch2.fixServerType | FIXEdge CPP | all | Configures the type of server to work with. Allowed values: FIXEdge CPP, FIXEdge Java, any other value means two types of the supported servers |
fixicch2.maxTimeToWaitServerStatusUpdate | 10 | 10 | Configures in minutes the max time slot for updating the server status from Consul. If there were no events during the period then the Consul sends the response. The maximum value is a 10 minutes |
fixicch2.metricsUpdatePeriod | 1 | 1 | Configures in seconds the period for request the metrics from FIXEdge |
fixicch2.mode | production | production | Marks the instance of FIXICC H2 |
fixicch2.notificationTimeZone | UTC | UTC | Specifies the time zone to display the time of the notification |
fixicch2.pauseToReconnect | 2000 | 2000 | Specifies the pause between the reconnection attempts |
Notice: If the parameters from the table above were configured in the local.app.properties file, values from the file would be applied despite values changed through the "Application Properties" page
Logging configuration
To configure the logging level for the FIXICC H2 application, please create the logback.xml and locate it in the directory as the local.app.properties file locates.
The logback.xml file is not mandatory.
For further information please refer to the link.
Start application
You should start the FIXICC H2 from the command line with the following command:
java -Dapp.home=/opt/fixicch2-home -jar /opt/fixicch2/app.jar
Where:
- "/opt/fixicch2-home" is the directory with the local.app.properties file, you should type full path for the file;
- "/opt/fixicch2/" is the directory with the app.jar file, you should type the full path for the file.
HTTPS support
To enable HTTPS support on FIXICC H2 you need:
- Key and trust stores with TLS certificate and private key. Please refer to
keytool
documentation for the details on generating key stores - keytool. - Jetty configuration file with enabled HTTPS.
- Launch FIXICC H2 with an explicit path to the Jetty configuration:
java -Dapp.home=/path/to/fixicch2-home -jar /path/to/app.jar -jettyConfPath /path/to/jetty.xml
Below are two examples of HTTPS configuration, for the details please refer to Jetty : The Definitive Reference.
Combined HTTP and HTTPS Example
An example Jetty configuration file with both HTTP and HTTPS enabled is below.
<Configure id="Server" class="org.eclipse.jetty.server.Server"> <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ServerConnector"> <Arg name="server"> <Ref refid="Server"/> </Arg> <Set name="port">8080</Set> </New> </Arg> </Call> <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ServerConnector"> <Arg name="server"> <Ref refid="Server"/> </Arg> <Arg> <New class="org.eclipse.jetty.util.ssl.SslContextFactory"> <Set name="keyStorePath">keystore.jks</Set> <Set name="trustStorePath">keystore.jks</Set> </New> </Arg> <Set name="port">8443</Set> </New> </Arg> </Call> </Configure>
This configuration file enables HTTP server on port 8080 (line 8) and HTTPS on port 8443 (line 24) with key and trust stores (lines 20-21).
HTTPS-Only Example
<Configure id="Server" class="org.eclipse.jetty.server.Server"> <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ServerConnector"> <Arg name="server"> <Ref refid="Server"/> </Arg> <Arg> <New class="org.eclipse.jetty.util.ssl.SslContextFactory"> <Set name="keyStorePath">keystore.jks</Set> <Set name="trustStorePath">keystore.jks</Set> </New> </Arg> <Set name="port">8443</Set> </New> </Arg> </Call> </Configure>