docs(ha-config-bootstrap): add initial cluster config installation steps
This commit is contained in:
parent
bb4e23663a
commit
f465af0c0c
1 changed files with 30 additions and 0 deletions
|
|
@ -84,6 +84,36 @@ done
|
||||||
> All nodes share the same self-signed cert so they mutually trust each other.
|
> All nodes share the same self-signed cert so they mutually trust each other.
|
||||||
> In production each node has its own cert signed by a shared CA.
|
> In production each node has its own cert signed by a shared CA.
|
||||||
|
|
||||||
|
### Initial Cluster Configuration (required)
|
||||||
|
|
||||||
|
The controller looks for its cluster config at:
|
||||||
|
```
|
||||||
|
{workdir}/{myname}/conf/current ← pointer file (contains the config filename)
|
||||||
|
{workdir}/{myname}/conf/cluster.bin.<hex_tag> ← actual capnp config blob
|
||||||
|
```
|
||||||
|
|
||||||
|
The `<hex_tag>` is the first 8 bytes of the SHA-256 of the config blob, as 16 hex digits.
|
||||||
|
|
||||||
|
**Steps (using your existing config file):**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Compute the config tag from your config blob
|
||||||
|
TAG=$(sha256sum /path/to/your_config.bin | awk '{print $1}' | cut -c1-16)
|
||||||
|
echo "Config tag: $TAG"
|
||||||
|
|
||||||
|
# 2. Install config into each node's workdir
|
||||||
|
for node in a b c; do
|
||||||
|
NODE_NAME="ctrl-${node}"
|
||||||
|
CONF_DIR="/tmp/xce-${node}/${NODE_NAME}/conf"
|
||||||
|
mkdir -p "$CONF_DIR"
|
||||||
|
cp /path/to/your_config.bin "${CONF_DIR}/cluster.bin.${TAG}"
|
||||||
|
printf "cluster.bin.${TAG}" > "${CONF_DIR}/current"
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
> The `current` file must contain exactly the filename (no trailing newline,
|
||||||
|
> no path separators). `printf` (not `echo`) avoids the trailing newline.
|
||||||
|
|
||||||
### Start the 3-node cluster (3 terminals)
|
### Start the 3-node cluster (3 terminals)
|
||||||
|
|
||||||
**Terminal 1 — Node A (priority 0 = highest):**
|
**Terminal 1 — Node A (priority 0 = highest):**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue