Weave Node Manager (linux/osx node manager)

Update: WNM Announcement post below,

So I’ve been working on a Python port of anm, which was progressing nicely until I lost the ability to run nodes.

Weave Node Manager seeks to monitor node clusters and automatically make adjustments to keep the nodes running within a set of adjustable rules.

I have a request for someone running a node. Somehow, I forgot to backup the output results from a node, which I want to simulate in my lab so that I can get back to development.

The first thing I need is a port dump of the two endpoints that I can’t make work at the moment. First the metadata results

curl http://<nodeip>:<nodemetricsport>/metadata > metadata.json

and then the output of the metrics port

curl http://<nodeip>:<nodemetricsport>/metrics > metrics.json

If someone can send me those two files, I’d be very grateful.

3 Likes

Can’t you run the node from CLI and get that data?

For that matter can python run a command line command. You can run antnode that way if python can do it.

I wanted data from a node that can connect, although I admit I haven’t tried using relay to run a node because I think of that as gone already.

2 Likes

Ok, Thank you @neo, I was also able to continue to test things with –relay while that still works… However.

I’ve created something unlikely to be used by anyone but me, but I’m releasing it anyway.

https://pypi.org/project/fakenode/

This little project makes a small but not tiny fake node to be used to simulate nodes without wasting network bandwidth or disk bandwidth (or in my case, when the network doesn’t work in my labs). All said and done, on OSX Sequoia this little script is still 24MB in size and doesn’t yet support many customized metrics (just uptime) but I may add more over time as wnm gets smarter.

I’m a little frustrated though. I can’t use antctl as a node manager with fakenode because antctl checks that the executable name matches, but I’m currently using a modifiable shell script called antnode to launch fakenodes with custom settings (like node version to report) and antctl start fails because the names don’t match (antctl sees /bin/bash instead of antnode).

Obviously, my use case shouldn’t distract the team, but my only alternative is to build a binary version of this script (in Rust?), which would then require building and managing binaries for each fake node version. I almost did that solution first, but I don’t know anything about rust so I can’t pair with AI like I can with python.

It’s also unlikely that anyone using antctl would bother with fakenode, so solving this edge case doesn’t seem necessary at this time.

Ultimately, even in its current state, this allows me to restart work on wnm, so it has succeeded in helping me move forward!

2 Likes

Hmm, I’m kind of burying the lede here… should I create a new topic or update the first post?

Announcing Weave Node Manager - wnm, a resource-following node manager for Autonomi.

Supporting OSX and Linux, using native process managers (systemd or launchd), or the official antctl process manager on any non-windows system.

Features:

  • Integration with NTracking for node visibility
  • Ability to take over an existing anm/wnm/antctl cluster that was started with Metrics enabled
  • –dry_run mode to simulate the next action with various non-permanent setting changes
  • Automatically adds node until base metrics are reached.
  • Temporarily stops the youngest nodes when system metrics spike
  • Installable through PyPi as wnm

This started as a Python port of anm, with the goal of adding antctl so more operating systems are supported than systemd linux.

8 Likes

The latest (v0.3.1) of wnm finally supports concurrent actions for those node operators running on large-scale hardware.

Setting –max_concurrent_start 10 or –max_concurrent_upgrade 5 will allow wnm to spin up or upgrade clusters faster.

Also added was –force_action update_config, which is a no-op action, allowing a node operator to change settings in the database without running the decision engine.

5 Likes

I’m going to take this opportunity of the new release to put wnm on at least one of my home node-runners.

2 Likes

What is the proper home for the config file?

~/.local/share/wnm/config

or
~/.local/share/autonomi/config

I’m having a spot of bother trying to change config cos I stupidly started it with the default ports 12000 etc


(wnmvenv) willie@leonov:~/weave-node-manager$ wnm --force-action update-config
WARNI [root] Cannot change port_start, metrics_port_start, or process_manager on an active machine
(wnmvenv) willie@leonov:~/weave-node-manager$ wnm --force-action stop
WARNI [root] Cannot change port_start, metrics_port_start, or process_manager on an active machine
(wnmvenv) willie@leonov:~/weave-node-manager$ wnm --force-action teardown
WARNI [root] Cannot change port_start, metrics_port_start, or process_manager on an active machine
(wnmvenv) willie@leonov:~/weave-node-manager$ wnm -c ~/.local/share/autonomi/config
WARNI [root] Cannot change port_start, metrics_port_start, or process_manager on an active machine
1 Like

/me pokes @ambled