Anything you do to Grafana twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.
1. Install it reproducibly
docker run -d -p 3000:3000 --name grafana grafana/grafana-oss
# default login admin/admin on http://localhost:30002. Describe the desired state
Provision a data source as code so it is reproducible.
# provisioning/datasources/prometheus.yaml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true3. Run it from CI
Ship dashboards from Git via provisioning.
# provisioning/dashboards/all.yaml
apiVersion: 1
providers:
- name: git-dashboards
folder: Services
type: file
options: { path: /var/lib/grafana/dashboards }Want senior help putting Grafana to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.