Compare commits

...

8 Commits

Author SHA1 Message Date
oleg 2c26e4d258 config (for executor) is made more flexible, docker compose initial 2024-09-09 17:39:00 -04:00
oleg 0624f35ddd docker compose 2024-09-07 12:47:04 -04:00
oleg 7052563d3b Merge branch 'master' of cloud21.cvtt.vpn:/opt/store/git/ops into moving2python_3.12 2024-09-07 12:05:41 -04:00
oleg fb60f5f4f6 progress 2024-09-06 21:12:46 -04:00
oleg 98fe0e08f3 minor 2024-09-05 00:03:10 -04:00
oleg 0b2d9e40ee python 3.12, etc. 2024-09-03 19:52:16 -04:00
oleg 3eec3e6bf8 to python3.12 2024-09-03 18:28:38 -04:00
oleg 0eded0e6da homestore /works/cvtt ownership moved to cvtt 2024-09-02 16:56:43 -04:00
22 changed files with 120 additions and 11 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/env bash
Registry=http://homestore.cvtt.vpn:5500
Catalog=${Registry}/v2/_catalog
jstr=$(curl -s -X GET ${Catalog})
# echo ${jstr}
echo "${jstr}" | jq -r '.repositories[]' | while read repo; do
TagListURL="${Registry}/v2/${repo}/tags/list"
# echo $repo
curl -s -X GET ${TagListURL}
done
+61
View File
@@ -0,0 +1,61 @@
[supervisord]
environment=PYTHONPATH="/home/cvtt/prod"
autostart=true
autorestart=unexpected
startretries=3
logfile=/var/log/supervisor/supervisord_cvtt.log
[supervisorctl]
[inet_http_server]
port = 127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:coinbase_rec_cvttdata]
directory=/home/cvtt/prod
command=/home/cvtt/.pyenv/python3.10-venv/bin/python3 -u /home/cvtt/prod/cvttpy/apps/md/md_recorder.py
--config=http://cloud16.cvtt.vpn:6789/apps/md_recorder
--active_exchanges=COINBASE_AT
--instruments=COINBASE:PAIR-BTC-USD,COINBASE:PAIR-ETH-USD,COINBASE:PAIR-LTC-USD,COINBASE:PAIR-XRP-USD
--db_credentials_key=TSDB_MD_CVTTDATA
--admin_port=7223
--log_level=INFO
--log_file=/home/cvtt/prod/logs/%%T.MD_REC.COINBASE.CVTTDATA.log
autostart=true
autorestart=true
startretries=1
startsecs=3
user=cvtt
#
[program:bnbfut_rec_cvttdata]
directory=/home/cvtt/prod
command=/home/cvtt/.pyenv/python3.10-venv/bin/python3 -u /home/cvtt/prod/cvttpy/apps/md/md_recorder.py
--config=http://cloud16.cvtt.vpn:6789/apps/md_recorder
--active_exchanges=BNBFUT
--instruments=BNBFUT:PERP-BTC-USDT,BNBFUT:PERP-ETH-USDT
--db_credentials_key=TSDB_MD_CVTTDATA
--admin_port=7224
--log_level=INFO
--log_file=/home/cvtt/prod/logs/%%T.MD_REC.BNBFUT.CVTTDATA.log
autostart=true
autorestart=true
startretries=1
startsecs=3
user=cvtt
[program:md_rec_monitor]
directory=/home/cvtt/prod
command=/home/cvtt/.pyenv/python3.10-venv/bin/python3 -u /home/cvtt/prod/cvttpy/apps/md/md_rec_monitor.py
--config=http://cloud16.cvtt.vpn:6789/apps/md_rec_monitor
--db=CVTTDATA
--admin_port=7225
--log_level=INFO
--log_file=/home/cvtt/prod/logs/%%T.MD_REC.MONITOR.CVTTDATA.log
autostart=true
autorestart=true
startretries=1
startsecs=3
user=cvtt
+5
View File
@@ -0,0 +1,5 @@
BOOK=ALPACA-TEST-BOOK-01
CONFIG=http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca
ACTIVE_EXCHANGES=ALPACA_SNDBX-MDPORTAL
#
ADMIN_PORT_EXECUTOR=7222
+27
View File
@@ -0,0 +1,27 @@
version: "3.8"
#==================================================
# Relies on the file `.env` content for varables:
# BOOK
# CONFIG
# ACTIVE_EXCHANGES
# ADMIN_PORT_EXECUTOR
# Start with the command:
# docker compose up -d --pull
#==================================================
services:
redis:
image: redis/redis-stack:latest
container_name: redis-stack
ports:
- "6379:6379"
executor:
image: cloud21.cvtt.vpn:5500/executor:latest
container_name: executor.${BOOK}
network_mode: "host"
restart: unless-stopped
depends_on:
- redis
volumes:
- /opt/shared:/shared
command: ["-c", "${CONFIG}", "-e", "${ACTIVE_EXCHANGES}", "-a", "${ADMIN_PORT_EXECUTOR}"]
shm_size: "8gb"
@@ -2,7 +2,7 @@
usage() {
echo -n "Usage: $0"
echo -n " [-c <config_server (dflt: cloud23.cvtt.vpn:6789)>]"
echo -n " [-c <config (dflt: http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca)>]"
echo -n " [-e <active_exchanges (ALPACA_SNDBX-MDPORTAL)>]"
echo -n " [-a <admin_port (7222)>"]
echo
@@ -11,7 +11,7 @@ usage() {
args=${*}
ConfigServer=cloud23.cvtt.vpn:6789
Config=http://cloud23.cvtt.vpn:6789/apps/cvtt_eqt_alpaca
ActiveExchanges=ALPACA_SNDBX-MDPORTAL
AdminPort=7222
Book=""
@@ -19,7 +19,7 @@ Book=""
while getopts ":c:e:a:" opt; do
case ${opt} in
c )
ConfigServer=$OPTARG
Config=$OPTARG
;;
e )
ActiveExchanges=$OPTARG
@@ -38,7 +38,7 @@ while getopts ":c:e:a:" opt; do
esac
done
echo "ConfigServer=${ConfigServer}"
echo "Config=${Config}"
echo "ActiveExchanges=${ActiveExchanges}"
echo "AdminPort=${AdminPort}"
+1 -1
View File
@@ -1 +1 @@
1.6.3F3,homestore /works/cvtt ownership moved to cvtt
1.6.6,config (for executor) is made more flexible, docker compose initial
@@ -1,6 +1,6 @@
#!/bin/bash
Python=/home/cvtt/.pyenv/python3.10-venv/bin/python3.10
Python=/home/cvtt/.pyenv/python3.12-venv/bin/python3.12
RootDir=/home/cvtt/prod
export PYTHONPATH=${RootDir}
+1 -1
View File
@@ -10,7 +10,7 @@ usage() {
}
Python="${HOME}/.pyenv/python3.10-venv/bin/python3.10"
Python="${HOME}/.pyenv/python3.12-venv/bin/python3.12"
RootDir="${HOME}/prod"
# **** D E B U G
+1 -1
View File
@@ -45,7 +45,7 @@ echo "Start=${Start} End=${End} NumJobs=${NumJobs}"
# export PyScript=/home/cvtt/prod/cvttpy/exchanges/alpaca/hist_mkt_data.py
export PYTHONPATH=/home/cvtt/prod
export Python=/home/cvtt/.pyenv/python3.10-venv/bin/python3
export Python=/home/cvtt/.pyenv/python3.12-venv/bin/python3
export Config=http://cloud16.cvtt.vpn:6789/apps/minimal_md
export PyScript=/home/cvtt/prod/cvttpy/exchanges/alpaca/hist_md/hist_md_bars.py
@@ -2,7 +2,7 @@
export PYTHONPATH=${HOME}/prod
Python=${HOME}/.pyenv/python3.10-venv/bin/python3
Python=${HOME}/.pyenv/python3.12-venv/bin/python3
Script=${HOME}/prod/cvttpy/exchanges/alpaca/hist_md/rl_calc_loader.py
DbFile=${HOME}/prod/data/rel_liquidity.db
Config=http://cloud23.cvtt.vpn:6789/apps/minimal_md_eqt
@@ -56,6 +56,7 @@ echo '```' | tee -a ${tmpfile}
run_checklist | tee -a ${tmpfile}
echo '```' | tee -a ${tmpfile}
echo "Sending result to ${Sender} ${StatusChannel}"
cat ${tmpfile} | ${Sender} ${StatusChannel}
exit
@@ -2,7 +2,7 @@
export PYTHONPATH=/home/cvtt/prod
Cmd="/home/cvtt/.pyenv/python3.10-venv/bin/python3"
Cmd="/home/cvtt/.pyenv/python3.12-venv/bin/python3"
Cmd="${Cmd} /home/cvtt/prod/cvttpy/apps/research/exchange_trading_stats.py"
Cmd="${Cmd} --config=http://cloud16.cvtt.vpn:6789/apps/tests/listen_market_data"
Cmd="${Cmd} --active_exchanges=OKX,GEMINI,BITSTAMP,COINBASE_AT,BNBSPOT,KRAKEN"
+1 -1
View File
@@ -12,7 +12,7 @@ fi
rsync -ahv /home/cvtt/host_drive/eqt_hist_md/txt/${letter} /home/cvtt/tmp/txt/
# create db files
PYTHONPATH=/home/cvtt/prod /home/cvtt/.pyenv/python3.10-venv/bin/python3 /home/cvtt/prod/cvttpy/trading/mkt_data/ad_hoc/eqt_md_to_db.py /home/cvtt/tmp/txt/${letter} /home/cvtt/tmp/db
PYTHONPATH=/home/cvtt/prod /home/cvtt/.pyenv/python3.12-venv/bin/python3 /home/cvtt/prod/cvttpy/trading/mkt_data/ad_hoc/eqt_md_to_db.py /home/cvtt/tmp/txt/${letter} /home/cvtt/tmp/db
if [ "$?" != "0" ] ; then
exit