Skip to content

Commit c580328

Browse files
authored
Merge pull request #14 from ipfs/docs-infra
add initial setup instructions
2 parents 6671f93 + bfd68d1 commit c580328

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ From the benchmark/tests directory:
2020
> node loca-extract
2121
> node local-transfer
2222
```
23-
23+
2424
Run all benchamrks:
2525
```bash
2626
> npm run benchmark
@@ -33,8 +33,20 @@ TODO:
3333

3434
Results will be writen to out directory under /tests
3535

36-
## Setup Grafana and send results to InfluxDB
36+
## Initial Setup Grafana InfluxDB
37+
```bash
38+
> docker-compose -f infrastructure/local/docker-compose.yaml up
39+
```
40+
Open http://localhost:3000/ in a browser. The default username/password combination is admin/admin. You will be asked to change that password after initial login. Setup the datasource with type `influxDB`and use `http://influxdb:8086` as the URL. Next import the dashboard from `infrastructure/grafana/dashboard.json` by hovering over the `+` icon on the left of your screen.
41+
42+
![Grafana import dashboard](./docs/images/import-hover.png)
3743

44+
* All of the Grafana configuration is stored in a folder adjacent to the this project's folder named `/data/grafana`.
45+
* The data for influxDB is stored in a folder adjacent to the this project's folder named `/data/influxdb`.
46+
47+
## Run dashboard locally and send results to InfluxDB
48+
49+
If you're not running it yet:
3850
```bash
3951
> docker-compose -f infrastructure/local/docker-compose.yaml up
4052
```
@@ -44,10 +56,16 @@ Keep docker running and in another tab run:
4456
> STAGE=local LOG_PRETTY=true node runner/index.js
4557
```
4658

47-
To view the Grafan dashboard: http://localhost:3000/
59+
To view the Grafana dashboard: http://localhost:3000/
4860

4961
Use the default account admin/admin to login
5062

63+
## Production architecture
64+
65+
The diagram below describes the production setup.
66+
67+
![Production diagram](./docs/images/prod-infrastructure.png)
68+
5169
## Test description
5270

5371
Each test uses a small file ( 200 bytes ) and large file ( 1.2 MB ) and actions on empty repo vs populated repo.

docs/images/import-hover.png

28.8 KB
Loading

infrastructure/local/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ services:
1212
image: grafana/grafana:latest
1313
ports:
1414
- "3000:3000"
15+
volumes:
16+
- ../../../data/grafana:/var/lib/grafana
1517
depends_on:
1618
- influxdb
1719
links:

0 commit comments

Comments
 (0)