Skip to content

Commit

Permalink
use venv for monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossignolskier committed Aug 30, 2024
1 parent bca7cc5 commit 718946c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions roles/configure_ubuntu/tasks/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- gpg-agent
- python3
- python3-pip
- python3-venv
- ufw
- rsyslog
tags:
Expand Down
24 changes: 11 additions & 13 deletions roles/monitoring/tasks/install_monitoring_script.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
---
- name: Install python packages
pip:
name:
- requests
- numpy
state: present
executable: pip3
tags:
monitoring.script

- name: Delete script folder
file:
path: "{{ solana_home }}/monitoring"
Expand All @@ -26,6 +16,17 @@
tags:
monitoring.script

- name: Install python packages
pip:
name:
- requests
- numpy
state: present
virtualenv: "{{ solana_home }}/monitoring"
# executable: pip3
tags:
monitoring.script

- name: ensure secrets_path exists
stat:
path: "{{ secrets_path }}"
Expand Down Expand Up @@ -72,13 +73,10 @@
- "measurement_validator_info.py"
- "output_gossip.py"
- "output_validator_measurements.py"
- "output_tds_measurements.py"
- "output_validators_info.py"
- "output_validators.py"
- "request_utils.py"
- "solana_rpc.py"
- "tds_info.py"
- "measurement_tds_info.py"
- "validator_monitoring.py"
tags:
- monitoring.script
Expand Down
1 change: 1 addition & 0 deletions roles/monitoring/tasks/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- gpg-agent
- python3
- python3-pip
- python3-virtualenv
- coreutils
tags:
- config.packages
2 changes: 1 addition & 1 deletion roles/monitoring/templates/output_starter.sh.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

source "{{ solana_home }}/monitoring/bin/activate"
result=$(timeout -k 50 45 python3 "{{ solana_home }}/monitoring/$1.py")

if [ -z "${result}" ]
Expand Down

0 comments on commit 718946c

Please sign in to comment.