Some applications, such as bookkeeper, require connected zookeeper servers to have znodes available at specific paths. Zookeeper should be able to automatically create these znodes when a path is provided via relation data.
Znodes can be created manually by accessing a zookeeper-k8s unit, using the zookeeper cli at bin/zkCli.sh, then running the create command followed by a directory. Nested directories must be created one directory at a time, hence using recursion to generate znodes all the way down some path. For example, bookeeper, by default, looks for a znode at /ledgers/available on the zookeeper servers it's connected to. This node is created by, as previously described, accessing the unit, invoking the zookeeper cli, and running create /ledgers followed by create /ledgers/available.
Ideally, this manual step would be completely skipped by having a connecting application, like bookeeeper, provide the path(s) where it will be looking for a znode and having zookeeper create them automatically.
Some applications, such as bookkeeper, require connected zookeeper servers to have znodes available at specific paths. Zookeeper should be able to automatically create these znodes when a path is provided via relation data.
Znodes can be created manually by accessing a zookeeper-k8s unit, using the zookeeper cli at bin/zkCli.sh, then running the
create
command followed by a directory. Nested directories must be created one directory at a time, hence using recursion to generate znodes all the way down some path. For example, bookeeper, by default, looks for a znode at /ledgers/available on the zookeeper servers it's connected to. This node is created by, as previously described, accessing the unit, invoking the zookeeper cli, and runningcreate /ledgers
followed bycreate /ledgers/available
.Ideally, this manual step would be completely skipped by having a connecting application, like bookeeeper, provide the path(s) where it will be looking for a znode and having zookeeper create them automatically.