Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@ DNSControl configuration for the Cloudflare zones. One directory per zone, each
- `rubyci.org/` — the CI hosts. Every rubyci host is resolved through DNS rather than `~/.ssh/config`, so a new host needs its record here before `bin/hocho apply`. The apex uses Cloudflare's CNAME flattening, which DNSControl expresses as `ALIAS`.
- `ruby-lang.org/` — the project zone.

## Credentials

The API tokens are zone-scoped and therefore different per zone, so each `creds.json` reads an environment variable named after its zone. `rubyci.org/creds.json` reads `CLOUDFLARE_API_TOKEN_RUBYCI` and `ruby-lang.org/creds.json` reads `CLOUDFLARE_API_TOKEN_RUBY_LANG_ORG`.

No token is stored here, so that variable has to be in the environment before `dnscontrol` runs. Export it, or inject it from whichever secret store holds it. With 1Password, wrap the commands below in `op run` with the env file for the zone:

```
cd dns/rubyci.org
op run --env-file ~/.config/credentials/cloudflare-rubyci.org.env -- dnscontrol preview --creds creds.json
```

## rubyci.org

Applied from CI by `.github/workflows/dns.yml`: a pull request runs `dnscontrol preview`, and merging to `master` runs `dnscontrol push`. The token comes from the repository secret `CLOUDFLARE_API_TOKEN_RUBYCI`.

To preview locally:

```
source ~/.config/cloudflare/rubyci.org/token.sh
cd dns/rubyci.org
dnscontrol preview --creds creds.json
```
Expand All @@ -24,7 +32,6 @@ dnscontrol preview --creds creds.json
Not applied from CI. The zone is shared with other maintainers, so `push` is run by hand after the change is reviewed:

```
source ~/.config/cloudflare/ruby-lang.org/token.sh
cd dns/ruby-lang.org
dnscontrol preview --creds creds.json
dnscontrol push --creds creds.json
Expand Down
1 change: 0 additions & 1 deletion dns/rubyci.org/dnsconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ D("rubyci.org", REG_NONE,
A("amazon2023", "35.72.97.116"),
A("arch", "35.72.171.27"),
A("crossruby", "54.65.185.15"),
A("debian11", "54.178.164.239"),
A("debian12", "18.177.243.215"),
A("debian13", "35.72.238.43"),
A("debian", "35.73.95.28"),
Expand Down
7 changes: 0 additions & 7 deletions hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ rhel8.rubyci.org:
run_list:
- recipes/default.rb

debian11.rubyci.org:
properties:
nopasswd_sudo: true
compress: false
run_list:
- recipes/default.rb

openbsd.rubyci.org:
properties:
attributes:
Expand Down