Index: trunk/debs/wikimedia-task-dns-auth/debian/control |
— | — | @@ -2,12 +2,12 @@ |
3 | 3 | Section: unknown |
4 | 4 | Priority: optional |
5 | 5 | Maintainer: Mark Bergsma <mark@wikimedia.org> |
6 | | -Build-Depends: debhelper (>= 4.0.0), pdns-server (>= 2.9.21) |
| 6 | +Build-Depends: debhelper (>= 4.0.0), pdns-server (>= 2.9.22) |
7 | 7 | Standards-Version: 3.6.2 |
8 | 8 | |
9 | 9 | Package: wikimedia-task-dns-auth |
10 | 10 | Architecture: all |
11 | | -Depends: pdns-server (>= 2.9.21), pdns-backend-geo (>= 2.9.21), pdns-backend-pipe (>= 2.9.21), python, rsync |
| 11 | +Depends: pdns-server (>= 2.9.22), pdns-backend-geo (>= 2.9.22), pdns-backend-pipe (>= 2.9.22), python, rsync |
12 | 12 | Description: Provides a Wikimedia authoritative DNS server |
13 | 13 | Package wikimedia-task-dns-auth depends on the appropriate packages |
14 | 14 | that need to be installed on a Wikimedia authoritative DNS server, |
Index: trunk/debs/wikimedia-task-dns-auth/debian/wikimedia-task-dns-auth-default |
— | — | @@ -4,6 +4,6 @@ |
5 | 5 | NAMESERVERS="ns0.wikimedia.org ns1.wikimedia.org ns2.wikimedia.org" |
6 | 6 | |
7 | 7 | # Server to rsync "langlist" from: |
8 | | -LANGLISTSOURCE=zwinger.wikimedia.org:/home/wikipedia/common/langlist |
| 8 | +LANGLISTSOURCE=fenari.wikimedia.org:/home/wikipedia/common/langlist |
9 | 9 | |
10 | | -DBLISTSOURCE=zwinger.wikimedia.org:/home/wikipedia/common/all.dblist |
| 10 | +DBLISTSOURCE=fenari.wikimedia.org:/home/wikipedia/common/all.dblist |
Index: trunk/debs/wikimedia-task-dns-auth/debian/changelog |
— | — | @@ -1,3 +1,14 @@ |
| 2 | +wikimedia-task-dns-auth (0.11) hardy; urgency=low |
| 3 | + |
| 4 | + * Refactored authdns-update into separate scripts |
| 5 | + * Removed directory scenarios/yaseo-down |
| 6 | + * Renamed directory knams-down to esams-down |
| 7 | + * Changed zwinger into fenari in /etc/default/wikimedia-task-dns-auth |
| 8 | + * Depend on pnds > 2.9.22 |
| 9 | + * Add script authdns-local-update |
| 10 | + |
| 11 | + -- Mark Bergsma <mark@wikimedia.org> Sun, 15 Nov 2009 14:55:58 +0000 |
| 12 | + |
2 | 13 | wikimedia-task-dns-auth (0.10) hardy; urgency=low |
3 | 14 | |
4 | 15 | * Add <language>.m.wikipedia.org entries |
Index: trunk/debs/wikimedia-task-dns-auth/debian/conffiles |
— | — | @@ -2,7 +2,5 @@ |
3 | 3 | /etc/default/wikimedia-task-dns-auth |
4 | 4 | /etc/powerdns/scenarios/normal/rr.wikimedia.org |
5 | 5 | /etc/powerdns/scenarios/normal/upload.wikimedia.org |
6 | | -/etc/powerdns/scenarios/knams-down/rr.wikimedia.org |
7 | | -/etc/powerdns/scenarios/knams-down/upload.wikimedia.org |
8 | | -/etc/powerdns/scenarios/yaseo-down/rr.wikimedia.org |
9 | | -/etc/powerdns/scenarios/yaseo-down/upload.wikimedia.org |
| 6 | +/etc/powerdns/scenarios/esams-down/rr.wikimedia.org |
| 7 | +/etc/powerdns/scenarios/esams-down/upload.wikimedia.org |
Index: trunk/debs/wikimedia-task-dns-auth/debian/rules |
— | — | @@ -67,15 +67,15 @@ |
68 | 68 | install -m 0644 debian/wikimedia-task-dns-auth-default $(DESTDIR)/etc/default/wikimedia-task-dns-auth |
69 | 69 | install gen-zones $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/ |
70 | 70 | install gen-bind.conf $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/ |
71 | | - install authdns-update authdns-scenario $(DESTDIR)/usr/sbin/ |
| 71 | + install gen-langlist-cnames $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/ |
| 72 | + install gen-dblist-cnames $(DESTDIR)/usr/lib/wikimedia-task-dns-auth/bin/ |
| 73 | + install authdns-update authdns-local-update authdns-scenario $(DESTDIR)/usr/sbin/ |
72 | 74 | install -m 0644 -o pdns zz.countries.nerd.dk.rbldnsd $(DESTDIR)/etc/powerdns/ip-map/ |
73 | 75 | install -d $(DESTDIR)/etc/powerdns/scenarios/ |
74 | 76 | install -d $(DESTDIR)/etc/powerdns/scenarios/normal |
75 | | - install -d $(DESTDIR)/etc/powerdns/scenarios/knams-down |
76 | | - install -d $(DESTDIR)/etc/powerdns/scenarios/yaseo-down |
| 77 | + install -d $(DESTDIR)/etc/powerdns/scenarios/esams-down |
77 | 78 | install scenarios/normal/* $(DESTDIR)/etc/powerdns/scenarios/normal/ |
78 | | - install scenarios/knams-down/* $(DESTDIR)/etc/powerdns/scenarios/knams-down/ |
79 | | - install scenarios/yaseo-down/* $(DESTDIR)/etc/powerdns/scenarios/yaseo-down/ |
| 79 | + install scenarios/esams-down/* $(DESTDIR)/etc/powerdns/scenarios/esams-down/ |
80 | 80 | |
81 | 81 | |
82 | 82 | # Build architecture-independent files here. |
Index: trunk/debs/wikimedia-task-dns-auth/authdns-update |
— | — | @@ -53,24 +53,15 @@ |
54 | 54 | # Generate a new list of language CNAMEs |
55 | 55 | echo "Syncing langlist" |
56 | 56 | rsync -t $LANGLISTSOURCE $LANGLIST || true |
57 | | -echo "Generating language subdomains CNAME file from $LANGLIST" |
58 | | -[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print"www."$1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print $1".m\t\t\t1H\tIN CNAME\tmobile1.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames |
59 | 57 | |
60 | 58 | echo "Syncing all.dblist" |
61 | 59 | rsync -t $DBLISTSOURCE $DBLIST || true |
| 60 | + |
| 61 | +echo "Generating language subdomains CNAME file from $LANGLIST" |
| 62 | +$SCRIPTDIR/gen-langlist-cnames |
| 63 | + |
62 | 64 | echo "Generating wiki toolserver CNAMEs from $DBLIST" |
63 | | -( |
64 | | -while read line; do |
65 | | - line=`echo $line | tr _ -` |
66 | | - if echo $line | egrep -q '^(bgwiki|bgwiktionary|commonswiki|cswiki|dewiki|enwikiquote|enwiktionary|eowiki|fiwiki|idwiki|itwiki|nlwiki|nowiki|plwiki|ptwiki|svwiki|thwiki|trwiki|zhwiki)$'; then |
67 | | - echo "$line-p 1H IN CNAME sql-s2.toolserver.org." |
68 | | - elif [ $line = enwiki ]; then |
69 | | - echo "$line-p 1H IN CNAME sql-s1.toolserver.org." |
70 | | - else |
71 | | - echo "$line-p 1H IN CNAME sql-s3.toolserver.org." |
72 | | - fi; |
73 | | -done |
74 | | -) < $DBLIST > $POWERDNSDIR/dblist-cnames |
| 65 | +$SCRIPTDIR/gen-dblist-cnames |
75 | 66 | |
76 | 67 | # Generate the zonefiles from the templates |
77 | 68 | echo "Generating zonefiles from zone templates" |
Index: trunk/debs/wikimedia-task-dns-auth/scenarios/esams-down/rr.wikimedia.org |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +$RECORD rr.wikimedia.org. |
| 3 | +$ORIGIN wikimedia.org. |
| 4 | + |
| 5 | +# Korea, Democratic People's Republic of |
| 6 | +408 rr.yaseo |
| 7 | +# Korea, Republic of |
| 8 | +410 rr.yaseo |
| 9 | +# Japan |
| 10 | +392 rr.yaseo |
| 11 | +# China |
| 12 | +156 rr.yaseo |
| 13 | +# Singapore |
| 14 | +702 rr.yaseo |
| 15 | +# Taiwan |
| 16 | +158 rr.yaseo |
| 17 | +# Thailand |
| 18 | +764 rr.yaseo |
| 19 | +# Vietnam |
| 20 | +704 rr.yaseo |
| 21 | +# Mongolia |
| 22 | +496 rr.yaseo |
| 23 | +# Cambodia |
| 24 | +116 rr.yaseo |
| 25 | +# Philippines |
| 26 | +608 rr.yaseo |
| 27 | +# Lao People's Democratic Republic |
| 28 | +418 rr.yaseo |
| 29 | +# Malaysia |
| 30 | +458 rr.yaseo |
| 31 | +# Default |
| 32 | +0 rr.pmtpa |
Index: trunk/debs/wikimedia-task-dns-auth/scenarios/esams-down/upload.wikimedia.org |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +$RECORD upload.wikimedia.org. |
| 3 | +$ORIGIN wikimedia.org. |
| 4 | + |
| 5 | +# Korea, Democratic People's Republic of |
| 6 | +408 upload.yaseo |
| 7 | +# Korea, Republic of |
| 8 | +410 upload.yaseo |
| 9 | +# Japan |
| 10 | +392 upload.yaseo |
| 11 | +# China |
| 12 | +156 upload.yaseo |
| 13 | +# Singapore |
| 14 | +702 upload.yaseo |
| 15 | +# Taiwan |
| 16 | +158 upload.yaseo |
| 17 | +# Thailand |
| 18 | +764 upload.yaseo |
| 19 | +# Vietnam |
| 20 | +704 upload.yaseo |
| 21 | +# Mongolia |
| 22 | +496 upload.yaseo |
| 23 | +# Cambodia |
| 24 | +116 upload.yaseo |
| 25 | +# Philippines |
| 26 | +608 upload.yaseo |
| 27 | +# Lao People's Democratic Republic |
| 28 | +418 upload.yaseo |
| 29 | +# Malaysia |
| 30 | +458 upload.yaseo |
| 31 | +# Default |
| 32 | +0 upload.pmtpa |
Index: trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +#!/bin/bash |
| 3 | + |
| 4 | +set -e |
| 5 | + |
| 6 | +PATH=/bin:/usr/bin |
| 7 | + |
| 8 | +POWERDNSDIR=/etc/powerdns |
| 9 | +LANGLIST=$POWERDNSDIR/langlist |
| 10 | +LANGLISTSOURCE="" |
| 11 | + |
| 12 | +[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print"www."$1"\t\t\t1H\tIN CNAME\trr.wikimedia.org."; print $1".m\t\t\t1H\tIN CNAME\tmobile1.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames |
| 13 | + |
Property changes on: trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames |
___________________________________________________________________ |
Name: svn:executable |
1 | 14 | + * |
Index: trunk/debs/wikimedia-task-dns-auth/gen-dblist-cnames |
— | — | @@ -0,0 +1,22 @@ |
| 2 | +#!/bin/bash |
| 3 | + |
| 4 | +POWERDNSDIR=/etc/powerdns |
| 5 | + |
| 6 | +DBLIST=$POWERDNSDIR/all.dblist |
| 7 | +DBLISTSOURCE="" |
| 8 | + |
| 9 | +PATH=/bin:/usr/bin:/usr/local/bin |
| 10 | + |
| 11 | +( |
| 12 | +while read line; do |
| 13 | + line=`echo $line | tr _ -` |
| 14 | + if echo $line | egrep -q '^(bgwiki|bgwiktionary|commonswiki|cswiki|dewiki|enwikiquote|enwiktionary|eowiki|fiwiki|idwiki|itwiki|nlwiki|nowiki|plwiki|ptwiki|svwiki|thwiki|trwiki |
| 15 | +|zhwiki)$'; then |
| 16 | + echo "$line-p 1H IN CNAME sql-s2.toolserver.org." |
| 17 | + elif [ $line = enwiki ]; then |
| 18 | + echo "$line-p 1H IN CNAME sql-s1.toolserver.org." |
| 19 | + else |
| 20 | + echo "$line-p 1H IN CNAME sql-s3.toolserver.org." |
| 21 | + fi; |
| 22 | +done |
| 23 | +) < $DBLIST > $POWERDNSDIR/dblist-cnames |
Index: trunk/debs/wikimedia-task-dns-auth/authdns-local-update |
— | — | @@ -0,0 +1,40 @@ |
| 2 | +#!/bin/bash |
| 3 | +# |
| 4 | +# Shell script that pulls zone templates from the "master" DNS server, |
| 5 | +# and regenerates them locally. |
| 6 | +# |
| 7 | +# Written on 2009/11/15 by Mark Bergsma <mark@wikimedia.org> |
| 8 | + |
| 9 | +set -e |
| 10 | + |
| 11 | +CONFFILE=/etc/default/wikimedia-task-dns-auth |
| 12 | +MASTER="" |
| 13 | +POWERDNSDIR=/etc/powerdns |
| 14 | +SCRIPTDIR=/usr/lib/wikimedia-task-dns-auth/bin |
| 15 | + |
| 16 | +export RSYNC_RSH="ssh -i /root/.ssh/wikimedia-task-dns-auth" |
| 17 | + |
| 18 | +PATH=/bin:/usr/bin |
| 19 | + |
| 20 | +# Source the configuration file |
| 21 | +[ -f $CONFFILE ] && source $CONFFILE |
| 22 | + |
| 23 | +# If no master is given on the command line, use the first one in /etc/default/wikimedia-task-dns-auth |
| 24 | +if [ -z "$1" ]; then |
| 25 | + MASTER=$(echo $NAMESERVERS | cut -d' ' -f1 ) |
| 26 | +else |
| 27 | + MASTER=$1 |
| 28 | +fi |
| 29 | + |
| 30 | +rsync --delete -av $MASTER:$POWERDNSDIR/dblist-cnames $POWERDNSDIR/ |
| 31 | +rsync --delete -av $MASTER:$POWERDNSDIR/langlist-cnames $POWERDNSDIR/ |
| 32 | +rsync --delete -av $MASTER:$POWERDNSDIR/participants $POWERDNSDIR/ |
| 33 | +rsync --delete -av $MASTER:$POWERDNSDIR/templates $POWERDNSDIR/ |
| 34 | +rsync --delete -av $MASTER:$POWERDNSDIR/scenarios $POWERDNSDIR/ |
| 35 | +rsync --delete -av $MASTER:$POWERDNSDIR/geomaps $POWERDNSDIR/ |
| 36 | + |
| 37 | +$SCRIPTDIR/gen-zones |
| 38 | +$SCRIPTDIR/gen-bind.conf |
| 39 | + |
| 40 | +pdns_control reload |
| 41 | +pdns_control rediscover |
Property changes on: trunk/debs/wikimedia-task-dns-auth/authdns-local-update |
___________________________________________________________________ |
Name: svn:executable |
1 | 42 | + * |