Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-elk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hiep Nguyen
docker-elk
Commits
5075cafe
Unverified
Commit
5075cafe
authored
Oct 26, 2017
by
gotjoshua
Committed by
Antoine Cotten
Nov 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set ELK components version from .env file
Closes #189
parent
55bfa14b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
13 deletions
+46
-13
.env
.env
+1
-0
README.md
README.md
+24
-7
docker-compose.yml
docker-compose.yml
+12
-3
Dockerfile
elasticsearch/Dockerfile
+3
-1
Dockerfile
kibana/Dockerfile
+3
-1
Dockerfile
logstash/Dockerfile
+3
-1
No files found.
.env
0 → 100644
View file @
5075cafe
ELK_VERSION=5.6.3
README.md
View file @
5075cafe
...
...
@@ -42,6 +42,8 @@ Based on the official Docker images:
6.
[
JVM tuning
](
#jvm-tuning
)
*
[
How can I specify the amount of memory used by a service?
](
#how-can-i-specify-the-amount-of-memory-used-by-a-service
)
*
[
How can I enable a remote JMX connection to a service?
](
#how-can-i-enable-a-remote-jmx-connection-to-a-service
)
7.
[
Updates
](
#updates
)
*
[
Using a newer stack version
](
#using-a-newer-stack-version
)
## Requirements
...
...
@@ -57,7 +59,7 @@ On distributions which have SELinux enabled out-of-the-box you will need to eith
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
```
console
$
chcon
-R
system_u:object_r:admin_home_t:s0 docker-elk/
```
...
...
@@ -67,13 +69,13 @@ $ chcon -R system_u:object_r:admin_home_t:s0 docker-elk/
Start the ELK stack using
`docker-compose`
:
```
bash
```
console
$
docker-compose up
```
You can also choose to run it in background (detached mode):
```
bash
```
console
$
docker-compose up
-d
```
...
...
@@ -94,7 +96,7 @@ By default, the stack exposes the following ports:
Now that the stack is running, you will want to inject some log entries. The shipped Logstash configuration allows you
to send content via TCP:
```
bash
```
console
$
nc localhost 5000 < /path/to/logfile.log
```
...
...
@@ -117,7 +119,7 @@ about the index pattern configuration.
Run this command to create a Logstash index pattern:
```
bash
```
console
$
curl
-XPUT
-D-
'http://localhost:9200/.kibana/index-pattern/logstash-*'
\
-H
'Content-Type: application/json'
\
-d
'{"title" : "logstash-*", "timeFieldName": "@timestamp", "notExpandable": true}'
...
...
@@ -125,8 +127,8 @@ $ curl -XPUT -D- 'http://localhost:9200/.kibana/index-pattern/logstash-*' \
This command will mark the Logstash index pattern as the default index pattern:
```
bash
$
curl
-XPUT
-D-
'http://localhost:9200/.kibana/config/5.6.
2
'
\
```
console
$
curl
-XPUT
-D-
'http://localhost:9200/.kibana/config/5.6.
3
'
\
-H
'Content-Type: application/json'
\
-d
'{"defaultIndex": "logstash-*"}'
```
...
...
@@ -259,3 +261,18 @@ logstash:
environment
:
LS_JAVA_OPTS
:
"
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=18080
-Dcom.sun.management.jmxremote.rmi.port=18080
-Djava.rmi.server.hostname=DOCKER_HOST_IP
-Dcom.sun.management.jmxremote.local.only=false"
```
## Updates
### Using a newer stack version
To use a different Elastic Stack version than the one currently available in the repository, simply change the version
number inside the
`.env`
file, and rebuild the stack with:
```
console
$
docker-compose build
$
docker-compose up
```
**NOTE**
: Always pay attention to the
[
upgrade instructions
](
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html
)
for each individual component before performing a stack upgrade.
docker-compose.yml
View file @
5075cafe
...
...
@@ -3,7 +3,10 @@ version: '2'
services
:
elasticsearch
:
build
:
elasticsearch/
build
:
context
:
elasticsearch/
args
:
ELK_VERSION
:
$ELK_VERSION
volumes
:
-
./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports
:
...
...
@@ -15,7 +18,10 @@ services:
-
elk
logstash
:
build
:
logstash/
build
:
context
:
logstash/
args
:
ELK_VERSION
:
$ELK_VERSION
volumes
:
-
./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
-
./logstash/pipeline:/usr/share/logstash/pipeline
...
...
@@ -29,7 +35,10 @@ services:
-
elasticsearch
kibana
:
build
:
kibana/
build
:
context
:
kibana/
args
:
ELK_VERSION
:
$ELK_VERSION
volumes
:
-
./kibana/config/:/usr/share/kibana/config
ports
:
...
...
elasticsearch/Dockerfile
View file @
5075cafe
ARG
ELK_VERSION
# https://github.com/elastic/elasticsearch-docker
FROM
docker.elastic.co/elasticsearch/elasticsearch:
5.6.3
FROM
docker.elastic.co/elasticsearch/elasticsearch:
${ELK_VERSION}
# Add your elasticsearch plugins setup here
# Example: RUN elasticsearch-plugin install analysis-icu
kibana/Dockerfile
View file @
5075cafe
ARG
ELK_VERSION
# https://github.com/elastic/kibana-docker
FROM
docker.elastic.co/kibana/kibana:
5.6.3
FROM
docker.elastic.co/kibana/kibana:
${ELK_VERSION}
# Add your kibana plugins setup here
# Example: RUN kibana-plugin install <name|url>
logstash/Dockerfile
View file @
5075cafe
ARG
ELK_VERSION
# https://github.com/elastic/logstash-docker
FROM
docker.elastic.co/logstash/logstash:
5.6.3
FROM
docker.elastic.co/logstash/logstash:
${ELK_VERSION}
# Add your logstash plugins setup here
# Example: RUN logstash-plugin install logstash-filter-json
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment