X-Pack (alpha-2) support
This commit is contained in:
parent
a519ed63ea
commit
54cd667912
16
README.md
16
README.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
[](https://gitter.im/deviantony/fig-elk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
**WARNING: Experimental support of the X-Pack version of the Elastic stack.**
|
||||
**WARNING: Experimental support of the X-Pack (alpha-2) version of the Elastic stack.**
|
||||
|
||||
It is *NOT* recommended to use this in production.
|
||||
|
||||
|
@ -29,10 +29,18 @@ Based on the official images:
|
|||
On distributions which have SELinux enabled out-of-the-box you will need to either re-context the files or set SELinux into Permissive mode in order for docker-elk to start properly.
|
||||
For example on Redhat and CentOS, the following will apply the proper context:
|
||||
|
||||
````bash
|
||||
```bash
|
||||
.-root@centos ~
|
||||
-$ chcon -R system_u:object_r:admin_home_t:s0 fig-elk/
|
||||
````
|
||||
-$ chcon -R system_u:object_r:admin_home_t:s0 docker-elk/
|
||||
```
|
||||
|
||||
## Increase max_map_count on your host
|
||||
|
||||
You need to increase `max_map_count` on your Docker host:
|
||||
|
||||
```bash
|
||||
$ sudo sysctl -w vm.max_map_count=262144
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ elasticsearch:
|
|||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
environment:
|
||||
ES_JAVA_OPTS: "-Xms1g -Xmx1g"
|
||||
logstash:
|
||||
image: logstash:5
|
||||
command: logstash -f /etc/logstash/conf.d/logstash.conf
|
||||
|
|
|
@ -2,11 +2,6 @@ FROM elasticsearch:5
|
|||
|
||||
ENV ES_JAVA_OPTS="-Des.path.conf=/etc/elasticsearch"
|
||||
|
||||
RUN elasticsearch-plugin install x-pack
|
||||
RUN elasticsearch-plugin install --batch x-pack
|
||||
|
||||
RUN apt-get update && apt-get install -y netcat
|
||||
|
||||
COPY entrypoint.sh /tmp/entrypoint.sh
|
||||
RUN chmod +x /tmp/entrypoint.sh
|
||||
|
||||
CMD ["/tmp/entrypoint.sh"]
|
||||
CMD ["-E", "es.network.host=0.0.0.0", "-E", "es.discovery.zen.minimum_master_nodes=1"]
|
||||
|
|
|
@ -1,19 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Starting Elasticsearch"
|
||||
gosu elasticsearch elasticsearch -E es.network.host=0.0.0.0 -E es.discovery.zen.minimum_master_nodes=1 &
|
||||
|
||||
echo "Waiting for Elasticsearch to boot..."
|
||||
while true; do
|
||||
nc -q 1 localhost 9200 2>/dev/null && break
|
||||
done
|
||||
|
||||
echo "Elasticsearch ready. Creating x-pack users..."
|
||||
|
||||
/usr/share/elasticsearch/bin/x-pack/users useradd elastic -r admin -p 'pass-elastic'
|
||||
/usr/share/elasticsearch/bin/x-pack/users useradd kibana -r kibana4_server -p 'pass-kibana'
|
||||
/usr/share/elasticsearch/bin/x-pack/users useradd logstash -r logstash -p 'pass-logstash'
|
||||
|
||||
while true; do sleep 1000; done
|
||||
|
||||
exit 0
|
||||
exec gosu elasticsearch elasticsearch -E es.network.host=0.0.0.0 -E es.discovery.zen.minimum_master_nodes=1
|
||||
|
|
|
@ -78,6 +78,6 @@ bundled_plugin_ids:
|
|||
|
||||
xpack.security.encryptionKey: "my-secret-key"
|
||||
elasticsearch.username: "kibana"
|
||||
elasticsearch.password: "pass-kibana"
|
||||
elasticsearch.password: "changeme"
|
||||
xpack.security.skipSslCheck: true
|
||||
xpack.security.useUnsafeSessions: true
|
||||
|
|
|
@ -9,7 +9,7 @@ input {
|
|||
output {
|
||||
elasticsearch {
|
||||
hosts => "elasticsearch:9200"
|
||||
user => "logstash"
|
||||
password => "pass-logstash"
|
||||
user => "elastic"
|
||||
password => "changeme"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue