Added Kibana and its deployment.

Part of ELK stack. Includes Dockerfiles for both Centos and Ubuntu.

Change-Id: I1d955a5c51e416cc572eb2c9b4c57982a1d6ab67
Partially-implements: blueprint central-logging-service
changes/14/270214/7
akwasniewska 7 years ago committed by Alicja Kwasniewska
parent 0de0511e3b
commit 3672152d9d
  1. 5
      ansible/group_vars/all.yml
  2. 3
      ansible/inventory/all-in-one
  3. 3
      ansible/inventory/multinode
  4. 24
      ansible/roles/kibana/defaults/main.yml
  5. 3
      ansible/roles/kibana/meta/main.yml
  6. 22
      ansible/roles/kibana/tasks/config.yml
  7. 4
      ansible/roles/kibana/tasks/deploy.yml
  8. 2
      ansible/roles/kibana/tasks/main.yml
  9. 5
      ansible/roles/kibana/tasks/pull.yml
  10. 9
      ansible/roles/kibana/tasks/start.yml
  11. 11
      ansible/roles/kibana/templates/kibana.json.j2
  12. 19
      ansible/roles/kibana/templates/kibana.yml.j2
  13. 6
      ansible/site.yml
  14. 19
      docker/kibana/Dockerfile.j2

@ -122,6 +122,9 @@ rgw_port: "6780"
mistral_api_port: "8989"
kibana_port: "5601"
elasticsearch_port: "9200"
####################
# Openstack options
####################
@ -174,7 +177,7 @@ enable_murano: "no"
enable_ironic: "no"
enable_magnum: "no"
enable_mistral: "no"
enable_elk: "no"
ironic_keystone_user: "ironic"
# Nova fake driver and the number of fake driver per compute node

@ -15,6 +15,9 @@ localhost ansible_connection=local
# You can explicitly specify which hosts run each project by updating the
# groups in the sections below. Common services are grouped together.
[kibana:children]
control
[haproxy:children]
network

@ -27,6 +27,9 @@ storage01
# You can explicitly specify which hosts run each project by updating the
# groups in the sections below. Common services are grouped together.
[kibana:children]
control
[haproxy:children]
network

@ -0,0 +1,24 @@
---
####################
# Kibana
####################
kibana_port: "{{ kibana_port }}"
kibana_host: "{{ kolla_internal_address }}"
kibana_app_id: "discover"
kibana_request_timeout: 300000
kibana_shard_timeout: 0
kibana_verify_ssl: false
####################
# Docker
####################
kibana_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-kibana"
kibana_tag: "{{ openstack_release }}"
kibana_image_full: "{{ kibana_image }}:{{ kibana_tag }}"
####################
# Elasticsearch
####################
elasticsearch_preserve_host: "true"

@ -0,0 +1,3 @@
---
dependencies:
- { role: common }

@ -0,0 +1,22 @@
---
- name: Ensuring kibana config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
recurse: yes
with_items:
- "kibana"
- name: Copying over config.json files for services
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
with_items:
- "kibana"
- name: Copying over Kibana configuration file
template:
src: "{{ item }}.yml.j2"
dest: "{{ node_config_directory }}/{{ item }}/{{ item }}.yml"
with_items:
- "kibana"

@ -0,0 +1,4 @@
---
- include: config.yml
- include: start.yml

@ -0,0 +1,2 @@
---
- include: "{{ action }}.yml"

@ -0,0 +1,5 @@
- name: Pulling Kibana image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ kibana_image_full }}"

@ -0,0 +1,9 @@
---
- name: Starting Kibana container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ kibana_image_full }}"
name: "kibana"
volumes:
- "{{ node_config_directory }}/kibana/:{{ container_config_directory }}/:ro"

@ -0,0 +1,11 @@
{
"command": "/opt/kibana/bin/kibana",
"config_files": [
{
"source": "{{ container_config_directory }}/kibana.yml",
"dest": "/opt/kibana/config/kibana.yml",
"owner": "kibana",
"perm": "0640"
}
]
}

@ -0,0 +1,19 @@
port: {{ kibana_port }}
host: {{ kibana_host }}
elasticsearch_url: "http://{{ kolla_internal_address }}:{{ elasticsearch_port }}"
elasticsearch_preserve_host: {{ elasticsearch_preserve_host }}
default_app_id: {{ kibana_app_id }}
request_timeout: {{ kibana_request_timeout }}
shard_timeout: {{ kibana_shard_timeout }}
verify_ssl: {{ kibana_verify_ssl }}
bundled_plugin_ids:
- plugins/dashboard/index
- plugins/discover/index
- plugins/doc/index
- plugins/kibana/index
- plugins/markdown_vis/index
- plugins/metric_vis/index
- plugins/settings/index
- plugins/table_vis/index
- plugins/vis_types/index
- plugins/visualize/index

@ -26,6 +26,12 @@
tags: haproxy,
when: enable_haproxy | bool }
- hosts: kibana
roles:
- { role: kibana,
tags: kibana,
when: enable_elk | bool }
- hosts: memcached
roles:
- { role: memcached,

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
ENV KIBANA_VERSION 4.3.1
ENV KIBANA_DIR /opt/kibana/
ENV KIBANA_ARCHIVE kibana-${KIBANA_VERSION}-linux-x64.tar.gz
RUN useradd -r -m --user-group kibana \
&& usermod -a -G kolla kibana
RUN curl "https://download.elastic.co/kibana/kibana/$KIBANA_ARCHIVE" -o $KIBANA_ARCHIVE \
&& mkdir -p $KIBANA_DIR \
&& tar -xz --strip-components=1 -f $KIBANA_ARCHIVE -C $KIBANA_DIR \
&& chown -R kibana:kibana $KIBANA_DIR \
&& rm -f $KIBANA_ARCHIVE
{{ include_footer }}
USER kibana
Loading…
Cancel
Save