← All insightsAutomation

Automating Grafana from scratch

CodeWizard Academy · 12 May 2026 · 3 min read · Intermediate

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

bash
docker run -d -p 3000:3000 --name grafana grafana/grafana-oss
# default login admin/admin on http://localhost:3000

2. Describe the desired state

Provision a data source as code so it is reproducible.

yaml
# provisioning/datasources/prometheus.yaml
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    url: http://prometheus:9090
    isDefault: true

3. Run it from CI

Ship dashboards from Git via provisioning.

yaml
# 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.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult