From a79c9135fc2ed27b8d2374ab9728124f2357d2f1 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Fri, 13 May 2016 20:18:36 +0200 Subject: Move stuff from /opt/nms to /opt/gondul etc Still lots to do --- build/test/gondul-collector-test.Dockerfile | 17 ++++++++++++ build/test/gondul-db-test.Dockerfile | 10 +++++++ build/test/gondul-front-test.Dockerfile | 43 +++++++++++++++++++++++++++++ build/test/gondul-snmp-test.Dockerfile | 20 ++++++++++++++ build/test/gondul-varnish-test.Dockerfile | 8 ++++++ build/test/nms-collector-test.Dockerfile | 17 ------------ build/test/nms-db-test.Dockerfile | 10 ------- build/test/nms-front-test.Dockerfile | 43 ----------------------------- build/test/nms-snmp-test.Dockerfile | 20 -------------- build/test/nms-varnish-test.Dockerfile | 8 ------ build/test/snmpfetch-misc.sh | 2 +- 11 files changed, 99 insertions(+), 99 deletions(-) create mode 100644 build/test/gondul-collector-test.Dockerfile create mode 100644 build/test/gondul-db-test.Dockerfile create mode 100644 build/test/gondul-front-test.Dockerfile create mode 100644 build/test/gondul-snmp-test.Dockerfile create mode 100644 build/test/gondul-varnish-test.Dockerfile delete mode 100644 build/test/nms-collector-test.Dockerfile delete mode 100644 build/test/nms-db-test.Dockerfile delete mode 100644 build/test/nms-front-test.Dockerfile delete mode 100644 build/test/nms-snmp-test.Dockerfile delete mode 100644 build/test/nms-varnish-test.Dockerfile (limited to 'build/test') diff --git a/build/test/gondul-collector-test.Dockerfile b/build/test/gondul-collector-test.Dockerfile new file mode 100644 index 0000000..0af8f75 --- /dev/null +++ b/build/test/gondul-collector-test.Dockerfile @@ -0,0 +1,17 @@ +FROM debian:jessie +RUN apt-get update +RUN apt-get -y install \ + libdata-dumper-simple-perl \ + libdbd-pg-perl \ + libdbi-perl \ + libnet-oping-perl \ + libsocket-perl \ + libswitch-perl \ + libtimedate-perl \ + perl \ + libjson-xs-perl \ + libjson-perl \ + perl-base \ + perl-modules +RUN mkdir -p /opt/gondul +CMD /opt/gondul/collectors/ping.pl diff --git a/build/test/gondul-db-test.Dockerfile b/build/test/gondul-db-test.Dockerfile new file mode 100644 index 0000000..2e0e0ce --- /dev/null +++ b/build/test/gondul-db-test.Dockerfile @@ -0,0 +1,10 @@ +FROM debian:jessie +RUN apt-get update && apt-get install -y postgresql-9.4 +ADD build/test/pg_hba.tail /pg_hba.tail +RUN cat /pg_hba.tail >> /etc/postgresql/9.4/main/pg_hba.conf +RUN service postgresql start && su postgres -c "psql --command=\"CREATE ROLE nms PASSWORD 'risbrod' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\"" && su postgres -c "createdb -O nms nms" && service postgresql stop +ADD build/schema.sql /schema.sql +RUN service postgresql start && su postgres -c "cat /schema.sql | psql nms" && service postgresql stop +RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.4/main/postgresql.conf +CMD pg_ctlcluster --foreground 9.4 main start +EXPOSE 5432 diff --git a/build/test/gondul-front-test.Dockerfile b/build/test/gondul-front-test.Dockerfile new file mode 100644 index 0000000..90687cf --- /dev/null +++ b/build/test/gondul-front-test.Dockerfile @@ -0,0 +1,43 @@ +FROM debian:jessie +RUN apt-get update +RUN apt-get -y install \ + libcapture-tiny-perl \ + libcommon-sense-perl \ + libdata-dumper-simple-perl \ + libdbd-pg-perl \ + libdbi-perl \ + libdigest-perl \ + libgd-perl \ + libgeo-ip-perl \ + libhtml-parser-perl \ + libhtml-template-perl \ + libjson-perl \ + libjson-xs-perl \ + libnetaddr-ip-perl \ + libnet-cidr-perl \ + libnet-ip-perl \ + libnet-oping-perl \ + libnet-rawip-perl \ + libsnmp-perl \ + libsocket6-perl \ + libsocket-perl \ + libswitch-perl \ + libtimedate-perl \ + perl \ + perl-base \ + perl-modules \ + libfreezethaw-perl \ + apache2 + +RUN mkdir -p /opt/gondul + +RUN a2dissite 000-default +RUN a2enmod cgi +RUN ln -s /opt/gondul/extras/misc/apache2.conf /etc/apache2/sites-enabled/nms.conf +RUN mkdir -p /opt/gondul/etc +RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /htpasswd-read +RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /htpasswd-write +ADD build/test/dummy-apache2.start / +RUN chmod 0755 /dummy-apache2.start +CMD /dummy-apache2.start +EXPOSE 80 diff --git a/build/test/gondul-snmp-test.Dockerfile b/build/test/gondul-snmp-test.Dockerfile new file mode 100644 index 0000000..a99a943 --- /dev/null +++ b/build/test/gondul-snmp-test.Dockerfile @@ -0,0 +1,20 @@ +FROM debian:jessie +RUN apt-get update +RUN apt-get -y install \ + libdata-dumper-simple-perl \ + libdbd-pg-perl \ + libdbi-perl \ + libnet-oping-perl \ + libsocket-perl \ + libswitch-perl \ + libtimedate-perl \ + perl \ + libjson-xs-perl \ + libjson-perl \ + perl-base \ + snmpd \ + libsnmp-perl \ + perl-modules +RUN mkdir -p /opt/gondul +COPY build/test/snmpd.conf /etc/snmp/ +CMD /opt/gondul/build/test/snmpfetch-misc.sh diff --git a/build/test/gondul-varnish-test.Dockerfile b/build/test/gondul-varnish-test.Dockerfile new file mode 100644 index 0000000..7e75b86 --- /dev/null +++ b/build/test/gondul-varnish-test.Dockerfile @@ -0,0 +1,8 @@ +FROM debian:jessie +RUN apt-get update +RUN apt-get -y install varnish + +RUN rm /etc/varnish/default.vcl +ADD extras/misc/varnish.vcl /etc/varnish/default.vcl +CMD varnishd -a :80 -f /etc/varnish/default.vcl -F +EXPOSE 80 diff --git a/build/test/nms-collector-test.Dockerfile b/build/test/nms-collector-test.Dockerfile deleted file mode 100644 index 4b08f05..0000000 --- a/build/test/nms-collector-test.Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM debian:jessie -RUN apt-get update -RUN apt-get -y install \ - libdata-dumper-simple-perl \ - libdbd-pg-perl \ - libdbi-perl \ - libnet-oping-perl \ - libsocket-perl \ - libswitch-perl \ - libtimedate-perl \ - perl \ - libjson-xs-perl \ - libjson-perl \ - perl-base \ - perl-modules -RUN mkdir -p /opt/nms -CMD /opt/nms/collectors/ping.pl diff --git a/build/test/nms-db-test.Dockerfile b/build/test/nms-db-test.Dockerfile deleted file mode 100644 index 2e0e0ce..0000000 --- a/build/test/nms-db-test.Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM debian:jessie -RUN apt-get update && apt-get install -y postgresql-9.4 -ADD build/test/pg_hba.tail /pg_hba.tail -RUN cat /pg_hba.tail >> /etc/postgresql/9.4/main/pg_hba.conf -RUN service postgresql start && su postgres -c "psql --command=\"CREATE ROLE nms PASSWORD 'risbrod' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\"" && su postgres -c "createdb -O nms nms" && service postgresql stop -ADD build/schema.sql /schema.sql -RUN service postgresql start && su postgres -c "cat /schema.sql | psql nms" && service postgresql stop -RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.4/main/postgresql.conf -CMD pg_ctlcluster --foreground 9.4 main start -EXPOSE 5432 diff --git a/build/test/nms-front-test.Dockerfile b/build/test/nms-front-test.Dockerfile deleted file mode 100644 index e9d7ef8..0000000 --- a/build/test/nms-front-test.Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM debian:jessie -RUN apt-get update -RUN apt-get -y install \ - libcapture-tiny-perl \ - libcommon-sense-perl \ - libdata-dumper-simple-perl \ - libdbd-pg-perl \ - libdbi-perl \ - libdigest-perl \ - libgd-perl \ - libgeo-ip-perl \ - libhtml-parser-perl \ - libhtml-template-perl \ - libjson-perl \ - libjson-xs-perl \ - libnetaddr-ip-perl \ - libnet-cidr-perl \ - libnet-ip-perl \ - libnet-oping-perl \ - libnet-rawip-perl \ - libsnmp-perl \ - libsocket6-perl \ - libsocket-perl \ - libswitch-perl \ - libtimedate-perl \ - perl \ - perl-base \ - perl-modules \ - libfreezethaw-perl \ - apache2 - -RUN mkdir -p /opt/nms - -RUN a2dissite 000-default -RUN a2enmod cgi -RUN ln -s /opt/nms/extras/misc/apache2.conf /etc/apache2/sites-enabled/nms.conf -RUN mkdir -p /opt/nms/etc -RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /htpasswd-read -RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /htpasswd-write -ADD build/test/dummy-apache2.start / -RUN chmod 0755 /dummy-apache2.start -CMD /dummy-apache2.start -EXPOSE 80 diff --git a/build/test/nms-snmp-test.Dockerfile b/build/test/nms-snmp-test.Dockerfile deleted file mode 100644 index f7bb30e..0000000 --- a/build/test/nms-snmp-test.Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM debian:jessie -RUN apt-get update -RUN apt-get -y install \ - libdata-dumper-simple-perl \ - libdbd-pg-perl \ - libdbi-perl \ - libnet-oping-perl \ - libsocket-perl \ - libswitch-perl \ - libtimedate-perl \ - perl \ - libjson-xs-perl \ - libjson-perl \ - perl-base \ - snmpd \ - libsnmp-perl \ - perl-modules -RUN mkdir -p /opt/nms -COPY build/test/snmpd.conf /etc/snmp/ -CMD /opt/nms/build/test/snmpfetch-misc.sh diff --git a/build/test/nms-varnish-test.Dockerfile b/build/test/nms-varnish-test.Dockerfile deleted file mode 100644 index 7e75b86..0000000 --- a/build/test/nms-varnish-test.Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM debian:jessie -RUN apt-get update -RUN apt-get -y install varnish - -RUN rm /etc/varnish/default.vcl -ADD extras/misc/varnish.vcl /etc/varnish/default.vcl -CMD varnishd -a :80 -f /etc/varnish/default.vcl -F -EXPOSE 80 diff --git a/build/test/snmpfetch-misc.sh b/build/test/snmpfetch-misc.sh index 55c024d..95b005f 100755 --- a/build/test/snmpfetch-misc.sh +++ b/build/test/snmpfetch-misc.sh @@ -1,3 +1,3 @@ #!/bin/bash service snmpd start -exec /opt/nms/collectors/snmpfetchng.pl +exec /opt/gondul/collectors/snmpfetchng.pl -- cgit v1.2.3