2019-10-07 04:26:31 -07:00
# Set up your development environment
2018-05-29 16:52:02 +02:00
2019-10-07 04:26:31 -07:00
This folder contains useful scripts and configuration so you can:
2019-03-25 21:14:24 +01:00
2019-10-07 04:26:31 -07:00
* Configure data sources in Grafana for development.
* Configure dashboards for development and test scenarios.
* Create docker-compose file with databases and fake data.
2019-03-25 21:14:24 +01:00
2019-10-07 04:26:31 -07:00
## Install Docker
Grafana uses [Docker ](https://docker.com ) to make the task of setting up databases a little easier. If you do not have it already, make sure you [install Docker ](https://docs.docker.com/docker-for-mac/install/ ) before proceeding to the next step.
## Developer dashboards and data sources
2018-05-29 16:52:02 +02:00
```bash
./setup.sh
```
2018-07-16 12:36:35 +02:00
2019-10-07 04:26:31 -07:00
After restarting the Grafana server, there should be a number of data sources named `gdev-<type>` provisioned as well as
a dashboard folder named `gdev dashboards` . This folder contains dashboard and panel features tests dashboards.
2018-07-16 12:36:35 +02:00
2019-10-07 04:26:31 -07:00
Please update these dashboards or make new ones as new panels and dashboards features are developed or new bugs are
2019-03-25 21:14:24 +01:00
found. The dashboards are located in the `devenv/dev-dashboards` folder.
2018-07-16 12:36:35 +02:00
2019-10-07 04:26:31 -07:00
## docker-compose with databases
This command creates a docker-compose file with specified databases configured and ready to run. Each database has
a prepared image with some fake data ready to use. For available databases, see `docker/blocks` directory. Notice that
for some databases there are multiple images, for example there is prometheus_mac specifically for Macs or different
version.
2019-03-25 21:14:24 +01:00
```bash
2019-07-16 09:16:11 +03:00
make devenv sources=influxdb,prometheus2,elastic5
2019-03-25 21:14:24 +01:00
```
2018-07-16 12:36:35 +02:00
2019-10-07 04:26:31 -07:00
Some of the blocks support dynamic change of the image version used in the Docker file. The signature looks like this:
2019-07-16 09:16:11 +03:00
```bash
make devenv sources=postgres,openldap postgres_version=9.2
2019-10-07 04:26:31 -07:00
```