Docs: Document the plugins preinstall feature (#96464)

This commit is contained in:
Andres Martinez Gotor
2024-12-04 15:12:08 +01:00
committed by GitHub
parent ae44451155
commit 85e006935e
4 changed files with 39 additions and 13 deletions
@@ -132,37 +132,37 @@ Grafana currently supports three types of plugins: panel, data source, and app.
To install plugins in the Docker container, complete the following steps:
1. Pass the plugins you want to be installed to Docker with the `GF_INSTALL_PLUGINS` environment variable as a comma-separated list.
1. Pass the plugins you want to be installed to Docker with the `GF_PLUGINS_PREINSTALL` environment variable as a comma-separated list.
This sends each plugin name to `grafana-cli plugins install ${plugin}` and installs them when Grafana starts.
This starts a background process that installs the list of plugins while Grafana server starts.
For example:
```bash
docker run -d -p 3000:3000 --name=grafana \
-e "GF_INSTALL_PLUGINS=grafana-clock-panel, grafana-simple-json-datasource" \
-e "GF_PLUGINS_PREINSTALL=grafana-clock-panel, grafana-simple-json-datasource" \
grafana/grafana-enterprise
```
1. To specify the version of a plugin, add the version number to the `GF_INSTALL_PLUGINS` environment variable.
1. To specify the version of a plugin, add the version number to the `GF_PLUGINS_PREINSTALL` environment variable.
For example:
```bash
docker run -d -p 3000:3000 --name=grafana \
-e "GF_INSTALL_PLUGINS=grafana-clock-panel 1.0.1" \
-e "GF_PLUGINS_PREINSTALL=grafana-clock-panel 1.0.1" \
grafana/grafana-enterprise
```
> **Note:** If you do not specify a version number, the latest version is used.
1. To install a plugin from a custom URL, use the following convention to specify the URL: `<url to plugin zip>;<plugin install directory name>`.
1. To install a plugin from a custom URL, use the following convention to specify the URL: `<plugin ID>@[<plugin version>]@<url to plugin zip>`.
For example:
```bash
docker run -d -p 3000:3000 --name=grafana \
-e "GF_INSTALL_PLUGINS=https://github.com/VolkovLabs/custom-plugin.zip;custom-plugin" \
-e "GF_PLUGINS_PREINSTALL=custom-plugin@@https://github.com/VolkovLabs/custom-plugin.zip" \
grafana/grafana-enterprise
```
@@ -180,7 +180,7 @@ docker volume create grafana-storage
docker run -d -p 3000:3000 --name=grafana \
--volume grafana-storage:/var/lib/grafana \
-e "GF_SERVER_ROOT_URL=http://my.grafana.server/" \
-e "GF_INSTALL_PLUGINS=grafana-clock-panel" \
-e "GF_PLUGINS_PREINSTALL=grafana-clock-panel" \
grafana/grafana-enterprise
```
@@ -355,7 +355,7 @@ services:
restart: unless-stopped
environment:
- GF_SERVER_ROOT_URL=http://my.grafana.server/
- GF_INSTALL_PLUGINS=grafana-clock-panel
- GF_PLUGINS_PREINSTALL=grafana-clock-panel
ports:
- '3000:3000'
volumes:
@@ -364,7 +364,7 @@ volumes:
grafana_storage: {}
```
> **Note:** If you want to specify the version of a plugin, add the version number to the `GF_INSTALL_PLUGINS` environment variable. For example: `-e "GF_INSTALL_PLUGINS=grafana-clock-panel 1.0.1,grafana-simple-json-datasource 1.3.5"`. If you do not specify a version number, the latest version is used.
> **Note:** If you want to specify the version of a plugin, add the version number to the `GF_PLUGINS_PREINSTALL` environment variable. For example: `-e "GF_PLUGINS_PREINSTALL=grafana-clock-panel@1.0.1,grafana-simple-json-datasource@1.3.5"`. If you do not specify a version number, the latest version is used.
## Next steps