Add elasticsearch_datadir_volume

Change-Id: Id8276448c6e779b2b4a0aafee45d953c4f009fc1
This commit is contained in:
Christian Berendt 2019-02-25 15:53:08 +01:00
parent 953fb24a1d
commit 3a5ef38f3b
5 changed files with 12 additions and 1 deletions

View File

@ -133,6 +133,7 @@ keepalived_virtual_router_id: "51"
# Elasticsearch Options
#######################
es_heap_size: "1G"
elasticsearch_datadir_volume: "elasticsearch"
###################
# Messaging options

View File

@ -5,6 +5,7 @@
environment:
enable_haproxy: "{{ enable_haproxy }}"
enable_swift: "{{ enable_swift }}"
elasticsearch_datadir_volume: "{{ elasticsearch_datadir_volume }}"
glance_file_datadir_volume: "{{ glance_file_datadir_volume }}"
nova_instance_datadir_volume: "{{ nova_instance_datadir_volume }}"
gnocchi_metric_datadir_volume: "{{ gnocchi_metric_datadir_volume }}"

View File

@ -12,7 +12,7 @@ elasticsearch_services:
volumes:
- "{{ node_config_directory }}/elasticsearch/:{{ container_config_directory }}/"
- "/etc/localtime:/etc/localtime:ro"
- "elasticsearch:/var/lib/elasticsearch/data"
- "{{ elasticsearch_datadir_volume }}:/var/lib/elasticsearch/data"
dimensions: "{{ elasticsearch_dimensions }}"
haproxy:
elasticsearch:

View File

@ -31,6 +31,10 @@ By default Elasticsearch is deployed on port ``9200``.
Elasticsearch stores a lot of logs, so if you are running centralized logging,
remember to give ``/var/lib/docker`` an adequate space.
Alternatively it is possible to use a local directory instead of the volume
``elasticsearch`` to store the data of Elasticsearch. The path can be set via
the variable ``elasticsearch_datadir_volume``.
Kibana
~~~~~~

View File

@ -61,6 +61,11 @@ if [[ "$nova_instance_datadir_volume" != "nova_compute" && -d "$nova_instance_da
rm -rfv $nova_instance_datadir_volume
fi
if [[ "$elasticsearch_datadir_volume" != "elasticsearch" && -d "$elasticsearch_datadir_volume" ]]; then
echo "Removing elasticsearch volume if it is customzied"
rm -rfv $elasticsearch_datadir_volume
fi
if [[ "$gnocchi_metric_datadir_volume" != "gnocchi" && -d "$gnocchi_metric_datadir_volume" ]]; then
echo "Removing gnocchi volume if it is customzied"
rm -rfv $gnocchi_metric_datadir_volume