Skip to content

Commit

Permalink
Update Mixer's reading matter. (#588)
Browse files Browse the repository at this point in the history
Former-commit-id: 16405a990550596c8aa35c31a7586ab9f54c7a8f
  • Loading branch information
geeknoid committed Apr 20, 2017
1 parent 45e84d3 commit 155ca51
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 43 deletions.
17 changes: 9 additions & 8 deletions mixer/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# The Istio Mixer #
# Mixer
![Mixer](doc/logo.png)


[![GoDoc](https://godoc.org/github.com/istio/mixer?status.svg)](http://godoc.org/github.com/istio/mixer)
[![Build Status](https://testing.istio.io/buildStatus/icon?job=mixer/postsubmit)](https://testing.istio.io/job/mixer/)
[![Go Report Card](https://goreportcard.com/badge/github.com/istio/mixer)](https://goreportcard.com/report/github.com/istio/mixer)
[![codecov.io](https://codecov.io/github/istio/mixer/coverage.svg?branch=master)](https://codecov.io/github/istio/mixer?branch=master)
[![GitHub license](https://img.shields.io/github/license/istio/mixer.svg)](LICENSE)

The Istio mixer provides the foundation of the Istio service mesh
design. It is responsible for insulating the Istio proxy and
Mixer provides the foundation of the Istio service mesh
design. It is responsible for insulating Envoy and
Istio-based services from details of the current execution
environment, as well as to implement the control policies
that Istio supports.

The Istio mixer provides three distinct features:
Mixer provides three distinct features:

- **Precondition Checking**. Enables callers to verify a number of preconditions before responding to an incoming request from a service consumer.
Preconditions can include whether the service consumer is properly authenticated, is on the service's whitelist, passes ACL checks, and more.
Expand All @@ -25,10 +24,12 @@ for its consumers.
- **Quota Management**. Enables services to allocate and free quota on a number of dimensions, Quotas are used as a relatively simple resource management
tool to provide some fairness between service consumers when contending for limited resources.

Learn more about Mixer [here](https://istio.io/concepts/mixer.html).

Please see [istio.io](https://istio.io)
to learn about the overall Istio project and how to get in touch with us. To learn how you can
contribute to any of the Istio components, including the mixer, please
contribute to any of the Istio components, including Mixer, please
see the Istio [contribution guidelines](https://github.com/istio/istio/blob/master/CONTRIBUTING.md).

The Istio mixer's [developer's guide](doc/dev/development.md) presents everything
you need to know to create, build, and test code for the mixer.
Mixer's [developer's guide](doc/dev/development.md) presents everything
you need to know to create, build, and test code for Mixer.
4 changes: 2 additions & 2 deletions mixer/doc/dev/adapters.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Writing Mixer Adapters

This will eventually turn into a developer's guide for
creating mixer adapters. For now, it's just a set of
creating Mixer adapters. For now, it's just a set of
notes and reminders:

- Adapters must use env.Logger for logging during
Expand All @@ -11,5 +11,5 @@ operator wants to see it.

- Adapters must use env.ScheduleWork or env.ScheduleDaemon
in order to dispatch goroutines. This ensures all adapter goroutines
are prevented from crashing the mixer as a whole by catching
are prevented from crashing Mixer as a whole by catching
any panics they produce.
64 changes: 32 additions & 32 deletions mixer/doc/dev/development.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Development Guide

This document is intended to be the canonical source of truth for things like
supported toolchain versions for building the Istio mixer. If you find a
supported toolchain versions for building Mixer. If you find a
requirement that this doc does not capture, or if you find other docs with
references to requirements that are not simply links to this doc, please
[submit an issue](https://github.com/istio/mixer/issues/new).

This document is intended to be relative to the branch in which it is found.
It is guaranteed that requirements will change over time for the development
branch, but release branches of the Istio mixer should not change.
branch, but release branches of Mixer should not change.

- [Prerequisites](#prerequisites)
- [Setting up Go](#setting-up-go)
Expand All @@ -34,46 +34,46 @@ branch, but release branches of the Istio mixer should not change.
- [Running race detection tests](#running-race-detection-tests)
- [Adding dependencies](#adding-dependencies)
- [About testing](#about-testing)
- [Using the mixer](#using-the-mixer)
- [Using Mixer](#using-mixer)

Other docs you should look at:

- [Project conventions](./conventions.md)
- [Creating fast and lean code](./performance.md)
- [Writing mixer adapters](./adapters.md)
- [Writing Mixer adapters](./adapters.md)
- [Go landmines](https://gist.github.com/lavalamp/4bd23295a9f32706a48f)
- [Go style mistakes](https://github.com/golang/go/wiki/CodeReviewComments)

## Prerequisites

The mixer code base has only a few external dependencies you
The Mixer code base has only a few external dependencies you
need to setup before being able to build and run the code.

### Setting up Go

The Istio mixer is written in the [Go](http://golang.org) programming language.
To build the mixer, you'll need a Go development environment. Builds for
the mixer require Go version 1.8. If you haven't set up a Go development
Mixer is written in the [Go](http://golang.org) programming language.
To build Mixer, you'll need a Go development environment. Builds for
Mixer require Go version 1.8. If you haven't set up a Go development
environment, please follow [these instructions](http://golang.org/doc/code.html)
to install the Go tools.

Set up your GOPATH and add a path entry for Go binaries to your PATH. Typically
added to your ~/.profile:

```
```shell
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
```

### Setting up Bazel

The Istio mixer is built using the bazel build system. See
Mixer is built using the bazel build system. See
[here](https://bazel.build/versions/master/docs/install.html) for the
installation procedures.

### Setting up Docker

To run some of the mixer examples and tests, you need to set up Docker server.
To run some of the Mixer examples and tests, you need to set up Docker server.
Please follow [these instructions](https://docs.docker.com/engine/installation/)
for how to do this for your platform.

Expand All @@ -91,10 +91,10 @@ Other git workflows are also valid.

The commands below require that you have $GOPATH set ([$GOPATH
docs](https://golang.org/doc/code.html#GOPATH)). We highly recommend you put
the mixer's code into your GOPATH. Note: the commands below will not work if
Mixer's code into your GOPATH. Note: the commands below will not work if
there is more than one directory in your `$GOPATH`.

```
```shell
export ISTIO=~/go/src/istio.io
mkdir -p $ISTIO/mixer
cd $ISTIO
Expand All @@ -111,7 +111,7 @@ Mixer uses a local pre-commit hook to ensure that the code
passes local test.

Run
```
```shell
user@host:~/GOHOME/src/istio.io/mixer$ bin/pre-commit
Installing pre-commit hook
```
Expand All @@ -120,14 +120,14 @@ The commit is allowed to proceed only if the hook succeeds.

### Create a branch and make changes

```
```shell
git checkout -b my-feature
# Make your code changes
```

### Keeping your fork in sync

```
```shell
git fetch upstream
git rebase upstream/master
```
Expand All @@ -136,15 +136,15 @@ Note: If you have write access to the main repository at
github.com/istio/mixer, you should modify your git configuration so
that you can't accidentally push to upstream:

```
```shell
git remote set-url --push upstream no_push
```

### Committing changes to your fork

When you're happy with some changes, you can commit them and push them to your fork:

```
```shell
git add .
git commit
git push -f origin my-feature
Expand Down Expand Up @@ -181,9 +181,9 @@ reviews much easier.

### Building the code

To build the mixer, enter:
To build Mixer, enter:

```
```shell
cd $(ISTIO)/mixer
bazel build ...
```
Expand All @@ -194,21 +194,21 @@ This figures out what it needs to do and does not need any input from you.

You can delete any build artifacts with:

```
```shell
bazel clean
```
### Running tests

You can run all the available tests with:

```
```shell
bazel test ...
```
### Getting coverage numbers

You can get the current unit test coverage numbers on your local repo by going to the top of the repo and entering:

```
```shell
make coverage
```

Expand All @@ -217,23 +217,23 @@ make coverage
You can automatically format the source code and BUILD files to follow our conventions by going to the
top of the repo and entering:

```
```shell
make fmt
```

### Running the linters

You can run all the linters we require on your local repo by going to the top of the repo and entering:

```
```shell
make lint
```

### Race detection tests

You can run the test suite using the Go race detection tools using:

```
```shell
make racetest
```

Expand All @@ -256,15 +256,15 @@ known good recent commit is acceptable.

Examples:

```
```shell
new_go_repository(
name = "org_golang_google_grpc",
commit = "708a7f9f3283aa2d4f6132d287d78683babe55c8", # Dec 5, 2016 (v1.0.5)
importpath = "google.golang.org/grpc",
)
```

```
```shell
git_repository(
name = "org_pubref_rules_protobuf",
commit = "b0acb9ecaba79716a36fdadc0bcc47dedf6b711a", # Nov 28 2016 (importmap support for gogo_proto_library)
Expand All @@ -286,18 +286,18 @@ passed both unit and integration tests. We only merges pull requests when
[table driven testing](https://github.com/golang/go/wiki/TableDrivenTests)
* Concurrent unit test runs must pass.

## Using the mixer
## Using Mixer

Once you've built the source base, you can run the mixer in a basic mode using:
Once you've built the source base, you can run Mixer in a basic mode using:

```
```shell
bazel-bin/cmd/server/mixs server \
--globalConfigFile testdata/globalconfig.yml \
--serviceConfigFile testdata/serviceconfig.yml --logtostderr
```

You can also run a simple client to interact with the server:

```
```shell
bazel-bin/cmd/client/mixc check
```
2 changes: 1 addition & 1 deletion mixer/doc/dev/performance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creating Fast and Lean Code

The Istio mixer is a high-performance component. It's imperative to keep its
Mixer is a high-performance component. It's imperative to keep its
latency and memory consumption low.

- [Memory usage](#memory-usage)
Expand Down
Binary file modified mixer/doc/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 155ca51

Please sign in to comment.