-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nick Nellis
committed
Jun 11, 2018
0 parents
commit c6e2738
Showing
3,490 changed files
with
973,305 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
version: 2 | ||
jobs: | ||
build-api: | ||
docker: | ||
- image: circleci/golang:1.10.2 | ||
environment: | ||
DOCKER_IMAGE_NAME: nmnellis/vistio-api | ||
|
||
working_directory: /go/src/github.com/nmnellis/vistio | ||
steps: | ||
- checkout | ||
- run: cd api && make test | ||
- run: cd api && make build | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- run: | | ||
cd api | ||
if [ "${CIRCLE_BRANCH}" == "master" ]; then | ||
docker build -t $DOCKER_IMAGE_NAME . | ||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push $DOCKER_IMAGE_NAME | ||
fi | ||
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(?:\.[0-9]+){2}$ ]]; then | ||
docker build -t "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" . | ||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" | ||
fi | ||
build-web: | ||
docker: | ||
- image: circleci/node:10.3.0 | ||
environment: | ||
DOCKER_IMAGE_NAME: nmnellis/vistio-web | ||
|
||
working_directory: ~/vistio | ||
steps: | ||
- checkout | ||
- run: cd web && npm install | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- run: | | ||
cd web | ||
if [ "${CIRCLE_BRANCH}" == "master" ]; then | ||
docker build -t $DOCKER_IMAGE_NAME . | ||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push $DOCKER_IMAGE_NAME | ||
fi | ||
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(?:\.[0-9]+){2}$ ]]; then | ||
docker build -t "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" . | ||
docker login -u $DOCKER_USER -p $DOCKER_PASS | ||
docker push "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" | ||
fi | ||
workflows: | ||
version: 2 | ||
build_project: | ||
jobs: | ||
- build-api | ||
- build-web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "debug", | ||
"remotePath": "", | ||
"port": 2345, | ||
"host": "127.0.0.1", | ||
"program": "${workspaceRoot}/example/prometheus-mock", | ||
"env": {}, | ||
"args": [], | ||
"showLog": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Le Van Nghia | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Vistio [![CircleCI Build Status](https://circleci.com/gh/nmnellis/vistio.svg?style=shield)](https://circleci.com/gh/nmnellis/vistio) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![MIT Licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nmnellis/vistio/blob/master/LICENSE) | ||
|
||
* Forked from - https://github.com/nghialv/promviz and https://github.com/mjhd-devlion/promviz-front | ||
|
||
Vistio is an application that helps you visualize the traffic of your cluster from Prometheus data. | ||
|
||
It has 2 components: | ||
|
||
- Vistio-API: retrieves data from Prometheus servers, aggregates them and provides an API to get the graph data. | ||
|
||
- Vistio-Web: Forked from [Promviz-front](https://github.com/mjhd-devlion/promviz-front): based on Netflix's [vizceral](https://github.com/Netflix/vizceral) to render traffic graph. | ||
|
||
#### Features: | ||
- Generates and renders traffic graph in realtime | ||
- Able to replay from any time in the past | ||
- Able to generate notices on node and connection from prom query | ||
- Provides a sidecar application for k8s that watches config changes and reload Vistio server in runtime | ||
- Fits with [Istio](https://istio.io)'s metrics | ||
|
||
![](https://github.com/nmnellis/vistio/blob/master/documentation/sample_filter.png) | ||
|
||
## Architecture | ||
|
||
![](https://github.com/nmnellis/vistio/blob/master/documentation/architecture.png) | ||
|
||
## Install | ||
|
||
#### Helm chart | ||
|
||
If you are using [Helm](https://helm.sh), the simplest way to install is using the charts in `helm` directory with | ||
|
||
``` | ||
helm install --name vistio ./helm/vistio | ||
``` | ||
|
||
#### Docker images | ||
|
||
Docker images of both `vistio-api` and `vistio-web` are available on Docker Hub. | ||
|
||
- [nmnellis/vistio-api](https://hub.docker.com/r/nmnellis/vistio-api) | ||
- [nmnellis/vistio-web](https://hub.docker.com/r/nmnellis/vistio-web) | ||
|
||
## Example | ||
|
||
An Istio example is in the `/example` directory | ||
|
||
You can try it by going to that directory and run | ||
|
||
``` | ||
docker-compose up --build | ||
``` | ||
|
||
Then checkout each service at: | ||
- promviz-front: [http://localhost:8080/graph](http://localhost:8080/) | ||
- vistio: [http://localhost:9091/graph](http://localhost:9091/graph) | ||
- prometheus: [http://localhost:9090/graph](http://localhost:9090/graph) | ||
- mock-metric: [http://localhost:30001/metrics](http://localhost:30001/metrics) | ||
|
||
## Configuration | ||
|
||
See [configuration.md](https://github.com/nmnellis/vistio/blob/master/documentation/configuration.md) in documentation directory. | ||
|
||
## Deploy with Istio Bookinfo | ||
|
||
1. Deploy Vistio | ||
|
||
2. Get Vistio host and port. | ||
```sh | ||
export VISTIO_HOST=$(kubectl get po -l app=vistio-web -n default -o 'jsonpath={.items[0].status.hostIP}') | ||
export VISTIO_PORT=$(kubectl get service vistio-web -o jsonpath='{.spec.ports[?(@.name=="http")].nodePort}') | ||
export VISTIO_URL=$VISTIO_HOST:$VISTIO_PORT | ||
``` | ||
3. | ||
|
||
## Contributing | ||
|
||
Please feel free to create an issue or pull request. | ||
|
||
## LICENSE | ||
|
||
Vistio is released under the MIT license. See LICENSE file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM alpine:3.5 | ||
|
||
RUN apk --update add ca-certificates atop | ||
|
||
ADD build/vistio /bin | ||
|
||
EXPOSE 9091 | ||
|
||
ENTRYPOINT ["/bin/vistio"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[constraint]] | ||
name = "github.com/prometheus/client_golang" | ||
version = "0.8.0" | ||
|
||
[[constraint]] | ||
name = "github.com/uber-go/zap" | ||
version = "1.7.1" | ||
|
||
[[constraint]] | ||
source = "https://github.com/fsnotify/fsnotify/archive/v1.4.7.tar.gz" | ||
name = "gopkg.in/fsnotify.v1" |
Oops, something went wrong.