Skip to content

Commit

Permalink
update readme, add docs and various improvements (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
marefr authored Sep 11, 2019
1 parent 9f845e0 commit 429da32
Show file tree
Hide file tree
Showing 11 changed files with 175 additions and 513 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.circleci
artifacts
build
dist
docker
docs
node_modules
scripts
Dockerfile
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tmp
# Build
dist
build
artifacts

# API keys and secrets
.env
Expand All @@ -37,6 +38,3 @@ dist/**/*

# Ignore output from coverage report
coverage

# Dirs and tar.gz files generated from build
plugin-*
14 changes: 6 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# Change Log

## v1.0.3 - 2019-09-10
## 1.0.3 (2019-09-10)

- Automate docker release

## v1.0.2 - 2019-09-10
## 1.0.2 (2019-09-10)

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

## v1.0.1 - 2019-09-09
## 1.0.1 (2019-09-09)

- Switch docker base image from node:10 to node:alpine-10 #36, [marefr](https://github.com/marefr)
- Updated the panel render wait function to account for Grafana version 6 #26, [bmichaelis](https://github.com/bmichaelis)
- 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)
- 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)
- Updated dependencies

## v1.0.0 - 2019-08-16
## 1.0.0 (2019-08-16)

Initial release containing prebuilt binaries available for download. Right now the binaries themselves should be considered alpha as they need more testing.
69 changes: 35 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,53 @@

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

# Dependencies
## Requirements

Nodejs v8+ installed.
### Supported operating systems

# Installation
- Linux (x64)
- Windows (x64)
- Mac OS X (x64)

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

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.

# Remote Rendering Docker image
## Installation

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

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

```
cd docker
docker-compose up
grafana-cli plugins install grafana-image-renderer
```

# Packaging
This plugin can be packaged into single archive without dependencies.
```bash
make build_package ARCH=<arch_string>
```
### Clone into plugins folder

1. git clone into Grafana external plugins folder.
2. Install dependencies and build

```
yarn install --pure-lockfile
yarn run build
```
3. Restart Grafana
Where <arch_string> is a combination of
- linux, darwin, win32
- ia32, x64, arm, arm64
- unknown, glibc, musl
## Remote Rendering Using Docker
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)
So far these builds were tested from Mac:
- darwin-x64-unknown
- linux-x64-glibc
- win32-x64-unknown
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).
## Troubleshooting
To get more logging information, update Grafana configuration:
```
[log]
filters = rendering:debug
```
## Additional information
See [docs](https://github.com/grafana/grafana-image-renderer/blob/master/docs/index.md).
16 changes: 7 additions & 9 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ version: '2'

services:
grafana:
hostname: grafana
image: grafana:dev
image: grafana/grafana:master
ports:
- "3000:3000"
- "2003:2003"
volumes:
- ./grafana.ini:/etc/grafana/grafana.ini
environment:
GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
GF_LOG_FILTERS: rendering:debug
renderer:
hostname: renderer
image: grafana-image-renderer:latest
image: grafana/grafana-image-renderer:latest
ports:
- "8081:8081"

- 8081
Loading

0 comments on commit 429da32

Please sign in to comment.