From e649e0f5d5437e6cb47dd5aaa57ed6776659d486 Mon Sep 17 00:00:00 2001 From: Witold Bedyk Date: Thu, 30 Jun 2016 16:21:47 +0200 Subject: [PATCH] Install Kibana plugin for Keystone authentication The plugin implements keystone based authentication for communication between Kibana and Elasticsearch. https://github.com/FujitsuEnablingSoftwareTechnologyGmbH/fts-keystone Change-Id: I23fd89737fe5106c547b87aade6d7cc34821a8b7 --- devstack/files/kibana/kibana.yml | 7 +++++++ devstack/plugin.sh | 24 +++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/devstack/files/kibana/kibana.yml b/devstack/files/kibana/kibana.yml index 910735db..48c133be 100644 --- a/devstack/files/kibana/kibana.yml +++ b/devstack/files/kibana/kibana.yml @@ -73,3 +73,10 @@ logging.silent: false logging.quiet: false # Set this to true to log all events, including system usage information and all requests. logging.verbose: true + +# fts-keystone configuration +fts-keystone.port: 35357 +fts-keystone.url: http://127.0.0.1 +fts-keystone.enabled: True + +optimize.useBundleCache: False diff --git a/devstack/plugin.sh b/devstack/plugin.sh index bcd4971f..cf816757 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -326,9 +326,31 @@ function install_kibana { if [[ ${SERVICE_HOST} ]]; then # set bind host ip address - sudo sed -i "s/server.host: 127\.0\.0\.1/server.host: ${SERVICE_HOST}/g" /opt/kibana/config/kibana.yml + sudo sed -i \ + "s/server.host: 127\.0\.0\.1/server.host: ${SERVICE_HOST}/g" \ + /opt/kibana/config/kibana.yml + sudo sed -i \ + "s/fts-keystone.url: http:\/\/127\.0\.0\.1/fts-keystone.url: http:\/\/${SERVICE_HOST}/g" \ + /opt/kibana/config/kibana.yml fi + cd "${MONASCA_BASE}" + if [ ! -e fts-keystone ]; then + git clone https://github.com/FujitsuEnablingSoftwareTechnologyGmbH/fts-keystone.git + fi + cd fts-keystone + local fts_keystone_version="$(python -c 'import json; \ + obj = json.load(open("package.json")); print obj["version"]')" + + set -i + (source "${HOME}"/.nvm/nvm.sh >> /dev/null; nvm use 4.0.0; npm install) + (source "${HOME}"/.nvm/nvm.sh >> /dev/null; nvm use 4.0.0; npm run package) + set +i + + sudo -u kibana /opt/kibana/bin/kibana plugin -r fts-keystone + sudo -u kibana /opt/kibana/bin/kibana plugin -i fts-keystone \ + -u file://${PWD}/target/fts-keystone-${fts_keystone_version}.tar.gz + sudo mkdir -p /var/log/kibana || true sudo chown kibana:kibana /var/log/kibana sudo chmod 0750 /var/log/kibana