diff --git a/README.md b/README.md index 932589d3..ad38f471 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ From the benchmark/tests directory: > node loca-extract > node local-transfer ``` - + Run all benchamrks: ```bash > npm run benchmark @@ -33,8 +33,20 @@ TODO: Results will be writen to out directory under /tests -## Setup Grafana and send results to InfluxDB +## Initial Setup Grafana InfluxDB +```bash +> docker-compose -f infrastructure/local/docker-compose.yaml up +``` +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. + +![Grafana import dashboard](./docs/images/import-hover.png) +* All of the Grafana configuration is stored in a folder adjacent to the this project's folder named `/data/grafana`. +* The data for influxDB is stored in a folder adjacent to the this project's folder named `/data/influxdb`. + +## Run dashboard locally and send results to InfluxDB + +If you're not running it yet: ```bash > docker-compose -f infrastructure/local/docker-compose.yaml up ``` @@ -44,10 +56,16 @@ Keep docker running and in another tab run: > STAGE=local LOG_PRETTY=true node runner/index.js ``` -To view the Grafan dashboard: http://localhost:3000/ +To view the Grafana dashboard: http://localhost:3000/ Use the default account admin/admin to login +## Production architecture + +The diagram below describes the production setup. + +![Production diagram](./docs/images/prod-infrastructure.png) + ## Test description Each test uses a small file ( 200 bytes ) and large file ( 1.2 MB ) and actions on empty repo vs populated repo. diff --git a/docs/images/import-hover.png b/docs/images/import-hover.png new file mode 100644 index 00000000..7e45a63f Binary files /dev/null and b/docs/images/import-hover.png differ diff --git a/docs/performance infrastructure.png b/docs/images/prod-infrastructure.png similarity index 100% rename from docs/performance infrastructure.png rename to docs/images/prod-infrastructure.png diff --git a/infrastructure/local/docker-compose.yaml b/infrastructure/local/docker-compose.yaml index 4b6c5f2b..f7c6f69a 100644 --- a/infrastructure/local/docker-compose.yaml +++ b/infrastructure/local/docker-compose.yaml @@ -12,6 +12,8 @@ services: image: grafana/grafana:latest ports: - "3000:3000" + volumes: + - ../../../data/grafana:/var/lib/grafana depends_on: - influxdb links: