Installation
Bench-routes can be installed in 2 ways:
- Bare metal
- Docker
- Installing from source
Bare metal
This is for installing and running Bench-routes locally using a pre-release binary. Here is an example to download the
amd64 version of v1.0.0-alpha.2
release.
1# Download the pre-release version
2wget -O bench-routes.tar.gz https://github.com/bench-routes/bench-routes/releases/download/v1.0.0-alpha.2/src-linux-amd64.tar.gz
3
4# Extract the tar file
5tar -zxvf bench-routes.tar.gz
6
7# Change directory
8cd build/src-linux-amd64
9
10# Run
11./src-linus-amd64.sh
This should be enough to turn on Bench-routes. You should get something like this in the logs.
1[hsingh@localhost src-linux-amd64]$ ./src-linux-amd64.sh
2LOG: 2021/03/10 21:59:14.263315 main.go:55 initializing...
3LOG: 2021/03/10 21:59:14.266505 main.go:295 forming req_res chain ...
4https://www.google.co.insearch
5LOG: 2021/03/10 21:59:14.266584 main.go:295 forming flood_ping chain ...
6LOG: 2021/03/10 21:59:14.266688 db.go:132 creating chain at storage/req-res-delay-monitoring/chunk_req_res_https___www.google.co.in_search.json
7LOG: 2021/03/10 21:59:14.266736 db.go:132 creating chain at storage/flood-ping/chunk_flood_ping_google.co.in.json
8LOG: 2021/03/10 21:59:14.266749 main.go:295 forming jitter chain ...
9LOG: 2021/03/10 21:59:14.266808 main.go:295 forming ping chain ...
10LOG: 2021/03/10 21:59:14.266926 db.go:132 creating chain at storage/ping/chunk_ping_google.co.in.json
11LOG: 2021/03/10 21:59:14.266873 db.go:132 creating chain at storage/jitter/chunk_jitter_google.co.in.json
12https://www.facebook.comsearch
13LOG: 2021/03/10 21:59:14.267624 db.go:132 creating chain at storage/req-res-delay-monitoring/chunk_req_res_https___www.facebook.com_search.json
14LOG: 2021/03/10 21:59:14.267817 db.go:132 creating chain at storage/jitter/chunk_jitter_facebook.com.json
15LOG: 2021/03/10 21:59:14.267914 db.go:132 creating chain at storage/flood-ping/chunk_flood_ping_facebook.com.json
16https://in.search.yahoo.comsearch
17LOG: 2021/03/10 21:59:14.268023 db.go:132 creating chain at storage/ping/chunk_ping_facebook.com.json
18LOG: 2021/03/10 21:59:14.268106 db.go:132 creating chain at storage/req-res-delay-monitoring/chunk_req_res_https___in.search.yahoo.com_search.json
19LOG: 2021/03/10 21:59:14.268163 db.go:132 creating chain at storage/jitter/chunk_jitter_in.search.yahoo.com.json
20LOG: 2021/03/10 21:59:14.268211 db.go:132 creating chain at storage/flood-ping/chunk_flood_ping_in.search.yahoo.com.json
21LOG: 2021/03/10 21:59:14.268397 main.go:326 finished req_res chain
22LOG: 2021/03/10 21:59:14.268360 db.go:132 creating chain at storage/ping/chunk_ping_in.search.yahoo.com.json
23LOG: 2021/03/10 21:59:14.268639 main.go:326 finished jitter chain
24LOG: 2021/03/10 21:59:14.268730 main.go:326 finished flood_ping chain
25LOG: 2021/03/10 21:59:14.268806 main.go:326 finished ping chain
26LOG: 2021/03/10 21:59:14.268891 main.go:89 initial chain formation time: 2.503946ms
27LOG: 2021/03/10 21:59:14.268939 main.go:93 Bench-routes is up and running
Docker
Right now, we do not provide docker builds at docker hub. This will be done once the projecct moves to beta
version.
But that does not mean you cannot use docker to make your life easier. We have a
dockerfile for this purpose.
You can clone the repository and then in the root folder, execute
1# Build the image in your local docker registry
2docker build -t bench-routes:local-latest .
3
4# Run
5docker run -p 9990:9990 -it bench-routes:local-latest
This should start running Bench-routes in the current terminal.
Install from source
Since the project is in active development in early stages, the recent master commits will always be more stable than the alpha releases. This makes a lot of sense to install and use the most recent code from development.
You can install and run from source in 3 ways:
- Using
makefile
- Building the project
go
version satisfies 1.15.x
and above.Using makefile
Makefile is used to ease the software development process. In order to start running Bench-routes
1make run
This simply runs the following command
1go run src/*.go 9990
This means that you can also use that command to run directly.
Note: If you want to run Bench-routes at a port other than :9990
, just change the last argument to the port you
want to keep.
Building the project
You can make a binary file and simply run it.
1# Build
2go build -o bench-routes ./src/*.go
3
4# Run
5./bench-routes