Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

add get node statistics endpoint #303

Merged
merged 2 commits into from
Mar 19, 2023
Merged

add get node statistics endpoint #303

merged 2 commits into from
Mar 19, 2023

Conversation

alichaddad
Copy link
Contributor

Description

Adds a new endpoint for getting node statistics which includes workloads and deployments

Changes

  • Added dependency on RMB client

  • Added three new arguments in app:

    • tfchain-url for the substrate client need for RMB client
    • relay-url for the RMB client
    • mnemonics that represents a user on the network responsible to making calls to the relay
  • Implemented new endpoint to get node statistics that contacts the node through the relay to get node statistics

Questions/Issues

  • Values file used for deployment for each network needs to be updated to configure the new arguments
  • Add MNEMONICS env variable to pipeline
  • How to a test to the new endpoint since it is dependent on contacting an outside component and current test uses dummy date to fill out the DB
  • domain and tlsEmail arguments are not configured as far as I can tell
  • RMB SDK dep is not a released version(need a release there first)

Related Issues

Issue

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings

Copy link
Contributor

@AbdelrahmanElawady AbdelrahmanElawady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. just a typo

@@ -383,20 +384,48 @@ func (a *App) version(r *http.Request) (interface{}, mw.Response) {
}, response
}

// getNodeStatistics godoc
// @Summary Show node statistics
// @Description Get node statisitcs for more information about each node through the RMB relay
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statisitcs -> statistics

@xmonader xmonader merged commit 0c2c735 into development Mar 19, 2023
@xmonader xmonader deleted the 546_num_deployments branch March 19, 2023 14:12
@xmonader
Copy link
Collaborator

xmonader commented Mar 19, 2023

and for your questions

Values file used for deployment for each network needs to be updated to configure the new arguments

I rushed merging, please add a follow up PR for what is needed

Add MNEMONICS env variable to pipeline

Need admin access on the repo?

How to a test to the new endpoint since it is dependent on contacting an outside component and current test uses dummy date to fill out the DB

I believe simply by issuing a get request on node statistics on the proxy and it should internally call the node on devnet

domain and tlsEmail arguments are not configured as far as I can tell

These are not used in the kubernetes deployment, ingress is handling the cert generation/tls, but they are there as a generic option for whenever the proxy is running isolated from kubernetes, in a VM for instance

RMB SDK dep is not a released version(need a release there first)

let's open an issue here https://github.com/threefoldtech/rmb-sdk-go, Azmy should indeed version the repo if not done already

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants