A Google Cloud node
This page has not been walked: the test project’s service account lacks
compute.instances.create and compute.firewalls.create, so it could make
neither the instance nor its firewall rule. The walk is owed once it holds
both. Its command lines are what the CLI takes. Where a line of output is
written, it is the form the walked pages print; the rest is left open.
The gcp connection takes a project and a service account key. One
connection lights Cloud DNS, a passthrough TCP load balancer and zonal
persistent disks. The daemon does not use your own account: make a
service account for it with the roles dns.admin,
compute.loadBalancerAdmin and compute.instanceAdmin.v1, and download
its key.
Write the connection’s document on home01 as ~/gcp.json: the project
id and the key file’s contents as one string.
{"project": "<project id>", "credentials_json": "<the service account key JSON>"}$ chmod 600 ~/gcp.jsonCreate one Compute Engine instance: Debian 13, zone us-central1-a,
named after the node, with the firewall rules that allow the cluster
ports between it and the learn nodes. Install SHC on it. Call the node
gcp01.
The join asks home01 for its token over ssh, so give root on gcp01 the learn nodes’ names and a key home01 accepts, as the learn nodes have.
$ ssh home01 shc node token --fields token -o text | shc node join - --name gcp01 --cloud gcp --location us-central1-a✔ joined cluster as node "gcp01" at 34.1.2.3$ shc node ls...$ shc connection connect gcp --cred region=us-central1 --cred zone=us-central1-a --value-file ~/gcp.json...$ shc connection show gcp...zone is where the connection creates disks and must match gcp01’s
location. Install notes onto gcp01 with its data on a persistent disk,
take a snapshot of the disk, then uninstall.
$ shc install notes -s gcpdb --where node=gcp01 --storage gcp...$ shc volume ls...$ shc volume snapshot pgdata -s gcpdb --name learn-first...$ shc uninstall gcpdb -y...$ shc volume ls...$ shc volume restore-snapshot pgdata -s gcpdb learn-first --yesA restore puts the disk back to the snapshot; the data written since is gone. Stop the deployment first.
The system ingress keeps a traefik replica on every node, so a node that
still hosts one refuses to leave with X409025LVDEPS: drain it first,
from any node, and the cluster moves what it hosts. Then the node leaves
from itself.
$ shc node drain gcp01 --yes...$ shc node leave...$ shc node ls...$ shc connection rm gcp --yes...Delete the instance and the snapshot in the console.
This page leaves the cluster as the runtimes ladder left it: the learn nodes, with no cloud node and no connection.
Next: An AWS node.