Commit Graph

689 Commits

Author SHA1 Message Date
Brian Cunnie
244ad48bb1 Revert "+foundry.fun"
This reverts commit b8a327b128.

PowerDNS's bind backend doesn't appear to handle wildcards consistently
as secondaries, so I'm reverting this change and instead using a pair of
FreeBSD+bind servers (ns-he + ns-digitalocean) to provide the DNS.
2020-07-25 16:45:14 -07:00
Brian Cunnie
b8a327b128 +foundry.fun 2020-07-24 18:48:05 -07:00
Brian Cunnie
44f3a1cf95 🐞 PowerDNS 4.2.2 pdns.conf: no "first", "second"
fixes:
```
Jul 21 01:07:03 Caught an exception instantiating a backend: launch= suffixes are not supported on the bindbackend
```
```
Jul 21 01:08:47 Fatal error: Trying to set unknown parameter 'bind-first-config'
```
```
Jul 21 01:08:57 Fatal error: Trying to set unknown parameter 'pipe-second-command'
```
2020-07-20 18:32:33 -07:00
Brian Cunnie
ce7ae97e1e k8s: sslip.io nginx: deployment
readiness probes, memory limits—the works!
2020-07-05 17:04:12 -07:00
Brian Cunnie
46468f9f2c k8s: sslip.io DNS: add readiness & liveness probes
Also fix memory requirements: it's 32Mi not 32Gi
2020-07-05 16:51:44 -07:00
Brian Cunnie
bcb4536502 ks8: sslip.io DNS: deployment does not include nginx 2020-07-05 16:41:58 -07:00
Brian Cunnie
3565c5ab99 k8s sslip.io DNS: only request 32Mi
...because the 2 current pods only use 15Mi, 9Mi respectively.
2020-07-05 16:39:47 -07:00
Brian Cunnie
4164af4e9c k8s: introduce nginx Dockerfile
We now introduce a second Dockerfile, `Dockerfile-nginx`, to be used for
the web assets for sslip.io.

It does not run TLS; we assume that the load balancer will take care of
that.

We also gussied-up the PowerDNS Dockerfile with minor changes.
2020-07-05 15:49:42 -07:00
Brian Cunnie
ae1012f483 document_root/ is under k8s/
fixes `Forbidden path outside the build context` when building the
forthcoming `Dockerfile-nginx`
2020-07-05 11:32:27 -07:00
Brian Cunnie
3c7a883709 k8s: Distinguish Dockerfile with -pdns
...to differentiate from the nginx Dockerfile, which is forthcoming.
2020-07-05 09:08:58 -07:00
Brian Cunnie
50e17b3d7f k8s: deployment & nodePort service
- nodePort service is merely a proof-of-concept; this won't be the final
  form the service takes. The port needs to be 53, not 32767.
- the deployment doesn't include the nginx webserver, merely the DNS
  server. Also, I had trouble connecting both UDP & TCP to port 53,
  so I chose UDP.
2020-07-05 08:27:53 -07:00
Brian Cunnie
c89ff9cdd8 sslip.io needs ps, nc, lsof, ifconfig
Requires +19MB: 494 MB → 513 MB
2020-06-06 11:20:03 -07:00
Brian Cunnie
720e2a71b1 DNS: secondaries for diarizer.com
We are now secondaries for diarizer.com because it needs to share the
same webserver as *.cf.nono.io, and needs SSL certs, and needs to be
able to participate in the DNS challenge.
2020-05-24 17:47:22 -07:00
Brian Cunnie
23456d6a20 sslip.io: run DNS server in Docker container
- Include BIND secondaries for nono.io/nono.com
  (use this & you'll be unwitting secondaries for my domains)
- Fedora-based. Because IBM/Red Hat hires a lot of the Linux kernel developers.
2020-04-29 21:10:00 -07:00
Brian Cunnie
d79128ae37 Expand the term "Branding" to include "White Label"
I like "White Label" better. I also like the term "Custom Domains".

Thanks [Francisco Ros](https://moss.sh/free-wildcard-dns-services/).
2020-04-12 08:06:24 -07:00
Brian Cunnie
e8c9c0f283 Remove NS server ns-vultr.nono.io
I turn off ns-vultr typically the last week of the month because it
exceeds its 3TB bandwidth because it's one of the few NTP servers in
Singapore. Because it's not consistently up, it should not be a
nameserver, removing.

fixes <https://ci.nono.io/teams/main/pipelines/sslip.io/jobs/check-dns/builds/1874>
```
nameserver ns-vultr.nono.io.'s SOA record match (FAILED - 2)
nameserver ns-vultr.nono.io. resolves 199.147.119.111.sslip.io to 199.147.119.111 (FAILED - 3)
nameserver ns-vultr.nono.io. resolves 28-165-216-73.sslip.io to 28.165.216.73 (FAILED - 4)
nameserver ns-vultr.nono.io. resolves 5fjtv1hr.82-45-16-87.sslip.io to 82.45.16.87 (FAILED - 5)
nameserver ns-vultr.nono.io. resolves 207-60-213-72.9cs26rza to 207.60.213.72 (FAILED - 6)
nameserver ns-vultr.nono.io. resolves api.--.sslip.io' to eq ::)} (FAILED - 7)
nameserver ns-vultr.nono.io. resolves localhost.--1.sslip.io' to eq ::1)} (FAILED - 8)
nameserver ns-vultr.nono.io. resolves 2001-4860-4860--8888.sslip.io' to eq 2001:4860:4860::8888)} (FAILED - 9)
nameserver ns-vultr.nono.io. resolves 2601-646-100-69f0--24.sslip.io' to eq 2601:646:100:69f0::24)} (FAILED - 10)
```
2019-07-31 19:28:47 -07:00
Brian Cunnie
779306c6fa Enhancement: Excluded domains
The PowerDNS pipe backend will return NO RECORDS for domains which are
excluded (`XIP_EXCLUDED_DOMAINS`);

This fixes an error where the pipe backend returns authoritative records
for the domains which I want the bind backend to answer; surprisingly,
this behavior breaks wildcard records:

fixes:
```
TYPE=any RECORD=c.pas.nono.io; dig +short $TYPE $RECORD @ns-aws.nono.io; echo; dig +short $TYPE $RECORD @ns-he.nono.io
ns-aws.nono.io.
ns-azure.nono.io.
ns-gce.nono.io.
ns-vultr.nono.io.
"protonmail-verification=ce0ca3f5010aa7a2cf8bcc693778338ffde73e26"
10 mail.protonmail.ch.
briancunnie.gmail.com. ns-he.nono.io. 2018092000 300 300 300 300

haproxy.pas.nono.io.
```
2018-10-02 18:23:14 -07:00
Brian Cunnie
552353b2a0 Unit tests are run for sslip.io executable 2018-09-24 21:16:02 -07:00
Brian Cunnie
ed2c39e94f Remove redundant "https://"
How embarrassing -- it made the website seem like amateur-hour.
2018-09-24 18:12:47 -07:00
Brian Cunnie
7339e98501 NS records: +ns-vultr.nono.io, -ns-he.nono.io
ns-he.nono.io will be using BIND, not PowerDNS, in the near future.
2018-09-20 09:38:26 -07:00
Brian Cunnie
6fcad9e2b0 sslip.io NS: +ns-vultr.nono.io, -ns-he.nono.io
- I had to remove `ns-he.nono.io`; I'm moving back to BIND on that one.
- `resolve_ns_subdomain` is deprecated; I don't need to resolve
  the IP addresses of the NS records, for they're in a different domain.
- Added `localhost` resolution; it was one of the common queries.
2018-09-20 06:35:11 -07:00
Brian Cunnie
ee8c94a347 sslip.io has an MX record 2018-09-12 16:51:40 -07:00
Brian Cunnie
ec894473ce sslip.io has TXT records for protonmail 2018-09-12 13:48:00 -07:00
Brian Cunnie
a0f1136286 Deprecate serial_groups
Now that we run cellblocks in parallel, we no longer need serial groups,
but we might decide to use resource pools to allow us to chain deploys.
2018-07-11 12:50:35 -07:00
Brian Cunnie
51983abdaa Remove tasks; they're unnecessary for dummy pipeline
- Pull the pipeline configuration from Concourse, but re-add the
comments at the top & the entire `resources` section which has YAML
anchors and is much more brief as a result
2018-07-11 12:32:23 -07:00
Brian Cunnie
af4d259b02 Diego cellblocks are rolled in clumps of 5 2018-07-11 12:22:07 -07:00
Brian Cunnie
a72a840f66 CI job _deploy-pws-diego-cellblock-02_ has fewer restrictions
Previously _deploy-pws-diego-cellblock-02_ waited for
_deploy-pws-pivotal-internal-apps_ to complete before starting, but that
particular job has taken as long as 1:47 (HH:MM) (cf-deployment v2.5.0).

_deploy-pws-diego-cellblock-02_'s other dependency,
_deploy-pws-diego-cellblock-01_, completed in a much more reasonable
timeframe (1:08), and is also a more similar deployment (in other words,
if the deployment to cellblock 01 has succeeded, then we should proceed
with cellblock 02 & not bother to wait for Internal Apps).
2018-07-11 09:38:31 -07:00
Brian Cunnie
d7ce0cc7b6 Concourse pipeline bosh:pws_cf
This is a dummy pipeline to demonstrate visually the changes to
accelerate the deployment to PWS (Pivotal Web Services). We hope to
reduced deployment time from 17 hours to 11 hours while restricting
Diego cell vacating to one az (availability zone) at a time.
2018-07-11 09:34:20 -07:00
Brian Cunnie
a2564c12d3 dig shouldn't bomb-out if forbidden hyphen is used
Yes, according to the RFC it shouldn't begin with a hyphen. And, since
we're on the topic, underscores were supposed to be off the table, too,
but Microsoft used them anyway, and you know what? We're gonna use the
"forbidden hyphen". And we're gonna instruct `dig` to not be so
persnickety.

fixes:
```
dig +short  AAAA api.--.sslip.io
dig: idn2_lookup_ul failed: string start/ends with forbidden hyphen
```

I had to make it work for old-style (e.g. macOS dig) which is version
"DiG 9.8.3-P1" as well as for the new version ("DiG
9.11.3-RedHat-9.11.3-6.fc28") which has this new
[library](https://www.gnu.org/software/libidn/libidn2/reference/libidn2-idn2.html)
which does the following:

> Perform IDNA2008 lookup string conversion on domain name src , as described in section 5 of RFC 5891
2018-05-23 20:03:34 -07:00
Brian Cunnie
d778654c00 Table includes URLs pointing to the website mirrors
Nothing like a good example to drive the point home.

I need to update the AWS and Hetzner content to reflect these changes,
and include the new URL in the Hetzner LetsEncrypt list.
2018-05-21 07:07:04 -07:00
Brian Cunnie
964fad99d3 Delete index.md; it's not the true source
I wasted an hour trying to figure out how I converted `index.md` to
`index.html` (`pandoc`? `hugo`?), only to discover that it was never the
true source, I had merely converted then cut-and-pasted to the
hand-curated `index.html`.
2018-05-21 05:50:34 -07:00
Brian Cunnie
03485ad955 Pipelines: unpause from the CLI 2018-03-17 04:35:47 -07:00
Brian Cunnie
ebc13e99f6 Pipelines use new syntax for Docker images
Also modified simple so that _unit_ would pass and _integration_ would
fail. If swapped, then _unit_ would fail and _integration_ would never
run.

fixes:
```
error: invalid configuration:
unknown/extra keys:
  - jobs[0].plan[0].config.image
  - jobs[0].plan[0].config.tags
```
2018-03-08 20:44:08 -08:00
Brian Cunnie
f15db8f932 Root A and AAAA records return properly for mixed-case queries
When queried with a mixed-case domain, e.g. "SsLiP.Io", the A and AAAA
records are properly returned. Previously they weren't. This is a
problem when Let's Encrypt queries with a mixed-case domain, which it
does for reasons which are not clear:

  <https://github.com/letsencrypt/boulder/issues/1243>

fixes:
```
Failed authorization procedure. sslip.io (http-01): urn:acme:error:unknownHost :: The server could not resolve a domain name :: No valid IP addresses found for sslip.io
```
2018-03-04 12:11:36 -08:00
Brian Cunnie
47992ce311 ns-he.nono.io has IPv6 address, too 2018-03-04 08:33:31 -08:00
Brian Cunnie
fa3997f850 Hetzner will host sslip.io
- cert is from LetsEncrypt
- Hetzner already "owns" the IPv6 version
- For simplicity, it should also own IPv4

This marks a milestone in the sslip.io; its original purpose was to use
a wildcard certificate, and now we're hosting the domain using a
LetsEncrypt certificate. My, how the world has changed.
2018-03-01 19:46:57 -08:00
Brian Cunnie
3c50a3181a Placate https://validator.w3.org
fixes:
```
The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.
```
2018-03-01 17:49:18 -08:00
Brian Cunnie
2961708fa7 tidy -im -w 120 index.html 2018-03-01 17:37:30 -08:00
Brian Cunnie
84d55750dc sslip.io web page has new message
- Like xip.io, except
  - allow dashes as well as dots
  - allow IPv6
  - allow branding
  - allow wildcard TLS

We deprecate the old message, which was about using SSL.
2018-02-28 20:17:51 -08:00
Brian Cunnie
859107de14 🐞 Don't test resolution of Google's IPv6 DNS server twice
Instead, test one of my IPs.
2017-12-10 07:18:16 -08:00
Brian Cunnie
2642344d44 Test FQDNS -> IPv6 addresses 2017-12-10 06:27:58 -08:00
Brian Cunnie
accc3747de 🐞 No double parens; they confuse BOSH
Instead, we use a filler "x{0}", i.e. "'x' appearing exactly
zero times" to separate the parentheses.

fixes:
```
Task 21945 | 00:31:48 | Error: Unable to render instance groups for deployment. Errors are:
- Unable to render jobs for instance group 'concourse'. Errors are:
  - Unable to render templates for job 'pdns'. Errors are:
    Variable name '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?' must only contain alphanumeric, underscores, dashes, or forward slash characters
```
2017-12-09 16:41:09 -08:00
Brian Cunnie
4d7cfb9bf7 sslip.io returns AAAA (IPv6) records
- api.system.2a01-4f8-c17-b8f--2.sslip.io ➡ 2a01:4f8:c17:b8f::2
- `dashed` domains  only (e.g. only "fe80-2a01-4f8-c17--de0e" not
  "fe80.2a01.4f8.c17..de0e"; DNS doesn't allow two dots next to each
  other.
- mirrored from https://github.com/cunnie/bin/blob/master/pdns_pipe.sh
  which has colocated tests.
2017-12-09 14:51:25 -08:00
Brian Cunnie
e5a113d4d4 Reduce flakiness by attempting 10 times
- DNS is flaky, and sometimes tests fail for spurious reasons
  (e.g.  <https://ci.nono.io/teams/main/pipelines/sslip.io/jobs/check-dns/builds/1621>)

fixes
```
dig: couldn't get address for 'ns-he.nono.io.': not found
  nameserver ns-he.nono.io.'s NS records match whois's ["ns-azure.nono.io.", "ns-aws.nono.io.", "ns-he.nono.io.", "ns-gce.nono.io."], `dig +short ns sslip.io @ns-he.nono.io.` (FAILED - 1)
```
2017-10-08 08:04:29 -07:00
Brian Cunnie
3844f98c28 Unit tests show which command is being run
- helps me troubleshoot; I get lost at times.
- README shows more verbose variant of rspec
2017-09-21 06:01:10 -07:00
Brian Cunnie
bf623eafaa Remove double-parentheses
- causes BOSH interpolation to become confused
- separate parentheses using null-string "x{0}"

fixes:
```
Task 19122 | 15:47:01 | Error: Unable to render instance groups for deployment. Errors are:
  - Unable to render jobs for instance group 'concourse'. Errors are:
    - Unable to render templates for job 'pdns'. Errors are:
      Variable name '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?' must only contain alphanumeric, underscores, dashes, or forward slash characters
```
2017-09-02 11:55:33 -07:00
Brian Cunnie
c315a1f257 Revert "Remove tabs that cause BOSH interpolation to fail"
- the problem wasn't the tabs; it was the double-parentheses ("((")
- besides, tabs are needed: https://doc.powerdns.com/md/authoritative/backend-pipe/

This reverts commit e1c998a7b9.
2017-09-02 11:47:53 -07:00
Brian Cunnie
e1c998a7b9 Remove tabs that cause BOSH interpolation to fail
- improperly templated with tabs:
```yaml
pipe: "#!/usr/bin/env bash\n#\n# Originally written by Sam Stephenson for xip.io\nset
  -e\nshopt -s nocasematch\n\n# Configuration\n#\n# Increment this timestamp
```
- properly templated without:
```yaml
pipe: |
  #!/usr/bin/env bash
  #
  # Originally written by Sam Stephenson for xip.io
```

fixes:
```
Task 19122 | 15:47:01 | Error: Unable to render instance groups for deployment. Errors are:
  - Unable to render jobs for instance group 'concourse'. Errors are:
    - Unable to render templates for job 'pdns'. Errors are:
      Variable name '(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?' must only contain alphanumeric, underscores, dashes, or forward slash characters
```
2017-09-02 09:28:15 -07:00
Brian Cunnie
a549b5b74d Nameservers should be lowercased
fixes:
```
nameserver NS-AZURE.NONO.IO.'s NS records match whois's ["NS-AZURE.NONO.IO.", "NS-AWS.NONO.IO.", "NS-HE.NONO.IO.", "NS-GCE.NONO.IO."] (FAILED - 1)
```
2017-07-05 13:57:42 -07:00
Brian Cunnie
e779757527 Adjust to new whois format:
- previously Name Server line began with "NS"
- now they begin with "Name Server"
- fixed typo

fixes:
```
1) sslip.io should have at least 2 nameservers
   Failure/Error: expect(whois_nameservers.size).to be > 1

     expected: > 1
          got:   0
   # ./sslip.io/spec/check-dns_spec.rb:37:in `block (2 levels) in <top (required)>'
```
2017-07-01 06:38:16 -07:00