feat(influxdb3): add install package command documentation

- Create shared CLI documentation for install package command
- Add Enterprise and Core frontmatter files referencing shared content
- Add --node-spec option to create trigger command for Enterprise
- Update code-placeholders to use new fenced code block syntax

Closes influxdata/DAR#6301
pull/6326/head
Jason Stirnaman 2025-09-11 16:18:12 -05:00
parent 1f62fde793
commit 55017154fb
8 changed files with 148 additions and 9 deletions

View File

@ -48,23 +48,35 @@ Descriptions should follow consistent patterns:
## Hugo shortcodes in Markdown
- `{{% code-placeholders "PLACEHOLDER1|PLACEHOLDER2" %}}`: Use this shortcode to define placeholders in code snippets.
- `{{% /code-placeholders %}}`: End the shortcode.
- `{{% code-placeholder-key %}}`: Use this shortcode to define a specific placeholder key.
- `{{% /code-placeholder-key %}}`: End the specific placeholder key shortcode.
**Syntax**:
- Use the `placeholders` code block attribute to define placeholder patterns:
```<language> { placeholders="<expr>" }
function sampleCode () {};
```
**Old (deprecated) syntax**:
- `{{% code-placeholders "PLACEHOLDER1|PLACEHOLDER2" %}}`
- `{{% /code-placeholders %}}`
**Define a placeholder key (typically following the example)**:
- `{{% code-placeholder-key %}}`: Use this shortcode to define a placeholder key
- `{{% /code-placeholder-key %}}`: Use this shortcode to close the key name
- Follow with a description
## Language-Specific Placeholder Formatting
- **Bash/Shell**: Use uppercase variables with no quotes or prefix
```bash
```bash { placeholders="DATABASE_NAME" }
--database DATABASE_NAME
```
- Python: Use string literals with quotes
```python
```python { placeholders="DATABASE_NAME" }
database_name='DATABASE_NAME'
```
- JSON: Use key-value pairs with quotes
```json
```json { placeholders="DATABASE_NAME" }
{
"database": "DATABASE_NAME"
}
@ -75,8 +87,7 @@ Descriptions should follow consistent patterns:
### InfluxDB CLI Commands
This pattern appears frequently in CLI documentation:
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
```bash
```bash { placeholders="DATABASE_NAME|AUTH_TOKEN" }
influxdb3 write \
--database DATABASE_NAME \
--token AUTH_TOKEN \

View File

@ -0,0 +1,15 @@
---
title: influxdb3 install
description: >
The `influxdb3 install` command and its subcommands manage package installations for the InfluxDB 3 processing engine.
menu:
influxdb3_core:
parent: influxdb3
name: influxdb3 install
weight: 300
source: /shared/influxdb3-cli/install/_index.md
---
<!--
//SOURCE - content/shared/influxdb3-cli/install/_index.md
-->

View File

@ -0,0 +1,19 @@
---
title: influxdb3 install package
description: >
The `influxdb3 install package` command installs Python packages for use in InfluxDB 3 processing engine plugins.
influxdb3/core/tags: [cli, processing engine, plugins]
menu:
influxdb3_core:
name: influxdb3 install package
parent: influxdb3 install
weight: 201
related:
- /influxdb3/core/process/
- /influxdb3/core/plugins/
source: /shared/influxdb3-cli/install/package.md
---
<!--
//SOURCE - content/shared/influxdb3-cli/install/package.md
-->

View File

@ -0,0 +1,15 @@
---
title: influxdb3 install
description: >
The `influxdb3 install` command and its subcommands manage package installations for the InfluxDB 3 processing engine.
menu:
influxdb3_enterprise:
parent: influxdb3
name: influxdb3 install
weight: 300
source: /shared/influxdb3-cli/install/_index.md
---
<!--
//SOURCE - content/shared/influxdb3-cli/install/_index.md
-->

View File

@ -0,0 +1,19 @@
---
title: influxdb3 install package
description: >
The `influxdb3 install package` command installs Python packages for use in InfluxDB 3 processing engine plugins.
influxdb3/enterprise/tags: [cli, processing engine, plugins]
menu:
influxdb3_enterprise:
name: influxdb3 install package
parent: influxdb3 install
weight: 201
related:
- /influxdb3/enterprise/process/
- /influxdb3/enterprise/plugins/
source: /shared/influxdb3-cli/install/package.md
---
<!--
//SOURCE - content/shared/influxdb3-cli/install/package.md
-->

View File

@ -32,6 +32,7 @@ influxdb3 create trigger [OPTIONS] \
| | `--disabled` | Create the trigger in disabled state |
| | `--error-behavior` | Error handling behavior: `log`, `retry`, or `disable` |
| | `--run-asynchronous` | Run the trigger asynchronously, allowing multiple triggers to run simultaneously (default is synchronous) |
{{% show-in "enterprise" %}}| | `--node-spec` | Which node(s) the trigger should be configured on. Two value formats are supported: `all` (default) - applies to all nodes, or `nodes:<node-id>[,<node-id>..]` - applies only to specified comma-separated list of nodes |{{% /show-in %}}
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |

View File

@ -0,0 +1,5 @@
The `influxdb3 install` command includes the following subcommands:
| Subcommand | Description |
|:----------|:------------|
| [`package`](/influxdb3/version/reference/cli/influxdb3/install/package/) | Install Python packages for processing engine plugins |

View File

@ -0,0 +1,54 @@
The `influxdb3 install package` command installs Python packages for use in [InfluxDB 3 processing engine plugins](/influxdb3/version/process/).
## Usage
```bash { placeholders="PACKAGE_NAME" }
influxdb3 install package --packages PACKAGE_NAME
```
Replace the following:
- {{% code-placeholder-key %}}`PACKAGE_NAME`{{% /code-placeholder-key %}}: the name of the Python package to install
## Options
| Option | Description | Default | Environment | Required |
|--------|-------------|---------|-------------|----------|
| `--packages` | Python package names to install (comma-separated) | | | |
| `-r`, `--requirements` | Path to requirements.txt file | | | |
| `-H`, `--host` | Host URL of the running {{< product-name >}} server | `http://127.0.0.1:8181` | `INFLUXDB3_HOST_URL` | |
| `--token` | The token for authentication with the InfluxDB 3 server | | `INFLUXDB3_AUTH_TOKEN` | |
| `--tls-ca` | Path to a custom TLS certificate authority for testing with self-signed certificates | | `INFLUXDB3_TLS_CA` | |
| `--plugin-dir` | Location of the plugins directory | | `INFLUXDB3_PLUGIN_DIR` | |
| `--virtual-env-location` | Location of the Python virtual environment | | `VIRTUAL_ENV` | |
| `--package-manager` | Package manager to use for installing packages | `discover` | | |
## Examples
### Install a single package
```bash { placeholders="pandas" }
influxdb3 install package --packages pandas
```
### Install multiple packages
```bash
influxdb3 install package --packages pandas,numpy,scipy
```
### Install packages from requirements file
```bash
influxdb3 install package -r requirements.txt
```
### Install with authentication
```bash { placeholders="AUTH_TOKEN|pandas" }
influxdb3 install package --token AUTH_TOKEN --packages pandas
```
Replace the following:
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "admin" %}} for your {{< product-name >}} instance