Skip to content

Commit 6cf345e

Browse files
committed
added kibana example
1 parent a775322 commit 6cf345e

File tree

5 files changed

+38
-9
lines changed

5 files changed

+38
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/movie-data/*
2+
/shakespeare-data/*
23
/slides/*
34
/mysql/*
45
/credentials/*

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Run Elasticsearch in development by first pulling down the Docker Image:
44

5-
`docker pull docker.elastic.co/elasticsearch/elasticsearch:6.1.3`
5+
`docker pull docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2`
66

77
Then fire up Elasticsearch using the following Docker command:
88

9-
`docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.1.3`
9+
`docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2`
1010

1111
Test that all is well:
1212

@@ -854,4 +854,22 @@ curl -H "Content-Type: application/json" -XGET 'http://localhost:9200/ratings/ra
854854
}
855855
}
856856
}'
857-
```
857+
```
858+
859+
# Kibana
860+
861+
First grab the docker image:
862+
863+
`docker pull docker.elastic.co/kibana/kibana-oss:6.2.2`
864+
865+
Then run the following docker-compose command:
866+
867+
`docker-compose up elasticsearch kibana`
868+
869+
Then grab the data for Shakespeare's plays and index that:
870+
871+
`wget http://media.sundog-soft.com/es6/shakespeare_6.0.json`
872+
873+
Import that data into a new Elasticsearch index:
874+
875+
`curl -H "Content-Type: application/json" -XPOST http://localhost:9200/shakespeare/doc/_bulk?pretty --data-binary @shakespeare_6.0.json`

docker-compose.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2'
22
services:
33
elasticsearch:
4-
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
4+
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2
55
volumes:
66
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
77
ports:
@@ -24,14 +24,27 @@ services:
2424
- elasticsearch
2525
volumes:
2626
# Change which Logstash pipeline to load here by uncommenting ONE of the 'pipeline' volume mounts
27-
- ./logstash/pipeline/file.conf:/usr/share/logstash/pipeline/file.conf
27+
# - ./logstash/pipeline/file.conf:/usr/share/logstash/pipeline/file.conf
2828
# - ./logstash/pipeline/mysql.conf:/usr/share/logstash/pipeline/mysql.conf
2929
# - ./logstash/pipeline/s3.conf:/usr/share/logstash/pipeline/s3.conf
3030
# - ./logstash/pipeline/kafka.conf:/usr/share/logstash/pipeline/kafka.conf
3131
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
3232
- ./logstash/data/access_log:/usr/share/logstash/data/access_log:ro
3333
- ./mysql/:/tmp/java
3434

35+
kibana:
36+
image: docker.elastic.co/kibana/kibana-oss:6.2.2
37+
ports:
38+
- "5601:5601"
39+
# volumes:
40+
# - ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
41+
environment:
42+
ELASTICSEARCH_URL: http://elasticsearch:9200
43+
depends_on:
44+
- elasticsearch
45+
networks:
46+
- elk
47+
3548
db:
3649
image: mysql/mysql-server:5.7.20
3750
ports:

elasticsearch/config/elasticsearch.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@ discovery.zen.minimum_master_nodes: 1
1313
## Use single node discovery in order to disable production mode and avoid bootstrap checks
1414
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
1515
#
16-
discovery.type: single-node
17-
18-
# Disable authentication request for testing
19-
xpack.security.enabled: false
16+
discovery.type: single-node

kibana/config/kibana.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)