Skip to content

Commit c2ae93e

Browse files
authored
First open-source release
1 parent 814decd commit c2ae93e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4196
-1
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Before opening your pull request, please make sure that you have:
2+
3+
- [ ] signed [Uber's Contributor License Agreement][];
4+
- [ ] added tests to cover your changes;
5+
- [ ] run the test suite locally (`make test`); and finally,
6+
- [ ] run the linters locally (`make lint`).
7+
8+
Thanks for your contribution!
9+
10+
[Uber's Contributor License Agreement]: https://docs.google.com/a/uber.com/forms/d/1pAwS_-dA1KhPlfxzYLBqK6rsSWwRwH95OCCZrcsY5rk/viewform

.gitignore

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.DS_Store
2+
3+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
4+
*.o
5+
*.a
6+
*.so
7+
8+
# Folders
9+
_obj
10+
_test
11+
build/
12+
13+
# Architecture specific extensions/prefixes
14+
*.[568vq]
15+
[568vq].out
16+
17+
*.cgo1.go
18+
*.cgo2.c
19+
_cgo_defun.c
20+
_cgo_gotypes.go
21+
_cgo_export.*
22+
23+
_testmain.go
24+
25+
debian/arachne.debhelper.log
26+
debian/arachne.substvars
27+
debian/files
28+
29+
*.exe
30+
*.test
31+
*.log
32+
*.prof
33+
*.pprof
34+
35+
# Output of the go coverage tool, specifically when used with LiteIDE
36+
*.out
37+
38+
# external packages folder
39+
vendor/
40+
.idea/
41+
*.iml

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: go
2+
sudo: required
3+
go:
4+
- 1.7
5+
- tip
6+
env:
7+
global:
8+
- ARACHNE_CONFIG_DIR=./arachned/config
9+
install: make install_ci
10+
script: make test
11+
cache:
12+
directories:
13+
- vendor

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2016 Uber Technologies, Inc.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

Makefile

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
PACKAGES=$(shell glide novendor)
2+
3+
builddir := build
4+
5+
$(info builddir ${builddir})
6+
7+
${builddir}:
8+
mkdir -p $(builddir)
9+
10+
.PHONY: bins
11+
bins:
12+
go build -o ${builddir}/arachned github.com/uber/arachne/arachned/
13+
14+
all: bins
15+
16+
clean:
17+
rm -f ${builddir}/*
18+
19+
20+
.PHONY: lint
21+
lint:
22+
go vet $(PACKAGES)
23+
24+
.PHONY: test
25+
test: check-license lint
26+
find . -type f -name '*.go' | xargs golint
27+
go test $(PACKAGES)
28+
29+
.PHONY: vendor
30+
vendor: glide.lock
31+
glide install
32+
33+
.PHONY: install_ci
34+
install_ci:
35+
glide --version || go get -u -f github.com/Masterminds/glide
36+
make vendor
37+
go get -u -f github.com/golang/lint/golint
38+
39+
vendor/github.com/uber/uber-licence: vendor
40+
[ -d vendor/github.com/uber/uber-licence ] || glide install
41+
42+
vendor/github.com/uber/uber-licence/node_modules: vendor/github.com/uber/uber-licence
43+
cd vendor/github.com/uber/uber-licence && npm install
44+
45+
.PHONY: check-license
46+
check-license: vendor/github.com/uber/uber-licence/node_modules
47+
./vendor/github.com/uber/uber-licence/bin/licence --dry --file '*.go'
48+
49+
.PHONY: add-license
50+
add-license: vendor/github.com/uber/uber-licence/node_modules
51+
./vendor/github.com/uber/uber-licence/bin/licence --verbose --file '*.go'

README.md

+81-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,81 @@
1-
# arachne
1+
# Arachne [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci]
2+
3+
Arachne is a packet loss detection system and an underperforming path detection
4+
system. It provides fast and easy active end-to-end functional testing
5+
of all the components in Data Center and Cloud infrastructures.
6+
Arachne is able to detect intra-DC, inter-DC, DC-to-Cloud, and
7+
DC-to-External-Services issues by generating minimal traffic:
8+
9+
- Reachability
10+
- Round-trip and 1-way latency
11+
- Silent packet drops and black holes
12+
- Jitter (average of the deviation from the network mean latency)
13+
- PMTU or Firewall issues too related possibly to network config changes
14+
(accidental or not)
15+
- Whether network-level SLAs are met
16+
17+
18+
## Usage
19+
20+
There are two ways to use the Arachne package.
21+
22+
## As a standalone program
23+
Run Arachne as a standalone program (it's Debian packaged already too).
24+
25+
### As a library in your own program
26+
Import this package and call Arachne from your program/service with
27+
```go
28+
arachne.Run(config, arachne.ReceiverOnlyMode(false))
29+
```
30+
where the option provided above is among the few optional ones,
31+
32+
33+
Below is the list of all the CLI options available, when Arachne is
34+
used as a standalone program. The default options should be good
35+
enough for most users.
36+
37+
```
38+
$ arachne --help
39+
40+
____________________________________________________________/\\\______________________________________
41+
___________________________________________________________\/\\\______________________________________
42+
___________________________________________________________\/\\\______________________________________
43+
__/\\\\\\\\\_____/\\/\\\\\\\___/\\\\\\\\\________/\\\\\\\\_\/\\\__________/\\/\\\\\\_______/\\\\\\\\__
44+
_\////////\\\___\/\\\/////\\\_\////////\\\_____/\\\//////__\/\\\\\\\\\\__\/\\\////\\\____/\\\/////\\\_
45+
___/\\\\\\\\\\__\/\\\___\///____/\\\\\\\\\\___/\\\_________\/\\\/////\\\_\/\\\__\//\\\__/\\\\\\\\\\\__
46+
__/\\\/////\\\__\/\\\__________/\\\/////\\\__\//\\\________\/\\\___\/\\\_\/\\\___\/\\\_\//\\///////___
47+
_\//\\\\\\\\/\\_\/\\\_________\//\\\\\\\\/\\__\///\\\\\\\\_\/\\\___\/\\\_\/\\\___\/\\\__\//\\\\\\\\\\_
48+
__\////////\//__\///___________\////////\//_____\////////__\///____\///__\///____\///____\//////////__
49+
50+
51+
Usage: arachne [--foreground] [-c=<config_file_path>] [--receiver_only] [--sender_only] [--orchestrator]
52+
53+
Arachne is a packet loss detection system and an underperforming path detection
54+
system for Data Center and Cloud Infrastructures.
55+
56+
Options:
57+
-v, --version Show the version and exit
58+
--foreground=false Force foreground mode
59+
-c, --config="/etc/arachne/target_config.json" Configuration file path
60+
(by default in /etc/arachne/)
61+
--receiver_only=false Force TCP receiver-only mode
62+
--sender_only=false Force TCP sender-only mode
63+
--orchestrator=false Force orchestrator mode
64+
```
65+
66+
67+
### Note on required privileges to run
68+
69+
Arachne is granted access to raw sockets without the need to run with sudo or
70+
as root user, by being granted `CAP_NET_RAW` capability
71+
(see: [capabilities][]).
72+
73+
74+
<hr>
75+
Released under the [MIT License](LICENSE).
76+
77+
[doc-img]: https://godoc.org/github.com/uber/arachne?status.svg
78+
[doc]: https://godoc.org/github.com/uber/arachne
79+
[ci-img]: https://travis-ci.org/uber/arachne.svg?branch=master
80+
[ci]: https://travis-ci.org/uber/arachne
81+
[capabilities]: http://linux.die.net/man/7/capabilities

arachned/config/arachne.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
arachne:
2+
pidPath: /var/run/arachne/arachne.pid
3+
orchestrator:
4+
addrport: 127.0.0.1:12345
5+
restVersion: api/v1
6+
7+
logging:
8+
stdout: true
9+
level: info
10+
logSink: /var/log/arachne/arachne.log
11+
12+
metrics:
13+
statsd:
14+
hostPort: 127.0.0.1:6789
15+
prefix: arachne
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"local": {
3+
"region": "us-west",
4+
"src_address": "",
5+
"interface_name": "en0",
6+
"target_tcp_port": 44111,
7+
"timeout": "500ms",
8+
"base_src_tcp_port": 31000,
9+
"num_src_tcp_ports": 16,
10+
"batch_interval": "10s",
11+
"qos": "disabled",
12+
"resolve_dns": "enabled",
13+
"dns_servers_alternate": "8.8.8.8, 8.8.4.4",
14+
"poll_orchestrator_interval_success": "2h55m",
15+
"poll_orchestrator_interval_failure": "60s"
16+
},
17+
18+
"internal": [
19+
{"ip": "10.10.39.31"},
20+
{"ip": "10.10.15.27"}
21+
]
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"local": {
3+
"region": "us-west",
4+
"src_address": "",
5+
"interface_name": "eth0",
6+
"target_tcp_port": 44111,
7+
"timeout": "500ms",
8+
"base_src_tcp_port": 31000,
9+
"num_src_tcp_ports": 16,
10+
"batch_interval": "10s",
11+
"qos": "disabled",
12+
"resolve_dns": "enabled",
13+
"dns_servers_alternate": "8.8.8.8, 8.8.4.4",
14+
"poll_orchestrator_interval_success": "2h55m",
15+
"poll_orchestrator_interval_failure": "60s"
16+
},
17+
18+
"internal": [
19+
{"ip": "10.10.39.31"},
20+
{"ip": "10.10.15.27"}
21+
]
22+
}

arachned/main.go

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright (c) 2016 Uber Technologies, Inc.
2+
//
3+
// Permission is hereby granted, free of charge, to any person obtaining a copy
4+
// of this software and associated documentation files (the "Software"), to deal
5+
// in the Software without restriction, including without limitation the rights
6+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
// copies of the Software, and to permit persons to whom the Software is
8+
// furnished to do so, subject to the following conditions:
9+
//
10+
// The above copyright notice and this permission notice shall be included in
11+
// all copies or substantial portions of the Software.
12+
//
13+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
// THE SOFTWARE.
20+
21+
package main
22+
23+
import (
24+
"github.com/uber/arachne"
25+
"github.com/uber/arachne/config"
26+
"github.com/uber/arachne/metrics"
27+
)
28+
29+
func main() {
30+
31+
mc := new(metrics.StatsdConfiger)
32+
33+
ec := &config.Extended{
34+
Metrics: metrics.Opt(*mc),
35+
}
36+
37+
arachne.Run(
38+
ec,
39+
arachne.ReceiverOnlyMode(false),
40+
arachne.OrchestratorMode(false),
41+
)
42+
}

0 commit comments

Comments
 (0)