linkerd2/web
Phil Calçado 709de5a7b0
Moves k8s and conduit client code to /pkg (#103)
* Rename constructor functions from MakeXyz to NewXyz

As it is more commonly used in the codebase

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Make Conduit client depend on KubernetesAPI

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Move Conduit client and k8s logic to standard go package dir for internal libs

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Move dependencies to /pkg

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Make conduit client more testable

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Remove unused config object

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Add more test cases for marhsalling

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Move client back to controller

Signed-off-by: Phil Calcado <phil@buoyant.io>

* Sort imports

Signed-off-by: Phil Calcado <phil@buoyant.io>
2018-01-04 10:10:10 -08:00
..
app Make TabbedMetricsTable in charge of fetching timeseries (#89) 2018-01-03 16:55:56 -08:00
srv Consolidate api calling from the UI; Start surfacing API errors (#65) 2017-12-21 15:18:35 -08:00
templates Remove namespace property from the Conduit web app (#10) 2017-12-08 15:38:04 -08:00
util/filesonly Introducing Conduit, the ultralight service mesh 2017-12-05 00:24:55 +00:00
Dockerfile update go-deps image 2017-12-05 01:17:38 +00:00
README.md Implement client-side version checking (#79) 2018-01-02 16:07:50 -08:00
main.go Moves k8s and conduit client code to /pkg (#103) 2018-01-04 10:10:10 -08:00

README.md

Conduit Dashboard

This is a React app. It uses webpack to bundle assets, and postcss to transform css.

The commands below assume that you're starting from the root of the repo.

First time setup

Install yarn and use it to install dependencies.

brew install yarn
cd web/app
yarn

Development

After pulling master:

If you just want to run the frontend:

cd web/app
yarn
yarn webpack
cd ..
go run main.go

The web server will be running on localhost:8084.

To develop with a webpack dev server, start the server in a separate window:

cd web/app
yarn webpack-dev-server

And then set the -webpack-dev-server flag when running the web server:

go run main.go -webpack-dev-server=http://localhost:8080

To add a JS dependency:

cd web/app
yarn add [dep]

Run docker-compose

You can also run all of the go apps in a docker-compose environment.

From the root of the repo, run:

docker-compose build
docker-compose up -d

If you want to develop on the web service locally, stop it first, then run it locally and set the -api-addr flag to the address of the public API server that's running in your docker environment:

docker-compose stop web
cd web
go run main.go -api-addr=localhost:8085

Run Web against a public API server in Kubernetes

If you are running the public API server in Kubernetes, forward localhost:8085 to the conduit controller pod:

POD_NAME=$(kubectl --namespace=conduit get po --selector=app=controller -o jsonpath='{.items[*].metadata.name}')
kubectl -n conduit port-forward $POD_NAME 8085:8085

Then connect the local web process to the forwarded port:

cd web
go run main.go -api-addr=localhost:8085

Testing

Golang unit tests

To run:

go test ./...

JS unit tests

To run:

cd web/app
yarn karma start