Benutzer-Werkzeuge

Webseiten-Werkzeuge


openqrm_-_dns

openQRM - DNS

Damit das "RollOut"-Plugin funktioniert müssen wir noch eine "DNS-Abkürzung" (svn) bauen:

/usr/share/openqrm/plugins/dns/etc/bind/zones/extra.db

$TTL            3600
@               IN      SOA     ns.oqrm.victorvox.net. root.ns.oqrm.victorvox.net. (
                        2010093001 ; serial
                        3600       ; 1h  refresh
                        900        ; 15M retry
                        604800     ; 7d  expire
                        3600 )     ; 1h  minimum ttl

              IN      NS      ns.oqrm.victorvox.net.
svn           IN      A       192.168.205.44
# ln -s /usr/share/openqrm/plugins/dns/etc/bind/zones/extra.db /etc/bind/zones/
# ln -s /usr/share/openqrm/plugins/dns/etc/bind/zones/database.db /etc/bind/zones/
# ln -s /usr/share/openqrm/plugins/dns/etc/bind/zones/extern.db /etc/bind/zones/
# ls -la /etc/bind/zones/
total 12
drwxr-sr-x 2 root bind 4096 2010-09-30 17:19 .
drwxr-sr-x 3 root bind 4096 2010-09-30 17:01 ..
lrwxrwxrwx 1 root bind   70 2010-05-21 18:34 oqrm.victorvox.net.in.db -> /usr/share/openqrm/plugins/dns/etc/bind/zones/oqrm.victorvox.net.in.db
lrwxrwxrwx 1 root bind   71 2010-05-21 18:34 oqrm.victorvox.net.rev.db -> /usr/share/openqrm/plugins/dns/etc/bind/zones/oqrm.victorvox.net.rev.db
lrwxrwxrwx 1 root bind   54 2010-09-30 17:14 extra.db -> /usr/share/openqrm/plugins/dns/etc/bind/zones/extra.db
lrwxrwxrwx 1 root bind   54 2010-09-30 17:14 database.db -> /usr/share/openqrm/plugins/dns/etc/bind/zones/database.db
lrwxrwxrwx 1 root bind   54 2010-09-30 17:14 extern.db -> /usr/share/openqrm/plugins/dns/etc/bind/zones/extern.db

/usr/share/openqrm/plugins/dns/etc/bind/named.conf.local

zone "oqrm.victorvox.net" IN {
        type master;
        file "/etc/bind/zones/oqrm.victorvox.net.in.db";
};

zone "5.10.10.in-addr.arpa" {
        type master;
        file "/etc/bind/zones/oqrm.victorvox.net.rev.db";
};

zone "extra" {
        type master;
        file "/etc/bind/zones/extra.db";
        notify no;
        check-names ignore;
};

zone "database" {
        type master;
        file "/etc/bind/zones/database.db";
        notify no;
        check-names ignore;
};

zone "extern" {
        type master;
        file "/etc/bind/zones/extern.db";
        notify no;
        check-names ignore;
};

So, und zum Abschluss jetzt das "dns"-Plugin restarten (stop/start).

/usr/share/openqrm/plugins/dns/etc/bind/zones/database.db

$TTL            3600
@               IN      SOA     ns.oqrm.victorvox.net. root.ns.oqrm.victorvox.net. (
                        1000000000 ; serial
                        3600       ; 1h  refresh
                        900        ; 15M retry
                        604800     ; 7d  expire
                        3600 )     ; 1h  minimum ttl
;
              IN      NS      ns.oqrm.victorvox.net.

/usr/share/openqrm/plugins/dns/etc/bind/zones/extern.db

$TTL            3600
@               IN      SOA     ns.oqrm.victorvox.net. root.ns.oqrm.victorvox.net. (
                        1000000000 ; serial
                        3600       ; 1h  refresh
                        900        ; 15M retry
                        604800     ; 7d  expire
                        3600 )     ; 1h  minimum ttl
;
              IN      NS      ns.oqrm.victorvox.net.

/usr/share/openqrm/plugins/dns/bin/openqrm-dns-manager

Leider bleiben bei jedem austragen eine Leerzeile übrig, das ist auf Dauer sehr unschön. Deshalb werden wir dem sed noch die Option "-e '/^$/d'" mitgeben:

alt

        ...
        stop)
                dns_lock aquire
                dns_log openqrm-dns-manager "Appliance $APPLIANCE_NAME id $APPLIANCE_ID stopping with ip-address $APPLIANCE_IP"
                sed -i -e "s/$APPLIANCE_NAME.*.$APPLIANCE_IP//g" $DNS_INDB
                sed -i -e "s/^$APPLIANCE_LAST_IP_BYTE *.*$APPLIANCE_NAME*.*//g" $DNS_REVDB
        ...

neu

        ...
        stop)
                dns_lock aquire
                dns_log openqrm-dns-manager "Appliance $APPLIANCE_NAME id $APPLIANCE_ID stopping with ip-address $APPLIANCE_IP"
                sed -i -e "s/$APPLIANCE_NAME.*.$APPLIANCE_IP//g" -e '/^$/d' $DNS_INDB
                sed -i -e "s/^$APPLIANCE_LAST_IP_BYTE *.*$APPLIANCE_NAME*.*//g" -e '/^$/d' $DNS_REVDB
        ...
/home/http/wiki/data/pages/openqrm_-_dns.txt · Zuletzt geändert: von 127.0.0.1