Skip to content

Commit 79ab470

Browse files
committed
refactor: rename dev-test-iroh to dev-test-bootstrap2-iroh
Align naming with existing convention where "bootstrap2" refers to the Kitsune2 bootstrap protocol version.
1 parent adf300b commit 79ab470

5 files changed

Lines changed: 27 additions & 23 deletions

File tree

.github/workflows/preview.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
cat stderr.log | grep "in.*line.*column" -B1 -A1 --no-group-separator | sed -z 's/\([^\n]*\)\n\s*in "\([^"]*\)", line \([[:digit:]]\+\), column \([[:digit:]]\+\):\s*/::error file=cloud-init.yaml,title=\1 in \2,line=\3,col=\4::/g'
2222
exit 1
2323
fi
24-
- name: Lint dev-test-iroh cloud-init file
24+
- name: Lint dev-test-bootstrap2-iroh cloud-init file
2525
run: |
26-
if ! cloud-init schema -c dev-test-iroh/cloud-init.yaml 2> >(tee stderr.log) >> $GITHUB_STEP_SUMMARY
26+
if ! cloud-init schema -c dev-test-bootstrap2-iroh/cloud-init.yaml 2> >(tee stderr.log) >> $GITHUB_STEP_SUMMARY
2727
then
2828
# Print errors as such in GitHub logs.
2929
cat stderr.log | grep "in.*line.*column" -B1 -A1 --no-group-separator | sed -z 's/\([^\n]*\)\n\s*in "\([^"]*\)", line \([[:digit:]]\+\), column \([[:digit:]]\+\):\s*/::error file=cloud-init.yaml,title=\1 in \2,line=\3,col=\4::/g'

Pulumi.network-services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ config:
1010
hc-auth-iroh-unyt:session-secret:
1111
secure: AAABADk48DM2ZdxAXP0bqKocsoRrVSiS9aXgDULVL5jsc+TT8up+zivzSyNb0XriQvnYIz+o1VfyyYwVh8YQFqxTDdn4hNJSyh7rW2sYovD6rN3y+GuWhnVBdRNNflhNcGERk5k1nvkM8jDA7yvfkPzzUZaWgL1I
1212
cloudflare:apiToken:
13-
secure: AAABAAZzoth38tXpuxrHgKym1nBInl/O69Hr/R8TUdpoiQndNx9CS8KViwrNUHnoQCHb5C7rDOFna3JSIKwOjPkKup0Gi70vsalBI0xG/AY8Q0Lmcw==
13+
secure: AAABAFPh7LffxJ9S2r0u9GTA2M5dKok33wA3EsEtRrHD5WALAIDju1ANuvtjsaoxtZ7UpojMifDF7Ndk49zxFXhZozwvzn+/kQJWRhdsNqWmSsr9NA==
1414
dns:cloudflare-zone-id: 10a5dbacf3bed1ccc671f04e90f4423f

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ certificate (retrying until DNS propagates) and starts the `bootstrap` systemd s
212212
213213
No manual setup is required beyond the Pulumi configuration. The deployment creates:
214214
- A DigitalOcean droplet
215-
- Cloudflare A and AAAA records for `dev-test-iroh.holochain.org`
215+
- Cloudflare A and AAAA records for `dev-test-bootstrap2-iroh.holochain.org`
216216
217217
Cloud-init handles certbot and service startup automatically.
218218
@@ -221,7 +221,7 @@ Cloud-init handles certbot and service startup automatically.
221221
SSH into the server and use systemd to manage the bootstrap service:
222222
223223
```sh
224-
ssh root@dev-test-iroh.holochain.org
224+
ssh root@dev-test-bootstrap2-iroh.holochain.org
225225
226226
# Check service status
227227
systemctl status bootstrap
@@ -235,11 +235,11 @@ systemctl restart bootstrap
235235
236236
### Updating the container
237237
238-
Edit `dev-test-iroh/cloud-init.yaml` locally and open a PR. Once merged, the cloud-init change will take effect on the
238+
Edit `dev-test-bootstrap2-iroh/cloud-init.yaml` locally and open a PR. Once merged, the cloud-init change will take effect on the
239239
next droplet recreation. To update a running instance, SSH in and update the Quadlet container file:
240240
241241
```sh
242-
scp dev-test-iroh/cloud-init.yaml root@dev-test-iroh.holochain.org:/tmp/cloud-init.yaml
242+
scp dev-test-bootstrap2-iroh/cloud-init.yaml root@dev-test-bootstrap2-iroh.holochain.org:/tmp/cloud-init.yaml
243243
```
244244
245245
Then on the server, extract the updated container definition from the cloud-init and reload:
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#cloud-config
22

3-
packages:
4-
- podman
5-
63
snap:
74
commands:
85
0: [install, core]
@@ -13,7 +10,7 @@ write_files:
1310
- content: |
1411
[Container]
1512
Image=ghcr.io/holochain/kitsune2_bootstrap_srv_iroh_relay:v0.4.0-dev.6
16-
Exec=kitsune2-bootstrap-srv --production --listen [::]:443 --tls-cert /etc/letsencrypt/live/dev-test-iroh.holochain.org/fullchain.pem --tls-key /etc/letsencrypt/live/dev-test-iroh.holochain.org/privkey.pem
13+
Exec=kitsune2-bootstrap-srv --production --listen [::]:443 --tls-cert /etc/letsencrypt/live/dev-test-bootstrap2-iroh.holochain.org/fullchain.pem --tls-key /etc/letsencrypt/live/dev-test-bootstrap2-iroh.holochain.org/privkey.pem
1714
Environment=RUST_LOG=info
1815
Network=host
1916
Volume=/etc/letsencrypt:/etc/letsencrypt:ro
@@ -30,12 +27,19 @@ write_files:
3027
#!/bin/bash
3128
set -euo pipefail
3229
30+
# Restart journald so its storage directory matches the machine ID
31+
# that cloud-init may have reinitialized.
32+
systemctl restart systemd-journald
33+
34+
apt-get update -y
35+
apt-get install -y podman
36+
3337
max_attempts=10
3438
delay=30
3539
3640
for attempt in $(seq 1 $max_attempts); do
3741
echo "Certbot attempt $attempt of $max_attempts..."
38-
if certbot certonly --standalone -d dev-test-iroh.holochain.org --non-interactive --agree-tos -m contact@holochain.org; then
42+
if certbot certonly --standalone -d dev-test-bootstrap2-iroh.holochain.org --non-interactive --agree-tos -m contact@holochain.org; then
3943
echo "Certificate obtained successfully."
4044
systemctl daemon-reload
4145
systemctl start bootstrap

main.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
)
1414

1515
func main() {
16-
devTestIrohCloudInitYaml, err := os.ReadFile("dev-test-iroh/cloud-init.yaml")
16+
devTestBootstrap2IrohCloudInitYaml, err := os.ReadFile("dev-test-bootstrap2-iroh/cloud-init.yaml")
1717
if err != nil {
18-
log.Fatalf("failed to load dev-test-iroh/cloud-init.yaml: %s", err)
18+
log.Fatalf("failed to load dev-test-bootstrap2-iroh/cloud-init.yaml: %s", err)
1919
}
2020

2121
hcAuthIrohUnytCloudInitBytes, err := os.ReadFile("hc-auth-iroh-unyt/cloud-init.yaml.tmpl")
@@ -32,7 +32,7 @@ func main() {
3232
return err
3333
}
3434

35-
if err := configureDevTestIroh(ctx, string(devTestIrohCloudInitYaml)); err != nil {
35+
if err := configureDevTestBootstrap2Iroh(ctx, string(devTestBootstrap2IrohCloudInitYaml)); err != nil {
3636
return err
3737
}
3838

@@ -77,7 +77,7 @@ func configureDevTestBootstrapSrv(ctx *pulumi.Context) error {
7777
return nil
7878
}
7979

80-
func configureDevTestIroh(ctx *pulumi.Context, devTestIrohCloudInitYaml string) error {
80+
func configureDevTestBootstrap2Iroh(ctx *pulumi.Context, devTestBootstrap2IrohCloudInitYaml string) error {
8181
cfg := pulumiConfig.New(ctx, "dns")
8282
zoneId := cfg.Require("cloudflare-zone-id")
8383

@@ -91,23 +91,23 @@ func configureDevTestIroh(ctx *pulumi.Context, devTestIrohCloudInitYaml string)
9191
sshFingerprints = append(sshFingerprints, key.Fingerprint)
9292
}
9393

94-
droplet, err := digitalocean.NewDroplet(ctx, "dev-test-iroh", &digitalocean.DropletArgs{
94+
droplet, err := digitalocean.NewDroplet(ctx, "dev-test-bootstrap2-iroh", &digitalocean.DropletArgs{
9595
Image: pulumi.String("ubuntu-24-04-x64"),
96-
Name: pulumi.String("dev-test-iroh"),
96+
Name: pulumi.String("dev-test-bootstrap2-iroh"),
9797
Region: pulumi.String(digitalocean.RegionFRA1),
9898
Size: pulumi.String(digitalocean.DropletSlugDropletS2VCPU2GB),
9999
Ipv6: pulumi.Bool(true),
100100
Tags: pulumi.StringArray{pulumi.String("network-services")},
101101
SshKeys: pulumi.ToStringArray(sshFingerprints),
102-
UserData: pulumi.String(devTestIrohCloudInitYaml),
102+
UserData: pulumi.String(devTestBootstrap2IrohCloudInitYaml),
103103
}, pulumi.IgnoreChanges([]string{"sshKeys"}))
104104
if err != nil {
105105
return err
106106
}
107107

108-
_, err = cloudflare.NewRecord(ctx, "dev-test-iroh-A", &cloudflare.RecordArgs{
108+
_, err = cloudflare.NewRecord(ctx, "dev-test-bootstrap2-iroh-A", &cloudflare.RecordArgs{
109109
ZoneId: pulumi.String(zoneId),
110-
Name: pulumi.String("dev-test-iroh"),
110+
Name: pulumi.String("dev-test-bootstrap2-iroh"),
111111
Type: pulumi.String("A"),
112112
Content: droplet.Ipv4Address,
113113
Ttl: pulumi.Int(300),
@@ -117,9 +117,9 @@ func configureDevTestIroh(ctx *pulumi.Context, devTestIrohCloudInitYaml string)
117117
return err
118118
}
119119

120-
_, err = cloudflare.NewRecord(ctx, "dev-test-iroh-AAAA", &cloudflare.RecordArgs{
120+
_, err = cloudflare.NewRecord(ctx, "dev-test-bootstrap2-iroh-AAAA", &cloudflare.RecordArgs{
121121
ZoneId: pulumi.String(zoneId),
122-
Name: pulumi.String("dev-test-iroh"),
122+
Name: pulumi.String("dev-test-bootstrap2-iroh"),
123123
Type: pulumi.String("AAAA"),
124124
Content: droplet.Ipv6Address,
125125
Ttl: pulumi.Int(300),

0 commit comments

Comments
 (0)