Commit 54cd6679 authored by Anthony Lapenna's avatar Anthony Lapenna

X-Pack (alpha-2) support

parent a519ed63
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[![Join the chat at https://gitter.im/deviantony/fig-elk](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/deviantony/fig-elk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the chat at https://gitter.im/deviantony/fig-elk](https://badges.gitter.im/Join%20Chat.svg)](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. It is *NOT* recommended to use this in production.
...@@ -29,10 +29,18 @@ Based on the official images: ...@@ -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. 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: For example on Redhat and CentOS, the following will apply the proper context:
````bash ```bash
.-root@centos ~ .-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 # Usage
......
...@@ -3,6 +3,8 @@ elasticsearch: ...@@ -3,6 +3,8 @@ elasticsearch:
ports: ports:
- "9200:9200" - "9200:9200"
- "9300:9300" - "9300:9300"
environment:
ES_JAVA_OPTS: "-Xms1g -Xmx1g"
logstash: logstash:
image: logstash:5 image: logstash:5
command: logstash -f /etc/logstash/conf.d/logstash.conf command: logstash -f /etc/logstash/conf.d/logstash.conf
......
...@@ -2,11 +2,6 @@ FROM elasticsearch:5 ...@@ -2,11 +2,6 @@ FROM elasticsearch:5
ENV ES_JAVA_OPTS="-Des.path.conf=/etc/elasticsearch" 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 CMD ["-E", "es.network.host=0.0.0.0", "-E", "es.discovery.zen.minimum_master_nodes=1"]
COPY entrypoint.sh /tmp/entrypoint.sh
RUN chmod +x /tmp/entrypoint.sh
CMD ["/tmp/entrypoint.sh"]
#!/usr/bin/env bash
echo "Starting Elasticsearch" echo "Starting Elasticsearch"
gosu elasticsearch elasticsearch -E es.network.host=0.0.0.0 -E es.discovery.zen.minimum_master_nodes=1 & exec 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
...@@ -78,6 +78,6 @@ bundled_plugin_ids: ...@@ -78,6 +78,6 @@ bundled_plugin_ids:
xpack.security.encryptionKey: "my-secret-key" xpack.security.encryptionKey: "my-secret-key"
elasticsearch.username: "kibana" elasticsearch.username: "kibana"
elasticsearch.password: "pass-kibana" elasticsearch.password: "changeme"
xpack.security.skipSslCheck: true xpack.security.skipSslCheck: true
xpack.security.useUnsafeSessions: true xpack.security.useUnsafeSessions: true
...@@ -9,7 +9,7 @@ input { ...@@ -9,7 +9,7 @@ input {
output { output {
elasticsearch { elasticsearch {
hosts => "elasticsearch:9200" hosts => "elasticsearch:9200"
user => "logstash" user => "elastic"
password => "pass-logstash" password => "changeme"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment