Weave Node Manager (wnm) is a Python application designed to manage nodes for decentralized networks.
- Update node metrics and statuses.
- Manage systemd services and ufw firewall for linux nodes.
- Support for configuration via YAML, JSON, or command-line parameters.
This code is Alpha. It can currently only take over an anm initiated set of nodes (at least one node). This project is essentially starting as a Python port of anm
. It will eventually also have the option of using antctl
instead of systemd
to control nodes.
- Create a directory to hold data:
mkdir /home/ubuntu/wnm
- Navigate to the project directory:
cd /home/ubuntu/wnm
- Install the required dependencies:
sudo apt install -y python3.12-venv python3-dotenv
- Create a virtual environment
python3 -m venv .venv
- Activate the virtual environment
. .venv/bin/activate
- Install the package:
pip install wnm
- Run to initialize environment from anm
wnm
- Add to cron to run every minute
echo <<EOF SHELL=/bin/bash PATH=/home/ubuntu/.local/bin:/home/ubuntu/wnm/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin */1 * * * * ubuntu cd /home/ubuntu/wnm && wnm > /home/ubuntu/wnm/cron.out 2>&1 EOF
Configuration can be done through a .env
file, YAML, or JSON files. The application will prioritize these configurations over default values.
Upon finding an existing installation of anm - aatonnomicc node manager, wnm will disable anm and take over management of the cluster. The /var/antctl/config is only read on first ingestion, configuration priority then moves to the .env
file or a named configuration file.
To run the application, execute the following command:
python main.py
Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.