aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2016-02-20 22:05:15 +0100
committerKristian Lyngstol <kristian@bohemians.org>2016-02-20 22:05:15 +0100
commitd371e83f0035f20a49c354ca2a1fc0b88f733d27 (patch)
tree7204423379b28a84e3d307a23f7d7007f6d48f3c
parent938a2c4661fc965f84bb9e54e6ed24c873d36fd0 (diff)
nms: More docker/config work for tg16
-rw-r--r--nms/Dockerfile.in58
-rw-r--r--web/etc/apache2/nms.tg16.gathering.org.conf10
2 files changed, 50 insertions, 18 deletions
diff --git a/nms/Dockerfile.in b/nms/Dockerfile.in
index c3d861a..40cecee 100644
--- a/nms/Dockerfile.in
+++ b/nms/Dockerfile.in
@@ -42,25 +42,61 @@ RUN echo . /etc/bash_completion >> /root/.bashrc
ENV TERM=rxvt-unicode
ADD .vimrc /root/.vimrc
RUN rm /etc/apt/apt.conf.d/docker-clean
-RUN systemctl mask dev-hugepages.mount sys-fs-fuse-connections.mount
-RUN git clone https://github.com/tech-server/tgmanage.git root/tgmanage
-RUN systemctl disable systemd-logind.service
-
+RUN systemctl mask dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service
+RUN git clone https://github.com/tech-server/tgmanage.git /srv/tgmanage
+#RUN systemctl disable systemd-logind.service
CMD ["/sbin/init"]
@template nms-front
FROM nms-base
-RUN apt-get -y install libcapture-tiny-perl libcgi-pm-perl libcommon-sense-perl libdata-dumper-simple-perl libdbi-perl libdigest-perl libgd-perl libgeo-ip-perl libhtml-parser-perl libhtml-template-perl libimage-magick-perl libimage-magick-q16-perl libjson-perl libjson-xs-perl libnetaddr-ip-perl libnet-cidr-perl libnet-ip-perl libnet-openssh-perl libnet-oping-perl libnet-rawip-perl libnet-telnet-cisco-perl libnet-telnet-perl libsnmp-perl libsocket6-perl libsocket-perl libswitch-perl libtimedate-perl perl perl-base perl-modules
+RUN apt-get -y install \
+ libcapture-tiny-perl \
+ libcgi-pm-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 \
+ libimage-magick-perl \
+ libimage-magick-q16-perl \
+ libjson-perl \
+ libjson-xs-perl \
+ libnetaddr-ip-perl \
+ libnet-cidr-perl \
+ libnet-ip-perl \
+ libnet-openssh-perl \
+ libnet-oping-perl \
+ libnet-rawip-perl \
+ libnet-telnet-cisco-perl \
+ libnet-telnet-perl \
+ libsnmp-perl \
+ libsocket6-perl \
+ libsocket-perl \
+ libswitch-perl \
+ libtimedate-perl \
+ perl \
+ perl-base \
+ perl-modules \
+ varnish \
+ apache2 \
+
+RUN cd /srv/tgmanage/ && tools/get_mibs.sh
-RUN cd /root/tgmanage/ && tools/get_mibs.sh
-RUN apt-get -y install apache2
RUN sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf
RUN a2dissite 000-default
-RUN cd /root/tgmanage/ && git pull
-RUN ln -s /root/tgmanage/web/etc/apache2/nms.tg16.gathering.org.conf /etc/apache2/sites-enabled/
-RUN ln -s /root/tgmanage/web/etc/varnish/nms.vcl
+RUN ln -s /srv/tgmanage/web/etc/apache2/nms.tg16.gathering.org.conf /etc/apache2/sites-enabled/
+
RUN systemctl enable apache2
-RUN apt-get -y install varnish
+
+RUN rm /etc/varnish/default.vcl
+RUN ln -s /srv/tgmanage/web/etc/varnish/nms.vcl /etc/varnish/default.vcl
+RUN sed -i 's/6081/80/' /lib/systemd/system/varnish.service
+RUN echo 'demo:$apr1$IKrQYF6x$0zmRciLR7Clc2tEEosyHV.' > /srv/tgmanage/web/.htpasswd
+RUN a2enmod cgi
RUN systemctl enable varnish
diff --git a/web/etc/apache2/nms.tg16.gathering.org.conf b/web/etc/apache2/nms.tg16.gathering.org.conf
index db8910a..13fbefb 100644
--- a/web/etc/apache2/nms.tg16.gathering.org.conf
+++ b/web/etc/apache2/nms.tg16.gathering.org.conf
@@ -3,8 +3,8 @@
ServerName nms.tg16.gathering.org
ServerAlias einstein.tg16.gathering.org
- DocumentRoot /root/tgmanage/web/nms.gathering.org
- <Directory "/root/tgmanage/web/nms.gathering.org">
+ DocumentRoot /srv/tgmanage/web/nms.gathering.org
+ <Directory "/srv/tgmanage/web/nms.gathering.org">
AllowOverride None
Options Indexes FollowSymLinks ExecCGI MultiViews
@@ -15,7 +15,7 @@
SetEnvIF ^X-Forwarded-For$ "^2a02:ed02:1337::12$" AllowIP
<RequireAny>
- AuthUserFile /root/tgmanage/web/.htpasswd
+ AuthUserFile /srv/tgmanage/web/.htpasswd
AuthName "Tech:Server Secret Volcano Lair"
AuthType Basic
Require valid-user
@@ -23,10 +23,6 @@
Require env AllowIP
</RequireAny>
- #AuthUserFile /root/tgmanage/web/.htpasswd
- #AuthName "Tech:Server Secret Volcano Lair"
- #AuthType Basic
- #require valid-user
</Directory>
ErrorLog /var/log/apache2/error-nms.tg16.gathering.org.log