set api port in config test + doc clarification

This commit is contained in:
Dale McDiarmid 2017-01-17 15:19:50 +00:00
parent 914cb7867c
commit b9c9fd109e
6 changed files with 13 additions and 10 deletions

View file

@ -73,6 +73,7 @@ The following illustrates applying configuration parameters to an Elasticsearch
es_templates: false
es_version_lock: false
es_heap_size: 1g
es_api_port:9201
```
`
The role utilises Elasticsearch version defaults. The following should be set to ensure a successful cluster forms.
@ -117,6 +118,7 @@ A more complex example:
es_version_lock: false
es_start_service: false
es_plugins_reinstall: false
es_api_port:9201
es_plugins:
- plugin: license
- plugin: lmenezes/elasticsearch-kopf
@ -127,8 +129,8 @@ A more complex example:
#### Important Note
The role uses es_api_host and es_api_port to communicate with the node for actions only achievable via http e.g. to install templates. These default to "localhost" and 9200 respectively.
If the node is deployed to bind on either a different host or port, these must be changed.
**The role uses es_api_host and es_api_port to communicate with the node for actions only achievable via http e.g. to install templates and to check the NODE IS ACTIVE. These default to "localhost" and 9200 respectively.
If the node is deployed to bind on either a different host or port, these must be changed.**
### Multi Node Server Installations
@ -174,7 +176,7 @@ recommended in any multi node cluster configuration.
cluster.name: "test-cluster"
}
}
- { role: elasticsearch, es_instance_name: "node2",
- { role: elasticsearch, es_instance_name: "node2", es_api_port:9201,
es_config: {
discovery.zen.ping.unicast.hosts: "elastic02:9300",
http.port: 9201,
@ -317,7 +319,7 @@ Additional parameters to es_config allow the customization of the Java and Elast
* ```es_major_version``` (e.g. "5.1" ). Should be consistent with es_version. For versions >= 5.0 this must be "5.x".
* ```es_version``` (e.g. "5.1.2").
* ```es_api_host``` The host name used for actions requiring HTTP e.g. installing templates. Defaults to "localhost".
* ```es_api_port``` The port used for actions requiring HTTP e.g. installing templates. Defaults to 9200.
* ```es_api_port``` The port used for actions requiring HTTP e.g. installing templates. Defaults to 9200. **CHANGE IF THE HTTP PORT IS NOT 9200**
* ```es_api_basic_auth_username``` The Elasticsearch username for making admin changing actions. Used if Security is enabled. Ensure this user is admin.
* ```es_api_basic_auth_password``` The password associated with the user declared in `es_api_basic_auth_username`
* ```es_start_service``` (true (default) or false)

View file

@ -17,7 +17,7 @@ LOG_DIR={{log_dir}}
# Elasticsearch PID directory
PID_DIR={{pid_dir}}
#ES_JVM_OPTIONS={{conf_dir}}/jvm.options
ES_JVM_OPTIONS={{conf_dir}}/jvm.options
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
#ES_RESTART_ON_UPGRADE=true

View file

@ -10,3 +10,4 @@
es_templates: false
es_version_lock: false
es_heap_size: 1g
es_api_port: 9201

View file

@ -3,8 +3,8 @@
- name: Elasticsearch Multi tests
hosts: localhost
roles:
- { role: elasticsearch, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: true } }
- { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2", es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9201, transport.tcp.port: 9301, node.data: true, node.master: false } }
- { role: elasticsearch, es_api_port:9200, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: true } }
- { role: elasticsearch, es_api_port:9201, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2", es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9201, transport.tcp.port: 9301, node.data: true, node.master: false } }
vars:
es_scripts: true
es_templates: true

View file

@ -2,7 +2,7 @@
- name: Elasticsearch Package tests
hosts: localhost
roles:
- { role: elasticsearch, es_config: { "http.port": 9200, "transport.tcp.port":9300, discovery.zen.ping.unicast.hosts: "localhost:9300" }, es_instance_name: "node1" }
- { role: elasticsearch, es_api_port:9200, es_config: { "http.port": 9200, "transport.tcp.port":9300, discovery.zen.ping.unicast.hosts: "localhost:9300" }, es_instance_name: "node1" }
vars:
es_scripts: true
es_templates: true

View file

@ -2,7 +2,7 @@
- name: Elasticsearch Xpack tests
hosts: localhost
roles:
- { role: elasticsearch, es_config: { "http.port": 9200, "transport.tcp.port":9300, discovery.zen.ping.unicast.hosts: "localhost:9300",
- { role: elasticsearch, es_api_port:9200, es_config: { "http.port": 9200, "transport.tcp.port":9300, discovery.zen.ping.unicast.hosts: "localhost:9300",
"xpack.security.authc.realms.file1.type": "file","xpack.security.authc.realms.file1.order": 0, "xpack.security.authc.realms.native1.type": "native","xpack.security.authc.realms.native1.order": 1 },
es_instance_name: "security_node" }
vars: