Commit Graph

429 Commits

Author SHA1 Message Date
Risha Mars a977fb6b57
Add a link to the Tap page in the sidebar (#1412)
Reenable tap from the sidebar
2018-08-07 14:44:16 -07:00
Risha Mars 5d01779dc0
Tap Web UI: add autocomplete for some authorities (#1409)
Problem:
Currently the web UI's resource autocomplete also lists authorities. 
However you can't tap authorities in this way, you have to use --authority 
in addition to whatever resource you're trying to tap. 
The web UI is confusing as it presents authorities in that list. 
Those authorities should instead be moved to the Authority box in the advanced filter form.

Solution:
* Don't present authorities as options in the Resource dropdowns
* Add authority autocomplete to authority form input

Follow up to @kl in #1391 there is an error when we try to tap an authority
2018-08-07 14:29:02 -07:00
Risha Mars 511549e16d
Add client-side filters to the tap columns in the web UI (#1398)
Add client side filtering to the tap table, so that we can narrow down 
queries while still tapping a whole resource. 

There are two general kinds of filters here:
- filters where the number of possible values is bounded/small and 
we know them (e.g. inbound/outbound, grpc status). here, I've tried to 
hardcode the list of possible options with explanations (see the GRPC status filters)
- filters where the number of possible values can be very large (e.g. paths)
here, I've generated the list of options as we process the incoming data. 
I also periodically delete the oldest filter option so the list of filters 
doesn't grow unbounded

Filters added:
- GRPC status code filters
- http status filters
- path filters
- scheme filters
- tls, destination and source filters
2018-08-06 12:31:10 -07:00
Risha Mars 0e6c0a2f3b
Tap: Make use of the Web UI to render tap events in a table (#1391)
* Make use of the Web UI to render tap events in a table

- Return JSON tap events instead of the command line output
- Experiment with a different way of rendering the EventList
- changed the default width back to 100% of the screen because this 
table does not look great squished
2018-08-03 13:45:04 -07:00
Kevin Lingerfelt f70ad7de11
Use stable version for linkerd2-proxy-api dep (#1400)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-03 11:59:42 -07:00
Sean McArthur c035193313
add H2 protocol to destination addrs if managed by linkerd (#1380)
Signed-off-by: Sean McArthur <sean@buoyant.io>
2018-08-03 10:14:30 -07:00
Risha Mars fef896011f Add more filters to the web UI tap form (#1371)
* Update ant to 3.7.2
* Add autocomplete of namespaces/resources to Tap in web ui
  * Add form fields for authority/path/method/rps/scheme
  * Add the ability to clear error messages to the error banner
* Add error listener to ws object
2018-07-31 15:48:53 -07:00
Kevin Lingerfelt 8fe9e53f67
Remove remaining conduit references in codebase (#1381)
* Remove remaining conduit references in codebase
* Shorten emojivoto config url

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-31 11:19:34 -07:00
Kevin Lingerfelt c362d5e114
Update k8s.io dependencies to 1.11.1 (#1369)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-27 15:23:03 -07:00
Brian Smith 2098beb123
Don't relink web & controller executables when version changes. (#1338)
Speed up incremental rebuilds by avoiding relinking the controller
and/or web executables when changes are made to unrelated files.
Before this change, any time the git tag changed, the executables
would have to be rebuilt (relinked at least), even if no Go files
changed.

Validated by running the integration tests.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-07-26 16:20:36 -10:00
Kevin Lingerfelt dae86da0e4
Allow docker-build-proxy to override the proxy version (#1324)
* Allow docker-build-proxy to override the proxy version
* Update based on review feedback
* fetch-proxy should return full path to executable

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-26 10:10:49 -07:00
Kevin Lingerfelt 51848230a0
Send glog logs to stderr by default (#1367)
* Send glog logs to stderr by default
* Factor out more shared flag parsing code

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-25 12:59:24 -07:00
Risha Mars ec3c861743
Enable Tap from the Web UI (#1356)
Adds a tap endpoint in the web api that communicates with the dashboard 
via websockets.
I've moved a bunch of code from the cli tap.go into utils so that the code 
can be shared between web and CLI. I think we should consider making the 
display more suited to web, but in the short term, reusing the CLI's 
rendering of tap events works.

Adds a Tap page in the Web UI that you can use to make tap requests. 
The form currently only allows you to enter a resource and namespace, 
other filters coming in a follow-up branch.
2018-07-24 14:23:42 -04:00
Kevin Lingerfelt 4b9700933a
Update prometheus labels to match k8s resource names (#1355)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-23 15:45:05 -07:00
Risha Mars 9821b97326
Delete remaining conduit logo; add linkerd favicon (#1343)
- Remove a conduit image from our img folder
- Add a linkerd favicon, should no longer get the favicon not found console error
- Configure webpack to not hash image names
2018-07-18 17:27:57 -07:00
Franziska von der Goltz 829371bc06
add application topology graph to namespace tab (#1110)
* This commit adds an application topology graph within the namespace tab. As a developer / operator one would like to see an overview of the services running to identify dependencies. Adding this graph gives Linkerd2 users a good overview of service dependencies.
* networkgraphtest added

Fixes: #924

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-07-18 17:10:15 -07:00
Brian Smith 0fcfd2bffb
Stop using `installsuffix` when building Go code. (#1327)
* Stop using `installsuffix` when building Go code.

See https://plus.google.com/117192131596509381660/posts/eNnNePihYnK.
`-installsuffix cgo` isn't necessary as of Go 1.10 (where build caching
changed substantially) and it probably wasn't necessary earlier.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-07-16 13:48:50 -10:00
Franziska von der Goltz c7ac072acc
update grafana dashboards: conduit to linkerd (#1320)
* update grafana dashboards to remove conduit reference and replace with linkerd instances
* update test install fixtures to reflect changes

Fixes: #1315

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-07-16 13:05:01 -07:00
Kevin Lingerfelt e5cce1abaf
Rename CLI from conduit to linkerd (#1312)
* Rename CLI binary
* Update integration tests for new binary name
* Rename --conduit-namespace flag, change default ns
* Rename occurrences of conduit in rest of CLI
* Rename inject and install components
* Remove conduit occurrences in docker files
* Additional miscellaneous cleanup
* Move protobuf definitions to linkerd2 package
* Rename conduit.io labels to use linkerd.io
* Rename conduit-managed segment to linkerd-managed
* Fix conduit references in web project

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-12 17:14:07 -07:00
Risha Mars 0c2ea20a7e
Fix annoying flickering if image asset isn't present (#1305) 2018-07-12 11:51:41 -07:00
Risha Mars cf0ee70689
Continue to remove conduit branding from /web (#1290)
This PR adjusts the colour of a popup in the sidebar, as well as removes 
references to conduit in the frontend test fixtures.

All that's left in the Web UI code now is a few references to the conduit sites / githubs, 
as well as the CLI name.

* Remove a touch of conduit blue from the sidebar popup
* Remove minor references to conduit throughout the web code
* Fully colour the sidebar in new bg colour
2018-07-10 17:57:27 -07:00
Oliver Gould 941cad4a9c
Migrate build infrastructure to linkerd2 (#1298)
This PR begins to migrate Conduit to Linkerd2:
* The proxy has been completely removed from this repo, and is now located at
  github.com/linkerd/linkerd2-proxy.
* A `Dockerfile-proxy` has been added to fetch the most-recently published proxy
  binary from build.l5d.io.
* Proxy-specific protobuf bindings have been moved to
  github.com/linkerd/linkerd2-proxy-api.
* All docker images now use the gcr.io/linkerd-io registry.
* `inject` now uses `LINKERD2_PROXY_` environment variables
* Go paths have been updated to reflect the new (future) repo location.
2018-07-09 15:38:38 -07:00
Risha Mars 219b017c28
Change sidebar branding from Conduit to Linkerd (#1262)
Use Linkerd branding in the sidebar.

This PR deals with visuals only. See #1260 for word changes.
2018-07-05 18:24:32 -07:00
Kevin Lingerfelt 693acdbf26
Update ListPods endpoint to return all pod owner types (#1275)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-05 15:14:16 -07:00
Risha Mars 372e145fea
Start removing references to conduit in the web UI (#1260)
This PR starts removing all references to the word "Conduit" in the web UI.
In the interest of not making huge changes all at once, I'll gradually start moving away
from the usage of "conduit" in the Web UI. For example, there are a lot of components that
have conduit in their names but they don't need to.

This branch is mostly component / variable names. There should be no visible changes except 
the spinner is no longer a Conduit spinner.

See #1262 for visible branding changes.

- Rename ConduitLink to PrefixedLink
- Remove ConduitSpinner in favour of antd.Spin
- Remove css classnames that are conduit- centered
- Parameterize the current Product Name so that it's easier to change in the future

Tracking ticket: linkerd/linkerd#2018
2018-07-05 15:07:51 -07:00
Risha Mars ba2e13c731
Small tweaks to error modal, add Reason to api error response (#1246)
- Add Reason to the error data passed from the api
- Rewrite error logic in the UI to try to make it clearer
- Show 0/0 pods meshed instead of 0/0 pods meshed (N/A) if 0 pods are meshed
2018-07-03 17:14:27 -07:00
Risha Mars 83b982b25a
Change CLI and web TLS indicators from Secured to TLS (#1247)
Previously, we had "Secured" columns in the web and CLI for the percentage of traffic 
that is TLSed. Change this to "TLS"
2018-07-03 10:51:38 -07:00
Brian Smith 252a8d39d3
Generate an ephemeral CA at startup that distributes TLS credentials (#1245)
Create a ephemeral, in-memory TLS certificate authority and integrate it into the certificate distributor.

Remove the re-creation of deleted ConfigMaps; this will be added back later in #1248.

Signed-off-by: Brian Smith brian@briansmith.org
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-02 18:09:31 -10:00
Risha Mars 5ed7fc563c
Add controller component pod uptimes to the ServiceMesh page (#1205)
- Return pod uptimes from the GetPods endpoint
- Adds filtering by namespace to api.GetPods
- Adds a --namespace filter to conduit get pods
- Adds pod uptimes to the controller component toolitps on the ServiceMesh page
- Moves the ServiceMesh page back to using /api/pods
2018-06-28 15:42:00 -07:00
Risha Mars 5963b2ac24
Better format empty errors (#1202) 2018-06-28 14:52:04 -07:00
Risha Mars 68586fe697
Add the ability to query stats by authority (#1181)
Adds the ability to query by a new non-kubernetes resource type, "authorities",
in the StatSummary api.

This includes an extensive refactor of stat_summary.go to deal with non-kubernetes 
resource types.

- Add documentation to Resource in the public api so we can use it for authority
- Handle non-k8s resource requests in the StatSummary endpoint
- Rewrite stat summary fetching and parsing to handle non-k8s resources
- keys stat summary metric handling by Resource instead of a generated string
- Adds authority to the CLI
- Adds /authorities to the Web UI
- Adds some more stat integration and unit tests
2018-06-28 14:31:44 -07:00
Risha Mars 15718de2de
Change the icon for Documentation in the sidebar (#1211) 2018-06-26 17:00:21 -07:00
Risha Mars 269714ab35
Re-add sidebar links to individual resource pages (#1191)
Add Sidebar links to Pods, Deployments, and Replication Controllers

In #1016 we removed the sidebar links to individual resource pages in favour of a namespace
page that lists all resources. These resource pages require no additional code so they're still 
in our UI (accessible under /pods, /deployments etc), just not easily findable. I find them 
useful to check when in development mode, or when debugging something, so I'd like to 
re-add links.

If we don't want them in permanently, we can gate them behind `NODE_ENV=development`
2018-06-25 14:37:16 -07:00
Kevin Lingerfelt 12f869e7fc
Add CA certificate bundle distributor to conduit install (#675)
* Add CA certificate bundle distributor to conduit install
* Update ca-distributor to use shared informers
* Only install CA distributor when --enable-tls flag is set
* Only copy CA bundle into namespaces where inject pods have the same controller
* Update API config to only watch pods and configmaps
* Address review feedback

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-21 13:12:21 -07:00
Kevin Lingerfelt 682b0274b5
Add controller admin servers and readiness probes (#1168)
* Add controller admin servers and readiness probes
* Tweak readiness probes to be more sane
* Refactor based on review feedback

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-20 17:32:44 -07:00
Risha Mars 0ff1bb4ad8
Don't allow stat requests for named resources in --all-namespaces (#1163)
Don't allow the CLI or Web UI to request named resources if --all-namespaces is used.

This follows kubectl, which also does not allow requesting named resources
over all namespaces.

This PR also updates the Web API's behaviour to be in line with the CLI's. 
Both will now default to the default namespace if no namespace is specified.
2018-06-20 12:59:31 -07:00
Risha Mars 8c9119dad2
Truncate very long error messages, small tweaks to error messages (#1150)
- If error messages are very long, truncate them and display a toggle to show the full message
- Tweak the headings - remove Pod, Container and Image - instead show them as titles
- Also move over from using Ant's Modal.method to the plain Modal component, which is a 
little simpler to hook into our other renders.
2018-06-19 13:58:38 -07:00
Risha Mars df0bab80b4
Upgrade to webpack 4 and webpack-dev-server 3 (#1138)
Speeds up performance of webpack-dev-server.
2018-06-18 14:38:38 -07:00
Risha Mars 0ed40288e5
Display proxy container errors in the Web UI (#1130)
* Display proxy container errors in the Web UI

Add an error modal to display pod errors
Add icon to data tables to indicate errors are present
Display errors on the Service Mesh Overview Page and all the resource pages
2018-06-15 14:12:36 -07:00
Risha Mars 72415d173e
Allow webpack to compile on lint error (#1104)
Add an emitWarning to the webpack config so that webpack will compile despite lint 
errors when running in development mode. This is necessary to enable development 
on the frontend using webpack-dev-server's automatic reloading.

Also sets a NODE_ENV in travis.yml so that the build will fail if linting fails.
2018-06-14 11:26:59 -07:00
Kevin Lingerfelt 9f1df963e9
Move controller/util and web/util packages to pkg (#1109)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-13 11:25:56 -07:00
Kevin Lingerfelt b6d429e80d
dst svc: use shared informer instead of custom endpoints informer (#1079)
* Update destination service ot use shared informer instead of custom endpoints informer
* Add additional tests for dst svc endpoints watcher
* Remove service ports when all listeners unsubscribed
* Update go deps

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-13 11:11:57 -07:00
Risha Mars ea01378090
Upgrade enzyme-context-patch to its latest version (#1108)
https://www.npmjs.com/package/enzyme-context-patch

This is a temporary fix until enzyme releases with the fix for
Error: Enzyme Internal Error: unknown node with tag 12
2018-06-12 12:38:39 -07:00
Kevin Lingerfelt 6e66f6d662
Rename Lister to API and expose informers as well as listers (#1072)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-12 10:27:55 -07:00
Thomas Rampelberg c3dc20d64f
Move from /api/stat to /api/tps-reports (#1105)
Common blacklists have `/api/stat` in them. This causes the dashboard to not load.

`/api/tps-reports` is not in any blacklists, suggests what this route does and is slightly tongue in cheek. Fixes #970
2018-06-11 16:39:00 -07:00
Thomas Rampelberg 33ed167616
Display font-awesome icons no matter what URL is originally loaded (#1078)
* Display font-awesome icons no matter what URL is originally loaded

The URLs in the dashboard need to be relative. Unfortunately, this means that if
you load something that isn't the base route ... font-awesome icons look broken.

There's no real way to solve this from within webpack (or the web server without
some work). Instead, just load font-awesome from a CDN as there's no real
benefit we get from including it in the bundle. Fixes #1019.

* Moving font-awesome to styles
2018-06-07 15:37:35 -07:00
Kevin Lingerfelt 4584637920
Upgrade web docker build base image to node:10 (#1068)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-05 11:52:01 -07:00
Risha Mars d5f684542a
Upgrade some of our postcss deps to their latest versions (#1059) 2018-06-04 17:28:07 -07:00
Kevin Lingerfelt ec2433e9bd
Update controller to use 'tls' metric label (#1044)
* Update controller to use 'tls' metric label
* Fix meshed column formatter

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-06-01 16:44:33 -07:00
Kevin Lingerfelt 8b519fb92f
web: Update service mesh overview to include grafana (#1049)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-05-31 14:51:42 -07:00
Kevin Lingerfelt f344421dbd
Web: remove ns column from tables on individual ns page (#1043)
* Web: remove ns column from tables on individual ns page
* Add prop types and tests for MetricsTable component

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-05-31 14:07:33 -07:00
Thomas Rampelberg 1bcd428680
Add propType validation (#993)
* Add propType validation

When refactoring components, it is hard to know what is required and isn't.

Adds propTypes to the existing components and enables eslint errors for anything
moving forward. This should keep us documenting the API for components.

* Remove extra newline
2018-05-30 17:26:05 -07:00
Kevin Lingerfelt 423a073930
Update eslint config to extend more default rules (#1035)
* Update eslint config to extend more default rules
* react/no-unused-state rule doesn't recognize _.pick(this.state, ...)

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-05-29 18:23:13 -07:00
Kim Christensen 8cc6eea6a5 Don't show namespace filter on the namespace page (#1026)
On the individual namespace pages, the filter should not be shown, as all results that appear on the that page will be for on namespace.

Added a boolean property, showNamespaceFilter, to MetricsTable that allows you to define if the filter should be shown.

Tested that the filter is not shown on namespace pages.

Fixes #972

Signed-off-by: Kim Christensen <kimworking@gmail.com>
2018-05-29 17:23:49 -07:00
Thomas Rampelberg 6386b832a6
Wrap withREST in context for api reference (#1036)
As part of the HOC + Context merges, ResourceList missed out on the api injection and errors out on the Namespaces tab.

Wrap the returned HOC in `withContext` to make sure it is there, no matter where it is in the tree. (Fixes #1034)
2018-05-29 17:11:40 -07:00
Thomas Rampelberg 3f6514431c
Add a HOC for the REST API tooling (#989)
* Add a HOC for the REST API tooling

We're copying and duplicating logic all over the place with components that need to talk to the API.

Moves most of the REST API tooling into a HOC that can be used by other components. Now, a component can use `withREST`, pass in the promises that it would like resolved and receive the responses as props.

* Show PageHeader whether there's an error or not

* Hiding page header during loading

* Test updates to work with namespace restructuring
2018-05-29 09:56:49 -07:00
Risha Mars 87cfd2f7c4
Remove RC/Pods/Deploys from the sidebar, replace with namespaces (#1016)
In an effort to highlight the namespace overview pages, remove the Deployments, 
Replication Controllers and Pods items from the sidebar and replace them with direct 
links to individual Namespace pages. If the user has more than 8 namespaces, only 
list the first 8 (the rest can be accessed by the namespace list page).

The Deployments/RCs/Pods endpoints are still available if you go directly to 
/deployments, /pods, etc. but they're not highlighted to the user.
2018-05-25 14:57:40 -07:00
Risha Mars d095ea7834
Show kube-* stats in the web UI, tweaks to no resources appearance (#1007)
Previously, we would filter out stats coming from Conduit itself and from the kube-* 
namespaces on some views in the Web UI. Remove this filtering, so that we display 
all the resource information we get back from the Stat API. (Fixes #997)

On the Resource pages, the call to action would show up when there were no 
metrics present, but that's actually not actionable by the user. Instead, I'm 
going to show a blank table with a "no s detected" message.

* Remove special-case filtering out of kube-* namespaces, and conduit namespaces
* Remove the call to action for no metrics
* Linkify the namespace column for the resource pages
2018-05-25 10:44:23 -07:00
Thomas Rampelberg 15d3c1fbc4
Add an app-wide context for global props. (#949)
* Add an app-wide context for global props.

We've been passing the `api` object down from the top of the react tree. With
16.x, there's now the ability to have context that can inject anywhere in the
tree. This creates a top level context provider that contains most of the global
variables we've been using (api, appData, ...). It subsequently cleans up some
of the routes and nested components.

- Bumps `react-dom` to 16.3.2 (to match `react`).
- Adds `enzyme-context-patch` for now. This is fixed in enzyme master, but there
  has not been a release yet. Needs to be removed when that is fixed.

* Use a default inside appData for controllerNamespace

* Update syntax of if to use curly brackets
2018-05-24 11:09:02 -07:00
Risha Mars ffabdefc6c
Add queries to prometheus to determine number of fully meshed requests (#983)
- Update the `response_total` prometheus query of the StatSummary endpoint to also
break queries out by a `meshed` label. 
- Add a 'Secured' column to the web UI/CLI stat displays, which indicate the percentage of traffic
starting and ending in the mesh

This meshed label is used in the CLI/Web UI to display a column of the percentage of traffic that
starts/ends in the mesh. (Which is a proxy indicator for whether that traffic is 'secured' when we
add TLS by default for intra mesh requests).

The `meshed` label is not yet added anywhere, so until it is supplied by the proxy, all traffic will
show up as 0% secured in the web/CLI.
2018-05-24 11:05:09 -07:00
Thomas Rampelberg c5f0adafc8
Update babel to use `env` and `react-app` as presets. (#976)
- Switched from `es2015` to `env` for the default preset. This is the recommended preset and allows us to track the latest and greatest moving forward.
- Added `react-app` as a preset. We get class properties (and thus => for context) as well as the current recommended settings for react apps.
- Created a `web` script that provides functions for common tasks. `react-app` requires that BABEL_ENV/NODE_ENV is set and this guarantees it.
- Updated the web dockerfile to set NODE_ENV correctly and use `bin/web`.
- Moved the babel related modules over to devDependencies.
2018-05-22 17:17:44 -07:00
Thomas Rampelberg 55d7228959
Enable cheap source-map by default (#977)
Debugging issues in the dashboard is a little frustrating without source maps and the full source map takes awhile to build.

Just enables one of the cheaper source maps by default. It is good enough (tm) for what is there now.
2018-05-22 07:39:18 -07:00
Risha Mars b078a27a82
Consolidate calls to /metrics to use the new resource type all (#963)
This PR modifies the Namespace page in the web UI to replace the 3 existing api calls 
with a single call.

* Consolidate calls to /metrics to use the new resource type all
* Simplify urlsForResource, add comment with assumptions
2018-05-21 10:38:49 -07:00
Kevin Lingerfelt 36ec391dbe
Go: update k8s dependencies to 1.10.2 (#962)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-05-17 15:46:58 -07:00
Risha Mars 1464470487
Include path prefix in location of js asset bundle (#959)
Problem
If you navigate directly to (or do a hard refresh on) a path with more than one segment, 
e.g. http://localhost:8084/namespaces/conduit, the dashboard js is not served. 
Pages with two paths have to be accessed by loading the dashboard on a different 
path and then clicking through.

When accessing the dashboard via conduit dashboard we append a path prefix so that 
we can connect using the k8s proxy. This means that moving the dashboard to serve 
images off relative paths won't work, because we need to serve images whether the 
dashboard is loaded from http://localhost:8084/namespaces/conduit or 
from http://localhost:8084/namespaces. 

Solution
Check whether we're serving the dashboard with the proxy url, and if we are, adjust
the url at which we serve the index bundle from.
I've also added a very manual override if the conduit logo can't be found at the usual url.
2018-05-16 15:41:50 -07:00
Risha Mars 12b520a55d
Use menu links correctly (don't repeat icon and text links) (#953)
This enables the removal of the inline-block display for links and
fixes menu items not showing up when sidebar is expanded on firefox

Problem
Previously we were linking the icon and expand text of the menu bar separately. 
This caused the clickable areas of the menus to be inconsistent, which we were 
fixing via css. This wasn't consistently displayed across browsers.

Fix
Linkify the whole Menu Item rather than linking the icon and text separately.
This enables the removal of the inline-block display for links and
fixes menu items not showing up when sidebar is expanded on firefox.
Additionally it makes the clicking of menu links way more consistent.
2018-05-14 18:11:12 -07:00
Kim Christensen bcc4f9ec94 Optimize frontend assets to improve load times (#378) (#945)
The frontend assets was not optimized, resulting in suboptimal page load times.

Enabled webpack production mode in the Dockerfile, this still allows good development
and debugging experience when running the web interface locally during development.
Also added minification of the CSS handled by css-loader.

The web interface still works as expected.
The size of the JS file has been reduced from 3.6 MB to 1.2 MB.
And the CSS minification has resulted in sidebar.css from 5.71 kB to 4.33 kb,
and styles.css from 4.18 kB to 3.1 kB.

Fixes #378

Signed-off-by: Kim Christensen <kimworking@gmail.com>
2018-05-14 16:16:23 -07:00
Risha Mars 8cf5f45a58
Upgrade React to 16.3.2 (#927) 2018-05-10 15:15:29 -07:00
Risha Mars 1eb9e15f4a
Start polling for new resource type immediately after switching tabs (#926)
* Fix issue where we were waiting for the next polling interval when switching tabs

Fix issue where we were waiting for the next polling interval when switching tabs.
When we switch tabs, we update the Props of the ResourceList component, but we weren't
resetting how we poll the server. This meant we'd wait until the end of the current polling interval
(2s) to get the data for the tab we just switched to.

I've added stopServerPolling and startServerPolling methods so that we can cancel the resource
requests of the page we're leaving and immediately start polling for new data if the resource type
changes.
2018-05-10 15:14:59 -07:00
Oliver Gould a786089fd6
docker: Cache versionless builds before building versioned go binaries (#921)
The way that git-related version information is linked into go binaries
busts Docker's cache such that every commit causes all binaries to
rebuilt.

In order to ameliorate this, we can build each binary once without
version information first so that its artifacts are cached. When Go
sources are not changed and only the version information changes, builds
are 4.3x faster than before (from 5+ minutes to <90s).

On `master`

Branch off of master and build (mostly cached):

```
:; time DOCKER_TRACE=1 bin/docker-build
...
DOCKER_TRACE=1 bin/docker-build  9.10s user 6.30s system 5% cpu 4:26.47 total
```

Rebuild without changing anything (highly cached):

```
:; time DOCKER_TRACE=1 bin/docker-build
...
DOCKER_TRACE=1 bin/docker-build  9.23s user 6.04s system 47% cpu 32.017 total
```

Update only the git sha and rebuild:

```
:; git ci -am 'bump it' --allow-empty
[ver/eg 2749eb3] bump it
:; time DOCKER_TRACE=1 bin/docker-build
...
DOCKER_TRACE=1 bin/docker-build  8.55s user 6.08s system 4% cpu 5:22.25 total
```

On this branch:

Rebuild without changing anything (highly cached):

```
:; time DOCKER_TRACE=1 bin/docker-build
...
DOCKER_TRACE=1 bin/docker-build  8.94s user 5.97s system 46% cpu 32.257 total
```

Update only the git sha and rebuild:

```
:; git ci -am 'bump it' --allow-empty
[ver/go-docker-cache-versionless 77a80b5] bump it
:; time DOCKER_TRACE=1 bin/docker-build
...
DOCKER_TRACE=1 bin/docker-build-cli-bin  2.02s user 1.34s system 9% cpu 34.144 total
```
2018-05-10 10:22:09 -07:00
Risha Mars 0431193e94
Indicate failed pods in ServiceMesh page (#914)
* Turn the status bars red if there exist failed pods in the namespace
* Also use failed pods in conduit component table

Now that the API returns the number of failed pods, use this info to indicate failed pods in 
the ServiceMesh page. 
The bars will turn red if there are any failed pods present in the namespace. 
They'll be green if they have non-zero pods meshed, and grey otherwise.
2018-05-09 10:22:45 -07:00
Risha Mars 1b0f269a43
Add per namespace pages that show all resource stats for a namespace (#893)
Add namespaces as a top level resource in the Web UI

This PR does the following:
- Replace the deployments table in the service mesh page with namespaces
- Add a Namespaces index page that lists all namespaces and their stats
- Add an individual namespace page showing all resources for that namespace
- Make the incomplete mesh message more generic to any resource type
- Revamp rest of service mesh page to move off ListPods
2018-05-08 14:05:16 -07:00
Risha Mars 0f7d98067d
Make the sidebar icon based and collapsed by default (#897)
Make the sidebar icon based and collapsed by default

I had to move the call to version check into the sidebar component, indicator 
when the sidebar was minimized if there was a conduit update.

Currently I just have letters representing the icons for Deployments, RCs and Pods, 
but we can change this in the future.
2018-05-08 12:30:05 -07:00
Risha Mars f94856e489
Modify the Stat endpoint to also return the number of failed conduit pods (#895)
* Modify the Stat endpoint to also return the count of failed pods
* Add comments explaining pod count stats
* Rename total pod count to running pod count

This is to support the service mesh overview page, as I'd like to include an indicator of
failed pods there.
2018-05-08 10:35:21 -07:00
Risha Mars a2321a1802
Remove repetitive code in dashboard - web UI (#871)
* Rename PodOwnerList.jsx to ResourceList.jsx

* Delete PodsList.jsx
2018-04-30 13:37:09 -07:00
Risha Mars 84d131b6b0
Add a filter to the namespace column in the web UI (#866)
Enables filtering by one or more namespaces. Table updates are prevented
when the filter menu is open, as table updates will rerender the menu,
unselecting anything the user has selected but not confirmed.
2018-04-30 10:18:47 -07:00
Risha Mars f85dab8937
Upgrade antd to 3.4.3 (#855) 2018-04-26 16:35:42 -07:00
Risha Mars 4661aaf30d
Add a namespace column to the metrics tables (#854)
* Add a namespace column to the metrics tables, support long resource names

* Add a test for GrafanaLink

* Change the PodList.jsx component to not use the ListPods api
2018-04-26 16:34:59 -07:00
Risha Mars cd8c53ca2d
Remove the deployment search bar from the sidebar (#853)
We removed individual Deployment pages a while ago, but left the autocomplete search bar in. Clicking on searches goes to a 404 because we don't have /deployment any more.

This will be revisited in the future with direct links to grafana dashboards to all the 
resources we support.
2018-04-25 16:28:54 -07:00
Risha Mars fbacdd8a05
Add a Replication Controllers page in the Web UI (#850)
* Add a Replication Controllers page in the Web UI


@siggy pointed out that we don't need to use the PodsList api any more, since the new stats endpoint (#671) includes meshedPodCount and totalPodCount, which is all we need to determine whether the deployment/rc has been added to the mesh (which is what we were using ListPods to determine).

This PR modifies deployments to not use the pods api any more, and adds a Replication Controllers page. This page is quite similar to the Deployments page in logic, so I've made a PodOwnersList component to share the code.

I haven't added Replication Controllers to the Service Mesh page yet, because that page does require a list of component pods. Also, we don't need the calls to Prometheus for the Service Mesh page, so I don't want to use the existing stat apis for it. I figure that is a large enough change for a separate PR.
2018-04-25 15:01:06 -07:00
Brian Smith c5d2dab8bd
Remove special support for ExternalName services (#764)
After this was implemented we found that ExternalName services are
represented in DNS as CNAMEs, which means that the proxy's DNS
fallback logic can be used instead of doing DNS in the control
plane. Besides simplifying the controller, this will also increase
fidelity with the proxied pods' DNS configuration (improve
transparency).

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-04-25 11:53:33 -10:00
Andrew Seigner dce31b888f
Deprecate Tap, rename TapByResource to Tap (#844)
The `conduit tap` command is now deprecated.

Replace `conduit tap` with `connduit tapByResource`. Rename tapByResource
to tap. The underlying protobuf for tap remains, the tap gRPC endpoint now
returns Unimplemented.

Fixes #804

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-25 12:24:46 -07:00
Andrew Seigner a0a9a42e23
Implement Public API and Tap on top of Lister (#835)
public-api and and tap were both using their own implementations of
the Kubernetes Informer/Lister APIs.

This change factors out all Informer/Lister usage into the Lister
module. This also introduces a new `Lister.GetObjects` method.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-24 18:10:48 -07:00
Andrew Seigner baf4ea1a5a
Implement TapByResource in Tap Service (#827)
The TapByResource endpoint was previously a stub.

Implement end-to-end tapByResource functionality, with support for
specifying any kubernetes resource(s) as target and destination.

Fixes #803, #49

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-23 16:13:26 -07:00
Andrew Seigner 1e4ac8fda8
Destination service provides pod-template-hash (#784)
The Destination service does not provide ReplicaSet information to the
proxy.

The `pod-template-hash` label approximates selecting over all pods in a
ReplicaSet or ReplicationController. Modify the Destination service to
provide this label to the proxy.

Relates to #508 and #741

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-18 14:41:27 -07:00
Kevin Lingerfelt 71a51afb40
Expose pod stats in CLI, web UI, and Grafana (#788)
* Expose pod stats in CLI, web UI, and Grafana
* Fix js api helpers test
* Add outbound traffic stats to pod dashboard

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-18 11:26:47 -07:00
Andrew Seigner 727521f914
Permit arbitrary time windows in public-api (#774)
The public-api previously only permitted 4 hard-coded time windows:
10s, 1m, 10m, 1h. This was primarily a relic of the recently removed
telemetry system.

Modify the public-api to validate the time string, but allow for any
window size, which is then passed through to Prometheus.

Fixes #686

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-16 17:37:17 -07:00
Andrew Seigner 77fb6d3709
Add namespace as a resource type in public-api (#760)
* Add namespace as a resource type in public-api

The cli and public-api only supported deployments as a resource type.

This change adds support for namespace as a resource type in the cli and
public-api. This also change includes:
- cli statsummary now prints `-`'s when objects are not in the mesh
- cli statsummary prints `No resources found.` when applicable
- removed `out-` from cli statsummary flags, and analagous proto changes
- switched public-api to use native prometheus label types
- misc error handling and logging fixes

Part of #627

Signed-off-by: Andrew Seigner <siggy@buoyant.io>

* Refactor filter and groupby label formulation

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Rename stat_summary.go to stat.go in cli

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Update rbac privileges for namespace stats

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-13 16:53:01 -07:00
Andrew Seigner 21886760c6
Use apps/v1beta2 for Kubernetes 1.8 compatibility (#762)
Conduit was relying on apps/v1 to Deployment and ReplicaSet APIs.
apps/v1 is not available on Kubernetes 1.8. This prevented the
public-api from starting.

Switch Conduit to use apps/v1beta2. Also increase the Kubernetes API
cache sync timeout from 10 to 60 seconds, as it was taking 11 seconds on
a test cluster.

Fixes #761

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-13 12:08:16 -07:00
Kevin Lingerfelt fb15fe7c1a
Remove the telemetry service (#757)
* Remove the telemetry service

The telemetry service is no longer needed, now that prometheus scrapes
metrics directly from proxies, and the public-api talks directly to
prometheus. In this branch I'm removing the service itself as well as
all of the telemetry protobuf, and updating the conduit install command
to no longer install the service. I'm also removing the old version of
the stat command, which required the telemetry service, and renaming the
statsummary command to stat.

* Fix time window tests

* Remove deprecated controller scrape config

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-13 11:21:29 -07:00
Kevin Lingerfelt 37434d048a
Update web component to use new stat api (#753)
* Update web component to use new stat api
* Address review feedback
* Add external link icon

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-12 17:35:03 -07:00
Andrew Seigner 259fdcd134
Add latency stats in new stat summary endpoint (#737)
The new StatSummary endpoint was only providing request volume and
successs rate information.

Add support for retrieving latency stats via StatSummary. Also make
all prometheus calls in parallel, and implement kubernetes test
fixtures.

Fixes #681

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-11 11:58:32 -07:00
Kevin Lingerfelt 91c359e612
Switch public API to use cached k8s resources (#724)
* Switch public API to use cached k8s resources
* Move shared informer code to separate goroutine
* Fix spelling issue

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-04-10 11:39:31 -07:00
Andrew Seigner b6bcdcc059
Namespace-aware Grafana dashboards (#716)
The Grafana dashboards key off of deployment, but had no awareness of
namespaces, causing incorrect metrics aggregation and display.

This change makes the Grafana dashboards key off of namespaces, and also
modifies the Grafana links in the Conduit dashboard to link to
namespace+deployment.

Fixes #704
Part of #420

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-06 15:37:53 -07:00
Andrew Seigner 50c323c617
Use canonical k8s names, fix prom labels (#702)
The new statsummary command accepted friendly k8s names, which worked
for k8s queries, but Prometheus requires a specific key.

Modify the statsummary query to map friendly k8s names to canonical k8s
names when constructing the query. Then during the query, map the
canonical k8s name to a specific Prometheus label.

Fixes #695

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-06 12:34:54 -07:00
Andrew Seigner 836168884e
Link to Grafana from Conduit Dashboard (#678)
* Link to Grafana from Conduit Dashboard

Previously the only way to access the Grafana dashboards was via direct
link, provided by the `conduit dashboard` command.

Add Grafana links throughout the Conduit Dashboard, next to all
Deployment objects. This change also modifies the behavior of the
ConduitLink helper, to enable linking to other deployments proxied by
the `conduit dashboard` command.

Part of #420

Signed-off-by: Andrew Seigner <siggy@buoyant.io>

* review feedback

Signed-off-by: Andrew Seigner <siggy@buoyant.io>

* review feedback, fix console, remove absolute

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-04-06 10:56:42 -07:00
Risha Mars 2f5b5ea5f2
Start implementing conduit stat summary endpoint (#671)
Start implementing new conduit stat summary endpoint. 
Changes the public-api to call prometheus directly instead of the
telemetry service. Wired through to `api/stat` on the web server,
as well as `conduit statsummary` on the CLI. Works for deployments only.

Current implementation just retrieves requests and mesh/total pod count 
(so latency stats are always 0). 

Uses API defined in #663
Example queries the stat endpoint will eventually satisfy in #627

This branch includes commits from @klingerf 

* run ./bin/dep ensure
* run ./bin/update-go-deps-shas
2018-04-05 17:05:06 -07:00
Franziska von der Goltz eff848a8cf
fix pod status and count in control plane dashboard (#659)
* fix pod status and count display in control plane dashboard section:
- the control plane would show terminated and stale deployments in the UI, this is confusing and might indicate errors
- this filters out temrinated and failed component deploys from the UI
- it is to note that pending deploys will still be counted and represented with a greyed out status dot
- Fixes: #606

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>


Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-04-03 10:39:35 -07:00
Brian Smith df9ead9c36
Use Go 1.10.1 to build all Go code. (#650)
Go 1.10.1 is a security release.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-04-02 14:58:30 -10:00
Franziska von der Goltz 67fac9d240
remove toggle sorting functionality from TableComponent (#630)
remove toggle sorting functionality from TableComponent:
- tables displaying metrics allowed to toggle between being sorted and unsorted when clicking the same button. This was confusing behavior for the user.
- this PR removes the toggle functionality and introduces a BaseTable Component that extends antd's component without the capability to toggle
- Fixes: #566

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-03-28 18:01:34 -07:00
Kevin Lingerfelt 59c75a73a9
Add tests/utils/scripts for running integration tests (#608)
* Add tests/utils/scripts for running integration tests

Add a suite of integration tests in the `test/` directory, as well as
utilities for testing in the `testutil/` directory.

You can use the `bin/test-run` script to run the full suite of tests,
and the `bin/test-cleanup` script to cleanup after the tests.

The test/README.md file has more information about running tests.

@pcalcado, @franziskagoltz, and @rmars also contributed to this change.

* Create TEST.md file at the root of the repo

* Update based on review feedback

* Relax external service IP timeout for GKE

* Update TEST.md with more info about different types of test runs

* More updates to TEST.md based on review feedback

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-03-27 15:06:55 -07:00
Dennis Adjei-Baah ad42f2f8ab
Retry k8s watch endpoints on error (#510)
Shortly after conduit is installed in k8s environment. The control plane component that establishes a watch endpoint with k8s run in to networking issues during proxy initialization. During failure, each watcher fails to retry its connection to k8s watch endpoint which leads to timeouts and eventually, multiple controller pod restarts.

This PR adds retry logic to each "watch" enabled package.

fixes #478

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-03-07 13:40:43 -08:00
Brian Smith cf3c8cd7bc
Use Go 1.10.0 to build Go components. (#408)
* Use Go 1.10.0 to build Go components.

Take advantage of the new build cache in Go 1.10. Future work on improving
build performance will utilize the build cache further.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-02-21 14:31:29 -10:00
Brian Smith e6aad57766
Remove temporary files generated by dep in go-deps image. (#407)
Previously Dockerfile-go-deps was converted from a multi-stage Dockefile
to a single-stage Dockerfile in anticipation of enabling efficient use
of `--cache-from` in CI. However, that resulted in the image ballooning
in size because it contained the Git repo for every package downloaded
by `dep ensure`.

Bring the image back down to the proper size by removing the temporary
files created.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-02-21 13:06:24 -10:00
Kevin Lingerfelt b9b16195b8
Remove uses of upstream/downstream from web UI (#400)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-02-20 17:05:22 -08:00
Risha Mars b26a551d89
Increase padding of main section (#395) 2018-02-20 10:11:32 -08:00
Risha Mars ae0d47d5c9
Add ability to cancel promises via a wrapper (#374)
* Add ability to cancel promises via a wrapper

* Let the ApiHelpers keep track of outstanding requests, provide ApiHelpers.cancel()
2018-02-19 17:28:40 -08:00
Risha Mars 53354cf68f
Small UI tweaks for 0.3 prep (#377)
* Display more decimal points for truncated numbers, add hover info

* Filter completed pods out of web UI

* Decrease the polling interval from 10s to 2s

* Add more detailed pod categorization based on status

* Tweak filtering of pods, tweak explanations in status table
2018-02-19 14:11:03 -08:00
Risha Mars 8bc7c5acde
UI tweaks: sidebar collapse, latency formatting, table row spacing (#361)
- reduce row spacing on tables to make them more compact
- Rename TabbedMetricsTable to MetricsTable since it's not tabbed any more
- Format latencies greater than 1000ms as seconds
- Make sidebar collapsible 
- poll the /pods endpoint from the sidebar in order to refresh the list of deployments in the autocomplete
- display the conduit namespace in the service mesh details table
- Use floats rather than Col for more responsive layout (fixes #224)
2018-02-19 11:21:54 -08:00
Kevin Lingerfelt 300fd3475b
Remove unused web routes and helper (#356)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-02-14 11:52:39 -08:00
Brian Smith b18fe459d4
Precompile large Go libraries in go-deps Docker image. (#332)
On my system (i9-7960x running Docker natively in Linux) this regularly saves
over 11 seconds of build time when a file under pkg/ changes and over 1.5
seconds of build time when a file under controller/ changes. Since most
contributors are running Docker in a VM on less powerful computers, the
savings for most contributors should be significantly greater.

I imagine the savings for web/ and cli/ and proxy-init/ are similar, but I
did not measure them.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-02-13 11:35:10 -10:00
Brian Smith ec5a02fd64
Upgrade to Go 1.9.4. (#326)
Go 1.9.4 is a security release.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-02-12 13:47:40 -10:00
Brian Smith 86ea1c06bf
Improve the caching behavior of Dockerfile-go-deps. (#325)
Previously Dockerfile-go-deps would run `dep ensure` whenever anything in the
source tree changed. Also, because it was a multi-stage Dockerfile it did not
work well with Docker's `--cache-from` feature.

Change Dockerfile-go-deps to only re-run `dep ensure` when Gopkg.{toml,lock}
and/or bin/dep change. Simplify it to a single stage so that it works better
with Docker's `--cache-from` feature.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-02-12 13:40:20 -10:00
Brian Smith c78df4ba13
Use bin/dep in Dockerfile-go-deps. (#324)
bin/dep verifies the digest of the `dep` downloaded `dep` executable,
whereas previously Dockerfile-go-deps wasn't.

Signed-off-by: Brian Smith <brian@briansmith.org>
2018-02-12 13:32:08 -10:00
Risha Mars 1f6aa27922
UI updates, graph removals (#319)
UI cleanups. Remove repetitive labels in the UI, remove unused elements, 
remove graphs until we improve their utility.

- remove “Deployment” from the headers of the Deployment Detail Page
- remove Routes in sidebar
- kill leftmost 100px of sidebear
- remove word controller from service mesh page first table
- add twitter and GitHub and slack links
- kill the graphs, replace with one large header (request rate, success rate, latency top bar)
put upstream/downstream diagram before upstream downstream tables

* Clean up DeploymentList page (#321)

- remove "Most active deployments" graphs from the Deployments List page
- remove the scatterplot sections of the page as I don't think we'll be using them for a while
2018-02-12 12:44:33 -08:00
Eliza Weisman 458e9d2ac5
Remove per-path metrics from telemetry pipeline (#317)
Follow-up from #315.

Now that the UIs don't report per-path metrics, we can remove the path label from Prometheus, the path aggregation and filtering options from the telemetry API, and the path field from the proxy report API.

I've modified the tests to no longer expect the removed fields, and manually verified that Conduit still works after making these changes.

Closes #265 

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-02-09 14:20:28 -08:00
Eliza Weisman 6c2ac6125f
Remove per-path metrics from UIs (#315)
I've removed per-path metrics from the web dashboard and from the `conduit stat` command. 

Manually validated that these metrics are no longer displayed.

Closes  #263

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-02-09 12:35:49 -08:00
Andrew Seigner 33e3c3ace9
Optimize Prometheus queries (#298)
Prometheus queries from the Telemetry service were taking seconds or 10s
of seconds.

Optimize these queries:
- Move all summary queries requiring a single point data off of Prometheus'
  QueryRange() endpoint, onto Query()
- Set `defaultVectorRange` to 30s, and also use it regardless of time
  window
Also add tests for grpc_server and telemetry server

Signed-off-by: Andrew Seigner <siggy@buoyant.io>

Fixes #260
2018-02-09 10:55:07 -08:00
Eliza Weisman 2015d992cc
Remove pod-level metrics from web and CLI (#304)
This PR updates the web UI to remove the pod detail page, and to remove the links to that page from pod names in metrics tables. It also removes the `pods` option from `conduit stat`, and the `sourcePod` and `targetPod` fields from the controller API proto's `MetricMetadata` message.

I've updated the `conduit stat` tests to reflect these changes, and manually verified the web UI changes.

Closes #261 

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-02-08 19:07:10 -08:00
Risha Mars 81d4b7b924
Fix bug where table data wasn't being updated (#290) 2018-02-08 10:33:33 -08:00
Risha Mars ff15574a0d
MetricsTable: Consolidate latency, success, request metrics into one tab (#276)
* Consolidate latency, success, request metrics into one tab
on the SortableMetricsTable

- removes sparklines from the table
- makes tables sortable by default
- move pod table in DeploymentDetail to its own row

* remove request distribution column, reorder columns
2018-02-07 09:50:01 -08:00
Risha Mars 185f48b086
DeploymentsList: Replace "least healthy" with "most active" deployments (#277)
* Replace Least Healthy Deployments section with Most Active Deployments (MAD)

* Fix old arguments to ConduitLink
2018-02-06 11:35:57 -08:00
Risha Mars c2da891be7
Minor UI title renames and other tweaks (#256)
* ServiceMesh: plot public-api instead of destination, retitle destination and telemetry graphs

* ResourceHealthOverview: Hide Inbound/Outbound request rate if there are 0 deployments

* ResourceMetricOverview: retitle DeploymentDetail/PodDetail sections
2018-02-05 11:27:31 -08:00
Risha Mars 9887f10749
Add ability to change the time window for metrics fetching throughout the app (#237)
* Control metricsWindow from root of app

- Add buttons [currently hidden] on metrics pages to control window of metrics requests
- Consolidate metricsWindow usage (stop passing it around)
- Add a ConduitLink component so we can stop passing around pathPrefix
- Add tests for ApiHelpers

* Hide the time window buttons; fix bug in absolute links
* Add a note explaining why metricWindow buttons are disabled
* Convert ConduitLink in to a component that wraps another
2018-02-05 10:56:17 -08:00
Andrew Seigner 9a40d984ff
Replace shelling out with kubernetes proxy (#249)
The conduit dashboard command asychronously shells out and runs "kubectl
proxy".

This change replaces the shelling out with calls to kubernetes proxy
APIs. It also allows us to enable race detection in our go tests, as the
shell out code tests did not pass race detection.

Fixes #173

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-02-02 10:31:59 -08:00
Alex Leong fa2f5a0140
Add dep wrapper script to ensure consistent version of dep is used (#253)
* Add `bin/dep` which fetches a fixed version of `dep` to be used. 
* Upgrade from dep 0.3.1 to 0.4.1
* Fix inconsistent Gopkg.lock by checking in the result of `bin/dep ensure`

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-02-01 16:09:05 -08:00
Andrew Seigner 277c06cf1e
Simplify and refactor k8s labels and annnotations (#227)
The conduit.io/* k8s labels and annotations we're redundant in some
cases, and not flexible enough in others.

This change modifies the labels in the following ways:
`conduit.io/plane: control` => `conduit.io/controller-component: web`
`conduit.io/controller: conduit` => `conduit.io/controller-ns: conduit`
`conduit.io/plane: data` => (remove, redundant with `conduit.io/controller-ns`)
It also centralizes all k8s labels and annotations into
pkg/k8s/labels.go, and adds tests for the install command.

Part of #201

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-02-01 14:12:06 -08:00
Risha Mars a9d4a3d74e
Add more prometheus instrumentation (latency, response size) (#174)
We added basic prometheus instrumentation, but this only encapsulated basic go metrics and
 request counts. This adds latency and response size metrics exporting as well, to the 
public-api server, theweb server and the telemetry server.

Since the util function in grpc.go was basically used to wrap the server creation in a prometheus handler, I added the other prometheus constants in there and renamed the file to prometheus.go. 

- Add request duration and response size instrumentation to web and public api
- Also add latency monitoring to telemetry service requests
- Rename util/grpc.go to util/prometheus.go
2018-02-01 09:50:31 -08:00
Risha Mars f3925a07fb
Various small UI tweaks (#234)
* Various small UI naming tweaks

- align top two tables in the service mesh page
- "All Deployments" -> "Deployments"
- reorder latency p50, p95, p99
- "Current success" -> "Success rate"

* Add margin to incomplete mesh message, reorder latency in TabbedMetricsTable
* Right align numbers in service mesh page
2018-01-31 18:09:15 -08:00
Kevin Lingerfelt 7399df83f1
Set conduit version to match conduit docker tags (#208)
* Set conduit version to match conduit docker tags

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Remove --skip-inbound-ports for emojivoto

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Rename git_sha => git_sha_head

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Switch to using the go linker for setting the version

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Log conduit version when go servers start

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Cleanup conduit script

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Add --short flag to head sha command

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Set CONDUIT_VERSION in docker-compose env

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-01-26 11:43:45 -08:00
Risha Mars 8f63c2b7a5
Fix link to deployments from autocomplete not including pathPrefix (#209)
Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-25 16:47:39 -08:00
Risha Mars d0119162e8
Switch to ant sider/content Layout modules (#188)
* Switch to ant sider/content Layout modules, to help style sidebar
This fixes the problem of the sidebar not extending all the way on long pages.
* Fix a bug where the autocomplete options weren't being reset when an item was selected
2018-01-24 11:38:54 -08:00
Risha Mars b9f5ad093f
Rename js components to clarify component relationships (#179)
* Rename components to clarify component relationships
* Rename Deployment to DeploymentDetail to match PodDetail
* Rename Deployments to DeploymentsList to clarify which page this is
* Rename StatPane to ResourceMetricsOverview to be a less generic name
* Rename HealthPane -> ResourceHealthOverview
* Rename StatPaneStat -> ResourceOverviewMetric

Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-23 10:05:53 -08:00
Risha Mars 67255bc03a
Remove font colouring on the call to action (#184)
Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-19 13:43:32 -08:00
Risha Mars 8a1dc1a2b5
Improve appearance of autocomplete search bar (#180)
Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-19 10:40:52 -08:00
Risha Mars eea711a7f2
Hide scatterplot (#175)
Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-18 16:20:12 -08:00
Risha Mars 43e6229363
Consolidate latency colour naming, css tweaks from #147 (#164)
Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-17 14:22:48 -08:00
Oliver Gould 008f53865b
Make proxy-deps multi-stage to remove the original source files (#161)
Previously, proxy-deps and go-deps included the source tree for local
projects. This can cause build conflicts when files are renamed.

By adopting a multi-stage build for the proxy-deps image, we can be sure
that we only preserve essential dependencies & manifests in the
proxy-deps and go-deps images.

Furthermore, `bin/update-go-deps-shas` and `bin/update-proxy-deps-shas` have
been added to ease maintenance when files are changed.

Fixes #159

Signed-off-by: Oliver Gould <ver@buoyant.io>
2018-01-17 12:26:22 -08:00
Nathan Murthy 84d8fa6639 Use more descriptive CSS variable names (#135) (#147)
* Use more descriptive CSS variable names (#135)

Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>

* Decouple the names of the colors from their use

Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>

* Rename a few more root CSS color var names

Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>

* Update more CSS color vars referenced elsewhere

Signed-off-by: Nathan Murthy <drip.dr0p.dr0p@gmail.com>
2018-01-17 11:23:12 -08:00
Risha Mars 9d552bccb1
Revive searchbar: Add autocomplete search bar back into sidebar (#158)
* Add autocomplete search bar back into sidebar

Signed-off-by: Risha Mars <mars@buoyant.io>

* Use getPodsByDeployment

Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-17 11:03:42 -08:00
Risha Mars 14cba8870e
Revive scatterplot: re-add scatterplot to Deployments page (#144)
* Revive scatterplot: re-add scatterplot to Deployments page

Tried to make some UI improvements to address previous problems:

* added a hover bar and tooltip that displays all of the nodes under the bar, 
in descending order of successRate (to correspond with their order in the chart)
* the tooltip looked weird in the empty state so I also added the max/min latencies 
observed there

Also cleans up the Deployments page a little when there are not any "least healthy deployments".

* Previously, the sidebar tooltip would still render the last
highlighted nodes' information when the dots updated. Fix that
by selecting a datapoint to highlight when the dots update.

* Add overlay tooltip with names of highlighted nodes

* Align the node labels with the node, except in cases of label overlap


Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-17 10:10:59 -08:00
Phil Calçado 612bd0f7a0
Add --verbose option to CLI (#154)
* Use stdout as writer for tap command

fixes #136

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

* Add --log-level to command line

Signed-off-by: Phil Calcado <phil@buoyant.io>
2018-01-17 12:06:43 -05:00
Andrew Seigner ac242bd9b9
Introduce BUILD.md (#137)
Our build instructions were scattered across a few README's.

This consolidates all instructions relevant to Conduit development into
a single BUILD.md.

Fixes #134

Signed-off-by: Andrew Seigner <andrew@sig.gy>
2018-01-16 23:19:53 -08:00
Phil Calçado e328db7e87
Adds conduit-api check for status command (#140)
* Abstract Conduit API client from protobuf interface to add new features

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

* Consolidate mock api clients

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

* Add simple implementation of healthcheck for conduit api

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

* Change NextSteps to FriendlyMessageToUser

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

* Add grpc check for status on the client

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

* Add simple server-side check for Conduit API

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

* Fix feedback from PR

Signed-off-by: Phil Calcado <phil@buoyant.io>
2018-01-12 15:35:22 -05:00
Franziska von der Goltz de4ab1d807
add ability to add flash to latest datapoint on line graph. (#127)
* add ability to add flash to latest datapoint on line graph based on passed down prop.
- added flash to all graphs except the sparklines

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-01-12 09:58:36 -08:00
Risha Mars 1cf9da8ee7
Add /paths page that displays metrics by path, add ability to sort Table (#133)
* Add /paths page that shows rollup metrics by path
* Clean up ApiHelpers a bit

Adds ability to sort by column in the tabbed metrics table (to make a TabbedMetricsTable sortable, set sortable={true})

Adds a page, accessible via /paths that shows a table of all paths, with their request/success/latency metrics. I haven't exposed it in the sidebar as it doesn't have design treatment.
2018-01-11 17:36:48 -08:00
Kevin Lingerfelt 1dc1c00a2a
Upgrade k8s.io/client-go to v6.0.0 (#122)
* Sort imports

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Upgrade k8s.io/client-go to v6.0.0

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>

* Make k8s store initialization blocking with timeout

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-01-11 10:22:37 -08:00
Risha Mars 00844913f5
Upgrade React, ant, enzyme (#109)
* Upgrade ant to 3.1.0

* Adjust styles for updated ant

- Locale is enUS by default now, so removing our config
- Adjust table styles

* Upgrade react and react-dom to 16.2.0

* Upgrade enzyme to 3.3.0, fix tests accordingly
2018-01-10 10:10:59 -08:00
Andrew Seigner 1ceaf3874a
Fix web and public-api log info messages. (#129)
The existing startup/shutdown log info messages had spacing issues and
used fmt.

Update the log messages to use logrus for consistency, and fix spacing
issues.

Signed-off-by: Andrew Seigner <andrew@sig.gy>
2018-01-09 16:14:56 -08:00
Dennis Adjei-Baah 2b22d4bc63
Add Go vetting to Travis CI configuration (#128)
* Fix go vet warning in various go source files

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-01-09 15:21:41 -08:00
Andrew Seigner caeb83a526
Fix Go and Proxy dependency image SHAs (#117)
The image tags for gcr.io/runconduit/go-deps and
gcr.io/runconduit/proxy-deps were not updating to account for all
changes in those images.

Modify SHA generation to include all files that affect the base
dependency images. Also add instructions to README.md for updating
hard-coded SHAs in Dockerfile's.

Fixes #115

Signed-off-by: Andrew Seigner <andrew@sig.gy>
2018-01-08 11:19:49 -08:00
Andrew Seigner 9eb5cc69f3
Add instructions to run web locally (#114)
The web README.md mentions running locally, but it's not explicit about
how to connect to public-api.

Add notes on various ways to connect a local web to a public-api
process.

Signed-off-by: Andrew Seigner <andrew@sig.gy>
2018-01-05 15:52:37 -08:00
Risha Mars 80ecdc13c2
Copy over /pkg to container (#110)
Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-05 10:12:29 -08:00
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
Risha Mars fa49de6ff4
Make TabbedMetricsTable in charge of fetching timeseries (#89)
* Make TabbedMetricsTable in charge of fetching timeseries

All of the parent components in charge of fetching timeseries data
don't actually use them, but pass them to this table. It would simplify
a lot of the parents if this component handled the ts fetching too.

This introduces a urlsForResource helper in ApiHelpers to allow
us to consolidate url generating in the app to one place. It also
associates the appropriate groupBy for various fetches.

Signed-off-by: Risha Mars <mars@buoyant.io>
2018-01-03 16:55:56 -08:00
Franziska von der Goltz a7306113d2
increase test coverage for ServiceMesh component (#85)
* increased test coverage for ServiceMesh component

Signed-off-by: Franziska von der Goltz <franziska@vdgoltz.eu>
2018-01-03 09:50:29 -08:00
Andrew Seigner 449f306aeb
Implement client-side version checking (#79)
Previously Conduit would render an iframe, received from
versioncheck.conduit.io.

Modify the client to retrieve the latest released version, via CORS.

Signed-off-by: Andrew Seigner <andrew@sig.gy>
2018-01-02 16:07:50 -08:00
Andrew Seigner 365d0eec36
Add instructions for running Web against K8s (#94)
The README.md in the Web project describes building and running the Web
service locally, against a public API server in Docker.

Add instructions for running the Web Service locally against a public
API Server in Kubernetes.

Signed-off-by: Andrew Seigner <andrew@sig.gy>
2017-12-27 11:42:23 -08:00
Risha Mars 4389a1e312
Bind this.handleApiError in PodDetail (#84) 2017-12-22 13:54:34 -08:00
Risha Mars 8cf1bdbee3
Consolidate api calling from the UI; Start surfacing API errors (#65)
* Adds an ApiHelpers module that wraps our api calls to the server

* Adds ability to display error messages from the server
2017-12-21 15:18:35 -08:00
Franziska von der Goltz 405db65a18
refactored incomplete-mesh messaging to be stored in CopyUtils.jsx (#78) 2017-12-21 10:51:54 -08:00
Risha Mars 13a62cb21b
Add message to indicate /routes is not implemented (#77)
If someone clicks on Routes in the sidebar, the page appears to fail to load, 
but this endpoint is unimplemented. Add a message to indicate that.
2017-12-20 10:25:10 -08:00
Risha Mars 46ee763e8e
Have better empty states in Deployment Detail and Pod Detail (#71)
* Have better empty states in Deployment Detail and Pod Detail

* Fix call to action on deployment detail page

Adds various checks to hide sections of pages that don't have data:

* Removes the timeseries graphs and latency overview from Deployment/Pod 
detail if there are no metrics for it

* Removes the Upstreams/Downstreams if num upstreams / downstreams is 0

* Removes the pod barcharts from the Deployment detail if there are no pods

* If there are no pod metrics, populate the list of pods from /pods
These changes strip the pod detail view down a lot if there's no pod data, but that might be fine
2017-12-19 17:02:03 -08:00
Dennis Adjei-Baah 42d942c0bf
Add links to each deployment name in the Conduit dashboard (#44)
* add links for each deployment name and add a message for unadded deployments
2017-12-19 15:40:24 -08:00
Franziska von der Goltz 3591936de3
fix inconsistent deployment count on servicemesh page (#69)
* fix inconsistent deployment count on servicemesh page.
* tests added for deploy count messaging on servicemesh page
* refactored code for Call To Action component to use 'instructions' in util
* refactored correlating css
2017-12-19 14:53:47 -08:00
Phil Calçado 683b5c0dd6 Fix unit test runner and failing tests (#67)
* Remove integration test clause from travis file

* Use correct channel for asyn process error reporting

* Fix test for sorting stat keys

* Make integration tests only run if CONDUIT_INTEGRATION_TESTS_ENABLED is set

* Fix timeouts in tests

* Fix handler test check for version

* Removes smoke test that required kubectl as not present on travis

* Replace tail with sleep to avoid leaking subprocesses during tests

* Fix typo & extract constant
2017-12-19 14:21:56 -08:00
Sterling White ff519fc855 Swhite/css updates (#55)
* fix sidebar highlighting when dashboard is opened via cli:
- took path prefix into account

* addressed review feedback: using pathprefix

* addressed review feedback:
- revert to using this.props.location

* updates sidebar, initial progress indicator

* Update web README
2017-12-18 15:03:49 -08:00
Risha Mars 55de336325
Add a couple more eslint rules (#50)
* Add a couple more eslint rules

* Add keyword-spacing
2017-12-15 12:24:42 -08:00
Risha Mars d11115d241
Add javascript tests (#45)
* Add JS testing infra: karma, mocha, sinon, chai, enzyme

* Grab styleNum tests from kl
2017-12-14 15:12:26 -08:00
Risha Mars 27b6a9bc1f
Readability improvements on Bar Chart (#35) 2017-12-14 14:52:03 -08:00
Risha Mars 6b00bb8283
Allow Deployments page to handle larger numbers of deployments (#32)
* Revamp metrics processing in MetricUtils

- Try to improve documentation of functions
- Remove nested data from processed metrics - they were often duplicated data
- Split out timeseries processing from rollup processing
- Remove the 'rollup' level of nesting
- Limit the number of timeseries we fetch on the deployments page
2017-12-13 15:29:00 -08:00
Franziska von der Goltz b722db13f6
updated web readme title to conduit dashboard (#37) 2017-12-13 10:09:47 -08:00
Kevin Lingerfelt 372038f896
Add linting to js and jsx files (#29)
* Add linting to js and jsx files

* Fix BarChart percentages

* Fix merge issue

* Add indent rule

* Quote poperty names
2017-12-08 16:39:29 -08:00
Dennis Adjei-Baah 922b41c0fa
Remove namespace property from the Conduit web app (#10)
* Remove namespace property from ServiceMesh.jsx and Deployments.jsx and related Go code
2017-12-08 15:38:04 -08:00
Risha Mars 0f1d698275
Miscellaneous small dashboard fixes (#19)
Fix various loose ends in the web app:

* Add Tooltip to status dots explaining color meaning
* Adjust formatting of RPS numbers
* Pass in current success rate to the HealthPane
* Fix page header styling caused by content being in wrong div
* Align the metric value for inbound SR in Health Pane
* Status Dot tweaks
* Improve rendering of status dots when there are a lot of them
2017-12-08 15:24:13 -08:00
Kevin Lingerfelt 2f114e69fa
Add support for path stats in cli and web api (#13)
* Add support for path stats in cli and web api

The cli stat command supports grouping by pod and deployment. With this
change, it will also support grouping by path, in order to facilitate a
summary stats per individual endpoint.

* Right-align numeric columns in stat output
2017-12-08 12:24:39 -08:00
Risha Mars 0410a5e4fb
Clean up css scoping (#15)
Problem:
Because the spinner css was unscoped, it was causing 
the x axis line of the bar chart to be conduit-red.

Solution:
Clean up css scoping.
2017-12-08 11:21:21 -08:00
Oliver Gould a1fbafaae3 update go-deps image 2017-12-05 01:17:38 +00:00
Oliver Gould b104bd0676 Introducing Conduit, the ultralight service mesh
We’ve built Conduit from the ground up to be the fastest, lightest,
simplest, and most secure service mesh in the world. It features an
incredibly fast and safe data plane written in Rust, a simple yet
powerful control plane written in Go, and a design that’s focused on
performance, security, and usability. Most importantly, Conduit
incorporates the many lessons we’ve learned from over 18 months of
production service mesh experience with Linkerd.

This repository contains a few tightly-related components:
- `proxy` -- an HTTP/2 proxy written in Rust;
- `controller` -- a control plane written in Go with gRPC;
- `web` -- a UI written in React, served by Go.
2017-12-05 00:24:55 +00:00