Commit Graph

143 Commits

Author SHA1 Message Date
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
Brian Smith 208723b44d
conduit inject: Enable auto name completion in proxy (#60)
Previously `conduit inject` did not enable automatic name completion in
the proxy. As a result services couldn't connect to services outside
the "default" namespace without qualifying the service name with (at
least) the namespace. This is arguably safer but it isn't compatible
with the way things work in Kubernetes when the proxy isn't used.

Enable name auto-completion in the proxy so that the proxy will add
the current pod's namespace to any unqualified service name. This
depends on the feature being added to the proxy (PR #59).

Due to some issues with how zones are dealt with in the project, the
zone component isn't provided; it turns out that it doesn't matter
whether we provide the zone in the current implementation. Dealing
with the zone better will be added later.

Validated by deploying the emojivoto service with its configuration
updated to use unqualified names (`sed "s/\\.emojivoto//g"`). Before
this change this modified configuration would fail; now it succeeds.

Fixes #9.
2017-12-19 12:07:54 -10:00
Brian Smith 8385a7a8c1
Proxy: Map unqualified/partially-qualified names to FQDN (#59)
* Proxy: Map unqualified/partially-qualified names to FQDN

Previously we required the service to fully qualify all service names
for outbound traffic. Many services are written assuming that
Kubernetes will complete names using its DNS search path, and those
services weren't working with Conduit.

Now add an option, used by default, to fully-qualify the domain names.
Currently only Kubernetes-like name completion for services is
supported, but the configuration syntax is open-ended to allow for
alternatives in the future. Also, the auto-completion can be disabled
for applications that prefer to ensure they're always using unambiguous
names. Once routing is implemented then it is likely that (default)
routing rules will replace these hard-coded rules.

Unit tests for the name completion logic are included.

Part of the solution for #9. The changes to `conduit inject` to
actually use this facility will be in another PR.
2017-12-19 11:59:26 -10:00
Phil Calçado 6f9e8be2ee
Check kubectl versions before attempting dashboard (#53)
* Introduce objects to manage kubectl and shell

* Make dashboard command use new shell & kubectl objects

* Make compatible with version numbers like v1.9.0-beta.1

* Add version check for kubectl

* Refactor error to use proper method from fmt pa ckage

* Make channel and error handling more idiomatic and safe

* Make version require 1.8.0
2017-12-19 11:41:15 +11:00
Alex Leong 772b43fefa Add inject flag for skipping outbound ports (#38)
* Add inject flag for skipping outbound ports

* Fix usage of proxy-init ignore flags (closes #541)
2017-12-19 11:17:11 +11: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
Brian Smith d025bf4c0f
conduit inject: Configure proxy to log at "info" level (#58)
Previously `conduit inject` was configuring the proxy to log a lot of
detail, most of which is probably shouldn't be relevant to Conduit
users.

Configure the proxy to log at the "info" level instead for the proxy
itself, and the "warn" level for internal components of the proxy.

Validated by manually doing a `conduit inject`, triggering some
traffic, and inspecting the logs.

Fixes #57
2017-12-18 08:37:27 -10:00
Brian Smith 4fa4891694
Use `connection::Connection` for outbound connections (#51)
Previously `connection::Connection` was only being used for inbound
connections, not outbound connections. This led to some duplicate
logic and also made it difficult to adapt that code to enable TLS.

Now outbound connections use `connection::Connection` too. This will
allow the upcoming TLS logic to guarantee that `TCP_NODELAY` is
enabled at the right time, and the TLS logic also control access to
the underlying plaintext socket for security reasons.
2017-12-15 12:44:25 -10: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
Alex Leong 8a7579ef4a
Add RBAC support (#40)
Adds a ServiceAccount, ClusterRole, and ClusterRoleBinding to the conduit install output that allows the Conduit controller read access to the k8s API.

I have tested this on RBAC-enabled minikube and minikube without RBAC.
2017-12-14 16:57:52 -08:00
Brian Smith 40d50f0f4a
Encapsulate listening port connection acceptance logic (#46)
Previously every use of `BoundPort` repeated a bunch of logic.

Move the repeated logic to `BoundPort` itself. Just remove the no-op
handshaking logic; new handshaking logic will be added to `BoundPort`
when TLS is added.
2017-12-14 13:19:05 -10: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
Brian Smith 81fb0fea5f
Move default private connect timeout to `Config` (#42)
Previously the default value of this setting was in lib.rs instead of
being automatically set in `Config` like all the other defaults, which
was inconsistent and confusing.

Fix this by moving the defaulting logic to `Config`.

Validated by running the test suite.
2017-12-13 21:15:21 -06:00
Brian Smith 0c2aa0e185
Centralize and clarify TCP port binding (#43)
Previously the logic related to listening for incoming TCP connections
was duplicated in several places.

Begin centralizing this logic. Future commits will centralize it
further.

No validation was done other than running the test suite.
2017-12-13 19:45:15 -06:00
Brian Smith 0185522821
Proxy: Parse environment variables in one place (#26)
Previously `Process` did its own environment variable parsing and did
not benefit from the improved error handling that `config` now has.
Additionally, future changes will need access to these same environment
variables in other parts of the proxy.

Move `Process`'s environment variable parsing to `config` to address
both of these issues. Now there are no uses of `env::var` outside of
`config` except for logging, which is the final desired state.

I validated this manually.
2017-12-13 19:33:37 -06:00
Brian Smith 559f4a76fb
Proxy: Use production config parsing in tests (#25)
* Proxy: Use production config parsing in tests

Previosuly the testing code for the proxy was sensitive to the values
of environment variables unintentionally, because `Config` looked at
the environment variables. Also, the tests were largely avoiding
testing the production configuration parsing code since they were
doing their own parsing.

Now the tests avoid looking at environment variables other than
`ENV_LOG`, which makes them more resilient. Also the tests now parse
the settings using the same code as production use uses.

I validated this manually.
2017-12-13 19:27:50 -06:00
Brian Smith 0ebc20c013
Proxy: Parse all environment variables before aborting (#24)
Previously, as soon as we would encounter one environment variable with
an invalid value we would exit. This is frustrating behavior when
deploying to Kubernetes and there are multiple problems because the
edit-compile-test cycle is so slow.

Fix this by parsing all the environment variables and logging error
messages before exiting.

I validated this manually.
2017-12-13 18:56:14 -06:00
Sterling White c26e7f39a6
updates to README linking to docs and getting started (#39)
* updates to README linking to docs and getting started

* minor line break revisions

* markdown revisions and simplification

* updating line breaks and errant spaces

* updates grammar and simplifies language
2017-12-13 16:39:49 -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
Eliza Weisman 2fdb859dff
Add timeout to in-flight telemetry reports (#12)
This PR adds a configurable timeout duration after which in-flight telemetry reports are dropped, cancelling the corresponding RPC request to the control plane.

I've also made the `Timeout` implementation used in `TimeoutConnect` generic, and reused it in multiple places, including the timeout for in-flight reports.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2017-12-13 15:07:36 -08:00
Kevin Lingerfelt eac1c0540d
Add parallel ci build for javascript (#34) 2017-12-13 11:46:02 -08:00
Franziska von der Goltz b722db13f6
updated web readme title to conduit dashboard (#37) 2017-12-13 10:09:47 -08:00
Oliver Gould f27d7b6545
Add the TravisCI badge to README.md (#22) 2017-12-11 16:00:56 -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
Risha Mars 82f50b5536
Fix simulate-proxy script (#14)
Problem:
Simulate proxy would seemingly hang when used.
In simulate-proxy we were using rand.Uint32() to generate Count. This is way too big (in telemetry/server.go we call latencyStat.observe() Count times, so this loop was taking fovever).

Solution:
Use a count of 1 (as the surrounding loop will generate count requests)

Validation:
Script now works without hanging.
2017-12-08 11:15:05 -08:00
Kevin Lingerfelt 906d4e8b69
Fix public-api error marshaling and unmarshaling (#16) 2017-12-08 11:03:55 -08:00
Brian Smith e29a02d63b
Proxy: Improve error reporting for invalid environment variables (#23)
* Proxy: Improve error reporting for invalid environment variables

Previously when an environment variable had an invalid value the
process would exit with an error that did not mention which
environment variable is invalid.

Start fixing this by routing environment variable parsing through
functions that always know the name of the environment variable when
they report errors.

I validated this change manually.

* Proxy: Improve configuration URL parsing

Previously there was a bit of duplicated logic between parsing `Addr`
and `HostAndPort` values.

Factor out the common logic. In the process, improve the error
reporting in the cases where parsing fails.
2017-12-08 12:32:43 -06:00
Oliver Gould b2a044cbc3
Fix docker-build stage in CI (#21)
- update GCP credentials
- minor scripting changes
2017-12-08 00:52:06 -06:00
Oliver Gould 2ae7d48339
add readme (#3) 2017-12-04 21:05:32 -08:00
Oliver Gould bff3efea3f
Prepare for v0.1.0 (#1)
Update versions in code.

Use default docker tag of v0.1.0
2017-12-04 19:55:56 -08:00
Oliver Gould a1fbafaae3 update go-deps image 2017-12-05 01:17:38 +00:00
Oliver Gould fa52d341cf touch gopkg.lock for good luck 2017-12-05 01:08:20 +00:00
Oliver Gould f138516a40 actually log into gcloud 2017-12-05 00:54:13 +00:00
Oliver Gould 980f85963d apply rustffmt on proxy, remove rustfmt.toml for now 2017-12-05 00:44:16 +00:00
Oliver Gould 658cf06682 fixup gcp push credentials in ci 2017-12-05 00:38:08 +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