Skip to content
SHC Docs

Render once on the leader

Read this right after A node failing, with placed on far01 and the other deployments on home01. Every command here reads; none changes the cluster.

One node leads the cluster:

home01
$ shc node ls
NAME STATE CONDITION AVAIL CLOUD LOCATION ROOM BUILD LEADER VOTER
far01 healthy ready active learn learn/far ok 0.1.2 no no
home01 healthy ready active learn learn/home ok 0.1.2 yes yes
home02 healthy ready active learn learn/home ok 0.1.2 no no

The leader renders each deployment from its app once, at install or update, and stores the result. It keeps the rendered tree of every deployment:

home01
$ ls -1 /var/lib/shc/deployments/prod
cloud
db
pgweb
placed
store
web

A node that runs a replica gets that replica’s part of the render, a compose file and a replica record, and runs it. placed runs on far01, and far01 holds placed’s files and no other deployment’s. Its replica’s directory carries -i1, the incarnation the move to far01 started. members is empty: the last page’s uninstall took its files and left the directory.

far01
$ ls -1 /run/shc-secrets/.projects/prod/prod
members
placed
$ ls -1 /run/shc-secrets/.projects/prod/prod/members
$ ls -1 /run/shc-secrets/.projects/prod/prod/placed
postgres-r0-i1
$ ls -1 /run/shc-secrets/.projects/prod/prod/placed/postgres-r0-i1
compose.yaml
replica.json

/run is a memory filesystem, so the rendered secrets in those files never reach the node’s disk:

far01
$ stat -f -c %T /run
tmpfs

This is the last page of the app ladder. Learn SHC lists the ladders that go on from it.