Metadata-Version: 2.4
Name: wnm
Version: 0.0.9
Summary: Manager for Autonomi nodes
Author-email: Troy Johnson <troy@weave.sh>
License: GPL-3.0
Project-URL: Repository, https://github.com/iweave/weave-node-manager.git
Project-URL: Issues, https://github.com/iweave/weave-node-manager/issues
Keywords: Autonomi,antnode,weave,xd7
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.12.3
Description-Content-Type: text/markdown
Requires-Dist: python-dotenv
Requires-Dist: requests
Requires-Dist: packaging
Requires-Dist: sqlalchemy
Requires-Dist: alembic
Requires-Dist: json-fix
Requires-Dist: psutil
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"

# Weave Node Manager

## Overview
Weave Node Manager (wnm) is a Python application designed to manage nodes for decentralized networks.

## Features
- Update node metrics and statuses.
- Manage systemd services and ufw firewall for linux nodes.
- Support for configuration via YAML, JSON, or command-line parameters.

## Installation
1. Create a directory to hold data:
   ```
   mkdir /home/ubuntu/wnm
   ```
2. Navigate to the project directory:
   ```
   cd /home/ubuntu/wnm
3. Install the required dependencies:
   ```
   sudo apt install -y python3.12-venv python3-dotenv
   ```
4. Create a virtual environment
   ```
   python3 -m venv .venv
   ```
5. Activate the virtual environment
   ```
   . .venv/bin/activate
   ```
6. Install the package:
   ```
   pip install wnm 
   ```
7. Run to initialize environment from anm
   ```
   wnm
   ```
8. 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
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](https://github.com/safenetforum-community/NTracking/tree/main/anm), 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.

## Usage
To run the application, execute the following command:
```
python main.py
```

## Contributing
Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.

## License
This project is licensed under the MIT License. See the LICENSE file for more details.
