Sign inSign up

b2bitsepam/fixedge

By b2bitsepam

•Updated about 5 years ago

The official image of FIX server FIXEdge by B2BITSĀ®, EPAM's Capital Markets Competency Center.

Image
0

3.0K

b2bitsepam/fixedge repository overview

⁠Table of contents

⁠Overview

FIX server FIXEdge is an application server providing FIX connectivity to multiple clients. Client applications communicate with FIXEdge through one of the multiple transport protocols (e.g. Simple Sockets, JMS, IBM MQ) employing transport adaptors. It is designed to be as easy as possible to install, configure, administrate and monitor trading information flows. It is written in C++ and has a performance profile suitable for the needs of all clients up to and including large sell-side institutions and large volume traders. FIXEdge comes with a rich UI for monitoring session statuses and parameters in real-time.

⁠Resources

⁠FIXEdge Image description

The image contains the FIXEdge application. A default configuration allows FIXEdge to accept FIX-session with parameters:

SenderCompID = FIXECHOCLIENT
TargetCompID = FIXEDGE
FIX Protocol Version = FIX 4.4 
Listen Port 8901
SSL Listen Port 8905
Monitoring Port 8005

Note: Do not expect bare-metal performance if running FIXEdge in a docker container in Windows.

⁠How to use FIXEdge image

⁠Step 0 - Get the license

⁠Step 1 - Pull the image from Docker Hub
docker pull b2bitsepam/fixedge

⁠Step 2 - Create the following directories in the working directory on host machine:
  • license/ - Directory where the engine license should be placed
  • logs/ - Directory where logs are stored
  • conf/ - Directory for user configuration. For more details please have a look at FIXEdge Configuration documentation⁠ Run docker commands from the working directory.

⁠Step 3 - Run server

The docker image can use default configuration (Step 3a) or user defined configuration (Step 3b).
FIXEdge acts as an echo server in a default configuration. All messages from the client are routed back.

⁠Step 3a - Run server with echo configuration

Linux:

docker run -it -v $(pwd)/license:/srv/FELicense \
               -v  $(pwd)/logs:/srv/FIXEdge/FIXEdge1/log \
               -p 8901:8901 -p 8005:8005 -p 8905:8905 \
                --expose 1234/udp \
               b2bitsepam/fixedge

Windows:

docker run -it  -v %CD%/license:/srv/FELicense ^
	   -v %CD%/logs:/srv/FIXEdge/FIXEdge1/log ^
	   -p 8901:8901 -p 8006:8005 -p 8905:8905 ^
	   --expose 1234/udp ^
	   b2bitsepam/fixedge

⁠Step 3b - Run server with user configuration

FIXEdge applies configuration from the conf/ directory. The user should be sure that it is a full configuration. An example of FIXEdge configuration can be found in the FIXEdge Linux package.
Note: Set path to license file in engine.properties: LicenseFile = /srv/FELicense/engine.license. It is necessary because license folder is mapped into container as /srv/FELicense Ā Linux:

docker run -it -v $(pwd)/license:/srv/FELicense \
               -v $(pwd)/logs:/srv/FIXEdge/FIXEdge1/log \
               -v $(pwd)/conf:/srv/FIXEdge/FIXEdge1/conf \
               -p 8901:8901 -p 8005:8005 -p 8905:8905
                --expose 1234/udp \
               --entrypoint "./srv/entrypoint_user.sh" \
               b2bitsepam/fixedge

Windows:

docker run -it  -v %CD%/license:/srv/FELicense ^
	   -v %CD%/logs:/srv/FIXEdge/FIXEdge1/log ^
	   -v %CD%/conf:/srv/FIXEdge/FIXEdge1/conf ^
	   -p 8901:8901 -p 8006:8005 -p 8905:8905 ^
	   --expose 1234/udp ^
	   --entrypoint "./srv/entrypoint_user.sh" ^
	   b2bitsepam/fixedge

⁠How to build custom FIXEdge Docker Image

  • Download the package, e.g. FIXEdge 6.7.1.67 on the clientspace⁠
  • Put the package FIXEdge*.tar.gz into the working directory
  • Create the following folders in the working directory:
    • license/ - Directory where the engine license should be placed
    • logs/ - Directory where logs are stored
    • conf/ - Directory for user configuration.
  • Copy engine license to the license folder.
  • Create a Dockerfile:
  FROM centos:7.4.1708
  EXPOSE 8901
  EXPOSE 8903
  EXPOSE 8905
  EXPOSE 8005
  EXPOSE 1234:1234/udp

  RUN yum install -y libtool-ltdl wget sudo ;\
    groupadd -r fixedge --gid=990 ;\
    useradd -r -g fixedge fixedge  --uid=990 ;\
    mkdir -p /srv/ ;\
    chown -R fixedge:fixedge /srv/

  VOLUME [ "/srv/FELicense" ]
  VOLUME [ "/srv/FIXEdge/FIXEdge1/log/" ]

  COPY fixedge.tar.gz /srv/
  RUN cd /srv/ ;\
    tar -xzvf fixedge.tar.gz ;\
    rm fixedge.tar.gz ;\
    rm -rf /srv/FIXEdge/fixicc/ ;\
    chmod +x /srv/FIXEdge/jre/bin/* ;\
    chmod +x /srv/FIXEdge/fixicc-agent/bin/* ;\
    cd /srv/FIXEdge/fixicc-agent/bin/ ;\
    sh ./installDaemonNoPriv.sh

  # Save all logs to /srv/FIXEdge/FIXEdge1/log
  RUN  rmdir /srv/FIXEdge/fixicc-agent/logs ;\
       ln -s /srv/FIXEdge/FIXEdge1/log /srv/FIXEdge/fixicc-agent/logs

  COPY entrypoint.sh /srv/entrypoint.sh

  ENTRYPOINT ["/srv/entrypoint.sh"]
  • Create entrypoint.sh script with the following content:
  #!/bin/bash
  #Run FIXedge service
  cd /srv/FIXEdge/fixicc-agent/bin/
  ./startDaemonNoPriv.sh;
  cd /srv/FIXEdge/bin/
  nohup ./FixEdge1.run.sh &

  mkdir -p /srv/FIXEdge/FIXEdge1/log/backup
  mkdir -p /srv/FIXEdge/FIXEdge1/log/archive

  # do not stop the container after FIXEdge startup.
  tail -f /dev/null
  • Create a build image script.
    Linux: build_image.sh:
  #!/bin/bash

  # expected that the package FIXEdge*.tar.gz is placed in the current directory
  # engine license is placed in directory license

  package_name=$(find . -name 'FIXEdge*.tar.gz' | sort -n | tail -1)
  if [ -e "$package_name" ] ; then 
      echo found package $package_name

      cp $package_name ./fixedge.tar.gz
      docker build -t fixedge .

      tag=$(echo $package_name | cut -d'-' -f 2)
      echo setting tag $tag for fixedge image 
      docker tag fixedge fixedge:$tag
      docker tag fixedge fixedge:latest

      # cleanup.
      rm ./fixedge.tar.gz
  else
      echo ERROR: the package has not found
      exit 1
  fi

Windows PowerShell script build_image.ps1:

  # expected that the package FIXEdge*.tar.gz is placed in the current directory
  # engine license is placed in directory license
  $filename = '*FIXEdge*.tar.gz*.*'

  if(Get-ChildItem -Filter $filename | %{$_.FullName}){
    $package_name = Get-ChildItem -Filter $filename | %{$_.FullName}
    Write-Output "Package found $package_name"

    Copy-Item $package_name -Destination "./fixedge.tar.gz" -Force
    docker build --tag fixedge .

    $tag = $package_name.Split('-')[1]
    Write-Output "Setting tag $tag for fixedge image"
    docker tag fixedge fixedge:$tag
    docker tag fixedge fixedge:latest

    # List the Images
    docker images
    
    # Clean up.
    Remove-Item -Path "./fixedge.tar.gz"
  }else{
    Write-Output "ERROR: the package was not found"  
  }
  Read-Host -Prompt "Press Enter to exit"
  • Run build image script
  ./build_image.sh
  • To run the server with user configuration use the following command.
    Ā Linux:
  docker run -it -v $(pwd)/license:/srv/FELicense \
               -v $(pwd)/logs:/srv/FIXEdge/FIXEdge1/log \
               -v $(pwd)/conf:/srv/FIXEdge/FIXEdge1/conf \
               -p 8901:8901 -p 8005:8005 -p 8905:8905
               --expose 1234/udp  \
               fixedge

Windows:

docker run -it  -v %CD%/license:/srv/FELicense ^
	   -v %CD%/logs:/srv/FIXEdge/FIXEdge1/log ^
	   -v %CD%/conf:/srv/FIXEdge/FIXEdge1/conf ^
	   -p 8901:8901 -p 8006:8005 -p 8905:8905 ^
	   --expose 1234/udp ^
	   fixedge

Ā© B2BITS EPAM Systems Company 2000-2021.

Tag summary

Content type

Image

Digest

Size

607.8 MB

Last updated

about 5 years ago

docker pull b2bitsepam/fixedge