diff --git a/dev/.gitignore b/dev/.gitignore index a6cb371e..005867ef 100644 --- a/dev/.gitignore +++ b/dev/.gitignore @@ -11,3 +11,10 @@ !README.md !scripts/ !scripts/* + +# only source control grafana/provisioning/datasources/automatic.yml +# any other files under ./grafana will be ignored +!grafana/ +!grafana/provisioning/ +!grafana/provisioning/datasources/ +!grafana/provisioning/datasources/automatic.yml diff --git a/dev/README.md b/dev/README.md index e8ae4fd2..fd33bc47 100644 --- a/dev/README.md +++ b/dev/README.md @@ -98,7 +98,7 @@ The following commands assume you run them from the root of the project: ```bash touch ./dev/grafana.dev.ini # make desired changes to ./dev/grafana.dev.ini then run -touch .env && ./dev/add_env_var.sh GRAFANA_DEV_PROVISIONING ./dev/grafana.dev.ini .env +touch .env && ./dev/add_env_var.sh GRAFANA_DEV_PROVISIONING ./dev/grafana/grafana.dev.ini .env ``` For example, if you would like to enable the `topnav` feature toggle, you can modify your `./dev/grafana.dev.ini` as @@ -109,9 +109,15 @@ such: enable = top_nav ``` -The next time you start the project via `docker-compose`, the `grafana` container will have `./dev/grafana.dev.ini` +The next time you start the project via `docker-compose`, the `grafana` container will have `./dev/grafana/grafana.dev.ini` volume mounted inside the container. +#### Modifying Provisioning Configuration + +Files under `./dev/grafana/provisioning` are volume mounted into your Grafana container and allow you to easily +modify the instance's provisioning configuration. See the Grafana docs [here](https://grafana.com/docs/grafana/latest/administration/provisioning/#:~:text=You%20can%20manage%20data%20sources,match%20the%20provisioned%20configuration%20file.) +for more information. + ### Enabling RBAC for OnCall for local development To run the project locally w/ RBAC for OnCall enabled, you will first need to run a `grafana-enterprise` container, diff --git a/provisioning/datasources/automatic.yml b/dev/grafana/provisioning/datasources/automatic.yml similarity index 100% rename from provisioning/datasources/automatic.yml rename to dev/grafana/provisioning/datasources/automatic.yml diff --git a/docker-compose-developer.yml b/docker-compose-developer.yml index a7bc8910..d985604b 100644 --- a/docker-compose-developer.yml +++ b/docker-compose-developer.yml @@ -314,7 +314,7 @@ services: volumes: - grafanadata_dev:/var/lib/grafana - ./grafana-plugin:/var/lib/grafana/plugins/grafana-plugin - - ./provisioning:/etc/grafana/provisioning + - ./dev/grafana/provisioning:/etc/grafana/provisioning - ${GRAFANA_DEV_PROVISIONING:-/dev/null}:/etc/grafana/grafana.ini depends_on: postgres: diff --git a/examples/terraform/basic.tf b/terraform/examples/basic.tf similarity index 100% rename from examples/terraform/basic.tf rename to terraform/examples/basic.tf diff --git a/examples/terraform/routes.tf b/terraform/examples/routes.tf similarity index 100% rename from examples/terraform/routes.tf rename to terraform/examples/routes.tf diff --git a/examples/terraform/shift_schedule.tf b/terraform/examples/shift_schedule.tf similarity index 100% rename from examples/terraform/shift_schedule.tf rename to terraform/examples/shift_schedule.tf