forked from evolix/ansible-roles
Elasticsearch: merge the head plugin install back into the main role
This commit is contained in:
parent
b2278a151c
commit
183c467621
|
@ -1,22 +0,0 @@
|
||||||
# elasticsearch-plugin-head
|
|
||||||
|
|
||||||
Install Head (Elasticsearch plugin).
|
|
||||||
|
|
||||||
## Tasks
|
|
||||||
|
|
||||||
Everything is in the `tasks/main.yml` file.
|
|
||||||
|
|
||||||
## Variables
|
|
||||||
|
|
||||||
* `elasticsearch_plugin_head_basedir`: base directory (default : `/var/www`) ;
|
|
||||||
* `elasticsearch_plugin_head_clone_name`: directory name for git clone.
|
|
||||||
|
|
||||||
## Misc
|
|
||||||
|
|
||||||
To use this plugin, you have to run the built-in webserver (using Grunt/NodeJS), or point a webserver to the path. More details here : https://github.com/mobz/elasticsearch-head#running-with-built-in-server
|
|
||||||
|
|
||||||
For example, to run the built-in server, with "www-data" user :
|
|
||||||
|
|
||||||
```
|
|
||||||
# sudo -u www-data bash -c 'cd /var/www/elasticsearch-head && grunt server'
|
|
||||||
```
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
elasticsearch_plugin_head_owner: "elasticsearch-head"
|
|
||||||
elasticsearch_plugin_head_group: "{{ elasticsearch_plugin_head_owner }}"
|
|
||||||
elasticsearch_plugin_head_home: "/home/{{ elasticsearch_plugin_head_owner }}"
|
|
||||||
elasticsearch_plugin_head_clone_dir: "{{ elasticsearch_plugin_head_home }}/www"
|
|
||||||
elasticsearch_plugin_head_tmp_dir: "{{ elasticsearch_plugin_head_home }}/tmp"
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: restart elasticsearch
|
|
||||||
service:
|
|
||||||
name: elasticsearch
|
|
||||||
state: restarted
|
|
|
@ -1,27 +0,0 @@
|
||||||
---
|
|
||||||
galaxy_info:
|
|
||||||
author: Evolix
|
|
||||||
description: Install the Head plugin for Elasticsearch.
|
|
||||||
|
|
||||||
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
|
|
||||||
|
|
||||||
license: GPLv2
|
|
||||||
|
|
||||||
min_ansible_version: 2.2
|
|
||||||
|
|
||||||
platforms:
|
|
||||||
- name: Debian
|
|
||||||
versions:
|
|
||||||
- jessie
|
|
||||||
|
|
||||||
galaxy_tags: []
|
|
||||||
# List tags for your role here, one per line. A tag is
|
|
||||||
# a keyword that describes and categorizes the role.
|
|
||||||
# Users find roles by searching for tags. Be sure to
|
|
||||||
# remove the '[]' above if you add tags to this list.
|
|
||||||
#
|
|
||||||
# NOTE: A tag is limited to a single word comprised of
|
|
||||||
# alphanumeric characters. Maximum 20 tags per role.
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
- nodejs
|
|
|
@ -24,3 +24,19 @@ Tasks are extracted in several files, included in `tasks/main.yml` :
|
||||||
* `elasticsearch_jvm_xmx`: maximum heap size reserved for the JVM (defaults to 2g).
|
* `elasticsearch_jvm_xmx`: maximum heap size reserved for the JVM (defaults to 2g).
|
||||||
|
|
||||||
By default, Elasticsearch will listen to the public interfaces (`_site_` cf. https://www.elastic.co/guide/en/elasticsearch/reference/5.0/important-settings.html#network.host), so you will have to secure it, with firewall rules for example.
|
By default, Elasticsearch will listen to the public interfaces (`_site_` cf. https://www.elastic.co/guide/en/elasticsearch/reference/5.0/important-settings.html#network.host), so you will have to secure it, with firewall rules for example.
|
||||||
|
|
||||||
|
## Head plugin
|
||||||
|
|
||||||
|
The "head" plugin can be installed :
|
||||||
|
|
||||||
|
* `elasticsearch_plugin_head` : enable the plugin installation (default: `False`) ;
|
||||||
|
* `elasticsearch_plugin_head_basedir`: base directory (default : `/var/www`) ;
|
||||||
|
* `elasticsearch_plugin_head_clone_name`: directory name for git clone.
|
||||||
|
|
||||||
|
To use this plugin, you have to run the built-in webserver (using Grunt/NodeJS), or point a webserver to the path. More details here : https://github.com/mobz/elasticsearch-head#running-with-built-in-server
|
||||||
|
|
||||||
|
For example, to run the built-in server, with "www-data" user :
|
||||||
|
|
||||||
|
```
|
||||||
|
# sudo -u www-data bash -c 'cd /var/www/elasticsearch-head && grunt server'
|
||||||
|
```
|
||||||
|
|
|
@ -8,3 +8,10 @@ elasticsearch_custom_tmpdir: Null
|
||||||
elasticsearch_default_tmpdir: /var/lib/elasticsearch/tmp
|
elasticsearch_default_tmpdir: /var/lib/elasticsearch/tmp
|
||||||
elasticsearch_jvm_xms: 2g
|
elasticsearch_jvm_xms: 2g
|
||||||
elasticsearch_jvm_xmx: 2g
|
elasticsearch_jvm_xmx: 2g
|
||||||
|
|
||||||
|
elasticsearch_plugin_head: False
|
||||||
|
elasticsearch_plugin_head_owner: "elasticsearch-head"
|
||||||
|
elasticsearch_plugin_head_group: "{{ elasticsearch_plugin_head_owner }}"
|
||||||
|
elasticsearch_plugin_head_home: "/home/{{ elasticsearch_plugin_head_owner }}"
|
||||||
|
elasticsearch_plugin_head_clone_dir: "{{ elasticsearch_plugin_head_home }}/www"
|
||||||
|
elasticsearch_plugin_head_tmp_dir: "{{ elasticsearch_plugin_head_home }}/tmp"
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: reload elasticsearch unit
|
- name: reload elasticsearch unit
|
||||||
command: systemctl daemon-reload
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
|
@ -9,3 +9,6 @@
|
||||||
- include: datadir.yml
|
- include: datadir.yml
|
||||||
|
|
||||||
- include: tmpdir.yml
|
- include: tmpdir.yml
|
||||||
|
|
||||||
|
- include: plugin_head.yml
|
||||||
|
when: elasticsearch_plugin_head
|
||||||
|
|
Loading…
Reference in a new issue