logging-es set up the certification. kibana-logging needs to configure the connection information to connect to the logging-es. When logging to the kibana web page, need to enter the account and password to enhance security.
Signed-off-by: Wu Zhende wuzhende666@163.com --- container/kibana-logging/Dockerfile | 7 +++++-- container/kibana-logging/build | 10 +++++++++- 2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/container/kibana-logging/Dockerfile b/container/kibana-logging/Dockerfile index 970eb5a..7085618 100644 --- a/container/kibana-logging/Dockerfile +++ b/container/kibana-logging/Dockerfile @@ -5,8 +5,11 @@ ARG BASE_IMAGE
FROM ${BASE_IMAGE}
-# docker image borrowed from hub.docker.com/r/gagara/kibana-oss-arm64 +ARG USER +ARG PASSWORD
MAINTAINER Wu Zhende wuzhende666@163.com
-RUN sed -i 's/server.host: "0"/server.host: "0.0.0.0"/' config/kibana.yml +RUN sed -i 's/server.host: "0"/server.host: "0.0.0.0"/' config/kibana.yml && \ + sed -i "6i\elasticsearch.username: ${USER}" config/kibana.yml && \ + sed -i "6i\elasticsearch.password: ${PASSWORD}" config/kibana.yml diff --git a/container/kibana-logging/build b/container/kibana-logging/build index 9c75aeb..238a88d 100755 --- a/container/kibana-logging/build +++ b/container/kibana-logging/build @@ -3,8 +3,16 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # frozen_string_literal: true
+require 'set' require_relative '../defconfig'
+names = Set.new %w[ + LOGGING_ES_USER + LOGGING_ES_PASSWORD +] + +defaults = relevant_service_account(names) + docker_skip_rebuild "kibana:7.11.1"
BASE_IMAGE_DICT = { @@ -13,4 +21,4 @@ BASE_IMAGE_DICT = {
BASE_IMAGE = BASE_IMAGE_DICT[%x(arch).chomp]
-system "docker build -t kibana:7.11.1 --build-arg BASE_IMAGE=#{BASE_IMAGE} ." +system "docker build -t kibana:7.11.1 --build-arg BASE_IMAGE=#{BASE_IMAGE} --build-arg USER=#{defaults['LOGGING_ES_USER']} --build-arg PASSWORD=#{defaults['LOGGING_ES_PASSWORD']} ."