Skip to content

Commit

Permalink
Fixes and start of CLI updates
Browse files Browse the repository at this point in the history
Signed-off-by: Dj Walker-Morgan <[email protected]>
  • Loading branch information
djw-m committed Jan 22, 2025
1 parent 9d0973c commit d4be3f7
Show file tree
Hide file tree
Showing 31 changed files with 224 additions and 5,528 deletions.
7 changes: 7 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/assess/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: pgd assess
navTitle: Assess
---

The `pgd assess` commands are used to assess the suitability of a Postgres server instance for migration to the EDB Postgres Distributed cluster.

12 changes: 12 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/cluster/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: pgd cluster
navTitle: Cluster
---

The `pgd cluster` commands are used to manage the EDB Postgres Distributed cluster.

## Subcommands

- [show](show): Show cluster-level information.
- [verify](verify): Verify cluster-level information.

28 changes: 28 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/cluster/show.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: pgd cluster show
navTitle: Show
---

## Synopsis

The `pgd cluster show` command is used to display the cluster-level information in the EDB Postgres Distributed cluster.

## Syntax

```plaintext
pgd cluster show [OPTIONS]
```

## Options

The following table lists the options available for the `pgd events show` command:

| Short | Long | Description |
|-------------|---------------------|---------------------------------------------------------|
| | --clock-drift | Only show detailed clock drift information. |
| | --summary | Only show cluster summary information. |
| | --health | Only show cluster health information. |

Only one of the above options can be specified at a time.

## Examples
28 changes: 28 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/cluster/verify.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: pgd cluster verify
navTitle: Verify
---

## Synopsis

The `pgd cluster verify` command is used to verify the configuration of an EDB Postgres Distributed cluster.

## Syntax

```plaintext
pgd cluster show [OPTIONS]
```

## Options

The following table lists the options available for the `pgd events show` command:

| Short | Long | Description |
|-------|------------|------------------------------------------|
| | --settings | Verify Postgres settings in the cluster. |
| | --arch | Verify the cluster architecture |
| | --verbose | Display verbose output. |

With no option set, both setting and arch are verified by default and output is not verbose.

## Examples
7 changes: 7 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/completion/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: pgd completion
navTitle: Completion
---

The `pgd completion` commands are used to manage the completion settings for the EDB Postgres Distributed CLI.

11 changes: 11 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/events/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: pgd events
navTitle: Events
---

The `pgd events` commands are used to display the events in the EDB Postgres Distributed cluster.

## Subcommands

- [show](show): Show events.

26 changes: 26 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/events/show.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: pgd events show
navTitle: show
---

## Synopsis

The `pgd events show` command is used to display the events in the EDB Postgres Distributed cluster. With no additional flags, the command displays the 20 most recent events for all nodes and groups.

## Syntax

```plaintext
pgd events show [OPTIONS]
```

## Options

The following table lists the options available for the `pgd events show` command:

| Short | Long | Description |
|-------------|---------------------|---------------------------------------------------------|
| | --node _nodename_ | Only show events for the node with the specified name. |
| | --group _groupname_ | Only show events for the group with the specified name. |
| -n _number_ | --number _number_ | Show the specified number of events. Defaults to 20. |

## Examples
14 changes: 14 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/group/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: pgd group
navTitle: Group
---

The `pgd group` commands are used to manage the groups in the EDB Postgres Distributed cluster.

## Subcommands

- [show](pgd_group_show): Show group-level information.
- [set-option](pgd_group_set-option): Set group-level options.
- [get-option](pgd_group_get-option): Get group-level options.
- [set-leader](pgd_group_set-leader): Set the leader of a group (perform a switchover).

11 changes: 11 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/groups/groups.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: pgd groups
navTitle: Groups
---

The `pgd groups` commands are used to display the groups in the EDB Postgres Distributed cluster.

## Subcommands

- [list](pgd_groups_list): List groups.

83 changes: 55 additions & 28 deletions product_docs/docs/pgd/5/cli/command_ref/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,62 @@ manage your EDB Postgres Distributed cluster. It allows you to run commands
against EDB Postgres Distributed clusters. You can use it to inspect and manage
cluster resources.

## Commands

- [cluster](cluster): Cluster-level commands for managing the cluster.
- [show](cluster/show): Show cluster-level information.
- [verify](cluster/verify): Verify cluster-level information.
- [group](group): Group-level commands for managing groups.
- [show](group/show): Show group-level information.

Check failure on line 22 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: group/show (/pgd/5/cli/command_ref/group/show)
- [set-option](group/set-option): Set group-level options.

Check failure on line 23 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: group/set-option (/pgd/5/cli/command_ref/group/set-option)
- [get-option](group/get-option): Get group-level options.

Check failure on line 24 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: group/get-option (/pgd/5/cli/command_ref/group/get-option)
- [set-leader](group/set-leader): Set the leader of a group (perform a switchover).

Check failure on line 25 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: group/set-leader (/pgd/5/cli/command_ref/group/set-leader)
- [groups](groups): Group related commands for listing groups.

Check failure on line 26 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: groups (/pgd/5/cli/command_ref/groups)
- [list](groups/list): List groups.

Check failure on line 27 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: groups/list (/pgd/5/cli/command_ref/groups/list)
- [node](node): Node-level commands for managing nodes.
- [show](node/show): Show node-level information.

Check failure on line 29 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: node/show (/pgd/5/cli/command_ref/node/show)
- [set-option](node/set-option): Set node-level options.

Check failure on line 30 in product_docs/docs/pgd/5/cli/command_ref/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: node/set-option (/pgd/5/cli/command_ref/node/set-option)
- [get-option](node/get-option): Get node-level options.
- [upgrade-postgres](node/upgrade-postgres): Performa major version upgrade of a PGD Postgres node.
- [nodes](nodes): Node related commands for listing nodes.
- [list](nodes/list): List nodes.
- [events](events): Event log commands for viewing events.
- [show](events/show): Show events.
- [replication](replication): Replication related-commands for managing replication.
- [show](replication/show): Show replication information.
- [raft](raft): Raft related commands for managing Raft consensus.
- [show](raft/show): Show information about Raft state.
- [commit-scope](commit-scope): Commit scope related commands for managing PGD commit scopes.
- [show](commit-scope/show): Show information about a commit-scope.
- [create](commit-scope/create): Create a commit-scope.
- [update](commit-scope/update): Update a commit-scope.
- [drop](commit-scope/drop): Drop a commit-scope.
- [assess](pgd_assess): Assesses a Postgres server's PGD compatibility.
- [completion](pgd_completion): Generate shell completion scripts.




## Global Options

All commands accept the following global options:

| Short | Long&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description |
|-------|---------------|-----------------------------------------------------------------------------------------------|
| | --dsn | Database connection string<br/>For example "host=bdr-a1 port=5432 dbname=bdrdb user=postgres" |
| -f | --config-file | Name/Path to config file.<br/>This is ignored if --dsn flag is present<br/>Default "/etc/edb/pgd-cli/pgd-cli-config.yml" |
| -h | --help | Help for pgd - will show specific help for any command used |
| -L | --log-level | Logging level: debug, info, warn, error (default "error") |
| -o | --output | Output format: json, yaml |

## See also

- [check-health](pgd_check-health)
- [create-proxy](pgd_create-proxy)
- [delete-proxy](pgd_delete-proxy)
- [set-group-options](pgd_set-group-options)
- [set-node-options](pgd_set-node-options)
- [set-proxy-options](pgd_set-proxy-options)
- [show-clockskew](pgd_show-clockskew)
- [show-events](pgd_show-events)
- [show-groups](pgd_show-groups)
- [show-nodes](pgd_show-nodes)
- [show-proxies](pgd_show-proxies)
- [show-raft](pgd_show-raft)
- [show-replslots](pgd_show-replslots)
- [show-subscriptions](pgd_show-subscriptions)
- [show-version](pgd_show-version)
- [switchover](pgd_switchover)
- [verify-cluster](pgd_verify-cluster)
- [verify-settings](pgd_verify-settings)
| Short | Long&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description |
|-------|------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| -f | --config-file | Name/Path to config file.<br/>This is ignored if --dsn flag is present<br/>Default "/etc/edb/pgd-cli/pgd-cli-config.yml" |
| | --dsn | Database connection string<br/>For example "host=bdr-a1 port=5432 dbname=bdrdb user=postgres" |
| -h | --help | Help for pgd - will show specific help for any command used |
| -o | --output | Output format: `json`, `ascii`, `psql`, `modern`, `markdown-table`, `default` (see [Output formats](#output-formats)) |
| | --prefer-tabular-output | Prefer tabular output over non-tabular output, even for commands which normally use a report format. Default is false. |

## Output formats

| Format | Description |
|----------------|---------------------------------------------------------------------|
| json | JSON format - Output as a JSON document, non-tabular |
| ascii | ASCII format - Output as an ASCII table with boxes |
| psql | PSQL format - Output as an ASCII table in the style of PSQL |
| modern | Modern format - Output as a table using box characters |
| markdown-table | Markdown table format - Output as a markdown compatible ASCII table |
| default | Default format - Output as ASCII table with no boxes |

14 changes: 14 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/node/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: pgd node
navTitle: Node
---

The `pgd node` commands are used to manage the nodes in the EDB Postgres Distributed cluster.

## Subcommands

- [show](pgd_node_show): Show node-level information.
- [set-option](pgd_node_set-option): Set node-level options.
- [get-option](pgd_node_get-option): Get node-level options.
- [upgrade-postgres](pgd_node_upgrade-postgres): Perform a major version upgrade of a PGD Postgres node.

11 changes: 11 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/nodes/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: pgd nodes
navTitle: Nodes
---

The `pgd nodes` commands are used to display the nodes in the EDB Postgres Distributed cluster.

## Subcommands

- [list](pgd_nodes_list): List nodes.

73 changes: 0 additions & 73 deletions product_docs/docs/pgd/5/cli/command_ref/pgd_check-health.mdx

This file was deleted.

Loading

0 comments on commit d4be3f7

Please sign in to comment.