Skip to content

Commit

Permalink
docs: Update management pages (#118)
Browse files Browse the repository at this point in the history
* Add cache subcommand documentation

* Add completions subcommand docs

* Update gen-docs xtask

* Update command pages

* Update stacklet xref

* Add conditions hint

* Update Cockpit start page

* Generate usage docs into antora partial

* Re-add correct long help texts

The command requires a call to the `build` function. See
clap-rs/clap#4685
  • Loading branch information
Techassi committed Oct 5, 2023
1 parent 205340e commit d43072f
Show file tree
Hide file tree
Showing 25 changed files with 786 additions and 603 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ repos:
entry: cargo xtask gen-ctl-readme
stages: [commit, merge-commit, manual]
pass_filenames: false
- id: gen-docs
name: gen-docs
language: system
entry: cargo xtask gen-docs
stages: [commit, merge-commit, manual]
pass_filenames: false
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions docs/modules/cockpit/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
= Stackable Cockpit

This is a visual dashboard to monitor and control Stackable Data Platform clusters.
IMPORTANT: The Stackable Cockpit is currently an early preview, and is not yet a fully supported component of the
Stackable Data Platform.

IMPORTANT: The Stackable Cockpit is currently an early preview, and is not yet a
fully supported component of the Stackable Data Platform.
The `Cockpit` application is a browser-based management tool which interacts with the Stackable data platform. Currently
it can display deployed stacklets and their status. The display can be compared with the
xref:management:stackablectl:commands/stacklet.adoc#list-stacklets[`stackablectl stacklet list`] command output.

The installation is described in the xref:installation.adoc[installation guide].
2 changes: 1 addition & 1 deletion docs/modules/stackablectl/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*** xref:commands/operator.adoc[operator]
*** xref:commands/release.adoc[release]
*** xref:commands/stack.adoc[stack]
*** xref:commands/stacklets.adoc[stacklets]
*** xref:commands/stacklet.adoc[stacklets]
** xref:customization/index.adoc[]
*** xref:customization/add-demo.adoc[]
*** xref:customization/add-stack.adoc[]
Expand Down
101 changes: 25 additions & 76 deletions docs/modules/stackablectl/pages/commands/cache.adoc
Original file line number Diff line number Diff line change
@@ -1,85 +1,34 @@
= stackablectl cache

// Autogenerated by cargo xtask gen-docs. DO NOT CHANGE MANUALLY!
[source,console]
----
$ stackablectl cache
Interact with locally cached files
Usage: cache [OPTIONS] <COMMAND>
Commands:
list List cached files
clean Clean cached files
help Print this message or the help of the given subcommand(s)
Options:
-l, --log-level <LOG_LEVEL>
Log level this application uses
--no-cache
Do not cache the remote (default) demo, stack and release files
Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually
'$HOME/.cache/stackablectl' when not explicitly set.
--offline
Do not request any remote files via the network
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
File options:
-d, --demo-file <DEMO_FILE>
Provide one or more additional (custom) demo file(s)
The `cache` command let's you interact with locally cached files. The `stackablectl` tool retrieves release, demo, and
stack definitions from a dedicated GitHub repository. It additionally retrieves Helm / YAML manifests from various other
sources. These files are downloaded once and then cached for one hour. In this time period, the files are not downloaded
again, but instead the locally cached (stored on disk) files are used. Users can opt out of caching by providing the
`--no-cache` flag.

Demos are loaded in the following order: Remote (default) demo file, custom
demo files provided via the 'STACKABLE_DEMO_FILES' environment variable, and
lastly demo files provided via the '-d/--demo-file' argument(s). If there are
demos with the same name, the last demo definition will be used.
== General Usage

Use "stackablectl [OPTIONS] <COMMAND> -d path/to/demos1.yaml -d path/to/demos2.yaml"
to provide multiple additional demo files.
include::management:stackablectl:partial$commands/cache.adoc[]

-s, --stack-file <STACK_FILE>
Provide one or more additional (custom) stack file(s)
== Listing Cached Files

Stacks are loaded in the following order: Remote (default) stack file, custom
stack files provided via the 'STACKABLE_STACK_FILES' environment variable, and
lastly demo files provided via the '-s/--stack-file' argument(s). If there are
stacks with the same name, the last stack definition will be used.
To list currently cached files, use `stackablectl cache list`:

Use "stackablectl [OPTIONS] <COMMAND> -s path/to/stacks1.yaml -s path/to/stacks2.yaml"
to provide multiple additional stack files.
-r, --release-file <RELEASE_FILE>
Provide one or more additional (custom) release file(s)
Releases are loaded in the following order: Remote (default) release file,
custom release files provided via the 'STACKABLE_RELEASE_FILES' environment
variable, and lastly release files provided via the '-r/--release-file'
argument(s). If there are releases with the same name, the last release
definition will be used.
Use "stackablectl [OPTIONS] <COMMAND> -r path/to/releases1.yaml -r path/to/releases2.yaml"
to provide multiple additional release files.
Helm repository options:
--helm-repo-stable <URL>
Provide a custom Helm stable repository URL
[default: https://repo.stackable.tech/repository/helm-stable/]
--helm-repo-test <URL>
Provide a custom Helm test repository URL
[default: https://repo.stackable.tech/repository/helm-test/]
[source,console]
----
$ stackablectl cache list
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────┐
│ FILE ┆ LAST SYNC │
╞════════════════════════════════════════════════════════════════════════════════════════════════════════════════╪════════════════╡
│ $HOME/.cache/stackablectl/https---raw-githubusercontent-com-stackabletech-stackablectl-main-stacks-stacks-v2-y ┆ 3 seconds ago │
│ aml-17447ade21bb02fe827b33ef32404e7cb3866ee169837dead6dfdcd7f7241e07 ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ $HOME/.cache/stackablectl/https---raw-githubusercontent-com-stackabletech-stackablectl-main-demos-demos-v2-yam ┆ 22 seconds ago │
│ l-a140c16c241efa6dbee780d48843a1975bd1069ee8dd8f936123ffb8ee700739 ┆ │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────┘
----

--helm-repo-dev <URL>
Provide a custom Helm dev repository URL
== Cleaning Cached Files

[default: https://repo.stackable.tech/repository/helm-dev/]
----
To clean currently cached files, use `stackablectl cache clean`. This will remove **all** cached files, regardless if
the files are expired. To only delete outdated files, add the `--outdated` flag.
86 changes: 3 additions & 83 deletions docs/modules/stackablectl/pages/commands/completions.adoc
Original file line number Diff line number Diff line change
@@ -1,86 +1,6 @@
= stackablectl completions

// Autogenerated by cargo xtask gen-docs. DO NOT CHANGE MANUALLY!
[source,console]
----
$ stackablectl completions
Generate shell completions for this tool
The `completions` command allows you to generate shell completions on-the-fly. Usually this is not needed, as we provide
pre-generated files for that. A guide on how to install these files can be found xref:installation.adoc#shell-comps[here].

Usage: completions [OPTIONS] <COMMAND>
Commands:
bash Generate shell completions for Bash
fish Generate shell completions for Fish
zsh Generate shell completions for ZSH
help Print this message or the help of the given subcommand(s)
Options:
-l, --log-level <LOG_LEVEL>
Log level this application uses
--no-cache
Do not cache the remote (default) demo, stack and release files
Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually
'$HOME/.cache/stackablectl' when not explicitly set.
--offline
Do not request any remote files via the network
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
File options:
-d, --demo-file <DEMO_FILE>
Provide one or more additional (custom) demo file(s)
Demos are loaded in the following order: Remote (default) demo file, custom
demo files provided via the 'STACKABLE_DEMO_FILES' environment variable, and
lastly demo files provided via the '-d/--demo-file' argument(s). If there are
demos with the same name, the last demo definition will be used.
Use "stackablectl [OPTIONS] <COMMAND> -d path/to/demos1.yaml -d path/to/demos2.yaml"
to provide multiple additional demo files.
-s, --stack-file <STACK_FILE>
Provide one or more additional (custom) stack file(s)
Stacks are loaded in the following order: Remote (default) stack file, custom
stack files provided via the 'STACKABLE_STACK_FILES' environment variable, and
lastly demo files provided via the '-s/--stack-file' argument(s). If there are
stacks with the same name, the last stack definition will be used.
Use "stackablectl [OPTIONS] <COMMAND> -s path/to/stacks1.yaml -s path/to/stacks2.yaml"
to provide multiple additional stack files.
-r, --release-file <RELEASE_FILE>
Provide one or more additional (custom) release file(s)
Releases are loaded in the following order: Remote (default) release file,
custom release files provided via the 'STACKABLE_RELEASE_FILES' environment
variable, and lastly release files provided via the '-r/--release-file'
argument(s). If there are releases with the same name, the last release
definition will be used.
Use "stackablectl [OPTIONS] <COMMAND> -r path/to/releases1.yaml -r path/to/releases2.yaml"
to provide multiple additional release files.
Helm repository options:
--helm-repo-stable <URL>
Provide a custom Helm stable repository URL
[default: https://repo.stackable.tech/repository/helm-stable/]
--helm-repo-test <URL>
Provide a custom Helm test repository URL
[default: https://repo.stackable.tech/repository/helm-test/]
--helm-repo-dev <URL>
Provide a custom Helm dev repository URL
[default: https://repo.stackable.tech/repository/helm-dev/]
----
include::management:stackablectl:partial$commands/completions.adoc[]
87 changes: 2 additions & 85 deletions docs/modules/stackablectl/pages/commands/demo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,90 +6,7 @@ Stackable data platform, which will provide the required products for the demo.

== General Usage

// Autogenerated by cargo xtask gen-docs. DO NOT CHANGE MANUALLY!
[source,console]
----
$ stackablectl demo
Interact with demos, which are end-to-end usage demonstrations of the Stackable data platform
Usage: demo [OPTIONS] <COMMAND>
Commands:
list List available demos
describe Print out detailed demo information
install Install a specific demo
help Print this message or the help of the given subcommand(s)
Options:
-l, --log-level <LOG_LEVEL>
Log level this application uses
--no-cache
Do not cache the remote (default) demo, stack and release files
Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually
'$HOME/.cache/stackablectl' when not explicitly set.
--offline
Do not request any remote files via the network
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
File options:
-d, --demo-file <DEMO_FILE>
Provide one or more additional (custom) demo file(s)
Demos are loaded in the following order: Remote (default) demo file, custom
demo files provided via the 'STACKABLE_DEMO_FILES' environment variable, and
lastly demo files provided via the '-d/--demo-file' argument(s). If there are
demos with the same name, the last demo definition will be used.
Use "stackablectl [OPTIONS] <COMMAND> -d path/to/demos1.yaml -d path/to/demos2.yaml"
to provide multiple additional demo files.
-s, --stack-file <STACK_FILE>
Provide one or more additional (custom) stack file(s)
Stacks are loaded in the following order: Remote (default) stack file, custom
stack files provided via the 'STACKABLE_STACK_FILES' environment variable, and
lastly demo files provided via the '-s/--stack-file' argument(s). If there are
stacks with the same name, the last stack definition will be used.
Use "stackablectl [OPTIONS] <COMMAND> -s path/to/stacks1.yaml -s path/to/stacks2.yaml"
to provide multiple additional stack files.
-r, --release-file <RELEASE_FILE>
Provide one or more additional (custom) release file(s)
Releases are loaded in the following order: Remote (default) release file,
custom release files provided via the 'STACKABLE_RELEASE_FILES' environment
variable, and lastly release files provided via the '-r/--release-file'
argument(s). If there are releases with the same name, the last release
definition will be used.
Use "stackablectl [OPTIONS] <COMMAND> -r path/to/releases1.yaml -r path/to/releases2.yaml"
to provide multiple additional release files.
Helm repository options:
--helm-repo-stable <URL>
Provide a custom Helm stable repository URL
[default: https://repo.stackable.tech/repository/helm-stable/]
--helm-repo-test <URL>
Provide a custom Helm test repository URL
[default: https://repo.stackable.tech/repository/helm-test/]
--helm-repo-dev <URL>
Provide a custom Helm dev repository URL
[default: https://repo.stackable.tech/repository/helm-dev/]
----
include::management:stackablectl:partial$commands/demo.adoc[]

== Browse Available Demos

Expand Down Expand Up @@ -228,7 +145,7 @@ everything should settle down.

=== Listing Deployed Stacklets

After installing your demo you can use the xref:commands/stacklets.adoc[`stackablectl stacklets`] command to list the
After installing your demo you can use the xref:commands/stacklet.adoc[`stackablectl stacklets`] command to list the
installed stacklets as follows:

[source,console]
Expand Down

0 comments on commit d43072f

Please sign in to comment.