├── .kitchen.yml ├── LICENSE.md ├── README.md ├── devnull-1.0_debian ├── Dockerfile ├── README.md ├── inetd.conf └── nginx.conf ├── freepbx-12_centos6 └── Dockerfile ├── nagios-4.0.8_centos6 ├── Dockerfile ├── README.md └── supervisord.conf ├── nagios-4.0.8_centos7 ├── Dockerfile ├── README.md └── supervisord.conf ├── nagios-4.2.3_centos7 └── Dockerfile ├── omd-docker ├── Dockerfile └── runner.sh ├── opennetadmin_centos6 └── Dockerfile └── sensu-docker-client ├── Dockerfile ├── Dockerfile.tmpl ├── README.md ├── conf └── supervisord.conf ├── templates ├── client.json.tmpl ├── redis.json.tmpl └── transport.json.tmpl └── yum.repos.d └── sensu.repo /.kitchen.yml: -------------------------------------------------------------------------------- 1 | --- 2 | driver: 3 | name: docker 4 | forward: 9000:9000 5 | 6 | provisioner: 7 | name: chef_zero 8 | environments_path: environments 9 | roles_path: roles 10 | solo_rb: 11 | environment: us4 12 | 13 | platforms: 14 | - name: centos-7 15 | driver_config: 16 | image: centos:7.4.1708 17 | privileged: true 18 | run_command: /usr/sbin/init 19 | hostname: mytestbox01 20 | dns: 4.2.2.2 21 | instance_name: mytestbox01 22 | attributes: 23 | authorization: 24 | sudo: 25 | users: ['kitchen'] 26 | passwordless: true 27 | include_sudoers_d: true 28 | 29 | suites: 30 | - name: default 31 | run_list: 32 | - recipe[chef-client::default] 33 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | docker-files 2 | ============ 3 | 4 | custom docker build files 5 | -------------------------------------------------------------------------------- /devnull-1.0_debian/Dockerfile: -------------------------------------------------------------------------------- 1 | # installation of DaaS in container 2 | FROM debian 3 | 4 | MAINTAINER boardstretcher version: 1.0 5 | 6 | # update container 7 | RUN apt-get -y update 8 | RUN apt-get -y upgrade 9 | 10 | # nginx 11 | RUN apt-get install -y nginx 12 | ADD nginx.conf /etc/nginx/nginx.conf 13 | 14 | # discard service 15 | RUN apt-get install -y openbsd-inetd 16 | ADD inetd.conf /etc/inetd.conf 17 | 18 | # ports 19 | EXPOSE 9 20 | EXPOSE 80 21 | 22 | # start up nginx 23 | CMD /usr/sbin/inetd && nginx 24 | -------------------------------------------------------------------------------- /devnull-1.0_debian/README.md: -------------------------------------------------------------------------------- 1 | # DaaS Docker container 2 | ## /dev/null as a service 3 | 4 | Built with latest Debian and Nginx, and version 1.0 of DaaS 5 | 6 | ## Installation 7 | Use docker to build the container and then run it on port 80. 8 | 9 | ``` 10 | git clone https://github.com/boardstretcher/docker-files.git 11 | cd docker-files/devnull-1.0_debian 12 | docker build -t devnull . 13 | docker run -p 80:80 -d devnull 14 | ``` 15 | 16 | You may then test with a curl command that your information is being dropped by dev/null 17 | 18 | ``` 19 | touch this 20 | curl -v -d @this -X POST http://your-ip-address/dev/null 21 | ``` 22 | 23 | ## About 24 | 25 | From: http://devnull-as-a-service.com/ 26 | > In modern days everything is a service. You create documents, upload photos, deploy computers, but what's happening to your trash? That's why we're launching /dev/null to the cloud. 27 | > 28 | > IAAS, SAAS, PAAS, holy fuckshit, we call our baby DAAS. 29 | > 30 | > Don't get rid of your data yourself anymore. Use our distributed service located in over 380 countries! No matter if you're using it personally or for your business: plans for whole companies are available as well. 31 | > 32 | > Just because, of course, everything should be a managed-service somewhere in the internet! 33 | -------------------------------------------------------------------------------- /devnull-1.0_debian/inetd.conf: -------------------------------------------------------------------------------- 1 | # /etc/inetd.conf: see inetd(8) for further informations. 2 | # 3 | # Internet superserver configuration database 4 | # 5 | # 6 | # Lines starting with "#:LABEL:" or "##" should not 7 | # be changed unless you know what you are doing! 8 | # 9 | # If you want to disable an entry so it isn't touched during 10 | # package updates just comment it out with a single '#' character. 11 | # 12 | # Packages should modify this file by using update-inetd(8) 13 | # 14 | # 15 | # 16 | #:INTERNAL: Internal services 17 | discard stream tcp nowait root internal 18 | discard dgram udp wait root internal 19 | #daytime stream tcp nowait root internal 20 | #time stream tcp nowait root internal 21 | 22 | #:STANDARD: These are standard services. 23 | 24 | #:BSD: Shell, login, exec and talk are BSD protocols. 25 | 26 | #:MAIL: Mail, news and uucp services. 27 | 28 | #:INFO: Info services 29 | 30 | #:BOOT: TFTP service is provided primarily for booting. Most sites 31 | # run this only on machines acting as "boot servers." 32 | 33 | #:RPC: RPC based services 34 | 35 | #:HAM-RADIO: amateur-radio services 36 | 37 | #:OTHER: Other services 38 | -------------------------------------------------------------------------------- /devnull-1.0_debian/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes 4; 3 | pid /var/run/nginx.pid; 4 | daemon off; 5 | 6 | events { 7 | worker_connections 768; 8 | } 9 | 10 | http { 11 | sendfile on; 12 | tcp_nopush on; 13 | tcp_nodelay on; 14 | keepalive_timeout 65; 15 | types_hash_max_size 2048; 16 | include /etc/nginx/mime.types; 17 | default_type application/octet-stream; 18 | access_log /dev/null; 19 | error_log /dev/null; 20 | gzip on; 21 | gzip_disable "msie6"; 22 | include /etc/nginx/conf.d/*.conf; 23 | include /etc/nginx/sites-enabled/*; 24 | server { 25 | listen 80; 26 | location /dev/null { 27 | if ($request_method = POST ) { 28 | return 200; } 29 | if ($request_method = GET ) { 30 | return 204; } 31 | } 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /freepbx-12_centos6/Dockerfile: -------------------------------------------------------------------------------- 1 | # install asterisk 13 on centos 6.6 2 | FROM centos:centos6 3 | 4 | # info 5 | MAINTAINER szboardstretcher version:1.0 6 | 7 | # update container 8 | RUN yum install -y epel-release 9 | RUN yum update -y 10 | RUN yum groupinstall -y core 11 | RUN yum groupinstall -y base 12 | RUN yum install -y gcc gcc-c++ lynx bison mysql-devel mysql-server php php-xml php-mysql php-pear \ 13 | php-mbstring tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf \ 14 | caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel \ 15 | subversion kernel-devel git subversion kernel-devel php-process crontabs cronie \ 16 | cronie-anacron doxygen sqlite-devel vim wget speex-devel gsm-devel libuuid-devel 17 | 18 | RUN pear channel-update pear.php.net 19 | RUN pear install db 20 | 21 | # asterisk source requirements 22 | WORKDIR /root/ 23 | 24 | ADD http://srtp.sourceforge.net/srtp-1.4.2.tgz /root/srtp-1.4.2.tgz 25 | ADD http://www.digip.org/jansson/releases/jansson-2.5.tar.gz /root/jansson-2.5.tar.gz 26 | ADD http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz /root/asterisk-13-current.tar.gz 27 | RUN git clone https://github.com/asterisk/pjproject /root/pjproject 28 | 29 | RUN tar xf srtp-1.4.2.tgz 30 | RUN tar xf jansson-2.5.tar.gz 31 | RUN tar xf asterisk-13-current.tar.gz 32 | 33 | WORKDIR /root/srtp/ 34 | RUN autoconf && ./configure && sed -i "s/CFLAGS.= -Wall/CFLAGS = -fPIC -Wall/g" Makefile &&\ 35 | make && make install && cp /usr/local/lib/libsrtp.a /lib 36 | 37 | WORKDIR /root/pjproject/ 38 | RUN ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample \ 39 | --disable-video --disable-opencore-amr --with-external-speex --with-external-srtp \ 40 | --with-external-gsm --libdir=/usr/lib64 && \ 41 | make dep && make && make install 42 | 43 | WORKDIR /root/jansson-2.5 44 | RUN ./configure --prefix=/usr/ && make && make install && ldconfig 45 | 46 | WORKDIR /root/asterisk-13.0.0 47 | RUN ./configure && make && make install 48 | 49 | 50 | ENV VER_FREEPBX 12.0 51 | 52 | WORKDIR /usr/src 53 | RUN git clone http://git.freepbx.org/scm/freepbx/framework.git freepbx 54 | 55 | WORKDIR /usr/src/freepbx 56 | RUN git checkout release/${VER_FREEPBX} 57 | RUN adduser asterisk -M -c "Asterisk User" 58 | RUN touch /var/run/asterisk/asterisk.pid 59 | RUN chown -R asterisk. /var/run/asterisk 60 | RUN chown -R asterisk. /etc/asterisk 61 | RUN chown -R asterisk. /var/{lib,log,spool}/asterisk 62 | RUN chown -R asterisk. /usr/lib/asterisk 63 | RUN chown -R asterisk. /var/www/ 64 | RUN sed -i "s/\(^upload_max_filesize = \).*/\\120M/" /etc/php.ini 65 | RUN cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_orig 66 | RUN sed -i "s/^\(User\|Group\).*/\\1 asterisk/" /etc/httpd/conf/httpd.conf 67 | RUN sed -i "s/AllowOverride None/AllowOverride All/g" /etc/httpd/conf/httpd.conf 68 | RUN ldconfig 69 | RUN rm -rf /var/www/html 70 | 71 | ENV ASTERISK_DB_PW amp109 72 | 73 | WORKDIR /usr/src/freepbx 74 | RUN service mysqld start 75 | RUN mysqladmin -u root create asterisk 76 | RUN mysqladmin -u root create asteriskcdrdb 77 | RUN mysql -u root asterisk < SQL/newinstall.sql 78 | RUN mysql -u root asteriskcdrdb < SQL/cdr_mysql_table.sql 79 | RUN mysql -u root -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY \'${ASTERISK_DB_PW}\';" 80 | RUN mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY \'${ASTERISK_DB_PW}\';" 81 | RUN mysql -u root -e "flush privileges;" 82 | with cd('/usr/src/freepbx: 83 | RUN ./start_asterisk start 84 | RUN ./install_amp --dbname asterisk --username asteriskuser --password ${ASTERISK_DB_PW} 85 | RUN amportal a ma download manager 86 | RUN amportal a ma install manager 87 | RUN amportal a ma download userman 88 | RUN amportal a ma install userman 89 | RUN amportal a ma download sipstation 90 | RUN amportal a ma install sipstation 91 | RUN amportal a ma installall 92 | RUN amportal chown 93 | RUN amportal a ma refreshsignatures 94 | RUN amportal a reload 95 | RUN mysql -u root -D asterisk -e "UPDATE modules SET signature = ( SELECT signature FROM ( SELECT signature FROM modules WHERE id = 2 ) t ) WHERE id = 1;" 96 | RUN ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3 97 | RUN service httpd restart 98 | RUN amportal restart 99 | -------------------------------------------------------------------------------- /nagios-4.0.8_centos6/Dockerfile: -------------------------------------------------------------------------------- 1 | # Docker containers are supposedly made to run 1 service per container,. 2 | # this is a dev container for testing nagios quickly - it runs all the 3 | # services needed in one container. Do NOT USE THIS IN PRODUCTION. 4 | 5 | # Install Nagios on Centos 6.5 6 | FROM centos:centos6 7 | 8 | # me! 9 | MAINTAINER boardstretcher version: 0.1 10 | 11 | # update container 12 | RUN yum -y update 13 | RUN yum -y install epel-release 14 | RUN yum -y install gd gd-devel wget httpd php gcc perl tar sendmail supervisor 15 | 16 | # users and groups 17 | RUN adduser nagios 18 | RUN groupadd nagcmd 19 | RUN usermod -a -G nagcmd nagios 20 | RUN usermod -a -G nagios apache 21 | 22 | # get archives 23 | ADD http://downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.8/nagios-4.0.8.tar.gz nagios-4.0.8.tar.gz 24 | ADD http://www.nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz nagios-plugins-2.0.3.tar.gz 25 | 26 | # install nagios 27 | RUN tar xf nagios-4.0.8.tar.gz 28 | RUN cd nagios-4.0.8 && ./configure --with-command-group=nagcmd 29 | RUN cd nagios-4.0.8 && make all && make install && make install-init 30 | RUN cd nagios-4.0.8 && make install-config && make install-commandmode && make install-webconf 31 | 32 | # user/password = nagiosadmin/nagiosadmin 33 | RUN echo "nagiosadmin:M.t9dyxR3OZ3E" > /usr/local/nagios/etc/htpasswd.users 34 | RUN chown nagios:nagios /usr/local/nagios/etc/htpasswd.users 35 | 36 | # install plugins 37 | RUN tar xf nagios-plugins-2.0.3.tar.gz 38 | RUN cd nagios-plugins-2.0.3 && ./configure --with-nagios-user=nagios --with-nagios-group=nagios 39 | RUN cd nagios-plugins-2.0.3 && make && make install 40 | 41 | # create initial config 42 | RUN /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 43 | 44 | # some bug fixes 45 | RUN touch /var/www/html/index.html 46 | RUN chown nagios.nagcmd /usr/local/nagios/var/rw 47 | RUN chmod g+rwx /usr/local/nagios/var/rw 48 | RUN chmod g+s /usr/local/nagios/var/rw 49 | 50 | # init bug fix 51 | # RUN sed -i '/$NagiosBin -d $NagiosCfgFile/a (sleep 10; chmod 666 \/usr\/local\/nagios\/var\/rw\/nagios\.cmd) &' /etc/init.d/nagios 52 | 53 | # remove gcc 54 | RUN yum -y remove gcc 55 | 56 | # port 80 57 | EXPOSE 25 80 58 | 59 | # supervisor configuration 60 | ADD supervisord.conf /etc/supervisord.conf 61 | 62 | # start up nagios, sendmail, apache 63 | CMD ["/usr/bin/supervisord"] 64 | -------------------------------------------------------------------------------- /nagios-4.0.8_centos6/README.md: -------------------------------------------------------------------------------- 1 | # Nagios 4.0.8 2 | - default username/password: nagiosadmin/nagiosadmin 3 | - all patches and fixes 4 | -------------------------------------------------------------------------------- /nagios-4.0.8_centos6/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:apache2] 5 | command=/bin/bash -c "exec /usr/sbin/apachectl -DFOREGROUND" 6 | 7 | [program:nagios] 8 | command=/bin/bash -c "/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg" 9 | 10 | [program:sendmail] 11 | command=/bin/bash -c "exec /etc/init.d/sendmail start" 12 | 13 | [program:nagios-bugfix] 14 | command=/bin/bash -c "sleep 10; chmod 666 /usr/local/nagios/var/rw/nagios.cmd; cat;" 15 | -------------------------------------------------------------------------------- /nagios-4.0.8_centos7/Dockerfile: -------------------------------------------------------------------------------- 1 | # Docker containers are supposedly made to run 1 service per container,. 2 | # this is a dev container for testing nagios quickly - it runs all the 3 | # services needed in one container. Do NOT USE THIS IN PRODUCTION. 4 | 5 | # install nagios 4.0.8 on centos 7 6 | FROM centos:centos7 7 | 8 | # info 9 | MAINTAINER szboardstretcher version: 0.1 10 | 11 | # update container 12 | RUN yum -y update 13 | RUN yum -y install epel-release 14 | RUN yum -y install gd gd-devel wget httpd php gcc make perl tar sendmail supervisor 15 | 16 | # users and groups 17 | RUN adduser nagios 18 | RUN groupadd nagcmd 19 | RUN usermod -a -G nagcmd nagios 20 | RUN usermod -a -G nagios apache 21 | 22 | # get archives 23 | 24 | ADD http://downloads.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.8/nagios-4.0.8.tar.gz nagios-4.0.8.tar.gz 25 | ADD http://www.nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz nagios-plugins-2.0.3.tar.gz 26 | 27 | # install nagios 28 | RUN tar xf nagios-4.0.8.tar.gz 29 | RUN cd nagios-4.0.8 && ./configure --with-command-group=nagcmd 30 | RUN cd nagios-4.0.8 && make all && make install && make install-init 31 | RUN cd nagios-4.0.8 && make install-config && make install-commandmode && make install-webconf 32 | 33 | # user/password = nagiosadmin/nagiosadmin 34 | RUN echo "nagiosadmin:M.t9dyxR3OZ3E" > /usr/local/nagios/etc/htpasswd.users 35 | RUN chown nagios:nagios /usr/local/nagios/etc/htpasswd.users 36 | 37 | # install plugins 38 | RUN tar xf nagios-plugins-2.0.3.tar.gz 39 | RUN cd nagios-plugins-2.0.3 && ./configure --with-nagios-user=nagios --with-nagios-group=nagios 40 | RUN cd nagios-plugins-2.0.3 && make && make install 41 | 42 | # create initial config 43 | RUN /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 44 | 45 | # some bug fixes 46 | RUN touch /var/www/html/index.html 47 | RUN chown nagios.nagcmd /usr/local/nagios/var/rw 48 | RUN chmod g+rwx /usr/local/nagios/var/rw 49 | RUN chmod g+s /usr/local/nagios/var/rw 50 | 51 | # init bug fix 52 | # RUN sed -i '/$NagiosBin -d $NagiosCfgFile/a (sleep 10; chmod 666 \/usr\/local\/nagios\/var\/rw\/nagios\.cmd) &' /etc/init.d/nagios 53 | 54 | # remove gcc 55 | RUN yum -y remove gcc 56 | 57 | # port 80 58 | EXPOSE 25 80 59 | 60 | # supervisor configuration 61 | ADD supervisord.conf /etc/supervisord.conf 62 | 63 | # start up nagios, sendmail, apache 64 | CMD ["/usr/bin/supervisord"] 65 | -------------------------------------------------------------------------------- /nagios-4.0.8_centos7/README.md: -------------------------------------------------------------------------------- 1 | # Nagios 4.0.8 2 | - Centos 7.0 3 | - default username/password: nagiosadmin/nagiosadmin 4 | - all patches and fixes 5 | -------------------------------------------------------------------------------- /nagios-4.0.8_centos7/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:apache] 5 | command=/bin/bash -c "exec /usr/sbin/apachectl -DFOREGROUND" 6 | 7 | [program:nagios] 8 | command=/bin/bash -c "/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg" 9 | 10 | [program:sendmail] 11 | command=/bin/bash -c "exec /etc/init.d/sendmail start" 12 | 13 | [program:nagios-bugfix] 14 | command=/bin/bash -c "sleep 10; chmod 666 /usr/local/nagios/var/rw/nagios.cmd; cat;" 15 | -------------------------------------------------------------------------------- /nagios-4.2.3_centos7/Dockerfile: -------------------------------------------------------------------------------- 1 | # To build and run: 2 | # docker build -t nagios:423_centos7 . 3 | # docker run -t -i nagios:423_centos7 4 | 5 | # Docker containers are supposedly made to run 1 service per container,. 6 | # this is a dev container for testing nagios quickly - it runs all the 7 | # services needed in one container. Do NOT USE THIS IN PRODUCTION. 8 | 9 | # install nagios 4.2.3 on centos 7 10 | FROM centos:centos7 11 | 12 | # info 13 | MAINTAINER szboardstretcher version: 0.1 14 | 15 | # update container 16 | RUN yum -y update 17 | RUN yum -y install epel-release 18 | RUN yum -y install gd gd-devel wget httpd php gcc make perl tar unzip sendmail supervisor 19 | 20 | # users and groups 21 | RUN adduser nagios 22 | RUN groupadd nagcmd 23 | RUN usermod -a -G nagcmd nagios 24 | RUN usermod -a -G nagios apache 25 | 26 | # get archives 27 | ADD https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.3.tar.gz /root 28 | ADD https://nagios-plugins.org/download/nagios-plugins-2.1.4.tar.gz /root 29 | 30 | # install nagios 31 | RUN cd /root/ && tar xf nagios-4.2.3.tar.gz 32 | RUN cd /root/nagios-4.2.3 && ./configure --with-command-group=nagcmd 33 | RUN cd /root/nagios-4.2.3 && make all && make install && make install-init 34 | RUN cd /root/nagios-4.2.3 && make install-config && make install-commandmode && make install-webconf 35 | 36 | # user/password = nagiosadmin/nagiosadmin 37 | RUN echo "nagiosadmin:M.t9dyxR3OZ3E" > /usr/local/nagios/etc/htpasswd.users 38 | RUN chown nagios:nagios /usr/local/nagios/etc/htpasswd.users 39 | 40 | # install plugins 41 | RUN cd /root && tar xf nagios-plugins-2.1.4.tar.gz 42 | RUN cd /root/nagios-plugins-2.1.4 && ./configure --with-nagios-user=nagios --with-nagios-group=nagios 43 | RUN cd /root/nagios-plugins-2.1.4 && make && make install 44 | 45 | # create initial config 46 | RUN /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 47 | 48 | # remove gcc 49 | RUN yum -y remove gcc 50 | 51 | # port 80 52 | EXPOSE 25 80 53 | 54 | # supervisor configuration 55 | ADD supervisord.conf /etc/supervisord.conf 56 | 57 | # start up nagios, sendmail, apache 58 | CMD ["/usr/bin/supervisord"] 59 | -------------------------------------------------------------------------------- /omd-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:centos7 2 | 3 | MAINTAINER szboardstretcher version: 0.1 4 | 5 | RUN yum update -y 6 | 7 | RUN yum -y install http://files.omdistro.org/releases/1.30/omd-1.30.rhel7.x86_64.rpm 8 | 9 | RUN echo yes | omd setup 10 | RUN cp /usr/lib64/python2.7/hashlib.py /opt/omd/versions/1.30/lib/python/ 11 | 12 | # Set up a default site with no TMPFS 13 | RUN omd create default 14 | RUN omd config default set TMPFS off 15 | RUN omd config default set APACHE_TCP_ADDR 0.0.0.0 16 | 17 | ADD runner.sh /runner.sh 18 | 19 | EXPOSE 80 5000 20 | ENTRYPOINT ["/runner.sh"] 21 | -------------------------------------------------------------------------------- /omd-docker/runner.sh: -------------------------------------------------------------------------------- 1 | service httpd start 2 | omd start 3 | while true; do 4 | sleep 5 5 | done 6 | -------------------------------------------------------------------------------- /opennetadmin_centos6/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for opennetadmin 2 | # https://github.com/boardstretcher/docker-files 3 | FROM centos:centos6 4 | MAINTAINER boardstretcher 5 | 6 | # Variables 7 | ENV SERVER_URL http://localhost:80 8 | 9 | # Update container 10 | RUN yum update -y 11 | 12 | # Download and install software 13 | ADD https://github.com/opennetadmin/ona/archive/ona-current.tar.gz /tmp/ona-current.tar.gz 14 | 15 | # Licensed under "The MIT License" in 2014 16 | -------------------------------------------------------------------------------- /sensu-docker-client/Dockerfile: -------------------------------------------------------------------------------- 1 | # install sensu-client on centos 7 2 | FROM centos:centos7 3 | 4 | # info 5 | MAINTAINER szboardstretcher version: 66.6 6 | 7 | # requirements 8 | RUN yum install -y epel-release 9 | RUN yum makecache fast 10 | RUN yum install -y wget deltarpm systemd-devel supervisor 11 | 12 | # support go environment vars 13 | ENV ENVTPL_VERSION=0.2.3 14 | RUN \ 15 | curl -Ls https://github.com/arschles/envtpl/releases/download/${ENVTPL_VERSION}/envtpl_linux_amd64 > /usr/local/bin/envtpl && \ 16 | chmod +x /usr/local/bin/envtpl 17 | 18 | # templates and bin 19 | COPY conf/supervisord.conf /etc 20 | COPY yum.repos.d/sensu.repo /etc/yum.repos.d 21 | COPY templates /etc/sensu/templates 22 | 23 | # install sensu 24 | RUN \ 25 | yum install -y sensu 26 | 27 | # install plugins 28 | RUN \ 29 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-cpu-checks && \ 30 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-memory-checks && \ 31 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-disk-checks && \ 32 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-load-checks 33 | 34 | # environment variables 35 | ENV \ 36 | #Client Config 37 | CLIENT_NAME=sensu-102 \ 38 | CLIENT_SUBSCRIPTIONS=all,default \ 39 | CLIENT_BIND=127.0.0.1 \ 40 | CLIENT_ADDRESS=127.0.0.1 \ 41 | CLIENT_DEREGISTER=true \ 42 | CLIENT_PID=/var/run/sensu/sensu-client.pid \ 43 | LOG_LEVEL=warn \ 44 | LOG_FILE=/var/log/sensu/sensu-client.log \ 45 | 46 | #Transport 47 | TRANSPORT_NAME=redis \ 48 | 49 | REDIS_HOST=104.236.75.69 \ 50 | REDIS_PORT=6379 \ 51 | 52 | #Common Config 53 | CONFIG_DIR=/etc/sensu/conf.d \ 54 | CHECK_DIR=/etc/sensu/check.d \ 55 | EXTENSION_DIR=/etc/sensu/extensions \ 56 | PLUGINS_DIR=/etc/sensu/plugins \ 57 | HANDLERS_DIR=/etc/sensu/handlers 58 | 59 | RUN mkdir -p $CONFIG_DIR $CHECK_DIR $EXTENSION_DIR $PLUGINS_DIR $HANDLERS_DIR 60 | 61 | RUN \ 62 | cd /etc/sensu/templates/ && \ 63 | for FILE in *.tmpl; do envtpl -in $FILE > /etc/sensu/conf.d/${FILE%.*}; done 64 | 65 | CMD ["/usr/bin/supervisord"] 66 | 67 | # vim 68 | # set ts=4 69 | -------------------------------------------------------------------------------- /sensu-docker-client/Dockerfile.tmpl: -------------------------------------------------------------------------------- 1 | # install sensu-client on centos 7 2 | FROM centos:centos7 3 | 4 | # info 5 | MAINTAINER szboardstretcher version: 66.6 6 | 7 | # requirements 8 | RUN yum install -y epel-release 9 | RUN yum makecache fast 10 | RUN yum install -y wget deltarpm systemd-devel supervisor 11 | 12 | # support go environment vars 13 | ENV ENVTPL_VERSION=0.2.3 14 | RUN \ 15 | curl -Ls https://github.com/arschles/envtpl/releases/download/${ENVTPL_VERSION}/envtpl_linux_amd64 > /usr/local/bin/envtpl && \ 16 | chmod +x /usr/local/bin/envtpl 17 | 18 | # templates and bin 19 | COPY conf/supervisord.conf /etc 20 | COPY yum.repos.d/sensu.repo /etc/yum.repos.d 21 | COPY templates /etc/sensu/templates 22 | 23 | # install sensu 24 | RUN \ 25 | yum install -y sensu 26 | 27 | # install plugins 28 | RUN \ 29 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-cpu-checks && \ 30 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-memory-checks && \ 31 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-disk-checks && \ 32 | /opt/sensu/embedded/bin/gem install --no-rdoc --no-ri sensu-plugins-load-checks 33 | 34 | # environment variables 35 | ENV \ 36 | #Client Config 37 | CLIENT_NAME=sensu-CLIENTNUM \ 38 | CLIENT_SUBSCRIPTIONS=all,default \ 39 | CLIENT_BIND=127.0.0.1 \ 40 | CLIENT_ADDRESS=127.0.0.1 \ 41 | CLIENT_DEREGISTER=true \ 42 | CLIENT_PID=/var/run/sensu/sensu-client.pid \ 43 | LOG_LEVEL=warn \ 44 | LOG_FILE=/var/log/sensu/sensu-client.log \ 45 | 46 | #Transport 47 | TRANSPORT_NAME=redis \ 48 | 49 | REDIS_HOST=104.236.75.69 \ 50 | REDIS_PORT=6379 \ 51 | 52 | #Common Config 53 | CONFIG_DIR=/etc/sensu/conf.d \ 54 | CHECK_DIR=/etc/sensu/check.d \ 55 | EXTENSION_DIR=/etc/sensu/extensions \ 56 | PLUGINS_DIR=/etc/sensu/plugins \ 57 | HANDLERS_DIR=/etc/sensu/handlers 58 | 59 | RUN mkdir -p $CONFIG_DIR $CHECK_DIR $EXTENSION_DIR $PLUGINS_DIR $HANDLERS_DIR 60 | 61 | RUN \ 62 | cd /etc/sensu/templates/ && \ 63 | for FILE in *.tmpl; do envtpl -in $FILE > /etc/sensu/conf.d/${FILE%.*}; done 64 | 65 | CMD ["/usr/bin/supervisord"] 66 | 67 | # vim 68 | # set ts=4 69 | -------------------------------------------------------------------------------- /sensu-docker-client/README.md: -------------------------------------------------------------------------------- 1 | Building and running the thing with a N number 2 | 3 | export N="101"; cp -f Dockerfile.tmpl Dockerfile; sed -i "s/CLIENTNUM/$N/g" Dockerfile; docker build -t "sensu-client$N" .; docker run -d --name sensu$N sensu-client$N; docker ps 4 | 5 | or building multiples 6 | 7 | for N in {01..05}; do cp -f Dockerfile.tmpl Dockerfile; sed -i "s/CLIENTNUM/$N/g" Dockerfile; docker build -t "sensu-client$N" .; docker run -d --name sensu$N sensu-client$N; docker ps; done 8 | -------------------------------------------------------------------------------- /sensu-docker-client/conf/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=/var/log/supervisor/supervisord.log 3 | logfile_maxbytes=50MB 4 | logfile_backups=10 5 | loglevel=info 6 | pidfile=/var/run/supervisord.pid 7 | nodaemon=true 8 | minfds=1024 9 | minprocs=200 10 | 11 | [program:sensu-client] 12 | command=/bin/bash -c "exec /opt/sensu/bin/sensu-client -d $CONFIG_DIR -e $EXTENSION_DIR -p $CLIENT_PID -l $LOG_FILE -L $LOG_LEVEL $OPTIONS" 13 | 14 | [include] 15 | files = supervisord.d/*.ini 16 | -------------------------------------------------------------------------------- /sensu-docker-client/templates/client.json.tmpl: -------------------------------------------------------------------------------- 1 | { 2 | "client": { 3 | "socket": { 4 | "bind": {{ .CLIENT_BIND | quote }} 5 | }, 6 | "name": {{ default .HOSTNAME .CLIENT_NAME | quote }}, 7 | "address": {{ .CLIENT_ADDRESS | quote }}, 8 | "deregister": {{ .CLIENT_DEREGISTER }}, 9 | 10 | "subscriptions": [ 11 | 12 | {{ range $index, $element := split "," .CLIENT_SUBSCRIPTIONS }} 13 | {{ if ne $index "_0" }},{{end}}{{. | quote }} 14 | {{end}} 15 | 16 | ], 17 | 18 | "keepalive": { 19 | "handler": [ "slack" ] 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /sensu-docker-client/templates/redis.json.tmpl: -------------------------------------------------------------------------------- 1 | { 2 | "redis": { 3 | "host": {{ .REDIS_HOST | quote }}, 4 | "port": {{ .REDIS_PORT | quote }}, 5 | 6 | "db": 0, 7 | "auto_reconnect": true, 8 | "reconnect_on_error": false 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /sensu-docker-client/templates/transport.json.tmpl: -------------------------------------------------------------------------------- 1 | { 2 | "transport": { 3 | "name": {{ .TRANSPORT_NAME | quote }}, 4 | "reconnect_on_error": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /sensu-docker-client/yum.repos.d/sensu.repo: -------------------------------------------------------------------------------- 1 | [sensu] 2 | name=sensu 3 | baseurl=https://sensu.global.ssl.fastly.net/yum/$releasever/$basearch/ 4 | gpgcheck=0 5 | enabled=1 6 | --------------------------------------------------------------------------------