dns/domains/030-burble.dn42.js
Simon Marsh eb20c579bd
All checks were successful
continuous-integration/drone/push Build is passing
na cluster changes
2025-01-26 09:25:59 +00:00

220 lines
8.8 KiB
JavaScript

//////////////////////////////////////////////////////////////////////////
// define domains
domain='burble.dn42';
D(
domain,
REG_NONE,
DnsProvider(PDNS),
NAMESERVER_TTL(62400),
NAMESERVER('ns1.burble.dn42.'),
DefaultTTL(3600)
)
//////////////////////////////////////////////////////////////////////////
// special records
D_EXTEND(
domain,
TXT('canary', "It's Alive!", TTL(1))
)
//////////////////////////////////////////////////////////////////////////
// services
// IPv4 service names
host('ns1', 'fd42:4242:2601:ac53::1', '172.20.129.1')
host('dns', 'fd42:4242:2601:ac53::53', '172.20.129.2')
host('@', 'fd42:4242:2601:ac80::1', '172.20.129.3')
host('grc', 'fd42:4242:2601:ac12::1', '172.20.129.4')
host('pingable', 'fd42:4242:2601:ac05::1', '172.20.129.5')
// 6 was nats
// 7 was rproxy
host('whois', 'fd42:4242:2601:ac43::1', '172.20.129.8')
host('asterisk.fr-par1', 'fd42:4242:2601:36:216:3eff:fe8f:6211', '172.20.129.9')
host('shell', 'fd42:4242:2601:ac22::1', '172.20.129.10')
host('traefik-v2', 'fd42:4242:2601:ac81::1', '172.20.129.11')
host('traefik', 'fd42:4242:2601:ac82::1', '172.20.129.12')
host('traefik-eu', 'fd42:4242:2601:ac83::1', '172.20.129.13')
host('traefik-na', 'fd42:4242:2601:ac84::1', '172.20.129.14')
// services 172.20.129.15 -> 172.20.129.20 are unassigned
host('shell.ca-bhs1', 'fd42:4242:2601:100c:72ef:f1ff:febb:d521', '172.20.129.21')
host('shell.us-ash1', 'fd42:4242:2601:1017:72ef:f1ff:febb:d521', '172.20.129.22')
host('shell.fr-rbx1', 'fd42:4242:2601:1006:72ef:f1ff:febb:d521', '172.20.129.23')
host('shell.de-fra2', 'fd42:4242:2601:100b:72ef:f1ff:febb:d521', '172.20.129.24')
host('shell.uk-lon1', 'fd42:4242:2601:1015:72ef:f1ff:febb:d521', '172.20.129.25')
host('shell.us-nyc2', 'fd42:4242:2601:101d:72ef:f1ff:febb:d521', '172.20.129.26')
host('shell.us-lax2', 'fd42:4242:2601:1018:72ef:f1ff:febb:d521', '172.20.129.27')
// shell aliases
D_EXTEND(
domain,
CNAME('shell.uk', 'shell.uk-lon1.burble.dn42.'),
CNAME('shell.uk-lon2', 'shell.uk-lon1.burble.dn42.'),
CNAME('shell.uk-lon3', 'shell.uk-lon1.burble.dn42.'),
CNAME('shell.uk-lon4', 'shell.uk-lon1.burble.dn42.'),
CNAME('shell.uk-lon5', 'shell.uk-lon1.burble.dn42.'),
CNAME('shell.fr', 'shell.fr-rbx1.burble.dn42.'),
CNAME('shell.de-fra1', 'shell.de-fra2.burble.dn42.'),
CNAME('shell.de', 'shell.de-fra2.burble.dn42.'),
CNAME('shell.us-nyc1', 'shell.us-nyc2.burble.dn42.'),
CNAME('shell.nyc', 'shell.us-nyc2.burble.dn42.'),
CNAME('shell.us-nyc3', 'shell.us-nyc2.burble.dn42.'),
CNAME('shell.us-lax1', 'shell.us-lax2.burble.dn42.'),
CNAME('shell.lax', 'shell.us-lax2.burble.dn42.')
);
// internal anycasts
host('rpki', 'fd42:4242:2601:ac10::1')
host('dns64', 'fd42:4242:2601:ac53::64')
host('dns-slave', 'fd42:4242:2601:ac00::53:1')
host('dns-secondary', 'fd42:4242:2601:acf0::50:1')
host('ldap', 'fd42:4242:2601:acf0::60:1')
host('traefik-tier2', 'fd42:4242:2601:acf0::70:1')
host('traefik-eu-tier2', 'fd42:4242:2601:acf0::75:1')
host('traefik-na-tier2', 'fd42:4242:2601:acf0::76:1')
host('traefik-infra', 'fd42:4242:2601:acf0::80:1')
// nomad container services
D_EXTEND(
domain,
// global anycast
CNAME('explorer', 'traefik.burble.dn42.'),
CNAME('anycast', 'traefik.burble.dn42.'),
CNAME('clicker', 'traefik.burble.dn42.'),
CNAME('glass', 'traefik.burble.dn42.'),
CNAME('lg', 'traefik.burble.dn42.'),
CNAME('acme', 'traefik.burble.dn42.'),
CNAME('speedtest', 'traefik.burble.dn42.'),
// eu specific services
CNAME('wiki', 'traefik-eu.burble.dn42.'),
CNAME('invidious', 'traefik-eu.burble.dn42.'),
CNAME('grafana', 'traefik-eu.burble.dn42.'),
CNAME('lounge', 'traefik-eu.burble.dn42.'),
CNAME('paste', 'traefik-eu.burble.dn42.'),
CNAME('whoami', 'traefik-eu.burble.dn42.'),
CNAME('minio', 'traefik-eu.burble.dn42.'),
CNAME('s3', 'traefik-eu.burble.dn42.'),
CNAME('svc', 'traefik-eu.burble.dn42.'),
CNAME('wiki-sync-uk-lon1', 'traefik-eu.burble.dn42.'),
CNAME('wiki-sync-de-fra1', 'traefik-eu.burble.dn42.'),
CNAME('wiki-sync-fr-rbx1', 'traefik-eu.burble.dn42.'),
CNAME('wiki-test', 'traefik-eu.burble.dn42.'),
// na specific services
CNAME('wiki-sync-ca-bhs1', 'traefik-na.burble.dn42.'),
CNAME('wiki-sync-us-ash1', 'traefik-na.burble.dn42.'),
// internal services
CNAME('ci', 'traefik-tier2.burble.dn42.'),
CNAME('ldap-admin', 'traefik-tier2.burble.dn42.'),
CNAME('nomad', 'traefik-tier2.burble.dn42.'),
CNAME('prometheus', 'traefik-tier2.burble.dn42.'),
CNAME('prometheus-ingest', 'traefik-tier2.burble.dn42.'),
CNAME('vault', 'traefik-tier2.burble.dn42.'),
// elburb.dn42 infra services
AAAA('v2', 'fd8f:a4c9:1c03:ac80::1'),
AAAA('n2', 'fd8f:a4c9:1c03:ac80::1'),
// special case
CNAME('dialup', 'traefik-t1.fr-par1.burble.dn42.')
);
// other service cnames
D_EXTEND(
domain,
// global service aliases
CNAME('www', 'burble.dn42.'),
CNAME('git', 'git.de-fra2.burble.dn42.'),
CNAME('mail', 'mail.tier2.uk-lon1.burble.dn42.'),
// grc SSHFP
SSHFP('grc', 4, 1, 'ff61153c18334e89df3b4b4e4696306eeb5ffe9c'),
SSHFP('grc', 4, 2, 'c3a2470309cb1e6fba252231a6504a096ffd8b6f92442493f762e7512c515e76'),
// shell servers SSHFP
SSHFP('shell.us-ash1', 4, 1, '2e590911563cdcc3fca077b4548ef67b8d3ca97b'),
SSHFP('shell.us-ash1', 4, 2, 'ea72725a12aa3a11c4d3eb84414c46406f5dadc7c32f0d1d02fdcd0d40fbc33d'),
SSHFP('shell.ca-bhs1', 4, 1, 'fe8e75f43281156e7547055d4e0e5a2a94d5040e'),
SSHFP('shell.ca-bhs1', 4, 2, '6be11571ff9d602bc949766122915ab60cd578dd4e07741606cf9b9da6687c4c'),
SSHFP('shell.fr-rbx1', 4, 1, '6cdc52bc0e712f8e6e3f61a9be61c25b58b3e242'),
SSHFP('shell.fr-rbx1', 4, 2, 'c6c58e8b6ee0ef37a3f508ec88b3baa69189cdfaae6cb6a0e2fb05305cf0a501'),
SSHFP('shell.fr-par1', 4, 1, '4b50210e34d8aa3b2ff3ac1143186410c4ac2c86'),
SSHFP('shell.fr-par1', 4, 2, '660e30eaf12dd3bf83888b1e56d459d49b89abe3a5244f65f80ef988b397bbb4'),
SSHFP('shell.de-fra2', 4, 1, '737eed6c6e315637c4013c91bf6a4d97fa77ead2'),
SSHFP('shell.de-fra2', 4, 2, '15f1890093623660c698252efaabe71cfc76fe3b5c0d13ff55bcb3385fe0abdd'),
SSHFP('shell.uk-lon1', 4, 1, '7d35687bfddc62de61145f717a4f4969ddbe0493'),
SSHFP('shell.uk-lon1', 4, 2, '03ea17456de0fcb8fb147858c0d0588c76c57b4cb4a429cf112679c961db379b'),
SSHFP('shell.us-lax2', 4, 1, 'c26bdb21b107225c3fea48b18ec606ac268f8074'),
SSHFP('shell.us-lax2', 4, 2, '8a78da2b1c21ba9993db310e8af92ab91b34ce28abfa7a07fac056d52d7d5e7a'),
SSHFP('shell.us-nyc2', 4, 1, '9f2b004f6617b4262d27d7cf56619b4988aeb0ed'),
SSHFP('shell.us-nyc2', 4, 2, '4df8b1f39fa01d69c9fd69c4ffb633b52230d7420339e61242311b703977c30c'),
// ping challenge starting address
AAAA('ping', 'fd42:4242:2601:31f0::1'),
// voip and modem dialup
CNAME('sip', 'asterisk.fr-par1.burble.dn42.'),
CNAME('voip', 'asterisk.fr-par1.burble.dn42.'),
A('svcs.voip', '192.168.20.10'),
A('asterisk.voip', '192.168.20.11'),
A('sol.voip', '192.168.20.13'),
A('pap2t.voip', '192.168.20.20'),
A('gstream.voip', '192.168.20.21'),
A('proxy.voip', '192.168.20.200'),
// burble.dn42 registry services
AAAA('gitea.regsvcs.uk-lon1', 'fd42:180:3de0:110:92ac:47ff:fe36:8769'),
AAAA('docker.regsvcs.uk-lon1', 'fd42:180:3de0:110:f2f9:d9ff:fea5:14ff')
);
//////////////////////////////////////////////////////////////////////////
// add entries for each node
// main nodes
nodes.forEach(function(node) {
var name = node[0]
var index = node[4]
var bdn42_ipv4 = node[5]
var hex = (index + 32).toString(16);
var tier1 = 'fd42:4242:2601:' + hex + '::1'
var tier2 = 'fd42:4242:2601:' + hex + '02::1'
// main node address ( = tier1 address)
host(name, tier1, bdn42_ipv4)
// subnet addresses
host('tier1.' + name, tier1)
host('tier2.' + name, tier2)
})
//////////////////////////////////////////////////////////////////////////
// add in all the containers and vms
// containers and VMs
virtual.forEach(function(v) {
host(v[0], v[1], v[2]);
});
//////////////////////////////////////////////////////////////////////////
// end of file