When building a custom grafana docker image that includes installation of raintank-worldping-app, the app is available in Grafana. When I navigate to Plugins, WorldPing Config tab I have Update and Disable buttons, but nowhere to enter my Grafana API Key. When I click on the Update button I receive:
Plugin Error
Fetch error: 403 Instantiating https://grafana-openshift-grafana.apps.shared.openshift.local/public/plugins/raintank-worldping-app/components/config/config.js Loading https://grafana-openshift-grafana.apps.shared.openshift.local/public/plugins/raintank-worldping-app/module.js Loading plugins/raintank-worldping-app/module.
I see the following in my grafana container log:
t=2018-06-22T13:25:17+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=POST path=/api/plugins/raintank-worldping-app/settings status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.129.2.1” time_ms=7 size=37 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
t=2018-06-22T13:25:17+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=GET path=/plugins/raintank-worldping-app/edit status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.130.0.1” time_ms=1 size=14035 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
t=2018-06-22T13:25:17+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=GET path=/api/plugins/raintank-worldping-app/settings status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.130.2.1” time_ms=0 size=4529 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
t=2018-06-22T13:25:17+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=GET path=/api/plugins/raintank-worldping-app/markdown/readme status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.129.2.1” time_ms=0 size=4095 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
t=2018-06-22T13:25:21+0000 lvl=dbug msg=“Scheduling update” logger=alerting.scheduler ruleCount=1
t=2018-06-22T13:25:27+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=POST path=/api/plugins/raintank-worldping-app/settings status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.130.0.1” time_ms=7 size=37 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
t=2018-06-22T13:25:27+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=GET path=/plugins/raintank-worldping-app/edit status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.130.2.1” time_ms=1 size=14035 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
t=2018-06-22T13:25:27+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=GET path=/api/plugins/raintank-worldping-app/settings status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.129.2.1” time_ms=0 size=4529 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
t=2018-06-22T13:25:27+0000 lvl=info msg=“Request Completed” logger=context userId=0 orgId=1 uname= method=GET path=/api/plugins/raintank-worldping-app/markdown/readme status=200 remote_addr=“10.204.14.139, 172.23.12.247, 10.130.0.1” time_ms=0 size=4095 referer=https://grafana-openshift-grafana.apps.shared.openshift.local/plugins/raintank-worldping-app/edit
My oauth_proxy container log has the following:
2018/06/22 13:25:27 oauthproxy.go:657: 10.130.0.1:59686 Cookie “_oauth_proxy” not present
2018/06/22 13:25:27 oauthproxy.go:657: 10.129.2.1:49248 Cookie “_oauth_proxy” not present
2018/06/22 13:25:27 oauthproxy.go:657: 10.130.2.1:56006 Cookie “_oauth_proxy” not present
2018/06/22 13:25:27 oauthproxy.go:657: 10.130.2.1:56014 Cookie “_oauth_proxy” not present
2018/06/22 13:25:27 oauthproxy.go:657: 10.129.2.1:49222 Cookie “_oauth_proxy” not present
2018/06/22 13:25:27 oauthproxy.go:657: 10.130.0.1:59670 Cookie “_oauth_proxy” not present
I am using the following Dockerfile:
FROM grafana/grafana
USER grafana
ARG GF_INSTALL_PLUGINS=“raintank-worldping-app”
ARG GF_PATHS_PLUGINS="…/data/plugins"
RUN if [ ! -z “${GF_INSTALL_PLUGINS}” ]; then
OLDIFS=IFS; \
IFS=','; \
for plugin in {GF_INSTALL_PLUGINS}; do
IFS=$OLDIFS;
grafana-cli --pluginsDir "GF_PATHS_PLUGINS" plugins install {plugin};
done;
fi
This is my docker build log:
Cloning "git@gitee.unigroupinc.com:openshift/unigroup-grafana.git" …
Commit: 100a4e11ca308f616149d9181e6b994782f6e856 (Changes to plugin install)
Author: Cottrell tkwc4@c02qda9kg8wp.unigroupinc.com
Date: Tue Jun 19 16:34:08 2018 -0500
Pulling image grafana/grafana …
Pulled 3/3 layers, 100% complete
Extracting
Step 1/7 : FROM grafana/grafana
Trying to pull repository docker.io/grafana/grafana …
latest: Pulling from docker.io/grafana/grafana
Digest: sha256:21a68f0a3d2b50f0f3c6380330c6846a424c0539ff845fcd1a8a3832742b67c8
Status: Image is up to date for docker.io/grafana/grafana:latest
—> f58e79e3e80a
Step 2/7 : USER grafana
—> Running in bf19fee8ee40
—> 1f400c0e947b
Removing intermediate container bf19fee8ee40
Step 3/7 : ARG GF_INSTALL_PLUGINS=“raintank-worldping-app”
—> Running in 604c7ac3f6ee
—> e062c0856bd8
Removing intermediate container 604c7ac3f6ee
Step 4/7 : ARG GF_PATHS_PLUGINS="…/data/plugins"
—> Running in 59566758b376
—> 6bcf7eb8f653
Removing intermediate container 59566758b376
Step 5/7 : RUN if [ ! -z “${GF_INSTALL_PLUGINS}” ]; then OLDIFS=IFS; IFS=','; for plugin in {GF_INSTALL_PLUGINS}; do IFS=$OLDIFS; grafana-cli --pluginsDir “GF_PATHS_PLUGINS" plugins install {plugin}; done; fi
—> Running in a57b73d533f9
installing raintank-worldping-app @ 1.2.3
from url: https://grafana.com/api/plugins/raintank-worldping-app/versions/1.2.3/download
into: /var/lib/grafana/plugins
Installed raintank-worldping-app successfully
Restart grafana after installing plugins .
—> 66136c0cb48e
Removing intermediate container a57b73d533f9
Step 6/7 : ENV “OPENSHIFT_BUILD_NAME” “ug-grafana-6” “OPENSHIFT_BUILD_NAMESPACE” “image-build” “OPENSHIFT_BUILD_SOURCE” "git@gitee.unigroupinc.com:openshift/unigroup-grafana.git” “OPENSHIFT_BUILD_COMMIT” “100a4e11ca308f616149d9181e6b994782f6e856”
—> Running in c74c068f591d
—> 7d8f3dbc29eb
Removing intermediate container c74c068f591d
Step 7/7 : LABEL “io.openshift.build.commit.message” “Changes to plugin install” “io.openshift.build.source-location” "git@gitee.unigroupinc.com:openshift/unigroup-grafana.git" “io.openshift.build.name” “ug-grafana-6” “io.openshift.build.namespace” “image-build” “io.openshift.build.commit.author” “Cottrell \u003ctkwc4@c02qda9kg8wp.unigroupinc.com\u003e” “io.openshift.build.commit.date” “Tue Jun 19 16:34:08 2018 -0500” “io.openshift.build.commit.id” “100a4e11ca308f616149d9181e6b994782f6e856” “io.openshift.build.commit.ref” “master”
—> Running in 535e97e257d2
—> 2974ba09b122
Removing intermediate container 535e97e257d2
Successfully built 2974ba09b122
Pushing image docker-registry.default.svc:5000/openshift/ug-grafana:latest …
Pushed 3/4 layers, 100% complete
Pushed 4/4 layers, 100% complete
Push successful