Commit Graph

689 Commits

Author SHA1 Message Date
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
Brian Cunnie
1da3b67af2 3.2.4: Introduce new nameserver, ns-hetzner.sslip.io 3.2.4 2024-11-16 17:26:04 -08:00
Brian Cunnie
30d51c3014 Update SOA to 11/15
Jon Penn's birthday; probably the most life-changing birthday party I've
ever been to.
2024-11-16 16:09:43 -08:00
Brian Cunnie
ce852009c5 "ns-azure is dead, long live ns-hetzner"
The nameserver on Azure is probably my least-favorite: much slower, much
higher latency. Even though it would've made more geographic sense to
dismantle my GCP nameserver in favor of the Hetzner, I'm using this
opportunity to get rid of the Azure.

And, of course, introduce the Hetzner nameserver with its 20TB of
bandwidth allowance, which I've come to need.
2024-11-16 16:02:25 -08:00
Brian Cunnie
f6c3fca560 Heck, let's dedicate the entire service to Roopinder
It feels lonely not having him around.
2024-11-11 08:40:28 -08:00
Brian Cunnie
1ed661419b Let's dedicate this to Roopinder 2024-11-11 08:37:53 -08:00
Brian Cunnie
680fa3d8f3 Schedule de-commissioning of ns-aws
It costs too much.
2024-11-11 07:48:50 -08:00
Brian Cunnie
7a26f40ee6 Warn white labellers to update their NS servers
ns-aws.sslip.io is deprecated.

Drive-by: used absolute paths in the description of how I can use the
logs.
2024-11-07 17:41:14 -08:00
Brian Cunnie
ad91ae880e DEVELOPER instructions: corrected wrong comments 2024-11-07 07:17:36 -08:00
Brian Cunnie
c6c5435e4a 3.2.3: ns-aws is no longer an NS for sslip.io 3.2.3 2024-11-04 18:14:17 -08:00
Brian Cunnie
ef731f067d Update SOA to 11/5
The late, great Tom Casey's birthday
2024-11-04 18:05:37 -08:00
Brian Cunnie
ab78120615 Bump dependencies go get -u -t; go mod tidy 2024-11-04 18:02:33 -08:00
Brian Cunnie
34318bbb43 Retire DNS server, ns-aws.sslip.io
The torrent of traffic I'm receiving has caused my AWS bill to spike
from $9 to $148, all of the increase due to bandwidth charges.

I'm still maintaining ns-aws; the VM still continue to run, and continue
to serve web traffic, and maintain its hostname and IP addresses;
however, it will no longer be in the list of NS records for sslip.io.

There are much less expensive hosting providers. OVH is my current
favorite.
2024-11-04 17:56:03 -08:00
Brian Cunnie
1f7a54db73 Revert "Introduce new flag, -max_queries_per_sec"
Rather than bloating the code with yet another flag, one that only I
would use, and in only one specific case (ns-aws.sslip.io), it would be
better to simply take ns-aws.sslip.io out of the NS list.
2024-11-04 07:16:52 -08:00
Brian Cunnie
9c8712578d Introduce new flag, -max_queries_per_sec
I'm being gouged by bandwidth costs by AWS. Last month's bill was $148,
and all but $9 was about bandwidth.

My bandwidth has been inexplicably climbing since February:

Billing
Month   Total GB % increase

2024/2		  37.119
2024/3		  52.953	42.66%
2024/4		  58.745	10.94%
2024/5		  69.307	17.98%
2024/6		 173.371	150.15%
2024/7		 334.064	92.69%
2024/8		 539.343	61.45%
2024/9		 568.745	5.45%
2024/10	1365.305	140.06%

The new flag will allow me to throttle the AWS bandwidth to ~287 queries
/ second, which, according to my calculations, will max out the free
100 GB bandwidth without dipping into the for-pay bandwidth.
2024-11-03 17:35:46 -08:00