forked from deviantony/docker-elk
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
53 lines (47 loc) · 2.04 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: minimal
services: docker
env:
- DOCKER_COMPOSE_VERSION=1.14.0
install:
# Install Docker Compose
- curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o "$HOME/bin/docker-compose"
- chmod +x "$HOME/bin/docker-compose"
- docker-compose --version
before_script:
# Build images
- docker-compose build
# Pull buildpack image (curl 7.52.0+)
- docker pull buildpack-deps:artful-curl
- shopt -s expand_aliases
- alias curl='docker run --rm --net=host buildpack-deps:artful-curl curl'
script:
# Compose
- docker-compose up -d
- sleep 60
- curl -s --retry 10 --retry-delay 5 --retry-connrefused -D- 'http://localhost:9200/'
- curl -s --retry 10 --retry-delay 5 --retry-connrefused -D- 'http://localhost:5601/api/status'
- curl -s --retry 10 --retry-delay 5 --retry-connrefused -D- 'http://localhost:9600/_node/pipelines/main?pretty'
- echo 'dockerelk' | nc localhost 5000
- sleep 2
- curl -s -XPOST 'http://localhost:9200/_refresh'
- curl -s 'http://localhost:9200/_count?q=message:dockerelk' | egrep '^{"count":1,'
- curl -s 'http://localhost:9200/_search?q=message:dockerelk&pretty'
- docker-compose ps
- docker-compose logs
- docker-compose down -v
# Swarm
- docker swarm init
- docker stack deploy -c ./docker-stack.yml elk
- sleep 60
- curl -s --retry 10 --retry-delay 5 --retry-connrefused -D- 'http://localhost:9200/'
- curl -s --retry 10 --retry-delay 5 --retry-connrefused -D- 'http://localhost:5601/api/status'
- curl -s --retry 10 --retry-delay 5 --retry-connrefused -D- 'http://localhost:9600/_node/pipelines/main?pretty'
- echo 'dockerelk' | nc localhost 5000
- sleep 2
- curl -s -XPOST 'http://localhost:9200/_refresh'
- curl -s 'http://localhost:9200/_count?q=message:dockerelk' | egrep '^{"count":1,'
- curl -s 'http://localhost:9200/_search?q=message:dockerelk&pretty'
- docker stack services elk
- docker service logs elk_elasticsearch
- docker service logs elk_kibana
- docker service logs elk_logstash