Compare commits

...

4 Commits

Author SHA1 Message Date
oleg e1bc3ee663 musvc build fix 2025-04-22 19:24:10 -04:00
oleg ee25454664 bookkeeper bug fix 2025-04-22 18:53:14 -04:00
oleg 4aa4bd701a progress (UNTESTED) 2025-04-15 21:16:48 -04:00
oleg e1dd060929 progress (UNTESTED) 2025-04-15 21:13:42 -04:00
22 changed files with 305 additions and 7 deletions
+1
View File
@@ -0,0 +1 @@
0.0.6
+2 -1
View File
@@ -4,10 +4,11 @@
RegistryService=cloud21.cvtt.vpn:5500 RegistryService=cloud21.cvtt.vpn:5500
ImageName=md_recorder ImageName=md_recorder
BashFunctionCode=$(realpath $(dirname ${0}))/../../dckr_bld_functions.sh BashFunctionCode=$(realpath $(dirname ${0}))/../../dckr_bld_functions.sh
ImageVersion=$(cat $(realpath $(dirname ${0}))/VERSION)
# --- Settings # --- Settings
usage() { usage() {
echo "Usage: $0 -V <image_version> -L <library>:<library_version>" echo "Usage: $0 -L <library>:<library_version> [-V <image_version>] "
exit 1 exit 1
} }
+14 -1
View File
@@ -3,7 +3,7 @@ CONFIG_COMM_SETTINGS=comm/pubsub/redis/docker_microservices
CONFIG_FILE="http://${CONFIG_SERVICE}/apps/cvtt_musvc" CONFIG_FILE="http://${CONFIG_SERVICE}/apps/cvtt_musvc"
CVTT_USER=1001:1001 CVTT_USER=1001:1001
CVTT_VERSION=0.0.3 CVTT_VERSION=0.0.6
# MDGW_CREDS_FILE=.creds # MDGW_CREDS_FILE=.creds
MDGW_LOG_FILE=%T.md_gateway.log MDGW_LOG_FILE=%T.md_gateway.log
@@ -23,3 +23,16 @@ PXER_ADD_ARGS=
COORD_LOG_FILE=%T.coordinator.log COORD_LOG_FILE=%T.coordinator.log
COORD_ADD_ARGS= COORD_ADD_ARGS=
BKPR_CREDS_FILE=
BKPR_LOG_FILE=%T.bookkeeper.log
BKPR_ADD_ARGS=
RMGR_LOG_FILE=%T.riskmrg.log
RMGR_ADD_ARGS=
QUANT_LOG_FILE=%T.quant.log
QUANT_ADD_ARGS=
TRDR_LOG_FILE=%T.trader.log
TRDR_ADD_ARGS=
+1
View File
@@ -0,0 +1 @@
0.0.6
+3
View File
@@ -0,0 +1,3 @@
.git
**/__pycache__
.pipenv
+25
View File
@@ -0,0 +1,25 @@
FROM python:3.12-slim
# libpq needed for Timescale
RUN apt-get update && apt-get install -y \
apt-utils \
libpq-dev \
build-essential
COPY requirements.txt /
RUN pip install --upgrade pip --root-user-action=ignore
RUN pip install -r /requirements.txt --root-user-action=ignore
COPY cvttpy /cvttpy
RUN mkdir -p /logs /config
SHELL ["/bin/bash", "-c"]
ENV PYTHONPATH=/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
LogDir=/logs
Cmd="python3.12"
Cmd+=" cvttpy/apps/microservices/book_keeper/book_keeper.py"
Cmd+=" --config=${CONFIG_FILE}"
Cmd+=" --log_file=${LogDir}/${BKPR_LOG_FILE}"
Cmd+=" --credentials_file=${BKPR_CREDS_FILE:-/config/.creds}"
Cmd+=" ${BKPR_ADD_ARGS}"
echo ${Cmd}
exec ${Cmd}
+11
View File
@@ -0,0 +1,11 @@
aiohttp>=3.7.4.post0
nest-asyncio>=1.5.5
hjson>=3.1.0
sortedcontainers>=2.4.0
redis>=5.0.8
python-dateutil>=2.8.2
types-python-dateutil>=2.8.19.6
cryptography>=43.0.0
PyJWT>=2.10.1
psycopg>=3.2.1
pandas>=1.5.3
+13 -2
View File
@@ -2,12 +2,23 @@
# --- Settings # --- Settings
RegistryService=cloud21.cvtt.vpn:5500 RegistryService=cloud21.cvtt.vpn:5500
ValidImages=(md_gateway oe_gateway ac_gateway pricer coordinator)
ValidImages=()
ValidImages+=(md_gateway)
ValidImages+=(oe_gateway)
ValidImages+=(ac_gateway)
ValidImages+=(pricer)
ValidImages+=(coordinator)
ValidImages+=(bookkeeper)
ValidImages+=(risk_manager)
ValidImages+=(quant)
ValidImages+=(trader)
BashFunctionCode=$(realpath $(dirname ${0}))/../dckr_bld_functions.sh BashFunctionCode=$(realpath $(dirname ${0}))/../dckr_bld_functions.sh
ImageVersion=$(cat $(realpath $(dirname ${0}))/VERSION)
# --- Settings # --- Settings
usage() { usage() {
echo "Usage: $0 -I <image_name> -V <image_version> -L <library>:<library_version>" echo "Usage: $0 -I <image_name> -L <library>:<library_version> [-V <image_version>] "
exit 1 exit 1
} }
+84 -3
View File
@@ -1,5 +1,46 @@
# CVTT Microservices # CVTT Microservices
services: services:
trader:
image: cloud21.cvtt.vpn:5500/trader:${CVTT_VERSION}
container_name: cvtt-trader
pull_policy: always
user: ${CVTT_USER:-1001:1001}
environment:
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
TRDR_LOG_FILE: ${TRDR_LOG_FILE:-%T.trader.log}
TRDR_ADD_ARGS: ${TRDR_ADD_ARGS:-}
volumes:
- ./config:/config
- ./logs:/logs
depends_on:
- md_gateway
- oe_gateway
- quant
- bookkeeper
- risk_manager
- redis
quant:
image: cloud21.cvtt.vpn:5500/quant:${CVTT_VERSION}
container_name: cvtt-quant
pull_policy: always
user: ${CVTT_USER:-1001:1001}
environment:
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
QUANT_LOG_FILE: ${QUANT_LOG_FILE:-%T.quant.log}
QUANT_ADD_ARGS: ${QUANT_ADD_ARGS:-}
volumes:
- ./config:/config
- ./logs:/logs
depends_on:
- md_gateway
- bookkeeper
- redis
coordinator: coordinator:
image: cloud21.cvtt.vpn:5500/coordinator:${CVTT_VERSION} image: cloud21.cvtt.vpn:5500/coordinator:${CVTT_VERSION}
container_name: cvtt-coordinator container_name: cvtt-coordinator
@@ -18,7 +59,7 @@ services:
- pricer - pricer
# - quant # - quant
# - trader # - trader
# - riskmgr - risk_manager
- redis - redis
pricer: pricer:
@@ -30,8 +71,8 @@ services:
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789} CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices} CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc} CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
COORD_LOG_FILE: ${COORD_LOG_FILE:-%T.pricer.log} PXER_LOG_FILE: ${PXER_LOG_FILE:-%T.pricer.log}
COORD_ADD_ARGS: ${COORD_ADD_ARGS:-} PXER_ADD_ARGS: ${PXER_ADD_ARGS:-}
volumes: volumes:
- ./config:/config - ./config:/config
- ./logs:/logs - ./logs:/logs
@@ -39,6 +80,46 @@ services:
- md_gateway - md_gateway
- redis - redis
risk_manager:
image: cloud21.cvtt.vpn:5500/risk_manager:${CVTT_VERSION}
container_name: cvtt-risk_manager
pull_policy: always
user: ${CVTT_USER:-1001:1001}
environment:
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
RMGR_LOG_FILE: ${RMGR_LOG_FILE:-%T.riskmrg.log}
RMGR_ADD_ARGS: ${RMGR_ADD_ARGS:-}
volumes:
- ./config:/config
- ./logs:/logs
depends_on:
- md_gateway
- ac_gateway
- bookkeeper
- redis
bookkeeper:
image: cloud21.cvtt.vpn:5500/bookkeeper:${CVTT_VERSION}
container_name: cvtt-bookkeeper
pull_policy: always
user: ${CVTT_USER:-1001:1001}
environment:
CONFIG_SERVICE: ${CONFIG_SERVICE:-cloud16.cvtt.vpn:6789}
CONFIG_COMM_SETTINGS: ${CONFIG_COMM_SETTINGS:-comm/pubsub/redis/docker_microservices}
CONFIG_FILE: ${CONFIG_FILE:-http://${CONFIG_SERVICE}/apps/cvtt_musvc}
BKPR_LOG_FILE: ${BKPR_LOG_FILE:-%T.bookkeeper.log}
BKPR_ADD_ARGS: ${BKPR_ADD_ARGS:-}
volumes:
- ./config:/config
- ./logs:/logs
depends_on:
- ac_gateway
#- trader
- redis
md_gateway: md_gateway:
image: cloud21.cvtt.vpn:5500/md_gateway:${CVTT_VERSION} image: cloud21.cvtt.vpn:5500/md_gateway:${CVTT_VERSION}
container_name: md_gateway container_name: md_gateway
+3
View File
@@ -0,0 +1,3 @@
.git
**/__pycache__
.pipenv
+19
View File
@@ -0,0 +1,19 @@
FROM python:3.12-slim
COPY requirements.txt /
RUN pip install --upgrade pip --root-user-action=ignore
RUN pip install -r /requirements.txt --root-user-action=ignore
COPY cvttpy /cvttpy
RUN mkdir -p /logs /config
SHELL ["/bin/bash", "-c"]
ENV PYTHONPATH=/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
LogDir=/logs
Cmd="python3.12"
Cmd+=" cvttpy/apps/microservices/quant/quant.py"
Cmd+=" --config=${CONFIG_FILE:-/config/cvtt_musvc.cfg}"
Cmd+=" --log_file=${LogDir}/${QUANT_LOG_FILE}"
Cmd+=" ${QUANT_ADD_ARGS}"
echo ${Cmd}
exec ${Cmd}
+9
View File
@@ -0,0 +1,9 @@
aiohttp>=3.7.4.post0
nest-asyncio>=1.5.5
hjson>=3.1.0
sortedcontainers>=2.4.0
redis>=5.0.8
python-dateutil>=2.8.2
types-python-dateutil>=2.8.19.6
cryptography>=43.0.0
PyJWT>=2.10.1
+3
View File
@@ -0,0 +1,3 @@
.git
**/__pycache__
.pipenv
+19
View File
@@ -0,0 +1,19 @@
FROM python:3.12-slim
COPY requirements.txt /
RUN pip install --upgrade pip --root-user-action=ignore
RUN pip install -r /requirements.txt --root-user-action=ignore
COPY cvttpy /cvttpy
RUN mkdir -p /logs /config
SHELL ["/bin/bash", "-c"]
ENV PYTHONPATH=/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
LogDir=/logs
Cmd="python3.12"
Cmd+=" cvttpy/apps/microservices/risk_manager/risk_manager.py"
Cmd+=" --config=${CONFIG_FILE}"
Cmd+=" --log_file=${LogDir}/${RMGR_LOG_FILE}"
Cmd+=" ${RMGR_ADD_ARGS}"
echo ${Cmd}
exec ${Cmd}
@@ -0,0 +1,9 @@
aiohttp>=3.7.4.post0
nest-asyncio>=1.5.5
hjson>=3.1.0
sortedcontainers>=2.4.0
redis>=5.0.8
python-dateutil>=2.8.2
types-python-dateutil>=2.8.19.6
cryptography>=43.0.0
PyJWT>=2.10.1
+3
View File
@@ -0,0 +1,3 @@
.git
**/__pycache__
.pipenv
+19
View File
@@ -0,0 +1,19 @@
FROM python:3.12-slim
COPY requirements.txt /
RUN pip install --upgrade pip --root-user-action=ignore
RUN pip install -r /requirements.txt --root-user-action=ignore
COPY cvttpy /cvttpy
RUN mkdir -p /logs /config
SHELL ["/bin/bash", "-c"]
ENV PYTHONPATH=/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
LogDir=/logs
Cmd="python3.12"
Cmd+=" cvttpy/apps/microservices/trader/trader.py"
Cmd+=" --config=${CONFIG_FILE:-/config/cvtt_musvc.cfg}"
Cmd+=" --log_file=${LogDir}/${TRDR_LOG_FILE}"
Cmd+=" ${TRDR_ADD_ARGS}"
echo ${Cmd}
exec ${Cmd}
+9
View File
@@ -0,0 +1,9 @@
aiohttp>=3.7.4.post0
nest-asyncio>=1.5.5
hjson>=3.1.0
sortedcontainers>=2.4.0
redis>=5.0.8
python-dateutil>=2.8.2
types-python-dateutil>=2.8.19.6
cryptography>=43.0.0
PyJWT>=2.10.1