Skip to content

Commit fdb5ccb

Browse files
authored
Small improvements for VM configuration documentation (#37)
* Fix BAO_ADDR environment variable Signed-off-by: hashworks <mail@hashworks.net> * Add note for snapshots of larger databases that might exceed the default timeout Signed-off-by: hashworks <mail@hashworks.net> * Reference bao instead of vault where possible The BAO_CLIENT_TIMEOUT environment variable isn't documented, but supported. https://github.com/openbao/openbao/blob/main/api/client.go#L41C30-L41C48 Signed-off-by: hashworks <mail@hashworks.net> --------- Signed-off-by: hashworks <mail@hashworks.net>
1 parent 7a3f122 commit fdb5ccb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/vm-configuration.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ api_proxy {
6262
listener "unix" {
6363
# Expose OpenBao Agent API seperately
6464
# https://openbao.org/docs/agent-and-proxy/agent/caching/#configuration-listener
65-
address = "/etc/vault.d/agent.sock"
65+
address = "/etc/bao.d/agent.sock"
6666
tls_disable = true
6767
}
6868
@@ -131,7 +131,7 @@ cat << 'EOF' > /usr/local/bin/bao-snapshot
131131
# - /etc/bao.d/bao_snapshot_agent.hcl
132132
# - /etc/systemd/system/bao-agent.service
133133
134-
BAO_ADDR="BAO_ADDR=unix:///etc/bao.d/agent.sock" \
134+
BAO_ADDR="unix:///etc/bao.d/agent.sock" \
135135
/usr/local/bin/bao operator raft snapshot save "/opt/bao/snapshots/bao-raft_$(date +%F-%H%M).snapshot"
136136
EOF
137137
```
@@ -151,9 +151,11 @@ echo "0 * * * * root /usr/local/bin/bao-snapshot" >> /etc/crontab
151151
Test the script (errors probably in `/var/spool/mail/root`):
152152

153153
```bash
154-
vault-snapshot
154+
bao-snapshot
155155
```
156156

157+
For users with larger databases this might fail with `context deadline exceeded`, which can be solved by increasing the `BAO_CLIENT_TIMEOUT` environment variable (default 60s) for the [agent service](https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#Environment).
158+
157159
## Sync with remote storage
158160

159161
### S3

0 commit comments

Comments
 (0)