@cryptotaxi247 / infra-1 / commits / c8750dce

svn path=/configurations/trunk/tud/; revision=24183

svn path=/configurations/trunk/tud/; revision=24183

Eelco Dolstra committed Oct 8, 2010 at 12:50 UTC c8750dced13cde99713eaa88561b9066c998b245
3 files changed +38 -75
cartman.nix
+20 -72
@@ -15,8 +15,6 @@ let
15 };
16 in map addKey (filter (machine: machine ? buildUser) machines);
17
18 - jiraJetty = (import ../../services/jira/jira-instance.nix).jetty;
19 -
18 myIP = "130.161.158.181";
19
20 releasesCSS = /etc/nixos/release/generic-dist/release-page/releases.css;
@@ -98,8 +96,11 @@ rec {
96 iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 192.168.1.0/24 -j ACCEPT
97 iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source ${myIP}
98
101 - # losser ssh
102 - iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 8080 -j DNAT --to 192.168.1.18:2022
99 + # butters ssh
100 + iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 8080 -j DNAT --to 192.168.1.23:22
101 +
102 + # stan ssh (for the SCM seminar)
103 + iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 2222 -j DNAT --to 192.168.1.20:22
104
105 echo 1 > /proc/sys/net/ipv4/ip_forward
106 '';
@@ -115,14 +116,8 @@ rec {
116 cron = {
117 mailto = "rob.vermaas@gmail.com";
118 systemCronJobs =
118 - let indexJob = hour: dir: url:
119 - "45 ${toString hour} * * * buildfarm (cd /etc/nixos/release/index && PATH=${pkgs.saxonb}/bin:$PATH ./make-index.sh ${dir} ${url} /releases.css) | ${pkgs.utillinux}/bin/logger -t index";
120 - in
119 [
120 "15 0 * * * root (TZ=CET date; ${pkgs.rsync}/bin/rsync -razv --numeric-ids --delete /data/postgresql /data/webserver/tarballs unixhome.st.ewi.tudelft.nl::bfarm/) >> /var/log/backup.log 2>&1"
123 - (indexJob 02 "/data/webserver/dist/strategoxt2" http://releases.strategoxt.org/)
124 - (indexJob 05 "/data/webserver/dist" http://buildfarm.st.ewi.tudelft.nl/)
125 -
121 "00 03 * * * root ${pkgs.nixUnstable}/bin/nix-collect-garbage --max-atime $(date +\\%s -d '2 weeks ago') > /var/log/gc.log 2>&1"
122 "* * * * * root ${pkgs.python}/bin/python ${ZabbixApacheUpdater} -z 192.168.1.5 -c cartman"
123 ];
@@ -307,8 +302,8 @@ rec {
302
303 ProxyRequests Off
304 ProxyPreserveHost On
310 - ProxyPass / http://localhost:10080/
311 - ProxyPassReverse / http://localhost:10080/
305 + ProxyPass / http://mrkitty:10080/
306 + ProxyPassReverse / http://mrkitty:10080/
307 '';
308 }
309
@@ -319,9 +314,6 @@ rec {
314 { hostName = "nixos.org";
315 documentRoot = "/home/eelco/nix-homepage";
316 servedDirs = [
322 - { urlPath = "/releases";
323 - dir = "/data/webserver/dist/nix";
324 - }
317 { urlPath = "/tarballs";
318 dir = "/data/webserver/tarballs";
319 }
@@ -332,6 +324,19 @@ rec {
324 dir = "/data/webserver/update";
325 }
326 ];
327 +
328 + extraConfig = ''
329 + <Proxy *>
330 + Order deny,allow
331 + Allow from all
332 + </Proxy>
333 +
334 + ProxyRequests Off
335 + ProxyPreserveHost On
336 + ProxyPass /releases/ http://lucifer:80/releases/
337 + ProxyPassReverse /releases/ http://lucifer:80/releases/
338 + '';
339 +
340 servedFiles = [
341 { urlPath = "/releases/css/releases.css";
342 file = releasesCSS;
@@ -400,42 +405,9 @@ rec {
405 documentRoot = "/home/karltk/public_html/planet";
406 }
407
403 - { hostName = "test.researchr.org";
404 - extraConfig = ''
405 - <Proxy *>
406 - Order deny,allow
407 - Allow from all
408 - </Proxy>
409 -
410 - ProxyRequests Off
411 - ProxyPreserveHost On
412 - ProxyPass / http://mrhankey:8080/ retry=5
413 - ProxyPassReverse / http://mrhankey:8080/
414 - '';
415 - }
416 -
417 - { hostName = "test.nixos.org";
418 - extraConfig = ''
419 - <Proxy *>
420 - Order deny,allow
421 - Allow from all
422 - </Proxy>
423 -
424 - ProxyRequests Off
425 - ProxyPreserveHost On
426 - ProxyPass / http://mrhankey:8080/ retry=5
427 - ProxyPassReverse / http://mrhankey:8080/
428 - '';
429 - }
430 -
408 ];
409 };
410
434 - postgresqlBackup = {
435 - enable = true;
436 - databases = [ "jira" ];
437 - };
438 -
411 sitecopy = {
412 enable = true;
413 backups =
@@ -491,30 +463,6 @@ rec {
463
464 };
465
494 - users.extraUsers = singleton
495 - { name = "jira";
496 - description = "JIRA bug tracker";
497 - };
498 -
499 - jobs.jira =
500 - { description = "JIRA bug tracker";
501 -
502 - startOn = "started network-interfaces";
503 -
504 - preStart =
505 - ''
506 - mkdir -p /var/log/jetty /var/cache/jira
507 - chown jira /var/log/jetty /var/cache/jira
508 - '';
509 -
510 - exec = "${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh jira -c '${jiraJetty}/bin/run-jetty'";
511 -
512 - postStop =
513 - ''
514 - ${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh jira -c '${jiraJetty}/bin/stop-jetty'
515 - '';
516 - };
517 -
466 # Needed for the Nixpkgs mirror script.
467 environment.pathsToLink = [ "/libexec" ];
468
machines.nix
+16 -1
@@ -152,5 +152,20 @@
152 systems = [ "i386-sunos" ];
153 maxJobs = 2;
154 }
155 -
155 +
156 + {
157 + hostName = "drdoctor";
158 + ipAddress = "192.168.1.51";
159 + ethernetAddress = "00:16:3e:00:00:02";
160 + systems = [ "x86_64-linux" ];
161 + }
162 +
163 + { # Legacy JIRA server, put in its own Xen ghetto because our JIRA
164 + # is very old and probably insecure.
165 + hostName = "mrkitty";
166 + ipAddress = "192.168.1.52";
167 + ethernetAddress = "00:16:3e:00:00:03";
168 + systems = [ "x86_64-linux" ];
169 + }
170 +
171 ]
mass-update.sh
+2 -2
@@ -1,8 +1,8 @@
1 #! /bin/sh -e
2
3 -export SSH_AUTH_SOCK= # hack
3 +#export SSH_AUTH_SOCK= # hack
4
5 -for i in jimmy timmy terrance phillip; do
5 +for i in ${MACHINES:-jimmy timmy stan kyle kenny}; do
6 echo "=== Updating $i ==="
7 ssh -i /root/.ssh/id_mass_update root@$i sh --login -c '"cd /etc/nixos && svn up nixos nixpkgs configurations release && nixos-rebuild switch"'
8 done