-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathTaskfile.yml
123 lines (101 loc) · 4.13 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: "3"
dotenv:
- .env
- .vali.env
tasks:
set_weights:
cmds:
- docker compose --env-file .vali.env -f docker-compose.yml run -e LOCALHOST=false -e JUST_ONCE=true --entrypoint "python src/set_weights/calculate_and_schedule_weights.py" weight_setter
show_stats:
cmds:
- docker compose --env-file .vali.env -f docker-compose.yml run -e LOCALHOST=false --entrypoint "python src/collect_statistics.py" control_node
control_node_dev:
cmds:
- LOCALHOST=true ENV_FILE=.vali.env python -m validator.control_node.src.main
query_node_dev:
cmds:
- LOCALHOST=true ENV_FILE=.vali.env python -m validator.query_node.src.main
entry_node_dev:
cmds:
- LOCALHOST=true uvicorn validator.entry_node.src.server:app --reload --host 0.0.0.0 --port 8090 --env-file .vali.env
weight_setter_dev:
cmds:
- LOCALHOST=true ENV_FILE=.vali.env python -m validator.control_node.src.set_weights.calculate_and_schedule_weights
dev_setup:
cmds:
# turns off the nodes so you can run them on the host
# turns _on_ the proxies and dev tooling so you can access the infrastructure directly from the host
- "
docker compose
--env-file .vali.env
--profile entry_node_profile
up -d --build
--scale entry_node=0
--scale query_node=0
--scale control_node=0
--scale weight_setter=0
--scale redis-proxy=1
--scale adminer=1
--scale postgres-proxy=1
--scale redis-commander=1
"
# Now use control_node_dev etc
m1_dev:
cmds:
- ENV=DEV uvicorn miner.server:app --reload --host 0.0.0.0 --port 4001 --env-file .1.env --log-level debug
m2_dev:
cmds:
- ENV=DEV uvicorn miner.server:app --reload --host 0.0.0.0 --port 4002 --env-file .2.env --log-level debug
update_docker_fiber_version:
cmds:
- docker run --rm nineteen-control_node sh -c "pip install git+https://github.com/rayonlabs/[email protected] --upgrade"
- docker run --rm nineteen-entry_node sh -c "pip install git+https://github.com/rayonlabs/[email protected] --upgrade"
- docker run --rm nineteen-query_node sh -c "pip install git+https://github.com/rayonlabs/[email protected] --upgrade"
createm:
cmds:
- bash start_miners.sh
startup:
cmds:
- docker compose --env-file .vali.env --profile entry_node_profile up -d --build
shutdown:
cmds:
- docker compose --env-file .vali.env --profile entry_node_profile down --remove-orphans
shutdown_and_delete:
cmds:
- docker compose --env-file .vali.env --profile entry_node_profile down --remove-orphans -v
postgres:
cmds:
- docker compose --env-file .vali.env --profile entry_node_profile exec -it postgresql psql -U$POSTGRES_USER $POSTGRES_DB
redis:
cmds:
- docker compose --env-file .vali.env --profile entry_node_profile exec -it redis redis-cli
expose-postgres:
cmds:
- docker compose -f docker-compose.yml --env-file .vali.env up -d --scale postgres-proxy=1 --scale adminer=1
auditor-config:
cmds:
- python -m core.create_config --auditor
install:
cmds:
- source $HOME/.venv/bin/activate
- pip install -e .
- pip install -r validator/control_node/requirements.txt
auditor:
cmds:
- source $HOME/.venv/bin/activate
- pm2 delete auditor || true
- pm2 start auditor-ecosystem.config.js
auditor-autoupdates:
cmds:
- pm2 delete auditor-autoupdates || true
- pm2 start "python utils/run_auditor_autoupdate.py" --name auditor-autoupdates
new-auditor:
cmds:
- source $HOME/.venv/bin/activate && if [ -f .vali.env ]; then export $(cat .vali.env | grep -v '^#' | xargs); else echo "Error - .vali.env file not found" && exit 1; fi
- sh -c '[ -f .auditor.env ] || cp .vali.env .auditor.env'
- docker compose --env-file .vali.env --profile entry_node_profile down --remove-orphans
- docker image prune -a -f --filter "until=168h"
- pip install -e .
- pip install -r validator/control_node/requirements.txt
- pm2 delete auditor || true
- pm2 start auditor-ecosystem.config.js