Skip to content

Commit

Permalink
Merge pull request #11 from BuoyantIO/siggy/v0.0.5-updates
Browse files Browse the repository at this point in the history
Updates for v0.0.5 release
  • Loading branch information
siggy committed Sep 21, 2018
2 parents 9b82cf0 + ae5abd5 commit c578036
Show file tree
Hide file tree
Showing 12 changed files with 191 additions and 105 deletions.
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## v0.0.5

* Fix gRPC clients to honor `downstream-timeout`.
* Remove `grpc-downstream-authority` flag in favor of `grpc-proxy` flag.
If `grpc-proxy` is set, the target URL will be set by `grpc-proxy` and the
`:authority` header will be set by `grpc-downstream-server`. If `grpc-proxy`
is not set, the target URL will be set by `grpc-downstream-server`.
* Change `log-level` default from `debug` to `info`.
* Modify gRPC Client IDs to include `grpc-proxy` and `grpc-downstream-server`.
* Additional debug logging around broadcast requests.
* Bump `go-grpc` to `1.15.0`, `golang/protobuf` to `v1.2.0`, `logrus` to
`v1.0.6`.
* Bump Docker build Golang version to `1.11.0`.

## v0.0.4

* Introduce `grpc-downstream-authority` flag, to enable setting authority
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.10.0-stretch as golang
FROM golang:1.11.0-stretch as golang
WORKDIR /go/src/github.com/buoyantio/bb
ADD . /go/src/github.com/buoyantio/bb

Expand All @@ -10,4 +10,4 @@ FROM gcr.io/runconduit/base:2017-10-30.01
RUN apt-get update
RUN apt-get install -y ca-certificates
COPY --from=golang /out /out
ENTRYPOINT ["/out/bb"]
ENTRYPOINT ["/out/bb"]
85 changes: 61 additions & 24 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ required = ["github.com/golang/protobuf/protoc-gen-go"]

[[constraint]]
name = "github.com/sirupsen/logrus"
version = "v1.0.3"
version = "v1.0.6"

[[constraint]]
name = "github.com/golang/protobuf"
revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845" # protobuf has no release tags at time of writing
version = "v1.2.0"

[[constraint]]
name = "google.golang.org/grpc"
version = "1.8.0"
version = "1.15.0"
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Building Blocks or `bb` is a tool that can simulate many of the typical scenario
of a cloud-native Service-Oriented Architecture based on microservices.

## Using `bb`
`bb` publishes a single container, `buoyantio/bb:v0.0.3`. Instances of this
`bb` publishes a single container, `buoyantio/bb:v0.0.5`. Instances of this
container receive and return a simple message, described by the protobuf schema
[in this repository](api.proto). This known interface allows for `bb`
containers to be arranged in many different ways, just like building a structure
Expand Down Expand Up @@ -79,11 +79,12 @@ You should then build a Docker image for `bb`:
[...]
Removing intermediate container f4f571b01dd8
Successfully built e6d76c5df612
Successfully tagged buoyantio/bb:v0.0.3
Successfully tagged buoyantio/bb:v0.0.5

A test run using the Docker CLI should return usage information and confirm that everything is ok:

$ docker run buoyantio/bb:v0.0.3
$ docker run buoyantio/bb:v0.0.5

Building Blocks or `bb` is a tool that can simulate many of the typical scenarios of a cloud-native Service-Oriented Architecture based on microservices.

Usage:
Expand All @@ -97,19 +98,19 @@ A test run using the Docker CLI should return usage information and confirm that
terminus Receives the request and returns a pre-defined response

Flags:
--downstream-timeout duration timeout to use when making downstream connections. (default 1m0s)
--fire-and-forget do not wait for a response when contacting downstream services.
--grpc-downstream-authority stringSlice list of authority headers to specify routing, if set, ordering and count should match grpc-downstream-server
--grpc-downstream-server stringSlice list of servers (hostname:port) to send messages to using gRPC, can be repeated
--grpc-server-port int port to bind a gRPC server to (default -1)
--h1-downstream-server stringSlice list of servers (protocol://hostname:port) to send messages to using HTTP 1.1, can be repeated
--h1-server-port int port to bind a HTTP 1.1 server to (default -1)
-h, --help help for bb
--id string identifier for this container
--log-level string log level, must be one of: panic, fatal, error, warn, info, debug (default "debug")
--percent-failure int percentage of requests that this service will automatically fail
--sleep-in-millis int amount of milliseconds to wait before actually start processing a request
--terminate-after int terminate the process after this many requests
--downstream-timeout duration timeout to use when making downstream connections. (default 1m0s)
--fire-and-forget do not wait for a response when contacting downstream services.
--grpc-downstream-server stringSlice list of servers (hostname:port) to send messages to using gRPC, can be repeated
--grpc-proxy string optional proxy to route gRPC requests
--grpc-server-port int port to bind a gRPC server to (default -1)
--h1-downstream-server stringSlice list of servers (protocol://hostname:port) to send messages to using HTTP 1.1, can be repeated
--h1-server-port int port to bind a HTTP 1.1 server to (default -1)
-h, --help help for bb
--id string identifier for this container
--log-level string log level, must be one of: panic, fatal, error, warn, info, debug (default "info")
--percent-failure int percentage of requests that this service will automatically fail
--sleep-in-millis int amount of milliseconds to wait before actually start processing a request
--terminate-after int terminate the process after this many requests

Use "bb [command] --help" for more information about a command.

Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func init() {
RootCmd.PersistentFlags().IntVar(&config.TerminateAfter, "terminate-after", 0, "terminate the process after this many requests")
RootCmd.PersistentFlags().BoolVar(&config.FireAndForget, "fire-and-forget", false, "do not wait for a response when contacting downstream services.")
RootCmd.PersistentFlags().StringSliceVar(&config.GRPCDownstreamServers, "grpc-downstream-server", []string{}, "list of servers (hostname:port) to send messages to using gRPC, can be repeated")
RootCmd.PersistentFlags().StringSliceVar(&config.GRPCDownstreamAuthorities, "grpc-downstream-authority", []string{}, "list of authority headers to specify routing, if set, ordering and count should match grpc-downstream-server")
RootCmd.PersistentFlags().StringVar(&config.GRPCProxy, "grpc-proxy", "", "optional proxy to route gRPC requests")
RootCmd.PersistentFlags().StringSliceVar(&config.H1DownstreamServers, "h1-downstream-server", []string{}, "list of servers (protocol://hostname:port) to send messages to using HTTP 1.1, can be repeated")
RootCmd.PersistentFlags().DurationVar(&config.DownstreamConnectionTimeout, "downstream-timeout", time.Minute*1, "timeout to use when making downstream connections.")
RootCmd.PersistentFlags().StringVar(&logLevel, "log-level", log.DebugLevel.String(), "log level, must be one of: panic, fatal, error, warn, info, debug")
RootCmd.PersistentFlags().StringVar(&logLevel, "log-level", log.InfoLevel.String(), "log level, must be one of: panic, fatal, error, warn, info, debug")
}
4 changes: 2 additions & 2 deletions examples/bb-readme/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: http-to-grpc
image: buoyantio/bb:v0.0.3
image: buoyantio/bb:v0.0.5
args: ["terminus", "--grpc-server-port", "9090", "--response-text", "BANANA"]
ports:
- containerPort: 9090
Expand Down Expand Up @@ -56,7 +56,7 @@ spec:
spec:
containers:
- name: http-to-grpc
image: buoyantio/bb:v0.0.3
image: buoyantio/bb:v0.0.5
args: ["point-to-point-channel", "--grpc-downstream-server", "bb-readme-terminus-svc:9090", "--h1-server-port", "8080"]
ports:
- containerPort: 8080
Expand Down
Loading

0 comments on commit c578036

Please sign in to comment.