-
Notifications
You must be signed in to change notification settings - Fork 2
Running EML CTS as Single Executable JAR
System Docker File
FROM java:8
WORKDIR <PATH TO JAR & CONF FILE>
ADD parity-system.jar parity-system.jar
ADD system0620.conf system0620.conf
EXPOSE 4000
CMD java -jar parity-system.jar system0620.conf
Client Docker File
FROM java:8
WORKDIR <PATH TO JAR & CONF FILE>
ADD parity-client.jar parity-client.jar
ADD client0620.conf client0620.conf
EXPOSE 39401
EXPOSE 39402
CMD java -jar parity-client.jar 192.168.1.52 client0620.conf
Eml Docker File
FROM java:8
WORKDIR <PATH TO JAR FILE>
ADD eml-cts.jar eml-cts.jar
EXPOSE 8080
EXPOSE 39401
EXPOSE 39402
CMD java -jar eml-cts.jar
System Configuration File
market-data {
session = parity
multicast-interface = 192.168.1.50
multicast-group = 224.0.0.1
multicast-port = 5000
request-address = 192.168.1.50
request-port = 5001
}
market-report {
session = parity
multicast-interface = 192.168.1.50
multicast-group = 224.0.0.1
multicast-port = 6000
request-address = 192.168.1.50
request-port = 6001
}
order-entry {
address = 192.168.1.50
port = 4000
}
...
Client Configuration File
order-entry {
address = 192.168.1.50
port = 4000
username = parity
password = parity
}
...
- Create docker images
parity-system:
- For Windows -
docker build -t system:1.0 <PATH TO SYSTEM DOCKER FILE> - For Mac -
docker build --tag system:1.0 <PATH TO SYSTEM DOCKER FILE>
parity-client:
- For Windows -
docker build -t client:1.0 <PATH TO CLIENT DOCKER FILE> - For Mac -
docker build --tag client:1.0 <PATH TO CLIENT DOCKER FILE>
eml-cts:
- For Windows -
docker build -t eml:1.0 <PATH TO EML DOCKER FILE> - For Mac -
docker build --tag eml:1.0 <PATH TO EML DOCKER FILE>
-
Create a docker network to run the container in with this command:
docker network create --subnet=192.168.1.1/24 ctsnet -
Run the newly created System Docker image inside a container using the specified IP with this command:
docker run --net ctsnet --ip 192.168.1.50 --name systemcontainer1 system:1.0 -
Run the newly created Client Docker image inside a container using the specified IP with this command:
docker run --net ctsnet --ip 192.168.1.51 -i -t --name clientcontainer1 client:1.0 -
Run MySQL:
-
Approach 1: using mysql image and set up
- Pull mysql docker image:
docker pull mysql - Run the newly created MySQL Docker image inside a container using the specified IP with this command:
docker run --net ctsnet --ip 192.168.1.53 --name mysqlctsnet -p 3306:3306 -e MYSQL_ROOT_PASSWORD=capstone@123 mysql - Open MySQL console in docker using this command:
docker exec -it mysqlctsnet bash - Enter credentials in MySQL console using this command:
mysql -u root -pcapstone@123 - Create/setup database and user using following command:
- To create database:
create database nist_cts_eml; - To create user:
create user eml@192.168.1.52 identified by ""; - To grant full access of database to user:
grant all on nist_cts_eml.* to eml@192.168.1.52; - To set password for user:
SET PASSWORD FOR 'eml'@'192.168.1.52' = 'capstone@123';
- To create database:
- Pull mysql docker image:
-
Approach 2: using docker file of MySQL:
- Download Docker and sql file and keep both files in same directory: Download
- Build Docker image:
docker build --tag mysql:1.0 <PATH TO MYSQL DOCKER FILE> - Run MYSQL from docker image:
docker run --net ctsnet --ip 192.168.1.53 --rm --name eml-mysql -p 3306:3306 mysql:1.0 -
Note: In case of error (Bind: Address already in use), run
sudo service mysql stopthen run MYSQL from docker image again.
-
-
Run the newly created Eml Docker image inside a container using the specified IP with this command:
docker run --net ctsnet --ip 192.168.1.52 -p 8080:8080 --name emlcontainer1 eml:1.0
Code Documentation
- Actor Pseudocode - LMA, LMM, TEUA
- RESTful Controller Payloads
- Position Manager
- Logging
- Time in CTS
- UML and Java Classes
- Simple Binary Encoding (SBE)
- SBE Quick Guide
- Auction Market
Building and Running the Project
- Setup Run and Drive - with YouTube videos
- Dependencies and Prerequisites
- Set Up MySQL
- Parity Terminal Client
- Project Build Steps
- In Case of Difficulty
Docker
- Docker Background
- Docker Setup Requirements
- Docker Setup Part 1
- Docker Setup Part 2
- Running EML-CTS as a Single Executable JAR
- Docker Quick Guide
General Tech Guides
Spring 2024 Updates