Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite the farmerbot in go #484

Closed
xmonader opened this issue Nov 14, 2023 · 6 comments
Closed

rewrite the farmerbot in go #484

xmonader opened this issue Nov 14, 2023 · 6 comments
Assignees
Labels
farmerbot type_feature New feature or request

Comments

@xmonader
Copy link
Contributor

there's a lot of instability in the v version combined with the instability in components + the requirement of having rmb-peer and http server exposing the sdk-ts functionality.

Rawda did some initial work on the a farmerbot version before in go, and it's time to revive, and revise it. Please also introduce simplification in the configurations format, toml or yaml should be very intuitive options ✌🏼

@rawdaGastan rawdaGastan self-assigned this Nov 15, 2023
@rawdaGastan rawdaGastan added farmerbot type_feature New feature or request labels Nov 15, 2023
@rawdaGastan
Copy link
Collaborator

v repo: https://github.com/threefoldtech/farmerbot
go repo: https://github.com/rawdaGastan/farmerbot

farmerbot:

we have 3 managers:

  1. node manager
  2. farm manager
  3. power manager

Jobs can be sent to the farmerbot using RMB

farm manager jobs:

  1. define: to define a new farm

node manager jobs:

  1. define: to define a new node
  2. fine_node: to find a node (returns a node ID)
- _has_gpus_ => if you require one or more gpus you can filter on that with this parameter (should be a positive value)
- _gpu_vendors_ => a list of strings that will be used to filter the nodes on gpu vendor (for example AMD)
- _gpu_devices_ => a list of strings that will be used to filter the nodes on gpu device (for example GTX 1080)
- _certified_ => whether or not you want a certified node (not adding this argument means you don't care whether you get a certified or non certified node)
- _public_config_ => whether or not you want a node with a public config (not adding this argument means you don't care whether or not the node has a public config)
- _public_ips_ => how much public ips you need
- _dedicated_ => whether you want a dedicated node (rent the full node)
- _node_exclude_ => the node ids you want to exclude in your search
- _required_hru_ => the amount of hru required in kilobytes (add suffix mb or gb to define the required resources in megabyte or gygabite)
- _required_sru_ => the amount of sru required in kilobytes (add suffix mb or gb to define the required resources in megabyte or gygabite)
- _required_mru_ => the amount of mru required in kilobytes (add suffix mb or gb to define the required resources in megabyte or gygabite)
- _required_cru_ => the amount of cru required

power manager jobs:

  1. power on: powers on a node
  2. power off: powers off a node
  3. configure: configures power
- wake_up_threshold => a value between 50 and 80 defining the threshold at which nodes will be powered on or off. If the usage percentage (total used resources devided by the total amount of resources) is greater then the threshold a new node will be powered on. In the other case the farmerbot will try to power off nodes if possible.
- periodic_wakeup => the time at which the periodic wakeups (powering on a node that is off) should happen. The offline nodes will be powered on sequentially with an interval of 5 minutes starting at the time defined in periodic_wakeup.
- periodic_wakeup_limit => by default only one node will be woken up every 5 minutes during a periodic wakeup. You can change that behavior by setting the periodic_wakeup_limit setting. 
  1. periodic_wakeup: turns the nodes on according to a configured wakeup time
  2. powermanagement: turns nodes on/off according to the resources usage and the configured threshold

@xmonader xmonader added this to 3.13.x Nov 15, 2023
@xmonader xmonader moved this to In Progress in 3.13.x Nov 15, 2023
@xmonader xmonader added this to the 1.0.0 milestone Nov 15, 2023
@muhamadazmy
Copy link
Member

It's not clear what those managers do in the comment above. Can we add link to docs.

each module need to define:

  • Role of operation, what does it's needed in general
  • Automated tasks the manager does (for example, a power manager does random wake ups)
  • Configuration
  • Requests that are handled by this manager
  • How it work with other managers.

For example above, it seems there is a farm manager job to define a new farm. I have no idea what that mean

@rawdaGastan
Copy link
Collaborator

@rawdaGastan
Copy link
Collaborator

  • testing in progress
  • getting farms/nodes from substrate in progress

@rawdaGastan
Copy link
Collaborator

Added:

  • testing the farmerbot using Brandon farm
  • added examples
  • sync config files updates

@rawdaGastan rawdaGastan moved this from In Progress to Pending review in 3.13.x Dec 4, 2023
@rawdaGastan rawdaGastan moved this from Pending review to In Verification in 3.13.x Dec 26, 2023
@rawdaGastan
Copy link
Collaborator

rawdaGastan commented Mar 3, 2024

@github-project-automation github-project-automation bot moved this from In Verification to Done in 3.13.x Mar 3, 2024
@rawdaGastan rawdaGastan modified the milestones: 1.0.0, v0.13.x - v0.14.x Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
farmerbot type_feature New feature or request
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants