forked from spujadas/elk-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (58 loc) · 2.44 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
54
55
56
57
58
59
60
61
62
63
64
65
66
sudo: required
language: bash
services: docker
before_install:
- sudo sysctl -w vm.max_map_count=262144
# Docker for elk:
- docker build -t elk_image .
- docker images
- docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -p 6379:6379 -d --name elk_container elk_image
- travis_wait 30
- docker exec -it elk_container echo hello world
- docker exec -it elk_container /opt/logstash/bin/logstash --version
- docker exec -it elk_container setfacl -m u:logstash:r /var/log/{syslog,auth.log}
- docker exec -it elk_container service logstash restart
- docker exec -it elk_container /opt/logstash/bin/logstash --config.test_and_exit -f /etc/logstash/conf.d/indexing.conf/
- docker exec -it elk_container redis-server --version
#- docker exec -it elk_container /opt/logstash/bin/logstash -f /etc/logstash/conf.d/indexing.conf/
# Docker for shipper:
#- docker build -t shipper_image shipper/.
#- docker run -p 6379:6379 -d --name shipper_container shipper_image
#- docker exec -it shipper_container service logstash restart
- docker ps -a
# HardWare Usage:
- echo HardWare Usage
- cat /proc/cpuinfo | grep 'model name' | uniq
- cat /proc/cpuinfo | grep processor
- sudo lshw -c memory
- sudo df -h
# Network Information
- echo Network Information
- current_ip="$(curl --silent --show-error --fail ipecho.net/plain)"
- echo "Public IP :$current_ip"
- ifconfig
script:
# Elastic Search TEST
- echo Elastic Search TEST
- wget -q --waitretry=1 --retry-connrefused -T 10 -O - http://127.0.0.1:9200
- curl http://127.0.0.1:9200
- curl http://127.0.0.1:6379
- curl curl -XGET 'localhost:9200/?pretty'
# Checking the cluster health
- echo Checking the cluster health
- curl 'localhost:9200/_cat/health?v'
- curl 'localhost:9200/_cat/nodes?v'
- curl 'localhost:9200/_cat/indices?v'
# Creating an Index
- echo Creating an Index
- curl -XPUT 'localhost:9200/customer?pretty'
- curl 'localhost:9200/_cat/indices?v'
- curl -XPUT 'localhost:9200/customer/external/1?pretty' -d '{"name":"ramin rostami"}'
- curl -XGET 'localhost:9200/customer/external/1?pretty'
- curl -XDELETE 'localhost:9200/customer?pretty'
- curl 'localhost:9200/_cat/indices?v'
- curl -XPOST 'localhost:9200/customer/external?pretty' -d '{"name":"ramin rostami"}'
- curl -XPOST 'localhost:9200/customer/external?pretty' -d '{"name":"masood rostami"}'
- curl 'localhost:9200/_cat/indices?v'
- curl -XGET 'localhost:9200/_search?pretty'
- curl -XPOST http://localhost:9200/customer/external/_search?pretty -d '{"query":{"match_all":{}}}'