dns/domains/030-burble.dn42.js
Simon Marsh de3677baa5
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
initial zones
2020-09-22 19:48:09 +01:00

106 lines
3.0 KiB
JavaScript

//////////////////////////////////////////////////////////////////////////
// define domains
domain='burble.dn42';
pdns_domain(domain);
//////////////////////////////////////////////////////////////////////////
// special records
D_EXTEND(
domain,
TXT('canary', "It's Alive!", TTL(1))
);
//////////////////////////////////////////////////////////////////////////
// services
// IPv4 service names
service('ns1', 'fd42:4242:2601:ac53::1', '172.20.129.1');
service('dns', 'fd42:4242:2601:ac53::53', '172.20.129.2');
service('@', 'fd42:4242:2601:ac80::1', '172.20.129.3');
service('grc', 'fd42:4242:2601:ac12::1', '172.20.129.4');
service('pingable', 'fd42:4242:2601:ac05::1', '172.20.129.5');
// 172.20.129.6 was wiki but not now used
service('rproxy', 'fd42:4242:2601:acf0::1', '172.20.129.7');
service('whois', 'fd42:4242:2601:ac43::1', '172.20.129.8');
// services 172.20.129.9 -> 172.20.129.31 are unassigned
// internal anycasts
service('rpki', 'fd42:4242:2601:ac10::1');
service('dns64', 'fd42:4242:2601:ac53::64'),
service('wiki.service', 'fd42:4242:2601:ac00::10:1'),
service('dn42regsrv', 'fd42:4242:2601:ac00::20:1');
service('dns-slave', 'fd42:4242:2601:ac00::53:1');
service('consul.service', 'fd42:4242:2601:acf0::10:1'),
service('vault.service', 'fd42:4242:2601:acf0::20:1'),
service('acme', 'fd42:4242:2601:acf0::30:1'),
// proxied services
proxied('explorer');
proxied('git');
proxied('ci');
proxied('glass');
proxied('lg');
proxied('wiki');
proxied('lounge');
proxied('nextcloud');
proxied('alertmanager');
proxied('monitor');
proxied('grafana');
proxied('consul');
proxied('vault');
proxied('paste');
proxied('tasks');
// other service cnames
D_EXTEND(
domain,
// global service aliases
CNAME('www', 'burble.dn42.'),
// local service aliases
CNAME('wiki.us', 'rproxy.us-dal3.burble.dn42.'),
CNAME('wiki.fr', 'rproxy.fr-sbg1.burble.dn42.'),
CNAME('wiki.sg', 'rproxy.sg-sin1.burble.dn42.'),
CNAME('wiki.ca', 'rproxy.ca-bhs2.burble.dn42.'),
// host aliases
CNAME('repo', 'repo.fr-sbg1.burble.dn42.'),
// grc SSHFP
SSHFP('grc', 4, 1, 'ff61153c18334e89df3b4b4e4696306eeb5ffe9c'),
SSHFP('grc', 4, 2, 'c3a2470309cb1e6fba252231a6504a096ffd8b6f92442493f762e7512c515e76')
);
//////////////////////////////////////////////////////////////////////////
// hosts
// main nodes
nodes.forEach(function(n) {
var hex = (n[4] + 32).toString(16);
var ip4 = (n[5] == 'undefined' ? undefined : n[5]);
// main IP
host(n[0],'fd42:4242:2601:'+hex+'::1', ip4);
// tier2 IP
host('tier2.'+n[0], 'fd42:4242:2601:'+hex+'02::1');
// create dn42-xxx CNAME for dn42 nodes
if (n[3] == 'true') {
D_EXTEND(domain,CNAME('dn42-'+n[0], n[0]+'.burble.dn42.'));
}
});
// containers and VMs
virtual.forEach(function(v) {
host(v[0], v[1], v[2]);
});
//////////////////////////////////////////////////////////////////////////
// end of file