-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy path.travis.yml
62 lines (53 loc) · 2.26 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
language: ruby
sudo: required
env:
- CONTAINER_ID=$(mktemp)
rvm:
- "1.9.3"
services:
- docker
before_install:
- sudo apt-get update
# Pull containers
- sudo docker pull centos:7
# Customize containers
- sudo docker build --rm=true --file=test/Dockerfile.centos --tag=centos:ansible .
- gem install jls-grok
script:
- ruby test/test.rb
# Run container in detached state
- sudo docker run --detach --privileged --volume="${PWD}":/etc/ansible/lightsiem:ro --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro centos:ansible /usr/lib/systemd/systemd > /tmp/container_id
# Check syntax of ansible playbook
- sudo docker exec "$(cat /tmp/container_id)" ansible-playbook /etc/ansible/lightsiem/lightsiem-install.yml --syntax-check
# Run ansible playbook
- sudo docker exec "$(cat /tmp/container_id)" ansible-playbook /etc/ansible/lightsiem/lightsiem-install.yml
- sudo docker exec "$(cat /tmp/container_id)" /opt/logstash/bin/logstash -f /etc/logstash/conf.d/ &
- sleep 60
- sudo docker exec "$(cat /tmp/container_id)" netstat -lntup
# - sudo docker exec "$(cat /tmp/container_id)" tail /var/log/logstash/logstash.*
# - sudo docker exec "$(cat /tmp/container_id)" /etc/init.d/logstash status
# - sleep 100
# - sudo docker exec "$(cat /tmp/container_id)" whereis java
# - sudo docker exec "$(cat /tmp/container_id)" export
#Logstash Cisco
- sudo docker exec "$(cat /tmp/container_id)" netstat -lnup | grep "9020"
#Logstash Ossec
- sudo docker exec "$(cat /tmp/container_id)" netstat -lnup | grep "9000"
- sudo docker exec "$(cat /tmp/container_id)" netstat -lntp | grep "9001"
#Logstash snort
- sudo docker exec "$(cat /tmp/container_id)" netstat -lntp | grep "9010"
#Logstash Cisco
- sudo docker exec "$(cat /tmp/container_id)" netstat -lnup | grep "9999"
#Elastcisearch
- sudo docker exec "$(cat /tmp/container_id)" netstat -lntp | grep "127.0.0.1:9200"
- sudo docker exec "$(cat /tmp/container_id)" netstat -lntp | grep "127.0.0.1:9300"
#Kibana
- sudo docker exec "$(cat /tmp/container_id)" netstat -lntp | grep "5601"
#Dnsmasq
- sudo docker exec "$(cat /tmp/container_id)" netstat -lnup | grep "127.0.0.1:53"
# Clean up
- sudo docker stop "$(cat /tmp/container_id)"
notifications:
email:
on_failure: always
on_success: change