Configure log path for kibana

Closes-Bug: #1635989
Change-Id: I99402e54e7cc2f1ad972021bb1056966f5c08bff
This commit is contained in:
Jeffrey Zhang 2016-10-16 08:00:04 +08:00 committed by Jeffrey Zhang
parent 57203424c2
commit a5afa45f4e
3 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,5 @@
kibana.defaultAppId: "{{ kibana_default_app_id }}"
logging.dest: /var/log/kolla/kibana/kibana.log
server.port: {{ kibana_server_port }}
server.host: "{% if orchestration_engine == 'KUBERNETES' %}0.0.0.0{% else %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}{% endif %}"
elasticsearch.url: "{{ internal_protocol }}://{% if orchestration_engine == 'KUBERNETES' %}elasticsearch{% else %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}{% endif %}:{{ elasticsearch_port }}"

View File

@ -5,8 +5,10 @@ MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN useradd -r -m --user-group kibana \
&& usermod -a -G kolla kibana
&& usermod -a -G kolla kibana \
&& chmod 755 /usr/local/bin/kolla_extend_start
{% set kibana_packages = ['kibana'] %}
{{ macros.install_packages(kibana_packages | customizable("packages")) }}

View File

@ -0,0 +1,10 @@
#!/bin/bash
KIBANA_LOG_DIR="/var/log/kolla/kibana"
if [[ ! -d "${KIBANA_LOG_DIR}" ]]; then
mkdir -p "${KIBANA_LOG_DIR}"
fi
if [[ $(stat -c %U:%G "${KIBANA_LOG_DIR}") != "kibana:kolla" ]]; then
chown kibana:kolla "${KIBANA_LOG_DIR}"
fi