Merge pull request #5 from matisku/install-all-plugins

Install all plugins automatically
This commit is contained in:
Mateusz Trojak
2018-03-07 18:59:31 +01:00
committed by GitHub
4 changed files with 26 additions and 24 deletions
+19 -4
View File
@@ -10,7 +10,7 @@ TIG stack is created for [Rancher](http://rancher.com/). If you are not fammilia
To use it add custom [rancher-catalog](https://github.com/matisku/rancher-catalog) to the Rancher configuration, and within only one click, you are able to monitor your Docker Instance automatically!
## What if I don't want to use Rancher?
You can obviously use this stack without Rancher. Just grab [docker-compose.yml](https://raw.githubusercontent.com/matisku/tig-stack/master/docker-compose.yml) file amd start your stack as usual.
You can obviously use this stack without Rancher. Just grab [docker-compose.yml](https://raw.githubusercontent.com/matisku/tig-stack/master/docker-compose.yml) file and start your stack as usual.
```bash
$ mkdir tig-stack
$ cd tig-stack
@@ -18,9 +18,19 @@ $ curl -OL https://raw.githubusercontent.com/matisku/tig-stack/master/docker-com
$ docker-compose up -d
```
If needed you can clone this repository and build `tig-stack` locally. For this `docker-compose-circleci.yml` can be used
```bash
$ git clone https://github.com/matisku/tig-stack.git
$ cd tig-stack
$ docker-compose -f docker-compose-circleci.yml up -d
```
## Additional Info
* By default Grafana will have all available plugins installed.
* To access grafana go to: `http://localhost:30001`
## Environment
### Grafana
`GF_INSTALL_PLUGINS` - In default all plugins are installed
`GF_SECURITY_ADMIN_USER` - Admin Username. Default: `admin`
`GF_SECURITY_ADMIN_PASSWORD`- Admin User Password. Default:`admin`
`GF_SECURITY_SECRET_KEY` - Secret key. Default: `grafana`
@@ -31,6 +41,7 @@ $ docker-compose up -d
`GF_DASHBOARDS_JSON_ENABLED` - Dashboards as JSON enabled. Default: `"true"`
`GF_DASHBOARDS_JSON_PATH` - Path where JSON Dashboards are stored. Default: `/opt/grafana`
### InfluxDB
`INFLUX_DATABASE` - IndluxDB Database Name. Default: `"telegraf"`
`INLFUX_ADMIN_USER` - IndluxDB Admin Username. Default: `"grafana"`
@@ -43,8 +54,12 @@ $ docker-compose up -d
`DATABASE` - InfluxDB Database where telegraf stores data. Default: `"telegraf"`
## Ports
Grafana: `3000`
InfluxDB: `8083`, `8086`
Grafana:
  - `3000` - in Docker
  - `3001` - on Host
InfluxDB:
  - `8083`
  - `8086`
## License
Copyright © 2016-2018 Mateusz Trojak. See LICENSE for details.
-1
View File
@@ -5,7 +5,6 @@ grafana:
links:
- influxdb:influxdb
environment:
GF_INSTALL_PLUGINS: "abhisant-druid-datasource,adremsoft-netcrunch-app,alexanderzobnin-zabbix-app,ayoungprogrammer-finance-datasource,belugacdn-app,bessler-pictureit-panel,bosun-app,briangann-datatable-panel,briangann-gauge-panel,btplc-alarm-box-panel,btplc-peak-report-panel,btplc-status-dot-panel,btplc-trend-box-panel,camptocamp-prometheus-alertmanager-datasource,citilogics-geoloop-panel,cloudflare-app,crate-datasource,dalmatinerdb-datasource,ddurieux-glpi-app,devicehive-devicehive-datasource,digiapulssi-breadcrumb-panel,digiapulssi-organisations-panel,digrich-bubblechart-panel,fastweb-openfalcon-datasource,fetzerch-sunandmoon-datasource,foursquare-clouderamanager-datasource,fzakaria-simple-annotations-datasource,gnocchixyz-gnocchi-datasource,grafana-azure-monitor-datasource,grafana-clock-panel,grafana-example-app,grafana-influxdb-08-datasource,grafana-kairosdb-datasource,grafana-piechart-panel,grafana-simple-json-datasource,grafana-worldmap-panel,gridprotectionalliance-openhistorian-datasource,gridprotectionalliance-osisoftpi-datasource,hawkular-datasource,ibm-apm-datasource,jasonlashua-prtg-datasource,jdbranham-diagram-panel,kentik-app,linksmart-hds-datasource,michaeldmoore-annunciator-panel,monasca-datasource,monitoringartist-monitoringart-datasource,mtanda-google-calendar-datasource,mtanda-heatmap-epoch-panel,mtanda-histogram-panel,natel-discrete-panel,natel-influx-admin-panel,natel-plotly-panel,neocat-cal-heatmap-panel,novalabs-annotations-panel,ns1-app,ntop-ntopng-datasource,opennms-helm-app,percona-percona-app,petrslavotinek-carpetplot-panel,praj-ams-datasource,rackerlabs-blueflood-datasource,radensolutions-netxms-datasource,raintank-kubernetes-app,raintank-snap-app,raintank-worldping-app,ryantxu-ajax-panel,satellogic-3d-globe-panel,savantly-heatmap-panel,sidewinder-datasource,skydive-datasource,sni-pnp-datasource,stagemonitor-elasticsearch-app,udoprog-heroic-datasource,vertamedia-clickhouse-datasource,vonage-status-panel,voxter-app"
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_SECURITY_SECRET_KEY: grafana
-1
View File
@@ -5,7 +5,6 @@ grafana:
links:
- influxdb:influxdb
environment:
GF_INSTALL_PLUGINS: "abhisant-druid-datasource,adremsoft-netcrunch-app,alexanderzobnin-zabbix-app,ayoungprogrammer-finance-datasource,belugacdn-app,bessler-pictureit-panel,bosun-app,briangann-datatable-panel,briangann-gauge-panel,btplc-alarm-box-panel,btplc-peak-report-panel,btplc-status-dot-panel,btplc-trend-box-panel,camptocamp-prometheus-alertmanager-datasource,citilogics-geoloop-panel,cloudflare-app,crate-datasource,dalmatinerdb-datasource,ddurieux-glpi-app,devicehive-devicehive-datasource,digiapulssi-breadcrumb-panel,digiapulssi-organisations-panel,digrich-bubblechart-panel,fastweb-openfalcon-datasource,fetzerch-sunandmoon-datasource,foursquare-clouderamanager-datasource,fzakaria-simple-annotations-datasource,gnocchixyz-gnocchi-datasource,grafana-azure-monitor-datasource,grafana-clock-panel,grafana-example-app,grafana-influxdb-08-datasource,grafana-kairosdb-datasource,grafana-piechart-panel,grafana-simple-json-datasource,grafana-worldmap-panel,gridprotectionalliance-openhistorian-datasource,gridprotectionalliance-osisoftpi-datasource,hawkular-datasource,ibm-apm-datasource,jasonlashua-prtg-datasource,jdbranham-diagram-panel,kentik-app,linksmart-hds-datasource,michaeldmoore-annunciator-panel,monasca-datasource,monitoringartist-monitoringart-datasource,mtanda-google-calendar-datasource,mtanda-heatmap-epoch-panel,mtanda-histogram-panel,natel-discrete-panel,natel-influx-admin-panel,natel-plotly-panel,neocat-cal-heatmap-panel,novalabs-annotations-panel,ns1-app,ntop-ntopng-datasource,opennms-helm-app,percona-percona-app,petrslavotinek-carpetplot-panel,praj-ams-datasource,rackerlabs-blueflood-datasource,radensolutions-netxms-datasource,raintank-kubernetes-app,raintank-snap-app,raintank-worldping-app,ryantxu-ajax-panel,satellogic-3d-globe-panel,savantly-heatmap-panel,sidewinder-datasource,skydive-datasource,sni-pnp-datasource,stagemonitor-elasticsearch-app,udoprog-heroic-datasource,vertamedia-clickhouse-datasource,vonage-status-panel,voxter-app"
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_SECURITY_SECRET_KEY: grafana
+7 -18
View File
@@ -7,25 +7,14 @@
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_LOGS"
chown -R grafana:grafana /etc/grafana
# This will be used in the future
#plugins=`grafana-cli plugins list-remote | awk '{print $2}'| grep "-"`
#for i in $plugins; do grafana-cli plugins install $i; done
if [ ! -z ${GF_INSTALL_PLUGINS} ]; then
OLDIFS=$IFS
IFS=','
for plugin in ${GF_INSTALL_PLUGINS}; do
if [ ! -d ${GF_PATHS_PLUGINS}/${plugin} ]
then
echo "Plugin ${plugin} not installed. Starting installation."
grafana-cli plugins install ${plugin}
else
echo "Plugin ${plugin} already installed. Skipping"
fi
done
IFS=$OLDIFS
fi
# Install all available plugins
GRAFANA_PLUGINS=`grafana-cli plugins list-remote | awk '{print $2}'| grep "-"`
for plugin in ${GRAFANA_PLUGINS};
do
grafana-cli plugins install $plugin || true;
done
# Start grafana with gosu
exec gosu grafana /usr/sbin/grafana-server \
--homepath=/usr/share/grafana \
--config=/etc/grafana/grafana.ini \