Skip to content

Commit a4dd638

Browse files
authored
refactor: rename ssh services (dfinity#3548)
Renames: - `setup-ssh-account-keys` --> `setup-ssh-user-keys` - `setup-ssh-keys` --> `generate-host-ssh-keys`
1 parent 14ba37e commit a4dd638

File tree

18 files changed

+34
-34
lines changed

18 files changed

+34
-34
lines changed

ic-os/boundary-guestos/context/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ serve as a guide on how to add further actions.
4646

4747
=== ssh key generation
4848

49-
The `setup-ssh-keys` (and corresponding shell script) service performs one of
49+
The `generate-host-ssh-keys` (and corresponding shell script) service performs one of
5050
two things: If this is the first boot ever (on a newly installed system), it
5151
generates ssh keys and stashes them away in a location that is preserved across
5252
reboots and in the future upgrades.

ic-os/boundary-guestos/docs/Boot.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ service are started in the IC-OS boot sequence:
2020
2121
- Config injection
2222
23-
- Set up ssh account keys
23+
- Set up ssh user keys
2424
2525
- Generate network configuration
2626
@@ -53,7 +53,7 @@ Relevant information can be found in the guestos link:../../guestos/docs/Boot.ad
5353

5454
== Set up ssh host keys
5555

56-
Service: `setup-ssh-keys.service`, script: `/opt/ic/bin/setup-ssh-keys.sh`,
56+
Service: `generate-host-ssh-keys.service`, script: `/opt/ic/bin/generate-host-ssh-keys.sh`,
5757
depends on `/boot/config` mount.
5858

5959
This checks if ssh host keys for the system exist in the `config` partition
@@ -83,9 +83,9 @@ USB stick" attached to the VM that contains a tar file with initial configuratio
8383
for parts of the system (see link:ConfigStore{outfilesuffix}[config store] for a description). Required
8484
files in the `config` partition as well as payload store are created.
8585

86-
== Set up ssh account keys
86+
== Set up ssh user keys
8787

88-
Service: `setup-ssh-account-keys.services`, script `/opt/ic/bin/setup-ssh-account-keys.sh`.
88+
Service: `setup-ssh-user-keys.services`, script `/opt/ic/bin/setup-ssh-user-keys.sh`.
8989
Depends on `bootstrap-ic-node.service`.
9090

9191
The `authorized_keys` files for the role accounts are taken from the

ic-os/components/boundary-guestos.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ component_files = {
5656
Label("boundary-guestos/etc/systemd/system/setup-ic-gateway.service"): "/etc/systemd/system/setup-ic-gateway.service",
5757
Label("boundary-guestos/etc/systemd/system/setup-lvs.service"): "/etc/systemd/system/setup-lvs.service",
5858
Label("boundary-guestos/etc/systemd/system/setup-nftables.service"): "/etc/systemd/system/setup-nftables.service",
59-
Label("boundary-guestos/etc/systemd/system/setup-ssh-account-keys.service"): "/etc/systemd/system/setup-ssh-account-keys.service",
60-
Label("boundary-guestos/etc/systemd/system/setup-ssh-keys.service"): "/etc/systemd/system/setup-ssh-keys.service",
59+
Label("boundary-guestos/etc/systemd/system/setup-ssh-user-keys.service"): "/etc/systemd/system/setup-ssh-user-keys.service",
60+
Label("boundary-guestos/etc/systemd/system/generate-host-ssh-keys.service"): "/etc/systemd/system/generate-host-ssh-keys.service",
6161
Label("boundary-guestos/etc/systemd/system/setup-var-log.service"): "/etc/systemd/system/setup-var-log.service",
6262
Label("boundary-guestos/etc/systemd/system/setup-vector.service"): "/etc/systemd/system/setup-vector.service",
6363
Label("boundary-guestos/etc/systemd/system/setup-version-metric.service"): "/etc/systemd/system/setup-version-metric.service",
@@ -86,8 +86,8 @@ component_files = {
8686
Label("boundary-guestos/opt/ic/bin/setup-ic-gateway.sh"): "/opt/ic/bin/setup-ic-gateway.sh",
8787
Label("boundary-guestos/opt/ic/bin/setup-lvs.sh"): "/opt/ic/bin/setup-lvs.sh",
8888
Label("boundary-guestos/opt/ic/bin/setup-nftables.sh"): "/opt/ic/bin/setup-nftables.sh",
89-
Label("boundary-guestos/opt/ic/bin/setup-ssh-account-keys.sh"): "/opt/ic/bin/setup-ssh-account-keys.sh",
90-
Label("boundary-guestos/opt/ic/bin/setup-ssh-keys.sh"): "/opt/ic/bin/setup-ssh-keys.sh",
89+
Label("boundary-guestos/opt/ic/bin/setup-ssh-user-keys.sh"): "/opt/ic/bin/setup-ssh-user-keys.sh",
90+
Label("boundary-guestos/opt/ic/bin/generate-host-ssh-keys.sh"): "/opt/ic/bin/generate-host-ssh-keys.sh",
9191
Label("boundary-guestos/opt/ic/bin/setup-var-encryption.sh"): "/opt/ic/bin/setup-var-encryption.sh",
9292
Label("boundary-guestos/opt/ic/bin/setup-var-log.sh"): "/opt/ic/bin/setup-var-log.sh",
9393
Label("boundary-guestos/opt/ic/bin/setup-vector.sh"): "/opt/ic/bin/setup-vector.sh",

ic-os/components/boundary-guestos/etc/systemd/system/bootstrap-ic-node.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Description=Bootstrap the IC node
33
Requires=var-log.mount
44
After=var-log.mount
5-
Before=setup-ssh-account-keys.service
5+
Before=setup-ssh-user-keys.service
66

77
[Install]
88
WantedBy=multi-user.target
9-
RequiredBy=setup-ssh-account-keys.service
9+
RequiredBy=setup-ssh-user-keys.service
1010

1111
[Service]
1212
Type=oneshot

ic-os/components/boundary-guestos/etc/systemd/system/setup-ssh-keys.service renamed to ic-os/components/boundary-guestos/etc/systemd/system/generate-host-ssh-keys.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Before=ssh.service
88
[Service]
99
Type=oneshot
1010
RemainAfterExit=true
11-
ExecStart=/opt/ic/bin/setup-ssh-keys.sh
11+
ExecStart=/opt/ic/bin/generate-host-ssh-keys.sh
1212

1313
[Install]
1414
WantedBy=multi-user.target

ic-os/components/boundary-guestos/etc/systemd/system/setup-ssh-account-keys.service renamed to ic-os/components/boundary-guestos/etc/systemd/system/setup-ssh-user-keys.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Unit]
2-
Description=Set up ssh account keys
2+
Description=Set up ssh user keys
33
Before=ssh.service
44
# bootstrap-ic-node.service (if it exists) lists this service as a reverse dependency
55

@@ -9,7 +9,7 @@ WantedBy=multi-user.target
99
[Service]
1010
Type=oneshot
1111
RemainAfterExit=true
12-
ExecStart=/opt/ic/bin/setup-ssh-account-keys.sh
12+
ExecStart=/opt/ic/bin/setup-ssh-user-keys.sh
1313

1414
# All services that networking depends on log their outputs to the console
1515
# and are piped to the host terminal if the verbose flag is enabled.

ic-os/components/guestos.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ component_files = {
140140

141141
# ssh
142142
Label("ssh/provision-ssh-keys.sh"): "/opt/ic/bin/provision-ssh-keys.sh",
143-
Label("ssh/setup-ssh-keys/setup-ssh-keys.sh"): "/opt/ic/bin/setup-ssh-keys.sh",
144-
Label("ssh/setup-ssh-keys/setup-ssh-keys.service"): "/etc/systemd/system/setup-ssh-keys.service",
145-
Label("ssh/setup-ssh-account-keys/setup-ssh-account-keys.sh"): "/opt/ic/bin/setup-ssh-account-keys.sh",
146-
Label("ssh/setup-ssh-account-keys/setup-ssh-account-keys.service"): "/etc/systemd/system/setup-ssh-account-keys.service",
143+
Label("ssh/generate-host-ssh-keys/generate-host-ssh-keys.sh"): "/opt/ic/bin/generate-host-ssh-keys.sh",
144+
Label("ssh/generate-host-ssh-keys/generate-host-ssh-keys.service"): "/etc/systemd/system/generate-host-ssh-keys.service",
145+
Label("ssh/setup-ssh-user-keys/setup-ssh-user-keys.sh"): "/opt/ic/bin/setup-ssh-user-keys.sh",
146+
Label("ssh/setup-ssh-user-keys/setup-ssh-user-keys.service"): "/etc/systemd/system/setup-ssh-user-keys.service",
147147
Label("ssh/read-ssh-keys.sh"): "/opt/ic/bin/read-ssh-keys.sh",
148148

149149
# upgrade

ic-os/components/hostos.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ component_files = {
8585
Label("networking/hosts"): "/etc/hosts",
8686

8787
# ssh
88-
Label("ssh/setup-ssh-keys/setup-ssh-keys.sh"): "/opt/ic/bin/setup-ssh-keys.sh",
89-
Label("ssh/setup-ssh-keys/setup-ssh-keys.service"): "/etc/systemd/system/setup-ssh-keys.service",
90-
Label("ssh/setup-ssh-account-keys/setup-ssh-account-keys.sh"): "/opt/ic/bin/setup-ssh-account-keys.sh",
91-
Label("ssh/setup-ssh-account-keys/setup-ssh-account-keys.service"): "/etc/systemd/system/setup-ssh-account-keys.service",
88+
Label("ssh/generate-host-ssh-keys/generate-host-ssh-keys.sh"): "/opt/ic/bin/generate-host-ssh-keys.sh",
89+
Label("ssh/generate-host-ssh-keys/generate-host-ssh-keys.service"): "/etc/systemd/system/generate-host-ssh-keys.service",
90+
Label("ssh/setup-ssh-user-keys/setup-ssh-user-keys.sh"): "/opt/ic/bin/setup-ssh-user-keys.sh",
91+
Label("ssh/setup-ssh-user-keys/setup-ssh-user-keys.service"): "/etc/systemd/system/setup-ssh-user-keys.service",
9292
Label("ssh/deploy-updated-ssh-account-keys/deploy-updated-ssh-account-keys.sh"): "/opt/ic/bin/deploy-updated-ssh-account-keys.sh",
9393
Label("ssh/deploy-updated-ssh-account-keys/deploy-updated-ssh-account-keys.service"): "/etc/systemd/system/deploy-updated-ssh-account-keys.service",
9494

0 commit comments

Comments
 (0)