Skip to content

Commit 541eb1d

Browse files
Update documentation to improve visibility and avoid duplicates with Grafana documentation (#277)
* Update README with installation instructions and move Docker instructions * Apply suggestions from code review Co-authored-by: achatterjee-grafana <[email protected]> * Update README.md * Apply review feedback * fix links Co-authored-by: achatterjee-grafana <[email protected]>
1 parent 57bdfb3 commit 541eb1d

File tree

4 files changed

+88
-313
lines changed

4 files changed

+88
-313
lines changed

README.md

Lines changed: 84 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,106 @@ A Grafana backend plugin that handles rendering panels and dashboards to PNGs us
1313
This plugin is packaged in a single executable with [Node.js](https://nodejs.org/) runtime and [Chromium browser](https://www.chromium.org/Home).
1414
This means that you don't need to have Node.js and Chromium installed in your system for the plugin to function.
1515

16-
However, [Chromium browser](https://www.chromium.org/) depends on certain libraries and if you don't have all of those libraries installed in your
17-
system you may encounter errors when trying to render an image. For further details and troubleshooting help, please refer to
18-
[Grafana Image Rendering documentation](https://grafana.com/docs/administration/image_rendering/).
16+
However, the [Chromium browser](https://www.chromium.org/) depends on certain libraries. If you don't have all of those libraries installed in your
17+
system, you may see some errors when you try to render an image. For more information including troubleshooting help, refer to
18+
[Grafana Image Rendering documentation](https://grafana.com/docs/image-rendering/).
1919

20-
## Installation
20+
### Memory requirements
2121

22-
### Using grafana-cli
22+
Rendering images requires a lot of memory, mainly because Grafana creates browser instances in the background for the actual rendering.
23+
We recommend a minimum of 16GB of free memory on the system rendering images.
2324

24-
**NOTE:** Installing this plugin using grafana-cli is supported from Grafana v6.4.
25+
Rendering multiple images in parallel requires an even bigger memory footprint. You can use the remote rendering service in order to render images on a remote system, so your local system resources are not affected.
26+
27+
## Plugin installation
28+
29+
You can install the plugin using Grafana CLI (recommended way) or with Grafana Docker image.
30+
31+
### Grafana CLI (recommended)
2532

2633
```bash
2734
grafana-cli plugins install grafana-image-renderer
2835
```
2936

30-
### Install in Grafana Docker image
37+
### Grafana Docker image
3138

32-
This plugin is not compatible with the current Grafana Docker image without installing further system-level dependencies. We recommend setting up another Docker container
33-
for rendering and using remote rendering, see [Remote Rendering Using Docker](#remote-rendering-using-docker) for reference.
39+
This plugin is not compatible with the current Grafana Docker image and requires additional system-level dependencies. We recommend setting up another Docker container for rendering and using remote rendering instead. For instruction, refer to [Run in Docker](#run-in-docker).
3440

35-
If you still want to install the plugin in the Grafana docker image we provide instructions for how to build a custom Grafana image, see [Grafana Docker documentation](https://grafana.com/docs/installation/docker/#custom-image-with-grafana-image-renderer-plugin-pre-installed) for further instructions.
41+
If you still want to install the plugin with the Grafana Docker image, refer to the instructions on building a custom Grafana image in [Grafana Docker documentation](https://grafana.com/docs/installation/docker/#custom-image-with-grafana-image-renderer-plugin-pre-installed).
3642

43+
## Remote rendering service installation
3744

38-
### Configuration
45+
> **Note:** Requires an internet connection.
3946
40-
For available configuration settings, please refer to [Grafana Image Rendering documentation](https://grafana.com/docs/administration/image_rendering/).
47+
You can run this plugin as a remote HTTP rendering service. In this setup, Grafana renders an image by making an HTTP request to the remote rendering service, which in turn renders the image and returns it back in the HTTP response to Grafana.
4148

42-
## Remote Rendering Using Docker
49+
You can run the remote HTTP rendering service using Docker or as a standalone Node.js application.
4350

44-
Instead of installing and running the image renderer as a plugin, you can run it as a remote image rendering service using Docker. Read more about [remote rendering using Docker](https://github.com/grafana/grafana-image-renderer/blob/master/docs/remote_rendering_using_docker.md).
51+
### Run in Docker
4552

46-
## Troubleshooting
53+
Grafana Docker images are published at [Docker Hub](https://hub.docker.com/r/grafana/grafana-image-renderer).
54+
55+
The following example shows how you can run Grafana and the remote HTTP rendering service in two separate Docker containers using Docker Compose.
56+
57+
1. Create a `docker-compose.yml` with the following content:
58+
59+
```yaml
60+
version: '2'
61+
62+
services:
63+
grafana:
64+
image: grafana/grafana:latest
65+
ports:
66+
- '3000:3000'
67+
environment:
68+
GF_RENDERING_SERVER_URL: http://renderer:8081/render
69+
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
70+
GF_LOG_FILTERS: rendering:debug
71+
renderer:
72+
image: grafana/grafana-image-renderer:latest
73+
ports:
74+
- 8081
75+
```
76+
77+
1. Next, run docker compose.
78+
79+
```bash
80+
docker-compose up
81+
```
82+
83+
### Run as standalone Node.js application
84+
85+
The following example describes how to build and run the remote HTTP rendering service as a standalone Node.js application and configure Grafana appropriately.
86+
87+
1. Clone the [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) Git repository.
88+
1. Install dependencies and build:
89+
90+
```bash
91+
yarn install --pure-lockfile
92+
yarn run build
93+
```
94+
95+
1. Run the server:
4796

48-
For troubleshooting help, please refer to
49-
[Grafana Image Rendering documentation](https://grafana.com/docs/grafana/latest/administration/image_rendering/#troubleshoot-image-rendering).
97+
```bash
98+
node build/app.js server --port=8081
99+
```
50100

51-
## Additional information
101+
1. Update Grafana configuration:
102+
103+
```
104+
[rendering]
105+
server_url = http://localhost:8081/render
106+
callback_url = http://localhost:3000/
107+
```
108+
109+
1. Restart Grafana.
110+
111+
## Configuration
112+
113+
For available configuration settings, please refer to [Grafana Image Rendering documentation](https://grafana.com/docs/grafana/latest/image-rendering/#configuration).
114+
115+
## Troubleshooting
52116

53-
See [docs](https://github.com/grafana/grafana-image-renderer/blob/master/docs/index.md).
117+
For troubleshooting help, refer to
118+
[Grafana Image Rendering troubleshooting documentation](https://grafana.com/docs/grafana/latest//image-rendering/troubleshooting.md).

docs/building_from_source.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Building from source
1+
# Build the image renderer from source
22

33
Git clone this repo:
44

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Documentation
1+
# Developer documentation
2+
Use the following links for instructions on how to:
23

3-
- [Remote rendering using docker](remote_rendering_using_docker.md)
4-
- [Building from source](building_from_source.md)
4+
- [Build the image renderer from source](building_from_source.md)
55
- [Package plugin as a single executable](package_plugin_as_single_executable.md)
66
- [Release and publish a new version](release_new_version.md)

0 commit comments

Comments
 (0)