Closed xmonader closed 1 year ago
@DylanVerstraete please fill in the specs to review before working on the issue
@DylanVerstraete there's that module https://github.com/freeflowuniverse/crystallib/tree/development/twinclient/examples allowing invoking typescript functionality to execute what V doesn't support natively over http, rmb, ws
I have a couple of questions:
@xmonader
basically the goal is moving the logic that we did on the chain to be available on the farmerbot in terms of capacity planning and power management
a very important note is that, the farmerbot is opt-in so I believe we will need a field extra on the Farm object for the farmerbot url/ip (that needs to be on a public IP or we can use a twinID to support using @muhamadazmy 's relay instead)
from the previous story https://github.com/threefoldtech/home/issues/1303#issuecomment-1266774284 I can should be able to send the contracts to the farmerbot to investigate and execute the power mgmt options on the farm
farmerbot can check on the status of the contracts relevant to a specific farm i believe, even the farmerbot can ping the nodes statistics module to get the number of active deployments on a node and if it is extra on the farmer defined initial state it can be turned off
a very important note is that, the farmerbot is opt-in so I believe we will need a field extra on the Farm object for the farmerbot url/ip (that needs to be on a public IP or we can use a twinID to support using @muhamadazmy 's relay instead)
This has changed, the farmer bot will publish it's endpoint on a NATS server so the grid tools can lookup the farmerbot location on there and connect with it.
We could also support a RMB relay address once https://github.com/threefoldtech/tfchain/issues/569 is done.
Farmerbot
Tasklist
Description
The farmbot is an opt-in feature that can be run seperatly from the chain and zos.
On tfchain, power state and power target of the node will be added in order to let the farmerbot control the power state of it's nodes. The farmerbot can power down, power on nodes as it sees fit. The farmerbot should expose a method on it's actor to allow a user or tool to query the most optimal node in it's farm. It should try and match the workload with the current online / offline nodes and power on a node if it needs to accomodate a workload.
Proposed strategy for the farmerbot
There is a flow chart bellow.
Shutting down nodes
Waking up nodes periodically
TSClient jobs
Handeling jobs (aka bringing nodes up)
See more details