Commit Graph

157 Commits

Author SHA1 Message Date
Brian Cunnie
48d6514e82 k-v.io website: delete lingering copy-paste artifact 2022-04-22 20:58:10 -07:00
Brian Cunnie
14df91e967 k-v.io website has useful information
It's a beginning, but I really wanted to get this done. I can polish it
later.
2022-04-22 20:46:19 -07:00
Brian Cunnie
9c99b954be Update release docs to 2.5.3
And revert the gratuitous change I made earlier to trigger a build.
2022-04-22 16:36:06 -07:00
Brian Cunnie
4d339cd861 Version 2.5.3: k-v.io is operational 2022-04-22 14:33:47 -07:00
Brian Cunnie
cb08c5a9c3 k-v.io: has HTML assets, nginx Dockerfile to serve
We now have a Dockerfile to serve the upcoming https://k-v.io.

The dockerfile is patterned after the sslip.io nginx Dockerfile.

Note: the content isn't ready; the HTML needs fleshing out.
2022-04-22 12:25:29 -07:00
Brian Cunnie
d76e592500 🐞 Build sslip.io's nginx Dockerfile correctly
Also includes a gratuitous change to the HTML in order to trigger a
build.

Fixes <https://ci.nono.io/teams/main/pipelines/dockerfiles/jobs/build-and-push-sslip.io-nginx/builds/33>:
```
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c dnf install -y     bind-utils     iproute     less     lsof     neovim     net-tools     nginx     nmap-ncat     procps-ng RUN mv /usr/share/nginx/html /usr/share/nginx/html-orig]: exit code: 1
```
2022-04-22 09:04:41 -07:00
Brian Cunnie
81b0d4d739 Dockerfile nginx name explicitly states service
In this case, we rename the nginx Dockerfile to
`Dockerfile-sslip.io-nginx` to make room for the upcoming
`Dockerfile-k-v.io-nginx`
2022-04-22 08:39:31 -07:00
Brian Cunnie
1fc970a87e Dockerfiles: Replace deprecated "maintainer" label
Also, do the `dnf install` in one step, not in three.
2022-04-22 08:11:21 -07:00
Brian Cunnie
8d55c534fc Make way for k-v.io HTML website
To make room for the k-v.io HTML website, we rename the `document_root`
of the sslip.io website to the more explicit `document_root_sslip.io`.
2022-04-22 07:59:10 -07:00
Brian Cunnie
28ae9b4348 k8s: use the etcd cluster IP for queries
Note: this didn't work. So sad.
2022-04-17 20:17:24 -07:00
Brian Cunnie
294f54a79a Version 2.5.2: DELETE on k-v.io returns no TXT records
The original behavior was to return the deleted record, which
inadvertently prolonged the lifetime (in DNS cache) of the record which
was meant to expire as soon as possible.

- Removed the instructions to create a BOSH release. We are no longer
  creating a BOSH release because we needed to colocate an etcd release
  alongside the BOSH release, and we couldn't find an etcd BOSH release.
- Updated the instructions to run a quick test against the sslip.io DNS
  server locally (sanity check) instead of deploying a VM with the BOSH
  release & testing against that.
- Updated the instructions for updating ns-azure's DNS server. ns-azure
  is no longer a BOSH-deployed VM.
2022-04-13 12:55:34 -07:00
Brian Cunnie
cd2b14b924 BOSH release: 2.5.1: block phishers with CIDRs 2022-02-26 16:41:05 -08:00
Brian Cunnie
ae6883dd6c Include IPv6 CIDR in blocklist for testing
- updated comments in `blocklist.txt` to include references to CIDRs &
  how they're handled
- updated webpage to include description of the upcoming metrics for the
  blocklist
2022-02-26 15:57:11 -08:00
Brian Cunnie
01d68dcd8b Use more precise terminology in metrics
"Successful" is a nebulous term. "Answered" is more precise (at least
one record returned in the answer section of the DNS response).
2022-02-08 11:17:28 -08:00
Brian Cunnie
51ed47317e BOSH release: 2.5.0: block phishers 2022-02-06 19:51:06 -08:00
Brian Cunnie
8f2890d90e BOSH release: 2.4.2: fix panic() 2022-01-22 09:41:49 -08:00
Brian Cunnie
ec649870a5 Website: consistently put record type after hostname 2022-01-20 13:32:55 -08:00
Brian Cunnie
6b2d65c778 🐞 Update links to use main branch, not master
...because the website wasn't updating
2022-01-20 12:15:00 -08:00
Brian Cunnie
d2914645e4 Website shows correct endpoint for metrics
...metrics.status.sslip.io not version.status.sslip.io
2022-01-20 12:01:12 -08:00
Brian Cunnie
b496e68423 Website explains what each metric means
Drive-by: updated publishing docs.
2022-01-20 09:29:06 -08:00
Brian Cunnie
bbf1925be4 BOSH release: 2.4.1: fewer panics
customized records w/ non-existent TXTs don't panic().
2022-01-20 08:10:03 -08:00
Brian Cunnie
b119442a37 BOSH release: 2.4.0: metrics.status.sslip.io returns metrics
Also, I moved the "versio" endpoint: `version.sslip.io` →
`version.status.sslip.io`. It seemed to make more sense to corral the
special endpoints under `status`.
2022-01-20 05:02:21 -08:00
Brian Cunnie
7d551b81db Metrics endpoint is fully fleshed-out
- integration tests (woohoo!)
2022-01-19 11:58:07 -08:00
Brian Cunnie
bf4f039001 Metrics are served via metrics.status.sslip.io
- The metrics aren't fleshed out. In fact, there's only two so far:
  1. uptime
  2. number of queries
- Even though the metrics aren't complete, I'm checking it in because
  this commit is already much too big.
- I moved the version information to `version.status.sslip.io`;
  previously it was at `version.sslip.io`. I didn't want one endpoint
  for both metrics & version (worry: DNS amplification), and I wanted a
  consistent subdomain to find that information (i.e.
  `status.sslip.io`).
- I'm not worried about atomic updates to the metrics; if a metric is
  off by one, if I skip a count because two lookups are happening at the
  exact same time, I don't care.
- The `Metrics` struct is a pointer within `Xip` because I might have
  several copies of `Xip` (if I'm binding to several interfaces
  individually), but I must only have one copy of `Metrics`
- I only include the metrics I'm interested in, usually because it took
  some work to implement that feature. I don't care about MX records,
  but I care about IPv6 lookups, DNS-01 challenges, public IP lookups.
- got rid of a section of unreachable code at the end of
  `ProcessQuestion()`; I was tired of Goland flagging it. I had it there
  mostly because I was paranoid of falling through a `switch` statement
2022-01-19 06:47:21 -08:00
Brian Cunnie
5065229a03 Key-value store domain: kv.sslip.io → k-v.io
I didn't want a really long domain for the key-value store; I wanted a
short, easy-to-remember domain. And it cost $400 for ten years.

Many good domains (e.g. keyvalue.store, kv.io)
were taken, and some weren't easily registered (e.g. the Albanian
domain, keyv.al).

Browsing these domains that were never put into use is like strolling
along the Boulevard of Broken Dreams: high hopes dashed against the hard
rocks of reality.
2021-12-29 19:56:52 -08:00
Brian Cunnie
25ec87feb5 🐞 sslip.io: fix key-value store for GCE
We set the number of replicas to 1 so that when you create a key-value
on `ns-gce.sslip.io`, you're sure of retrieving that value later from
`ns-gce.sslip.io`.

Previously it could hit the other replica, which would have a different
key-value store, which would make the value "disappear".
2021-12-04 10:26:40 -08:00
Brian Cunnie
bd63421c3f BOSH release: 2.3.0: kv.sslip.io key-value store 2021-12-04 08:16:53 -08:00
Brian Cunnie
78722b6887 kv.sslip.io: (key-value) read/write/delete TXTs
We enable special behavior under the `kv.sslip.io` subdomain: it can be
treated as a key-value store, the sub-subdomain being the key, and the
TXT record being the value.

For example, to write ("put") the value "12.0.1" to the key
"macos-version" on the `ns-gce.sslip.io.` nameserver, you'd use the
following `dig` command:

```shell
dig @ns-gce.sslip.io. txt put.12.0.1.macos-version.kv.sslip.io.
```

To read ("get") the value back, you'd write the following `dig` command:

```shell
dig @ns-gce.sslip.io. txt get.macos-version.kv.sslip.io.
```

Since "get" is the default behavior, you don't need to include it in the
domain name:

```shell
dig @ns-gce.sslip.io. txt macos-version.kv.sslip.io.
```

Finally, when you're done with the key-value, you can "delete" it:

```shell
dig @ns-gce.sslip.io. txt delete.macos-version.kv.sslip.io.
```

Notes:

- Keys are case-insensitive (to accommodate DNS convention). In other
  words, `KEY.kv.sslip.io` and `key.kv.sslip.io` return the same TXT
  record.
- Values are case-sensitive. `put.CamelCase.style.kv.sslip.io` sets the
  TXT record to "CamelCase".
- `put` requests will return the TXT record being put; i.e.
  `put.hello.world.kv.sslip.io` returns one TXT record of one string,
  `hello`.
- `delete` requests will return the TXT record being deleted; i.e.
  `delete.world.kv.sslip.io` returns one TXT record of one string,
  `hello`. If the TXT record does not exist, no TXT records will be
  returned.
- Values are limited to 63 bytes to mitigate using the sslip.io servers
  in a [DNS amplification
  attack](https://us-cert.cisa.gov/ncas/alerts/TA13-088A).
- Values are not persistent: if the server is restarted, all values
  disappear. Poof.
- Values are not consistent. If a value is set in `ns-aws.sslip.io`, it
  does not propagate to `ns-gce.sslip.io` nor `ns-azure.sslip.io`.
2021-12-04 07:59:57 -08:00
Brian Cunnie
90b94baa29 BOSH release: 2.2.4: Deprecate nono.io nameservers 2021-11-28 13:08:49 -08:00
Brian Cunnie
4c8e7741f1 Use @ns.sslip.io to determine your IP lookup
It makes for simpler instructions than listing the three nameservers &
which ones have IPv6.
2021-11-27 19:03:40 -08:00
Brian Cunnie
7ed2107f36 Web page: use sslip.io servers, not nono.io 2021-11-27 18:23:02 -08:00
Brian Cunnie
56191a2ef7 HTML: remove the "new software" warning
It's not new after a year. I also updated the version numbers returned
because, well, it makes the website more "fresh".
2021-11-27 12:29:58 -08:00
Brian Cunnie
4e22123114 BOSH release: 2.2.3: Include sslip.io nameservers 2021-11-27 11:35:01 -08:00
Brian Cunnie
eed67fdf4d BOSH release: 2.2.2: ip.sslip.io TXT returns IP
Our documentation was wrong; our homepage said to get the origin IP
address by querying the TXT record of the root, i.e. `dig
@ns-aws.nono.io txt . +short`; however, our code worked differently: it
returned the origin IP when the `.ip` TLD was queried.

The new behavior is that it returns the origin IP when `ip.sslip.io.` is
queried, and the documentation now reflects that behavior.

Also, that behavior is marked "experimental" to give us leeway to
change.

[fixes #11]
2021-11-01 07:24:54 -07:00
Brian Cunnie
e133149beb New release instructions include updating k8s 2021-10-06 10:52:42 -07:00
Brian Cunnie
0be7d1c628 Dockerfile cunnie/sslip.io-dns-server: bump 2.2.0 → 2.2.1 2021-10-06 10:40:59 -07:00
Brian Cunnie
8ce23653bb BOSH release: 2.2.1: version.sslip.io TXT
- Returns version information for DNS server
- Contains 3 strings:
  - Semantic version, e.g. "2.2.1"
  - Date of compilation
  - Latest git hash

Note: the BOSH Release will have a different compilation date &
different git hash than the released executables; the semantic version
will be the same.
2021-10-06 05:16:46 -07:00
Brian Cunnie
502a6901cc Website: grammar fix, clarification 2021-09-15 11:04:07 -07:00
Brian Cunnie
90926d3bdf VMware employees can't get the wildcard
The wildcard is expiring, and I'm loath to spend something renewing
something I don't use, so I'll let it lapse.

(I use Let's Encrypt).
2021-09-15 10:57:13 -07:00
Brian Cunnie
bef3fc1685 GKE: bump #replicas to match #nodes (1→2)
They use hardly any CPU (the precious resource), so it's essentially
free. Plus it adds a green checkmark on the Google load balancer page.
2021-07-10 16:45:43 -07:00
Brian Cunnie
940ea6f810 GKE: certificate/secret has more meaningful name
...so I can identify it as soon as I see it. "quickstart" has no
significance to me.
2021-07-08 06:39:49 -07:00
Brian Cunnie
2af4c0bd05 🐞 <https://104.155.144.4.sslip.io/> now has favicon
Previously it was getting a 404 because I had the wrong `pathType` set.
2021-07-07 18:53:56 -07:00
Brian Cunnie
baf499536c Dockerfile-nginx: include less so I can look at logs 2021-07-07 18:49:49 -07:00
Brian Cunnie
6e5a9b1d1e sslip.io website: GKE is now a mirror—yay! 2021-07-07 18:33:43 -07:00
Brian Cunnie
aa0705e3a5 GKE: TLS Ingress for 104-155-144-4.sslip.io 2021-07-07 16:50:34 -07:00
Brian Cunnie
3eb38ecd19 GKE: sslip.io nginx has ClusterIP service 2021-07-07 16:30:57 -07:00
Brian Cunnie
9c15584b88 GKE: incorporate webserver into sslip.io
So far we've incorporated DNS & NTP, and now we incorporate the
webserver (on port 80, no TLS)
2021-07-07 16:05:43 -07:00
Brian Cunnie
27835a030f GKE: Cluster is now an NTP server!
- Much of the information was from this blog post:
  <https://goglides.io/manage-ntp-using-kubernetes/90/>
- Curiously, it creates another load balancer, so this brings me up to
  three load balancers (HTTP(S)/DNS/NTP)
- It uses the OpenNTPD server. And ns-aws uses NTPsec, and ns-azure uses
  the granddaddy, NTP.
2021-07-07 12:30:50 -07:00
Brian Cunnie
11b4966b90 GKE sslip.io DNS: 1 replica, no readiness
We only have 1 node (because I'm frugal), so we really need only one
replica (it's more likely that the node has crashed rather than my
fairly-simple server).

Also, I pushed out the liveness probe to 5 minutes so the logs aren't
cluttered with probes every ten seconds.

I got rid of the readiness probe, which is only for "[applications
[that] are temporarily unable to serve
traffic](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)".
It cluttered the logs with its probes. Also my app is never
temporarily unable to serve.

fixes too many occurrences of:
```
::1.55268 TypeA 127.0.0.1.sslip.io. ? 127.0.0.1
```
2021-07-06 05:23:04 -07:00
Brian Cunnie
59c9423989 Dockerfile: nginx: breadcrumb where to find it 2021-07-05 17:53:46 -07:00