aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoachim Tingvold <joachim@tingvold.com>2015-03-30 15:45:14 +0200
committerJoachim Tingvold <joachim@tingvold.com>2015-03-30 15:45:14 +0200
commit0713e9c8627abb20a701c16b74ef5f29d2231624 (patch)
treef9e695a57aa115896c30201c458323ac95976165
parent6890c6b2f33773a67d04f72be93133252a0635f6 (diff)
parent49b209d6e8b9eb141e6aa51620cd8e19b5882288 (diff)
Merge branch 'master' of github.com:tech-server/tgmanage
-rwxr-xr-xclients/update-public-nms.sh9
-rw-r--r--examples/tg15/nms-bootstrap.rst61
-rw-r--r--web/etc/apache2/nms-public.tg15.gathering.org11
-rw-r--r--web/etc/apache2/nms.tg15.gathering.org36
-rw-r--r--web/etc/apache2/stream.tg15.gathering.org (renamed from web/etc/apache2/stream.tg13.gathering.org)12
-rw-r--r--web/etc/apache2/tech.tg13.gathering.org12
-rw-r--r--web/etc/apache2/tech.tg15.gathering.org12
7 files changed, 132 insertions, 21 deletions
diff --git a/clients/update-public-nms.sh b/clients/update-public-nms.sh
index fe384cb..8d56251 100755
--- a/clients/update-public-nms.sh
+++ b/clients/update-public-nms.sh
@@ -1,9 +1,12 @@
#!/bin/sh
+YEAR=15
TGMANAGE=/root/tgmanage
-DIR=$TGMANAGE/web/nms-public.gathering.org
+DIR=/srv/www/nms-public.tg${YEAR}.gathering.org
+set -x
+mkdir -p $DIR
-wget -qO$DIR/nettkart-dhcp.png.new http://nms.tg14.gathering.org/dhcpkart.pl
-wget -qO$DIR/led.txt.new http://nms.tg14.gathering.org/led.pl
+wget -qO$DIR/nettkart-dhcp.png.new http://nms.tg${YEAR}.gathering.org/dhcpkart.pl
+wget -qO$DIR/led.txt.new http://nms.tg${YEAR}.gathering.org/led.pl
mv $DIR/nettkart-dhcp.png.new $DIR/nettkart-dhcp.png
mv $DIR/led.txt.new $DIR/led.txt
/usr/bin/perl $TGMANAGE/clients/update-public-speedometer.pl > $DIR/speedometer.json.tmp
diff --git a/examples/tg15/nms-bootstrap.rst b/examples/tg15/nms-bootstrap.rst
new file mode 100644
index 0000000..e81f615
--- /dev/null
+++ b/examples/tg15/nms-bootstrap.rst
@@ -0,0 +1,61 @@
+Bostrappe NMS
+==============
+
+1. Lag en maskin. Kall den, f.eks, Noget. Installer Debian på den. Tips:
+ "Web Server"-rollen fungerer bra.
+2. Legg inn git, få inn tgmanage repoet. Legg det under /root om du ønsker
+ å spare deg selv for litt arbeid.
+3. Gjør tgmanage tilgjengelig for andre brukere (type: chmod a+rx /root
+ f.eks)
+4. Link::
+ ln -s /root/tgmanage/web/etc/apache2/nms-public.tg15.gathering.org \
+ /etc/apache2/sites-enabled/
+ ln -s /root/tgmanage/web/etc/apache2/nms.tg15.gathering.org \
+ /etc/apache2/sites-enabled/
+5. Fjern::
+
+ rm /etc/apache2/sites-enabled/000*
+
+6. Installer postgresql. Lag en bruker og mat databasen::
+
+ su - postgres
+ # (som postgres)
+ createuser nms
+ psql < /root/tgmanage/sql/nms.sql
+
+7. Sørg for at du har ``include/cofig.pm`` satt opp korrekt, dette henger
+ typisk sammen med bootstrappingen av TG, vel og merke. Det viktigste for
+ oss foreløpig er databaseinformasjonen.
+
+8. Installer Diverse dependencies::
+
+ cd /root/tgmanage/web/nms.gathering.org
+ ./nettkart.pl
+ # Hmm, den mangler Foo/Bar!
+ apt-get install libfoo-bar-perl
+ # Rinse and repeat til feilmeldinger magisk forsvinner
+
+9. Test: http://nms.tg15.gathering.org (her kan /etc/hosts være nyttig)
+
+10. Fiks det du gjorde feil. Du vil nå ha en nms-side som delvis funker,
+ men har null data og dermed bare viser tomme kart.
+
+11. Ta en velfortjent pause. Nyt f.eks http://i.imgur.com/n5Sx4Bx.gif litt
+
+12. Populer ``/srv/www/nms-public.tg15.gathering.org/``::
+
+ FOO=/srv/www/nms-public.tg15.gathering.org
+ mkdir -p ${FOO}
+ cp /root/tgmanage/web/nms-public.gathering.org/* ${FOO}
+
+13. Kjør ``/root/tgmanage/clients/update-public-nms.sh`` og fiks eventuel
+ whine om dependencies.
+
+14. Link opp cron::
+
+ ln -s /root/tgmanage/web/etc/cron/update-public-nms \
+ /etc/cron/
+
+15. Begynn det artige populeringsarbeidet
+
+
diff --git a/web/etc/apache2/nms-public.tg15.gathering.org b/web/etc/apache2/nms-public.tg15.gathering.org
new file mode 100644
index 0000000..4ebf79b
--- /dev/null
+++ b/web/etc/apache2/nms-public.tg15.gathering.org
@@ -0,0 +1,11 @@
+<VirtualHost *:80>
+ ServerAdmin drift@gathering.org
+ ServerName nms-public.tg15.gathering.org
+
+ DocumentRoot /srv/www/nms-public.tg15.gathering.org
+ AddHandler cgi-script .cgi .sh .pl .py
+
+ LogLevel warn
+ ErrorLog /var/log/apache2/error-nms-public.tg15.gathering.org.log
+ CustomLog /var/log/apache2/access-nms-public.tg15.gathering.org.log combined
+</VirtualHost>
diff --git a/web/etc/apache2/nms.tg15.gathering.org b/web/etc/apache2/nms.tg15.gathering.org
new file mode 100644
index 0000000..b06257d
--- /dev/null
+++ b/web/etc/apache2/nms.tg15.gathering.org
@@ -0,0 +1,36 @@
+<VirtualHost *:80>
+ ServerAdmin drift@gathering.org
+ ServerName nms.tg15.gathering.org
+ ServerAlias noget.tg15.gathering.org
+
+ DocumentRoot /root/tgmanage/web/nms.gathering.org
+ <Directory "/root/tgmanage/web/nms.gathering.org">
+ AllowOverride None
+ Options Indexes FollowSymLinks ExecCGI MultiViews
+ Order allow,deny
+ Satisfy any
+ Allow from ::1
+ Allow from 127.0.0.1
+ Allow from 192.168.122.0/24
+
+ AddHandler cgi-script .cgi .sh .pl .py
+ AddDefaultCharset UTF-8
+
+ AuthUserFile /root/tgmanage/web/.htpasswd
+ AuthGroupFile /dev/null
+ AuthName "Tech:Server Secret Volcano Lair"
+ AuthType Basic
+
+ require valid-user
+ </Directory>
+
+ ErrorLog /var/log/apache2/error-nms.tg15.gathering.org.log
+
+ # Possible values include: debug, info, notice, warn, error, crit,
+ # alert, emerg.
+ LogLevel warn
+
+ CustomLog /var/log/apache2/access-nms.tg15.gathering.org.log combined
+ ServerSignature On
+
+</VirtualHost>
diff --git a/web/etc/apache2/stream.tg13.gathering.org b/web/etc/apache2/stream.tg15.gathering.org
index ff8a7c0..a7c0dda 100644
--- a/web/etc/apache2/stream.tg13.gathering.org
+++ b/web/etc/apache2/stream.tg15.gathering.org
@@ -1,10 +1,10 @@
<VirtualHost *:80>
ServerAdmin drift@gathering.org
- ServerName stream.tg14.gathering.org
- ServerAlias krosus.tg14.gathering.org
+ ServerName stream.tg15.gathering.org
+ ServerAlias krosus.tg15.gathering.org
- DocumentRoot /srv/stream.tg14.gathering.org
- <Directory "/srv/stream.tg14.gathering.org/">
+ DocumentRoot /srv/stream.tg15.gathering.org
+ <Directory "/srv/stream.tg15.gathering.org/">
AllowOverride None
Options Indexes FollowSymLinks ExecCGI MultiViews
Order allow,deny
@@ -14,12 +14,12 @@
</Directory>
- ErrorLog /var/log/apache2/error-stream.tg14.gathering.org.log
+ ErrorLog /var/log/apache2/error-stream.tg15.gathering.org.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
- CustomLog /var/log/apache2/access-stream.tg14.gathering.org.log combined
+ CustomLog /var/log/apache2/access-stream.tg15.gathering.org.log combined
ServerSignature On
</VirtualHost>
diff --git a/web/etc/apache2/tech.tg13.gathering.org b/web/etc/apache2/tech.tg13.gathering.org
deleted file mode 100644
index 7ab303b..0000000
--- a/web/etc/apache2/tech.tg13.gathering.org
+++ /dev/null
@@ -1,12 +0,0 @@
-<VirtualHost *:80>
- ServerAdmin drift@gathering.org
- ServerName tech.tg13.gathering.org
-
- DocumentRoot /srv/www/tech.tg13.gathering.org
-
- LogLevel warn
- ErrorLog /var/log/apache2/error-tech.tg13.gathering.org.log
- CustomLog /var/log/apache2/access-tech.tg13.gathering.org.log combined
-
- AddHandler cgi-script .pl
-</VirtualHost>
diff --git a/web/etc/apache2/tech.tg15.gathering.org b/web/etc/apache2/tech.tg15.gathering.org
new file mode 100644
index 0000000..bf2840e
--- /dev/null
+++ b/web/etc/apache2/tech.tg15.gathering.org
@@ -0,0 +1,12 @@
+<VirtualHost *:80>
+ ServerAdmin drift@gathering.org
+ ServerName tech.tg15.gathering.org
+
+ DocumentRoot /srv/www/tech.tg15.gathering.org
+
+ LogLevel warn
+ ErrorLog /var/log/apache2/error-tech.tg15.gathering.org.log
+ CustomLog /var/log/apache2/access-tech.tg15.gathering.org.log combined
+
+ AddHandler cgi-script .pl
+</VirtualHost>