Commit Graph

653 Commits

Author SHA1 Message Date
Brian Cunnie
a02936a34c 🐞 We no longer use Concourse, instead, GitHub Actions 2025-05-21 11:43:03 -04:00
Brian Cunnie
e5450f579a ns-ovh-sg → ns-do-sg; +ns-gce
We replace `ns-ovh-sg` with `ns-do-sg`; this is a purely financial
decision: `ns-ovh-sg` costs $60/month, $720/year.

`ns-do-sg` (Digital Ocean), is also a Singapore-based DNS server. It's a
basic-regular-2vcpu-4GiB RAM-80GB SSD-4TiB bandwidth for $24/month,
$288/year.

That's a yearly savings of $432.

I had originally overspec'ed the Singapore server because I suspected
that there was a ton of traffic in Asia; I was wrong. It's not even 20%
the traffic of Europe or North America. I am confident the Digital Ocean
server will be able to handle it.

I also reintroduce `ns-gce` as the second server in North America, backing
up `ns-hetzner`. My hope is that `ns-hetzner` carries most of the load,
and `ns-gce` carries the rest, but not so much as to trigger Google
Cloud Platform's (GCP's) expensive bandwidth billing.

| DNS server | Queries / second |
|:-----------|-----------------:|
| ns-hetzner |          10706.4 |
| ns-ovh     |          10802.0 |
| ns-ovh-sg  |           1677.7 |
3.2.8
2025-05-20 20:56:47 -04:00
Brian Cunnie
75fc68005d 🐞 Testing: show more output
When tests with long output fail, I have difficulty troubleshooting
because Gomega truncates the output at 4000 bytes. With this commit, we
tell Gomega not to truncate the output, which allows me to see what's
broken, which is invariably at the end of the output.

Fixes, when running `gingko -r .`:

```
Gomega truncated this representation as it exceeds 'format.MaxLength'.
Consider having the object provide a custom 'GomegaStringer' representation
or adjust the parameters in Gomega's 'format' package.
```
2025-05-20 10:49:25 -07:00
Brian Cunnie
f634ea9dec Build an ARM64 version for Windows
...because Windows supports ARM 64.

I plan to release RISC-V variants once the X280 demo board becomes
available.
2025-05-20 09:30:52 -07:00
Brian Cunnie
98bc74ffd9 Bump dependencies
```bash
go get -u -t; go mod tidy
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/onsi/ginkgo/v2/ginkgo@latest
```
2025-05-20 06:07:00 -07:00
Brian Cunnie
50e6d71ee4 ns-gce is dead! Long live ns-ovh-sg!
I'm worried the traffic to my GCP server will cost me a hundred dollars
in bandwidth fees. It has a volume similar to my late AWS server which,
in its last month, racked up ~$130 in bandwidth fees!

I'm also trying to balance the servers more geographically: instead of
having two servers in the US and none in Asia, I'll have one server in
the US and one in Asia (Singapore).

The OVH server in Asia is expensive — $60/month instead of $20/month for
the OVH server in Warsaw. Also there's a monthly bandwidth cap in
Singapore in addition to the 300 Mbps cap.

I went with a dedicated server, similar to the one in Warsaw, but I took
the opportunity to upgrade it (same price):

- ns-ovh:    KS-4: Intel Xeon-E3 1230 v6
- ns-ovh-sg: KS-5: Intel Xeon-E3 1270 v6

I'm hoping that by adding this server to Singapore, the traffic to the
ns-ovh, the Warsaw server, will lessen, and I won't get thos "Anti-DDoS
protection enabled for IP address 51.75.53.19" emails every few days.

Current Queries per second:

- 4,087 ns-gce
- 1,131 ns-hetzner
- 7,183 ns-ovh
3.2.7
2025-04-27 06:30:43 -07:00
Brian Cunnie
6d03384268 Bump serial 20250101 → 20250420
Heck, if I can't do New Year's Day, then let's celebrate cannabis
2025-04-26 19:01:34 -07:00
Brian Cunnie
e70b12c54e Bump dependencies
```bash
go get -u -t; go mod tidy
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/onsi/ginkgo/v2/ginkgo@latest
```
2025-04-26 17:36:00 -07:00
Brian Cunnie
a9bc811de0 Bump Ruby: we want fresh 3.4, not stale 3.3 2025-03-27 07:17:48 -07:00
Brian Cunnie
f542bc856a Placate Golang linter 2025-01-24 18:57:55 -08:00
Brian Cunnie
82f605a807 🐞 CI tests run properly
I have no idea why changing `HOME` from `/github/home` to `/root` fixes
the problem, but I know that when I built the container root's home was
set to `/root`

Fixes, when running CI tests in GitHub actions:

```
Failed to compile sslip.io:

integration_flags_test.go:8:2: no required module provides package github.com/onsi/ginkgo/v2; to add it:
	go get github.com/onsi/ginkgo/v2
```
2025-01-24 18:47:12 -08:00
Brian Cunnie
8b6561360c GitHub actions: peek inside the container 2025-01-20 21:20:36 -08:00
Brian Cunnie
df5098d9bc GitHub Actions: CI Workflow installs ginkgo beforehand
Fixes, hopefully:

```
integration_flags_test.go:8:2: no required module provides package github.com/onsi/ginkgo/v2; to add it:
	go get github.com/onsi/ginkgo/v2
```
2025-01-20 14:47:06 -08:00
Brian Cunnie
4ef76a113c 🐞 docker-fedora-ruby-bind-utils: remove errant linefeed #2
I overlooked these errant linefeeds; this commit rectifies that oversight.

Fixes:

```
ERROR: invalid tag "cunnie/fedora- ruby-bind-utils:latest": invalid reference format
```
2025-01-20 14:45:21 -08:00
Brian Cunnie
caa4a12a33 🐞 unlink fragile dependency, take two
I'm guessing that this change will fix it; it seems that the `run`
directive is executed by `/bin/sh`, not by `exec()`

Fixes:

```
▼ Run go mod download
  go mod download
  shell: sh -e {0}
```

```
integration_flags_test.go:8:2: no required module provides package github.com/onsi/ginkgo/v2; to add it:
	go get github.com/onsi/ginkgo/v2
```
2025-01-20 09:36:16 -08:00
Brian Cunnie
7e128118af 🐞 Unlink fragile dependency Docker image <-> tests
Previously we depended on the cunnie/fedora-golang-bosh image to have
the correct dependencies, and when it didn't it caused test failures.

This commit fixes that by downloading the dependencies before running
the tests (before running `ginkgo`)

Fixes:

```
xip/xip.go:21:2: no required module provides package golang.org/x/net/dns/dnsmessage; to add it:
	go get golang.org/x/net/dns/dnsmessage
```
2025-01-20 09:05:28 -08:00
Brian Cunnie
156a01d10f 🐞 Bump Golang dependencies
Fixes, hopefully:

```
xip/xip.go:21:2: no required module provides package golang.org/x/net/dns/dnsmessage; to add it:
	go get golang.org/x/net/dns/dnsmessage
```
2025-01-20 08:22:07 -08:00
Brian Cunnie
697d401296 GitHub Actions: allow manual triggering of CI tests
...because sometimes I want to trigger it manually in case of a glitch.
2025-01-20 08:15:08 -08:00
Brian Cunnie
83414d06c6 🐞 GitHub Actions builds Docker images in container
Fixes, hopefully:

```
Unable to create '/home/runner/actions-runner/_work/sslip.io/sslip.io/.git/index.lock': Permission denied
...
File was unable to be removed Error: EACCES: permission denied, unlink '/home/runner/actions-runner/_work/sslip.io/sslip.io/.git/FETCH_HEAD'
...
Unable to prepare the existing repository. The repository will be recreated instead.
```

I also had to manually log onto my self-hosted runner and change the
ownership of the files under ~runner that were owned by root.
2025-01-20 07:39:25 -08:00
Brian Cunnie
2e021b8751 🐞 Docker image fedora-golang-bosh installs Vault properly
Probably should've gotten rid of `vault` CLI because I don't have a
Vault instance anymore.

Fixes:

```
Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.
```

```
buildx failed with: ERROR: failed to solve: process "/bin/sh -c dnf install -y dnf-plugins-core;   dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo;   dnf -y install vault;   setcap -r /usr/bin/vault" did not complete successfully: exit code: 1
```
2025-01-20 06:31:57 -08:00
Brian Cunnie
47dbcd5e28 🐞 Build images on self-hosted runner
I went to the trouble of building a GitHub Actions self-hosted runner,
so why not use it?
2025-01-20 06:27:46 -08:00
Brian Cunnie
a9d99eb6b5 🐞 docker-fedora-ruby-bind-utils: remove errant linefeed
Fixes:

```
ERROR: invalid tag "cunnie/fedora- ruby-bind-utils:latest": invalid reference format
```
2025-01-20 06:23:19 -08:00
Brian Cunnie
ab56902440 Organize Dockerfiles
We produce 3 Docker images

- sslip.io-dns-server (run sslip.io in a container)
- fedora-golang-bosh (CI testing)
- fedora-ruby-bind-utils (nameserver testing)

We place the Dockerfiles under `Docker/` with a subdirectory name
corresponding to the Docker image name.

TODO: we need to tidy the Dockerfiles under `k8s`, but we'll leave that
for another day.
2025-01-20 06:07:58 -08:00
Brian Cunnie
de6432e1ec Testing nameservers: inline rspec
Having a separate, one-line bash script is silly; it should be inlined.
2025-01-19 18:21:46 -08:00
Brian Cunnie
2b0d6c313c README has better badges
I don't need a table anymore because the badges are descriptive
("Nameservers", "CI Tests")
2025-01-19 07:07:44 -08:00
Brian Cunnie
f23b216d53 Workflows have more descriptive names
This will come into play when we display badges on our README.
2025-01-19 06:57:28 -08:00
Brian Cunnie
7680b820d9 Remove deprecated Concourse CI Pipeline
We've migrated the workflows we want to keep to GitHub actions.

The only one we don't want to keep is the nginx-webserver Docker image
whose sole purpose is to be run on k8s, and we're decommissioning our
k8s cluster.
2025-01-19 06:46:14 -08:00
Brian Cunnie
25399e9ea2 Build multi-arch Docker image for ease-of-use 2025-01-19 06:42:32 -08:00
Brian Cunnie
87b921bcb8 🐞 GitHub Actions: use correct script location
Fixes:

```
/__w/_temp/d34b2f66-3464-45ff-8cd7-b6c7d4dcb095.sh: line 1: ./ci/tasks/check-dns.sh: No such file or directory
```
2025-01-19 06:31:14 -08:00
Brian Cunnie
673fb34ce9 Deprecate old Concourse CI pipelines
- I don't need the "badges" pipeline anymore. It was once something that
  made me terribly proud, and I'm sad to let it go.
- Similarly with the PWS pipeline. PWS is long-gone, and I don't know
  why I kept it around so long because I didn't have any emotional
  attachment to it
- I certainly don't need the task file for checking the nameservers;
  that's a Concourse CI-thing.
2025-01-19 06:25:04 -08:00
Brian Cunnie
1f4b183d0c GitHub Actions: Descriptive name when checking nameservers
Previously this action was called "Check DNS", but that was confusing
because this repo is all about DNS, so to be more clear we are calling
it "Check Nameservers" because that's what we're doing — checking that
the sslip.io nameservers are running properly.
2025-01-19 05:46:41 -08:00
Brian Cunnie
06fa9efdd0 🐞 GitHub Actions: server test uses domain
This variable, `DOMAIN`, is carried over from Concourse CI, but I
probably should've hard-coded it.

Fixes, when running GitHub actions:

```
Usage: whois [OPTION]... OBJECT...
```
2025-01-19 05:36:18 -08:00
Brian Cunnie
489ed15ee6 🐞 GitHub Actions: server test uses correct directory
Concourse uses the directory above the repo; GitHub actions uses the
repo. This commit adjusts the director to accommodate GitHub Actions.

Fixes:

```
LoadError:
  cannot load such file -- /__w/sslip.io/sslip.io/sslip.io/spec
```
2025-01-19 05:22:08 -08:00
Brian Cunnie
2a5d9dc649 GitHub Actions: cron job every 6 hours tests servers
Drive-by: I reformatted the two GitHub Actions files
2025-01-19 05:17:24 -08:00
Brian Cunnie
c6c7c9b73c Releases are done manually, not with GitHub Actions
I'm not ready to convert the release process, which is fairly
complicated, to GitHub actions. And the simple job is inadequate and
does the wrong thing (e.g. doesn't embed version numbers).
2025-01-19 05:14:02 -08:00
Brian Cunnie
4d6adde5a9 CI runs on GitHub Actions
- on a self-hosted runner
- pull requests don't trigger actions (security)
- forks don't trigger actions (security)
- run in a container (fedora-golang-bosh) (security)
2025-01-18 19:16:17 -08:00
Brian Cunnie
6027636bbd First pass at GitHub actiosn to run CI/CD
Concourse has stood me in good stead these past years, but development
has stalled with the Pivotal → VMware → Broadcom acquisitions, and now,
with the expiration of one of my Google Cloud Platform committed use
discounts, is a good time to transition to GitHub actions.
2025-01-18 06:11:43 -08:00
Brian Cunnie
64cf7b6bc1 3.2.6: -ns-azure, ns-aws → "blocked" 3.2.6 2025-01-04 11:51:18 -08:00
Brian Cunnie
7d6b724cbe Remove traces of nameservers ns-aws, ns-azure
- ns-aws & ns-azure have been replaced by ns-hetzner & ns-ovh
- ns-azure has been completely destroyed (`terraform apply -destroy`);
  the elastic IP has been released, so there's no hope of bringing it
  back.
- ns-aws has been renamed to "blocked.sslip.io". It no longer answers
  DNS queries, but lives on as the website we point "blocked" queries to
  that warns about phishing.
- Some of the Markdown files' changes were mere reformatting changes
2025-01-04 11:28:40 -08:00
Brian Cunnie
70c0b3ca74 Update SOA to 01/01
New year deserves new SOA
2025-01-04 08:10:04 -08:00
Brian Cunnie
a8cf468b72 Bump dependencies
```bash
go get -u -t; go mod tidy
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/onsi/ginkgo/v2/ginkgo@latest
```
2025-01-04 08:07:06 -08:00
Brian Cunnie
0dfbe21d1d I'm not looking for pull requests 2024-12-28 05:33:58 -08:00
Brian Cunnie
a17e9cc8c0 🐞 Make metrics more readable (no Unicode)
When using dig to determine the metrics of my servers, e.g. "dig txt
metrics.status.sslip.io @ns-ovh.sslip.io +short", one record looks
particularly heinous:

```
"Answer \226\137\165 1: 67974722 (651.9/s)"
```

It's supposed to look like this:

```
"Answer ≥ 1: 67974722 (651.9/s)"
```

`dig` doesn't handle Unicode well. So I'm replacing "Answer ≥ 1" with
"Answer > 0". No Unicode.

It was a worthy effort, but ultimately failed.
2024-12-04 18:16:17 -08:00
Brian Cunnie
508f058a7a 3.2.5: Minor bugfixes, tweaks 3.2.5 2024-12-03 11:07:07 -08:00
Brian Cunnie
b497beddd2 Deprecate custom listLocalIPCIDRs()
We don't need a custom `listLocalIPCIDRs()`; Golang now has a builtin:
`net.InterfaceAddrs()`. [0]

This is one of those wonderful commits that removes more lines than it
adds.

[0] https://pkg.go.dev/net#InterfaceAddrs
2024-12-03 11:21:06 -05:00
Brian Cunnie
0fc3c81641 Replace ambiguous metric, "Answered Queries"
I've always been uncomfortable with the metric "Answered Queries" — it
implies that we don't answer all the queries. But we do answer all the
queries!

What the metric meant is "the number of DNS responses that we send that
have one or more records in the ANSWER section".

The new metric is "Answer ≥ 1". Not great, but better than before.
2024-11-19 09:25:10 -08:00
Brian Cunnie
3ed466bc74 Placate the linter
- check for errors when I was previously skipping them
- use module `time` better

Drive-by: Shorter way to copy the new `index.html` to the 5 servers.
2024-11-17 07:22:37 -08:00
Brian Cunnie
8c89816eeb 🐞 ns.sslip.io → +ns-hetzner, -ns-azure
When I had introduced ns-hetzner, I forgot to update the records for
ns.sslip.io, which continued to point to the old, deprecated ns-azure.

This commit updates the ns.sslip.io records.
2024-11-17 06:54:33 -08:00
Brian Cunnie
cb2424ac2a web page: +ns-hetzner, -ns-azure
- remove the alert about not using the sslip.io nameservers as
  general-purpose nameservers — I feel if they're looking at the page,
  they already know enough not to use the nameservers as recursive
  nameservers.
- deprecate ns-azure.
- extend the shutdown to 12/25 for ns-aws & ns-azure
- add a shoutout to Let's Encrypt
2024-11-16 20:02:14 -08:00
Brian Cunnie
1eab46ca7c index.html; use VS Code to format, not tidy
`tidy`, a UNIX-based HTML-formatter, has had its day in the sun, but
with the advent of VS Code, which I'll be using often to modify the
HTML, it makes more sense to format within the editor rather than in a
separate terminal window.
2024-11-16 19:05:41 -08:00