skycoin / skywire-testnet

Skywire Meshnet and VPN
https://skycoin.net/skywire
162 stars 63 forks source link

[mainnet-manager] Manager Node backend additions. #226

Open evanlinjin opened 5 years ago

evanlinjin commented 5 years ago

Description

This is a parent issue of multiple sub-issues/sub-PRs. This is provided here for a clear overview of tasks.

From @jdknives on Discord:

Below the functionality needed for the manager backend (given how the frontend works, and most of those functions make sense imo): :point_down: Backend:

  • health endpoint (or directly in nodes resource) to report status of the node
  • uptime
  • ip of the node (for labeling and easier debugging instead of reading long keys)
  • version (of the node software)
  • loops endpoint
  • login (password protection to serve the manager on the web) + logout endpoint
  • change password endpoint (dont let the user use other endpoints if he hasnt changed the default pw first)
  • log/output from apps
  • native apps dont have endpoints yet (for controlling ssh...), once they do, there could also be a history for last used startup parameters (like whitelist for ssh server, nodes for proxy)
  • old manager had a "connect to node" (proxy app) with list of all discovered nodes and their location (country)
  • terminal (security: https://github.com/skycoin/skywire/issues/71)
  • check for updates and update
  • reboot node
  • some help texts? ex. what is exit node toggle for...

Tasks

jdknives commented 5 years ago

@evanlinjin note that uptime only requires the time elapsed since the last connection to the discovery (ap4y suggested implementing uptime tracking in transport discvory). The total uptime is calculated by the monitor, although we could improve on that.

Could you elaborate on why you want to move the RPC implementation back to /pkg/node?

evanlinjin commented 5 years ago

@evanlinjin note that uptime only requires the time elapsed since the last connection to the discovery (ap4y suggested implementing uptime tracking in transport discvory). The total uptime is calculated by the monitor, although we could improve on that.

Could you elaborate on why you want to move the RPC implementation back to /pkg/node?

For the first point, it's the transport discovery right? I think we need to call it network-uptime otherwise it will be confused with how long the node software has been running.

For the second point, it makes more sense to have it there and leads to more confusion.

ap4y commented 5 years ago

small correction, I actually backtracked suggestion for using transport discovery for uptime, see issue 110 in the original repo. My idea was to use transports to track uptime, since they have statuses but as I mentioned in that issue it's not going to work. Having separate service makes the most for me but I think it was rejected as an idea.