Skip to content

networkservicemesh/cmd-dashboard-backend

Repository files navigation

Network Service Mesh Dashboard Backend

NSM dashboard backend part provides graphical model data for the UI part through the REST API

Written in Go

The entire NSM dashboard deployment info see here

Usage

Environment config

  • NSM_PPROF_ENABLED - is pprof enabled (default: "false")
  • NSM_PPROF_LISTEN_ON - pprof URL to ListenAndServe (default: "localhost:6060")

Dev/debug

To run dashboard backend in the cluster:

  1. git clone git@github.com:networkservicemesh/deployments-k8s.git
  2. cd deployments-k8s/examples/observability/dashboard
  3. Edit dashboard-pod.yaml and remove the dashboard-ui container
  4. kubectl apply -f dashboard-pod.yaml
  5. kubectl apply -f dashboard-backend-service.yaml
  6. kubectl port-forward -n nsm-system service/dashboard-backend 3001:3001
  7. Check http://localhost:3001/nodes in the browser

To run dashboard backend with a custom container (Docker have to be installed) in the cluster:

  1. git clone git@github.com:networkservicemesh/cmd-dashboard-backend.git
  2. cd cmd-dashboard-backend
  3. Make the necessary code changes
  4. Create a Dockerhub repository
  5. docker build -t your-dh-namespace/dh-repo-name .
  6. docker push your-dh-namespace/dh-repo-name
  7. cd deployments-k8s/examples/observability/dashboard
  8. Edit dashboard-pod.yaml and set your Dockerhub image address for the dashboard-backend container
  9. Execute the steps 3-7 from the previous section