Skip to content

Commit 429da32

Browse files
authored
update readme, add docs and various improvements (#37)
1 parent 9f845e0 commit 429da32

File tree

11 files changed

+175
-513
lines changed

11 files changed

+175
-513
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
.circleci
2+
artifacts
3+
build
4+
dist
25
docker
6+
docs
37
node_modules
48
scripts
59
Dockerfile

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ tmp
1616
# Build
1717
dist
1818
build
19+
artifacts
1920

2021
# API keys and secrets
2122
.env
@@ -37,6 +38,3 @@ dist/**/*
3738

3839
# Ignore output from coverage report
3940
coverage
40-
41-
# Dirs and tar.gz files generated from build
42-
plugin-*

CHANGELOG.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
# Change Log
2-
3-
## v1.0.3 - 2019-09-10
1+
## 1.0.3 (2019-09-10)
42

53
- Automate docker release
64

7-
## v1.0.2 - 2019-09-10
5+
## 1.0.2 (2019-09-10)
86

97
- Don't include dist directory in archive (zip) files
108

11-
## v1.0.1 - 2019-09-09
9+
## 1.0.1 (2019-09-09)
1210

13-
- Switch docker base image from node:10 to node:alpine-10 #36, [marefr](https://github.com/marefr)
14-
- Updated the panel render wait function to account for Grafana version 6 #26, [bmichaelis](https://github.com/bmichaelis)
11+
- Switch docker base image from node:10 to node:alpine-10 [#36](https://github.com/grafana/grafana-image-renderer/issues/36), [marefr](https://github.com/marefr)
12+
- Updated the panel render wait function to account for Grafana version 6 [#26](https://github.com/grafana/grafana-image-renderer/issues/26), [bmichaelis](https://github.com/bmichaelis)
1513
- Updated dependencies
1614

17-
## v1.0.0 - 2019-08-16
15+
## 1.0.0 (2019-08-16)
1816

1917
Initial release containing prebuilt binaries available for download. Right now the binaries themselves should be considered alpha as they need more testing.

README.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,53 @@
22

33
A Grafana Backend Plugin that handles rendering panels & dashboards to PNGs using headless chrome.
44

5-
# Dependencies
5+
## Requirements
66

7-
Nodejs v8+ installed.
7+
### Supported operating systems
88

9-
# Installation
9+
- Linux (x64)
10+
- Windows (x64)
11+
- Mac OS X (x64)
1012

11-
- git clone into Grafana external plugins folder.
12-
- yarn install --pure-lockfile
13-
- yarn run build
14-
- restart grafana-server , it should log output that the renderer plugin was found and started.
15-
- To get more logging info update grafana.ini section [log] , key filters = rendering:debug
13+
### No dependencies
1614

15+
This plugin have been packaged into a single executable together with [Node.js](https://nodejs.org/) runtime and [Chromium](https://www.chromium.org/Home) so it doesn't require any additional dependencies to be installed on the Grafana server.
1716

18-
# Remote Rendering Docker image
17+
## Installation
1918

20-
A dockerfile is provided for deploying the remote-image-renderer in a container.
21-
You can then configure your Grafana server to use the container via the
22-
```
23-
[rendering]
24-
server_url=http://renderer:8081/render
25-
```
26-
config setting in grafana.ini
19+
### Using grafana-cli
2720

28-
A docker-compose example is provided in docker/
29-
to launch
21+
NOTE: Installing this plugin using grafana-cli is supported from Grafana v6.4.
3022

3123
```
32-
cd docker
33-
docker-compose up
24+
grafana-cli plugins install grafana-image-renderer
3425
```
3526

36-
# Packaging
37-
This plugin can be packaged into single archive without dependencies.
38-
```bash
39-
make build_package ARCH=<arch_string>
40-
```
27+
### Clone into plugins folder
28+
29+
1. git clone into Grafana external plugins folder.
30+
2. Install dependencies and build
31+
32+
```
33+
yarn install --pure-lockfile
34+
yarn run build
35+
```
36+
37+
3. Restart Grafana
4138
42-
Where <arch_string> is a combination of
43-
- linux, darwin, win32
44-
- ia32, x64, arm, arm64
45-
- unknown, glibc, musl
39+
## Remote Rendering Using Docker
4640
47-
This follows combinations allowed for grpc plugin and you can see options [here](https://console.cloud.google.com/storage/browser/node-precompiled-binaries.grpc.io/grpc/?project=grpc-testing)
48-
So far these builds were tested from Mac:
49-
- darwin-x64-unknown
50-
- linux-x64-glibc
51-
- win32-x64-unknown
41+
As an alternative to installing and running the image renderer as a plugin you can run it as a remote image rendering service using Docker. Read more [here](https://github.com/grafana/grafana-image-renderer/blob/master/docs/remote_rendering.md).
42+
43+
## Troubleshooting
44+
45+
To get more logging information, update Grafana configuration:
46+
47+
```
48+
[log]
49+
filters = rendering:debug
50+
```
5251
52+
## Additional information
5353
54+
See [docs](https://github.com/grafana/grafana-image-renderer/blob/master/docs/index.md).

docker/docker-compose.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@ version: '2'
22

33
services:
44
grafana:
5-
hostname: grafana
6-
image: grafana:dev
5+
image: grafana/grafana:master
76
ports:
87
- "3000:3000"
9-
- "2003:2003"
10-
volumes:
11-
- ./grafana.ini:/etc/grafana/grafana.ini
8+
environment:
9+
GF_RENDERING_SERVER_URL: http://renderer:8081/render
10+
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
11+
GF_LOG_FILTERS: rendering:debug
1212
renderer:
13-
hostname: renderer
14-
image: grafana-image-renderer:latest
13+
image: grafana/grafana-image-renderer:latest
1514
ports:
16-
- "8081:8081"
17-
15+
- 8081

0 commit comments

Comments
 (0)