forked from opinkerfi/adagios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (67 loc) · 2.87 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
67
language: python
python:
- "2.6"
- "2.7"
env:
- DJANGO_VERSION="Django<1.5"
- DJANGO_VERSION="Django<1.6"
- DJANGO_VERSION="Django<1.7"
script:
- cd ~/build/opinkerfi/adagios/adagios
- python manage.py test
install:
- whoami
- sudo apt-get update
- sudo apt-get install nagios3 check-mk-livestatus pnp4nagios python-simplejson python-django -y
- sudo usermod travis -G nagios -a
- sudo chown -R nagios:nagios /etc/nagios3
- sudo chmod -R 777 /etc/nagios3
- sudo chmod -R a+rx /var/log/nagios3/
- sudo mkdir -p /etc/adagios/
- sudo chown -R travis /etc/adagios/
- sudo usermod -G www-data nagios
- sudo sed -i 's/RUN.*/RUN="yes"/' /etc/default/npcd
- sudo pip install https://github.com/opinkerfi/okconfig/zipball/master
- pip install https://github.com/opinkerfi/okconfig/zipball/master || true
- sudo touch /etc/okconfig.conf
- sudo chown travis /etc/okconfig.conf
- echo 'nagios_config /etc/nagios3/nagios.cfg' >> /etc/okconfig.conf
- echo 'template_directory /etc/nagios3/okconfig/templates' >> /etc/okconfig.conf
- echo 'examples_directory /etc/nagios3/okconfig/examples' >> /etc/okconfig.conf
- echo 'destination_directory /etc/nagios3/okconfig' >> /etc/okconfig.conf
- cat /etc/okconfig.conf
- okconfig init
- pip install $DJANGO_VERSION
- pip install simplejson
- pip install paramiko
- pip install selenium
- pip install https://github.com/pynag/pynag/zipball/master
- python setup.py build
- python setup.py install
- cp -r adagios/etc/adagios/conf.d /etc/adagios/conf.d
- cp -r adagios/etc/adagios/adagios.conf /etc/adagios/
- pynag config --append "broker_module=/usr/lib/check_mk/livestatus.o /var/lib/nagios3/rw/livestatus"
- pynag config --set "process_performance_data=1"
- pynag config --append "broker_module=/usr/lib/pnp4nagios/npcdmod.o config_file=/etc/pnp4nagios/npcd.cfg"
- pynag config --set 'nagios_binary="/usr/sbin/nagios3"' --filename /etc/adagios/adagios.conf
- pynag config --set 'nagios_init="/etc/init.d/nagios3"' --filename /etc/adagios/adagios.conf
- pynag config --set 'nagios_config="/etc/nagios3/nagios.cfg"' --filename /etc/adagios/adagios.conf
- mkdir -p /etc/nagios3/okconfig/templates /etc/nagios3/okconfig/examples
- mkdir -p /etc/nagios3/adagios
- pynag config --append cfg_dir=/etc/nagios3/adagios
- cd /etc/nagios3/
- git config --global user.email "[email protected]"
- git config --global user.name "Adagios buildbot running inside travis"
- git init
- git add .
- git commit -a -m "Initial commit"
- sudo service nagios3 reload
- sudo service npcd start
- sudo chmod -R 777 /var/lib/nagios3
notifications:
email: false
addons:
sauce_connect:
username: tommi
access_key:
secure: "GZUO7uiH0Q5/oXAn3CiDjDo9/CeNTeRPI2z1uERAOX6aK0D6XnSpn+ot/KXYN90c/spPqyi4e6MdgfFxuZrt7IK7cMpxEPYYjbB9+vFbODaVvo6/1J3SxpcGJtn/bciEF4bTiEcmL4gfuc6+5FedocvFIpAmHuANOzfv1B26F0o="