Skip to content

Commit 4ee1543

Browse files
authored
add flake.nix and github workflow (#122)
* add NS records corresponding to DS records * add flake * add check-zones script * add build workflow for PRs * remove remnants of old build * update README to reflect changes
1 parent 0cb0403 commit 4ee1543

15 files changed

Lines changed: 137 additions & 577 deletions

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: build
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ci-ocf-dns
9+
steps:
10+
- uses: actions/checkout@v4
11+
- run: nix develop .#deploy -c bash check-zones

Jenkinsfile

Lines changed: 0 additions & 48 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 38 deletions
This file was deleted.

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
# dns
44

5-
[![Build Status](https://jenkins.ocf.berkeley.edu/buildStatus/icon?job=ocf/dns/master)](https://jenkins.ocf.berkeley.edu/job/ocf/job/dns/job/master)
6-
75
DNS zones for the Open Computing Facility
86

97

@@ -16,7 +14,7 @@ attributes:
1614
* `dnsA` for A and AAAA records.
1715

1816
Whether the host will automatically get IPv6 records depends on the type of
19-
host. For an up-to-date listing, run:
17+
host. For an up-to-date listing, run (in the dev shell):
2018

2119
```bash
2220
$ python3 -c 'import ocflib.infra.hosts; print(ocflib.infra.hosts.HOST_TYPES_WITH_IPV6)'
@@ -38,29 +36,27 @@ dnsCname: smtp
3836
There are some rare cases where it's necessary to use A records instead,
3937
usually mandated by some RFC. For example, the "apex" (root) of a domain cannot
4038
be a CNAME (because of the SOA record), so you must use dnsA. Another example
41-
is when one hostname needs multiple IPs (e.g. `mesos.ocf.berkeley.edu`).
39+
is when one hostname needs multiple IPs.
4240

4341

4442
## Making changes
4543

46-
When updating DNS, apply your changes to LDAP, and then run `make`. It will
47-
rebuild the primary DNS (`db.ocf`) and reverse DNS, including pulling host data
48-
from LDAP and bumping the serial number.
44+
When updating DNS, apply your changes to LDAP, and then run `nix develop` from koi.
45+
It will rebuild the primary DNS (`db.ocf`) and reverse DNS, including pulling host data
46+
from LDAP and bumping the serial number. It will automatically run named-checkzone on
47+
all the zone files to identify any mistakes.
4948

5049
Sanity-check the diff before commiting to make sure the changes in LDAP make
51-
sense. If not, don't push!
50+
sense. If not, don't push! Additionally, changes must be made through a PR, and GitHub
51+
actions will run named-checkzones to verify the zone files before it can be merged.
52+
53+
The name server will be updated the next time puppet triggers on pestilence, which
54+
should be at most 30 minutes after changes are merged.
5255

5356
Some zones under `etc/zones` are not automatically generated (e.g. `asuc.org`).
5457
These have to be manually edited. Be sure to bump the serial.
5558

56-
The Makefile targets you're intended to run are:
57-
58-
- `make`: update the DNS
59-
- `make test`: run pre-commit hooks
60-
- `make install-hooks`: install pre-commit hooks so that they run automatically
61-
62-
6359
## Hostname suggestions
6460

6561
A list of proposed hostnames, if you can't think of one, is located at
66-
`~staff/server_name_ideas`.
62+
https://en.wikipedia.org/wiki/List_of_fish_by_common_name

check-zones

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set -e
2+
3+
cd etc/zones
4+
5+
for zone in *
6+
do
7+
named-checkzone ${zone#*db.} $zone
8+
done

etc/db.ocf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
; ns.ocf is master server and hostmaster@ocf is technical contact
1212
@ IN SOA ns.ocf.berkeley.edu. hostmaster.ocf.berkeley.edu. (
13-
2026052402 ; serial number
13+
2026052403 ; serial number
1414
1d ; slave refresh schedule interval
1515
30m ; slave retry on failure interval
1616
4w ; slave expiration of zone data

etc/serial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2026052402
1+
2026052403

etc/zones/db.0.0.0.0.1.0.8.8.0.4.1.f.7.0.6.2.ip6.arpa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $ORIGIN 0.0.0.0.1.0.8.8.0.4.1.f.7.0.6.2.ip6.arpa.
1212
$TTL 1d
1313

1414
@ IN SOA ns.ocf.berkeley.edu. hostmaster.ocf.berkeley.edu. (
15-
2026052402 ; serial number
15+
2026052403 ; serial number
1616
1d ; slave refresh schedule interval
1717
30m ; slave retry on failure interval
1818
4w ; slave expiration of zone data

etc/zones/db.226.229.169.in-addr.arpa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $ORIGIN 226.229.169.in-addr.arpa.
1212
$TTL 1d
1313

1414
@ IN SOA ns.ocf.berkeley.edu. hostmaster.ocf.berkeley.edu. (
15-
2026052402 ; serial number
15+
2026052403 ; serial number
1616
1d ; slave refresh schedule interval
1717
30m ; slave retry on failure interval
1818
4w ; slave expiration of zone data

etc/zones/db.ocf.io

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ $INCLUDE ../db.ocf
1616
@ IN MX 10 alt4.aspmx.l.google.com.
1717

1818
; DNSSEC support for Let's Encrypt records
19+
letsencrypt IN NS ns.ocf.berkeley.edu.
1920
letsencrypt IN DS 57934 8 1 2201285F81BBD84AA166313B2835867708739376
2021
letsencrypt IN DS 57934 8 2 1C256F913B230E300CD1BC4F4F339A174DAFE21A6D770A9574037E35DD5AF766
2122

0 commit comments

Comments
 (0)