Grafana Installation

via Docker

To install Grafana, use the following command:

docker volume create grafana-storage
docker volume create grafana-log
docker volume create grafana-config
docker run -d --name=grafana -p 3010:3000 -v grafana-storage:/var/lib/grafana -v grafana-cfg:/etc/grafana/ -v grafana-log:/var/log/grafana grafana/grafana-enterprise:9.0.7

This command creates three Docker volumes for storing data, logs, and configuration. It then runs a Grafana container with the specified volumes and ports. You can access Grafana at http://localhost:3010, and the default login is admin/admin.

via Docker Compose (with Renderer)

To install Grafana with a rendering service using Docker Compose, follow these steps:

  1. Install the Docker Compose plugin:
yum install docker-compose-plugin
  1. Create three Docker volumes for storing data, logs, and configuration:
docker volume create grafana-storage
docker volume create grafana-log
docker volume create grafana-config
  1. Create a docker-compose.yaml file with the following contents:
services:
 grafana:
   image: grafana/grafana-enterprise:9.0.7
   ports:
   - '3010:3000'
   environment:
     GF_RENDERING_SERVER_URL: http://renderer:8081/render
     GF_RENDERING_CALLBACK_URL: http://grafana:3000/
     GF_LOG_FILTERS: rendering:debug
   volumes:
     - grafana-storage:/var/lib/grafana
     - grafana-cfg:/etc/grafana/
     - grafana-log:/var/log/grafana
 renderer:
   image: grafana/grafana-image-renderer:3.5.0
   ports:
   - 8081
volumes:
 grafana-storage:
   external: true
 grafana-log:
   external: true
 grafana-cfg:
   external: true

This file creates two Docker services, grafana and renderer, and three Docker volumes for storing data, logs, and configuration.

  1. Run the following command to start the services:
docker compose -f docker-compose.yaml up -d
  1. You can access Grafana at http://localhost:3010, and the default login is admin/admin.

Note that this configuration uses a rendering service to render images. The rendering service runs on port 8081 and is accessed by Grafana through the GF_RENDERING_SERVER_URL environment variable.

That's it! You now have Grafana up and running with a rendering service.