Skip to content

Commit

Permalink
document zk binaries (#1599)
Browse files Browse the repository at this point in the history
* document zk binaries

Signed-off-by: Andrew Mason <[email protected]>

* regenerate docs; forgot to commit makefile changes

Signed-off-by: Andrew Mason <[email protected]>

---------

Signed-off-by: Andrew Mason <[email protected]>
  • Loading branch information
Andrew Mason authored Sep 27, 2023
1 parent c93eb2c commit 99e03a0
Show file tree
Hide file tree
Showing 21 changed files with 1,173 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ifndef COBRADOC_VERSION_PAIRS
export COBRADOC_VERSION_PAIRS="main:18.0,v17.0.2:17.0,v16.0.4:16.0,v15.0.4:15.0"
endif

generated-docs: mysqlctl-docs mysqlctld-docs vtaclcheck-docs vtbackup-docs vtbench-docs vtclient-docs vtcombo-docs vtctld-docs vtctldclient-docs vtgate-docs vtorc-docs vttablet-docs
generated-docs: mysqlctl-docs mysqlctld-docs vtaclcheck-docs vtbackup-docs vtbench-docs vtclient-docs vtcombo-docs vtctld-docs vtctldclient-docs vtgate-docs vtorc-docs vttablet-docs zk-docs zkctl-docs zkctld-docs

# Usage: VITESS_DIR=/full/path/to/vitess.io/vitess make mysqlctl-docs
mysqlctl-docs:
Expand Down Expand Up @@ -94,3 +94,15 @@ vtorc-docs:
# Usage: VITESS_DIR=/full/path/to/vitess.io/vitess make vttablet-docs
vttablet-docs:
go run ./tools/cobradocs/ --vitess-dir "${VITESS_DIR}" --version-pairs "${COBRADOC_VERSION_PAIRS}" vttablet

# Usage: VITESS_DIR=/full/path/to/vitess.io/vitess make zk-docs
zk-docs:
go run ./tools/cobradocs/ --vitess-dir "${VITESS_DIR}" --version-pairs "${COBRADOC_VERSION_PAIRS}" zk

# Usage: VITESS_DIR=/full/path/to/vitess.io/vitess make zkctl-docs
zkctl-docs:
go run ./tools/cobradocs/ --vitess-dir "${VITESS_DIR}" --version-pairs "${COBRADOC_VERSION_PAIRS}" zkctl

# Usage: VITESS_DIR=/full/path/to/vitess.io/vitess make zkctld-docs
zkctld-docs:
go run ./tools/cobradocs/ --vitess-dir "${VITESS_DIR}" --version-pairs "${COBRADOC_VERSION_PAIRS}" zkctld
50 changes: 50 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: zk
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk

zk is a tool for wrangling zookeeper.

### Synopsis

zk is a tool for wrangling zookeeper.

It tries to mimic unix file system commands wherever possible, but
there are some slight differences in flag handling.

The zk tool looks for the address of the cluster in /etc/zookeeper/zk_client.conf,
or the file specified in the ZK_CLIENT_CONFIG environment variable.

The local cell may be overridden with the ZK_CLIENT_LOCAL_CELL environment
variable.

### Options

```
-h, --help help for zk
--keep_logs duration keep logs for this long (using ctime) (zero to keep forever)
--keep_logs_by_mtime duration keep logs for this long (using mtime) (zero to keep forever)
--log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800)
--purge_logs_interval duration how often try to remove old logs (default 1h0m0s)
--security_policy string the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)
--server string server(s) to connect to
```

### SEE ALSO

* [zk addAuth](./zk_addauth/) -
* [zk cat](./zk_cat/) -
* [zk chmod](./zk_chmod/) -
* [zk cp](./zk_cp/) -
* [zk edit](./zk_edit/) - Create a local copy, edit, and write changes back to cell.
* [zk ls](./zk_ls/) -
* [zk rm](./zk_rm/) -
* [zk stat](./zk_stat/) -
* [zk touch](./zk_touch/) - Change node access time.
* [zk unzip](./zk_unzip/) -
* [zk wait](./zk_wait/) - Sets a watch on the node and then waits for an event to fire.
* [zk watch](./zk_watch/) - Watches for changes to nodes and prints events as they occur.
* [zk zip](./zk_zip/) - Store a zk tree in a zip archive.

23 changes: 23 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_addAuth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: addAuth
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk addAuth



```
zk addAuth <digest> <user:pass> [flags]
```

### Options

```
-h, --help help for addAuth
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

35 changes: 35 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_cat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: cat
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk cat



```
zk cat <path1> [<path2> ...] [flags]
```

### Examples

```
zk cat /zk/path
# List filename before file data
zk cat -l /zk/path1 /zk/path2
```

### Options

```
-p, --decodeProto decode proto files and display them as text
-f, --force no warning on nonexistent node
-h, --help help for cat
-l, --longListing long listing
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

30 changes: 30 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_chmod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: chmod
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk chmod



```
zk chmod <mode> <path> [flags]
```

### Examples

```
zk chmod n-mode /zk/path
zk chmod n+mode /zk/path
```

### Options

```
-h, --help help for chmod
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

33 changes: 33 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_cp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: cp
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk cp



```
zk cp <src> <dst> [flags]
```

### Examples

```
zk cp /zk/path .
zk cp ./config /zk/path/config
# Trailing slash indicates directory
zk cp ./config /zk/path/
```

### Options

```
-h, --help help for cp
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

24 changes: 24 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: edit
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk edit

Create a local copy, edit, and write changes back to cell.

```
zk edit <path> [flags]
```

### Options

```
-f, --force no warning on nonexistent node
-h, --help help for edit
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

40 changes: 40 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_ls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: ls
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk ls



```
zk ls <path> [flags]
```

### Examples

```
zk ls /zk
zk ls -l /zk
# List directory node itself)
zk ls -ld /zk
# Recursive (expensive)
zk ls -R /zk
```

### Options

```
-d, --directorylisting list directory instead of contents
-f, --force no warning on nonexistent node
-h, --help help for ls
-l, --longlisting long listing
-R, --recursivelisting recursive listing
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

37 changes: 37 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_rm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: rm
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk rm



```
zk rm <path> [flags]
```

### Examples

```
zk rm /zk/path
# Recursive.
zk rm -R /zk/path
# No error on nonexistent node.
zk rm -f /zk/path
```

### Options

```
-f, --force no warning on nonexistent node
-h, --help help for rm
-r, --recursivedelete recursive delete
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

24 changes: 24 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_stat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: stat
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk stat



```
zk stat <path> [flags]
```

### Options

```
-f, --force no warning on nonexistent node
-h, --help help for stat
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

44 changes: 44 additions & 0 deletions content/en/docs/18.0/reference/programs/zk/zk_touch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: touch
series: zk
commit: 0e61ba498e0344d37d6e1cae933ae14aa2804fcd
---
## zk touch

Change node access time.

### Synopsis

Change node access time.

NOTE: There is no mkdir - just touch a node.
The disntinction between file and directory is not relevant in zookeeper.

```
zk touch <path> [flags]
```

### Examples

```
zk touch /zk/path
# Don't create, just touch timestamp.
zk touch -c /zk/path
# Create all parts necessary (think mkdir -p).
zk touch -p /zk/path
```

### Options

```
-p, --createparent create parents
-h, --help help for touch
-c, --touchonly touch only - don't create
```

### SEE ALSO

* [zk](../) - zk is a tool for wrangling zookeeper.

Loading

0 comments on commit 99e03a0

Please sign in to comment.