Skip to content

Commit f74b36b

Browse files
authored
Update readme and docs (#58)
1 parent a62e10a commit f74b36b

File tree

3 files changed

+69
-19
lines changed

3 files changed

+69
-19
lines changed

README.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Grafana Image Renderer [![CircleCI](https://circleci.com/gh/grafana/grafana-image-renderer.svg?style=svg)](https://circleci.com/gh/grafana/grafana-image-renderer)
2-
31
A Grafana backend plugin that handles rendering panels and dashboards to PNGs using headless Chrome.
42

53
## Requirements
@@ -10,44 +8,43 @@ A Grafana backend plugin that handles rendering panels and dashboards to PNGs us
108
- Windows (x64)
119
- Mac OS X (x64)
1210

13-
### No dependencies
11+
### Dependencies
12+
13+
This plugin is packaged in a single executable with [Node.js](https://nodejs.org/) runtime and [Chromium browser](https://www.chromium.org/Home).
14+
This means that you don't need to have Node.js and Chromium installed in your system for the plugin to function.
1415

15-
This plugin is packaged in a single executable with [Node.js](https://nodejs.org/) runtime and [Chromium](https://www.chromium.org/Home). It does not require any additional software to be installed on the Grafana server.
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/).
1619

1720
## Installation
1821

1922
### Using grafana-cli
2023

2124
**NOTE:** Installing this plugin using grafana-cli is supported from Grafana v6.4.
2225

23-
```
26+
```bash
2427
grafana-cli plugins install grafana-image-renderer
2528
```
2629

27-
### Clone into plugins folder
28-
29-
1. Git clone this repo into the Grafana external plugins folder.
30-
2. Install dependencies and build.
30+
### Install in Grafana Docker image
3131

32-
```
33-
yarn install --pure-lockfile
34-
yarn run build
35-
```
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.
3634

37-
3. Restart Grafana.
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.
3836

3937
## Remote Rendering Using Docker
4038

4139
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).
4240

4341
## Troubleshooting
4442

45-
To get more logging information, update the Grafana configuration:
43+
For troubleshooting help, please refer to [Grafana Image Rendering documentation](https://grafana.com/docs/administration/image_rendering/#troubleshooting).
4644

47-
```
48-
[log]
49-
filters = rendering:debug
50-
```
45+
## Building from source
46+
47+
See [Building from source](https://github.com/grafana/grafana-image-renderer/blob/master/docs/building_from_source.md).
5148

5249
## Additional information
5350

docs/building_from_source.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Building from source
2+
3+
Git clone this repo:
4+
5+
```bash
6+
git clone https://github.com/grafana/grafana-image-renderer.git
7+
cd grafana-image-renderer
8+
```
9+
10+
## Plugin
11+
12+
1. Install [Node.js](https://nodejs.org/) and [Yarn](https://yarnpkg.com/en/).
13+
2. Install dependencies and build:
14+
15+
```bash
16+
make deps
17+
18+
# build and package for Linux x64
19+
make build_package ARCH=linux-x64-glibc
20+
21+
# build and package for Window x64
22+
make build_package ARCH=win32-x64-unknown
23+
24+
# build and package for Darwin x64
25+
make build_package ARCH=darwin-x64-unknown
26+
27+
# build and package without including Chromium
28+
make build_package ARCH=<ARCH> SKIP_CHROMIUM=true OUT=plugin-<ARCH>-no-chromium
29+
```
30+
31+
3. Built artifacts can be found in ./artifacts directory
32+
33+
## Docker image
34+
35+
1. Install Docker
36+
2. Build Docker image:
37+
38+
```bash
39+
docker build -t custom-grafana-image-renderer .
40+
```
41+
42+
## Local Node.js application using local Chrome/Chromium
43+
44+
1. Install [Node.js](https://nodejs.org/) and [Yarn](https://yarnpkg.com/en/).
45+
2. Install dependencies and build:
46+
47+
```bash
48+
make deps
49+
make build
50+
```
51+
52+
3. Built artifacts are found in ./build

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Documentation
22

33
- [Remote rendering using docker](remote_rendering_using_docker.md)
4+
- [Building from source](building_from_source.md)
45
- [Package plugin as a single executable](package_plugin_as_single_executable.md)
56
- [Release and publish a new version](release_new_version.md)

0 commit comments

Comments
 (0)