From 7ddfa27c1488cf279ff295df8c7a8e28e152d570 Mon Sep 17 00:00:00 2001 From: noramullen1 <42354779+noramullen1@users.noreply.github.com> Date: Thu, 6 Feb 2020 13:58:34 -0800 Subject: [PATCH 01/13] WIP release notes --- content/v2.0/reference/release-notes/influxdb.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index 848648753..121884b85 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -7,6 +7,11 @@ menu: parent: Release notes weight: 101 --- +## v3.0.0-beta.2 [2020-02-06] + +### Bug Fixes + +- Fix notification rule renaming panics from UI. ## v2.0.0-beta.2 [2020-01-24] From dd479a7070d9d49c3fdd2a0f6cb4d3cbfb7e6298 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 6 Feb 2020 15:14:35 -0700 Subject: [PATCH 02/13] updated getting started page for beta-3 --- content/v2.0/get-started.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/v2.0/get-started.md b/content/v2.0/get-started.md index b47eb16d3..4a16c0eeb 100644 --- a/content/v2.0/get-started.md +++ b/content/v2.0/get-started.md @@ -28,7 +28,7 @@ This article describes how to get started with InfluxDB OSS. To get started with ### Download and install InfluxDB v2.0 beta Download InfluxDB v2.0 beta for macOS. -InfluxDB v2.0 beta (macOS) +InfluxDB v2.0 beta (macOS) ### Unpackage the InfluxDB binaries To unpackage the downloaded archive, **double click the archive file in Finder** @@ -37,7 +37,7 @@ or run the following command in a macOS command prompt application such ```sh # Unpackage contents to the current working directory -tar zxvf ~/Downloads/influxdb_2.0.0-beta.2_darwin_amd64.tar.gz +tar zxvf ~/Downloads/influxdb_2.0.0-beta.3_darwin_amd64.tar.gz ``` #### (Optional) Place the binaries in your $PATH @@ -46,7 +46,7 @@ prefix the executables with `./` to run then in place. ```sh # (Optional) Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.2_darwin_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.3_darwin_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -106,8 +106,8 @@ influxd --reporting-disabled ### Download and install InfluxDB v2.0 beta Download the InfluxDB v2.0 beta package appropriate for your chipset. -InfluxDB v2.0 beta (amd64) -InfluxDB v2.0 beta (arm) +InfluxDB v2.0 beta (amd64) +InfluxDB v2.0 beta (arm) ### Place the executables in your $PATH Unpackage the downloaded archive and place the `influx` and `influxd` executables in your system `$PATH`. @@ -116,10 +116,10 @@ _**Note:** The following commands are examples. Adjust the file names, paths, an ```sh # Unpackage contents to the current working directory -tar xvzf path/to/influxdb_2.0.0-beta.2_linux_amd64.tar.gz +tar xvzf path/to/influxdb_2.0.0-beta.3_linux_amd64.tar.gz # Copy the influx and influxd binary to your $PATH -sudo cp influxdb_2.0.0-beta.2_linux_amd64/{influx,influxd} /usr/local/bin/ +sudo cp influxdb_2.0.0-beta.3_linux_amd64/{influx,influxd} /usr/local/bin/ ``` {{% note %}} @@ -170,7 +170,7 @@ the [InfluxDB HTTP API](/v2.0/reference/api/). ```sh docker run --name influxdb -p 9999:9999 quay.io/influxdb/influxdb:2.0.0-beta ``` -_To run InfluxDB in [detached mode](https://docs.docker.com/engine/reference/run/#detached-vs-foreground), include the `-d` flag in the `docker run` command._ +_To run InfluxDB in [detached mode](https://docs.docker.com/engine/reference/run/#detached-vs-foreground), include the `-d` flag in the `docker run` command._ {{% note %}} #### InfluxDB "phone home" From 690185b911c2cd5ef89e5c703af47d5b6085e77a Mon Sep 17 00:00:00 2001 From: noramullen1 <42354779+noramullen1@users.noreply.github.com> Date: Thu, 6 Feb 2020 14:16:39 -0800 Subject: [PATCH 03/13] Add info about grouping in query builder --- content/v2.0/visualize-data/explore-metrics.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/content/v2.0/visualize-data/explore-metrics.md b/content/v2.0/visualize-data/explore-metrics.md index deb754251..663a3af1e 100644 --- a/content/v2.0/visualize-data/explore-metrics.md +++ b/content/v2.0/visualize-data/explore-metrics.md @@ -30,13 +30,17 @@ See [Get started with Flux](/v2.0/query-data/get-started) to learn more about Fl {{< nav-icon "data-explorer" >}} -2. Use the Flux builder in the bottom panel to select a bucket and filters such as measurement, field or tag. - Alternatively, click **Script Editor** to manually edit the query. +2. Use the Flux builder in the bottom panel to create a Flux query: + - Select a bucket to define your data source. + - Edit your time range with the [time range option](/select-time-range/) in the dropdown menu. + - Add filters to narrow your data by selecting attributes or columns in the dropdown menu. + - Select **Group** from the **Filter** dropdown menu to group data into tables. For more about how grouping data in Flux works, see [Group data](/v2.0/query-data/guides/group-data/). +3. Alternatively, click **Script Editor** to manually edit the query. To switch back to the query builder, click **Query Builder**. Note that your updates from the Script Editor will not be saved. -3. Use the **Functions** list to review the available Flux functions. +4. Use the **Functions** list to review the available Flux functions. Click on a function from the list to add it to your query. -4. Click **Submit** (or press `Control+Enter`) to run your query. You can then preview your graph in the above pane. -5. To work on multiple queries at once, click the {{< icon "plus" >}} to add another tab. +5. Click **Submit** (or press `Control+Enter`) to run your query. You can then preview your graph in the above pane. +6. To work on multiple queries at once, click the {{< icon "plus" >}} to add another tab. * Click the eye icon on a tab to hide or show a query's visualization. * Click on the name of the query in the tab to rename it. From a167499313fb18792aa43c688be8d479ce0e5bfb Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Thu, 6 Feb 2020 15:28:04 -0700 Subject: [PATCH 04/13] updated swagger for beta-3, resolves #741 --- api-docs/v2.0/swagger.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api-docs/v2.0/swagger.yml b/api-docs/v2.0/swagger.yml index a0c2dfaa2..58a78563b 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -3322,6 +3322,12 @@ paths: application/json: schema: $ref: "#/components/schemas/Bucket" + 422: + description: Request body failed validation + content: + application/json: + schema: + $ref: "#/components/schemas/Error" default: description: Unexpected error content: @@ -7284,6 +7290,10 @@ components: type: string labelID: type: string + missingEnvRefs: + type: array + items: + type: string missingSecrets: type: array items: From ebce940e829f44b35cbc9964191bffc15a537221 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 7 Feb 2020 09:16:20 -0700 Subject: [PATCH 05/13] more swagger updates for beta-3 --- api-docs/v2.0/swagger.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/api-docs/v2.0/swagger.yml b/api-docs/v2.0/swagger.yml index 58a78563b..08f622a08 100644 --- a/api-docs/v2.0/swagger.yml +++ b/api-docs/v2.0/swagger.yml @@ -7145,18 +7145,24 @@ components: type: string package: $ref: "#/components/schemas/Pkg" + packages: + type: array + items: + $ref: "#/components/schemas/Pkg" secrets: type: object additionalProperties: type: string - remote: - type: object - properties: - url: - type: string - contentType: - type: string - required: ["url"] + remotes: + type: array + items: + type: object + properties: + url: + type: string + contentType: + type: string + required: ["url"] PkgCreate: type: object properties: From 0aa3ad58f0e765df6d81664d6f256dbddc814b83 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 7 Feb 2020 11:34:15 -0700 Subject: [PATCH 06/13] updates to pkg commands for beta-3, resolves #745, resolves #744 --- .../v2.0/reference/cli/influx/pkg/_index.md | 27 +++++++++------- .../reference/cli/influx/pkg/export/_index.md | 3 -- .../reference/cli/influx/pkg/export/all.md | 3 -- content/v2.0/reference/cli/influx/pkg/new.md | 31 ------------------- .../v2.0/reference/cli/influx/pkg/summary.md | 16 ++++++---- .../v2.0/reference/cli/influx/pkg/validate.md | 11 ++++--- 6 files changed, 32 insertions(+), 59 deletions(-) delete mode 100644 content/v2.0/reference/cli/influx/pkg/new.md diff --git a/content/v2.0/reference/cli/influx/pkg/_index.md b/content/v2.0/reference/cli/influx/pkg/_index.md index dcbef77f5..1fbc7b874 100644 --- a/content/v2.0/reference/cli/influx/pkg/_index.md +++ b/content/v2.0/reference/cli/influx/pkg/_index.md @@ -21,22 +21,25 @@ influx pkg [command] | Command | Description | |:------- |:----------- | | [export](/v2.0/reference/cli/influx/pkg/export/) | Export existing resources as a package | -| [new](/v2.0/reference/cli/influx/pkg/new/) | Create a reusable pkg to create resources in a declarative manner | | [summary](/v2.0/reference/cli/influx/pkg/summary/) | Summarize the provided package | | [validate](/v2.0/reference/cli/influx/pkg/validate/) | Validate the provided package | ## Flags -| Flag | Description | Input Type | -|:---- |:----------------------------- |:---------- | -| `-c`, `--disable-color` | Disable color in output | | -| `-f`, `--file` | Path to package file | string | -| `--force` | Ignore warnings about destructive changes | | -| `-h`, `--help` | Help for the `pkg` command | | -| `-o`, `--org` | The name of the organization that owns the bucket | string | -| `--org-id` | The ID of the organization that owns the bucket | string | -| `-q`, `--quiet` | Disable output printing | | -| `--secret` | Secrets to provide alongside the package (format: `--secret=SECRET_KEY=SECRET_VALUE`) | string | -| `--disable-table-borders` | Disable table borders | | +| Flag | Description | Input Type | +|:---- |:----------------------------- |:---------- | +| `-c`, `--disable-color` | Disable color in output | | +| `--disable-table-borders` | Disable table borders | | +| `-e`, `--encoding` | Encoding of the input stream | string | +| `--env-ref` | Environment references to provide alongside the package (format: `--env-ref=REF_KEY=REF_VALUE`) | string | +| `-f`, `--file` | Path to package file | string | +| `--force` | Ignore warnings about destructive changes | | +| `-h`, `--help` | Help for the `pkg` command | | +| `-o`, `--org` | The name of the organization that owns the bucket | string | +| `--org-id` | The ID of the organization that owns the bucket | string | +| `-q`, `--quiet` | Disable output printing | | +| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | +| `--secret` | Secrets to provide alongside the package (format: `--secret=SECRET_KEY=SECRET_VALUE`) | string | +| `-u`, `--url` | URL of a package file file | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/export/_index.md b/content/v2.0/reference/cli/influx/pkg/export/_index.md index cfe7c15b7..d4b9e5d04 100644 --- a/content/v2.0/reference/cli/influx/pkg/export/_index.md +++ b/content/v2.0/reference/cli/influx/pkg/export/_index.md @@ -27,17 +27,14 @@ influx pkg export [command] | `--buckets` | Comma-separated list of bucket IDs | string | | `--checks` | Comma-separated list of check IDs | string | | `--dashboards` | Comma-separated list of dashboard IDs | string | -| `-d`, `--description` | Package description | string | | `--endpoints` | Comma-separated list of notification endpoint IDs | string | | `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | | `-h`, `--help` | Help for the `export` command | | | `--labels` | Comma-separated list of label IDs | string | -| `-n`, `--name` | Package name | string | | `--resource-type` | Resource type associated with all IDs via stdin | string | | `--rules` | Comma-separated list of notification rule IDs | string | | `--tasks` | Comma-separated list of task IDs | string | | `--telegraf-configs` | Comma-separated list of Telegraf configuration IDs | string | | `--variables` | Comma-separated list of variable IDs | string | -| `-v`, `--version` | Package version | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/export/all.md b/content/v2.0/reference/cli/influx/pkg/export/all.md index b31f2f596..8e6bc35a1 100644 --- a/content/v2.0/reference/cli/influx/pkg/export/all.md +++ b/content/v2.0/reference/cli/influx/pkg/export/all.md @@ -20,12 +20,9 @@ influx pkg export all [flags] | Flag | Description | Input Type | |:---- |:----------- |:---------- | -| `-d`, `--description` | Package description | string | | `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | | `-h`, `--help` | Help for the `export` command | | -| `-n`, `--name` | Package name | string | | `-o`, `--org` | The name of the organization that owns the resources | string | | `--org-id` | The ID of the organization that owns the resources | string | -| `-v`, `--version` | Package version | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/new.md b/content/v2.0/reference/cli/influx/pkg/new.md deleted file mode 100644 index ec24af999..000000000 --- a/content/v2.0/reference/cli/influx/pkg/new.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: influx pkg new -description: > - The 'influx pkg new' command creates a reusable package that create resources - in a declarative manner. -menu: - v2_0_ref: - parent: influx pkg -weight: 101 ---- - -The `influx pkg new` command creates a reusable package that create resources in -a declarative manner. - -## Usage -``` -influx pkg new [flags] -``` - -## Flags - -| Flag | Description | Input Type | -|:----------------------|:--------------------------------------------------------------------------------|-----------------| -| `-d`, `--description` | Package description | string | -| `-f`, `--file` | Package output file. Defaults to stdout. Use `.yml` or `.json` file extensions. | string | -| `-h`, `--help` | Help for the `new` command | | -| `-n`, `--name` | Package name | string | -| `-q`, `--quiet` | Skip interactive mode | | -| `-v`, `--version` | Package version | string | - -{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/summary.md b/content/v2.0/reference/cli/influx/pkg/summary.md index d06d32d7e..f6322c369 100644 --- a/content/v2.0/reference/cli/influx/pkg/summary.md +++ b/content/v2.0/reference/cli/influx/pkg/summary.md @@ -17,11 +17,15 @@ influx pkg summary [flags] ## Flags -| Flag | Description | Input Type | -|:---- |:----------- |:---------- | -| `-c`, `--color` | Enable color in output _(default is true) _ | | -| `-f`, `--file` | Package file to summarize | string | -| `-h`, `--help` | Help for the `summary` command | | -| `--table-borders` | Enable table borders _(default is true)_ | | +| Flag | Description | Input Type | +|:---- |:----------- |:---------- | +| `-c`, `--disable-color` | Disable color in output | | +| `--disable-table-borders` | Disable table borders | | +| `-e`, `--encoding` | Encoding of the input stream | string | +| `-f`, `--file` | Package file to summarize | string | +| `-h`, `--help` | Help for the `summary` command | | +| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | +| `-u`, `--url` | URL of a package file file | string | + {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/validate.md b/content/v2.0/reference/cli/influx/pkg/validate.md index b6ef70a59..9f8a6f77e 100644 --- a/content/v2.0/reference/cli/influx/pkg/validate.md +++ b/content/v2.0/reference/cli/influx/pkg/validate.md @@ -17,9 +17,12 @@ influx pkg validate [flags] ## Flags -| Flag | Description | Input Type | -|:---- |:----------- |:---------- | -| `-f`, `--file` | Package file to validate | string | -| `-h`, `--help` | Help for the `validate` command | | +| Flag | Description | Input Type | +|:---- |:----------- |:---------- | +| `-e`, `--encoding` | Encoding of the input stream | string | +| `-f`, `--file` | Package file to validate | string | +| `-h`, `--help` | Help for the `validate` command | | +| `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | +| `-u`, `--url` | URL of a package file file | string | {{% influx-cli-global-flags %}} From 31c888a8ebc8b139d559872f18a12b4ab641c889 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 7 Feb 2020 13:37:40 -0700 Subject: [PATCH 07/13] updates to pkg docs to address PR feedback --- content/v2.0/reference/cli/influx/pkg/_index.md | 2 +- content/v2.0/reference/cli/influx/pkg/summary.md | 2 +- content/v2.0/reference/cli/influx/pkg/validate.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/v2.0/reference/cli/influx/pkg/_index.md b/content/v2.0/reference/cli/influx/pkg/_index.md index 1fbc7b874..554e55396 100644 --- a/content/v2.0/reference/cli/influx/pkg/_index.md +++ b/content/v2.0/reference/cli/influx/pkg/_index.md @@ -40,6 +40,6 @@ influx pkg [command] | `-q`, `--quiet` | Disable output printing | | | `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | | `--secret` | Secrets to provide alongside the package (format: `--secret=SECRET_KEY=SECRET_VALUE`) | string | -| `-u`, `--url` | URL of a package file file | string | +| `-u`, `--url` | URL of package file | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/summary.md b/content/v2.0/reference/cli/influx/pkg/summary.md index f6322c369..faecc8318 100644 --- a/content/v2.0/reference/cli/influx/pkg/summary.md +++ b/content/v2.0/reference/cli/influx/pkg/summary.md @@ -25,7 +25,7 @@ influx pkg summary [flags] | `-f`, `--file` | Package file to summarize | string | | `-h`, `--help` | Help for the `summary` command | | | `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | -| `-u`, `--url` | URL of a package file file | string | +| `-u`, `--url` | URL of package file to summarize | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/pkg/validate.md b/content/v2.0/reference/cli/influx/pkg/validate.md index 9f8a6f77e..e0c8e0dc2 100644 --- a/content/v2.0/reference/cli/influx/pkg/validate.md +++ b/content/v2.0/reference/cli/influx/pkg/validate.md @@ -23,6 +23,6 @@ influx pkg validate [flags] | `-f`, `--file` | Package file to validate | string | | `-h`, `--help` | Help for the `validate` command | | | `-R`, `--recurse` | Recurse through files in the directory specified in `-f`, `--file` | | -| `-u`, `--url` | URL of a package file file | string | +| `-u`, `--url` | URL of package file to validate | string | {{% influx-cli-global-flags %}} From 8a0bceb557c933ac30b57c59fb537cee68304177 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 10 Feb 2020 13:25:16 -0700 Subject: [PATCH 08/13] WIP added new secrets CLI --- content/v2.0/reference/cli/influx/_index.md | 1 + .../reference/cli/influx/secret/_index.md | 32 +++++++++++++++++++ .../reference/cli/influx/secret/delete.md | 28 ++++++++++++++++ .../v2.0/reference/cli/influx/secret/find.md | 27 ++++++++++++++++ .../reference/cli/influx/secret/update.md | 28 ++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 content/v2.0/reference/cli/influx/secret/_index.md create mode 100644 content/v2.0/reference/cli/influx/secret/delete.md create mode 100644 content/v2.0/reference/cli/influx/secret/find.md create mode 100644 content/v2.0/reference/cli/influx/secret/update.md diff --git a/content/v2.0/reference/cli/influx/_index.md b/content/v2.0/reference/cli/influx/_index.md index b98ad5b65..d50966f3a 100644 --- a/content/v2.0/reference/cli/influx/_index.md +++ b/content/v2.0/reference/cli/influx/_index.md @@ -55,6 +55,7 @@ retrieving authentication tokens._ | [pkg](/v2.0/reference/cli/influx/pkg) | Manage InfluxDB packages | | [query](/v2.0/reference/cli/influx/query) | Execute a Flux query | | [repl](/v2.0/reference/cli/influx/repl) | Interactive REPL (read-eval-print-loop) | +| [secret](/v2.0/reference/cli/influx/secret) | Manage secrets | | [setup](/v2.0/reference/cli/influx/setup) | Create default username, password, org, bucket, etc. | | [task](/v2.0/reference/cli/influx/task) | Task management commands | | [transpile](/v2.0/reference/cli/influx/transpile) | Manually transpile an InfluxQL query to Flux | diff --git a/content/v2.0/reference/cli/influx/secret/_index.md b/content/v2.0/reference/cli/influx/secret/_index.md new file mode 100644 index 000000000..31abfb84b --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/_index.md @@ -0,0 +1,32 @@ +--- +title: influx secret – Manage secrets +description: The 'influx secret' command manages secrets. +menu: + v2_0_ref: + name: influx secret + parent: influx +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret` command manages secrets. + +## Usage +``` +influx secret [flags] +influx secret [command] +``` + +## Subcommands +| Subcommand | Description | +|:---------- |:----------- | +| [delete](/v2.0/reference/cli/influx/secret/delete/) | Delete a secret | +| [find](/v2.0/reference/cli/influx/secret/find/) | Find secrets | +| [update](/v2.0/reference/cli/influx/secret/update/) | Add or update a secret | + +## Flags +| Flag | Description | +|:---- |:----------- | +| `-h`, `--help` | Help for the `secret` command | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/delete.md b/content/v2.0/reference/cli/influx/secret/delete.md new file mode 100644 index 000000000..2d100723f --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/delete.md @@ -0,0 +1,28 @@ +--- +title: influx secret delete +description: The 'influx secret delete' command deletes secrets. +menu: + v2_0_ref: + name: influx secret delete + parent: influx secret +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret delete` command deletes secrets. + +## Usage +``` +influx secret delete [flags] +influx secret delete [command] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for `delete` | | +| `-k`, `--key` | Secret key _**(required)**_ | string | +| `-o`, `--org` | Organization name | string | +| `--org-id` | Organization ID | string | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/find.md b/content/v2.0/reference/cli/influx/secret/find.md new file mode 100644 index 000000000..fee59ab19 --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/find.md @@ -0,0 +1,27 @@ +--- +title: influx secret find +description: The 'influx secret find' command lists secret keys. +menu: + v2_0_ref: + name: influx secret find + parent: influx secret +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret find` command lists secret keys. + +## Usage +``` +influx secret find [flags] +influx secret find [command] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for `find` | | +| `-o`, `--org` | Organization name | string | +| `--org-id` | Organization ID | string | + +{{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/update.md b/content/v2.0/reference/cli/influx/secret/update.md new file mode 100644 index 000000000..683408213 --- /dev/null +++ b/content/v2.0/reference/cli/influx/secret/update.md @@ -0,0 +1,28 @@ +--- +title: influx secret update +description: The 'influx secret update' command adds and updates secrets. +menu: + v2_0_ref: + name: influx secret update + parent: influx secret +weight: 101 +v2.0/tags: [secrets] +--- + +The `influx secret update` command adds and updates secrets. + +## Usage +``` +influx secret update [flags] +influx secret update [command] +``` + +## Flags +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for `update` | | +| `-k`, `--key` | Secret key _**(required)**_ | string | +| `-o`, `--org` | Organization name | string | +| `--org-id` | Organization ID | string | + +{{% influx-cli-global-flags %}} From b7f117cfdf51da3b5de0cc868570842255e282e5 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 10 Feb 2020 14:18:47 -0700 Subject: [PATCH 09/13] added additional instructions to secret update command --- content/v2.0/reference/cli/influx/secret/update.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/v2.0/reference/cli/influx/secret/update.md b/content/v2.0/reference/cli/influx/secret/update.md index 683408213..d8924ff11 100644 --- a/content/v2.0/reference/cli/influx/secret/update.md +++ b/content/v2.0/reference/cli/influx/secret/update.md @@ -10,6 +10,8 @@ v2.0/tags: [secrets] --- The `influx secret update` command adds and updates secrets. +Provide the secret key with the the `-k` or `--key` flag. +When prompted, enter and confirm the secret value. ## Usage ``` From d0b954a0a6b84d1545c67f4cebde041989cf0d79 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 10 Feb 2020 15:42:18 -0700 Subject: [PATCH 10/13] updated secret management docs with new cli commands, resolves #750 --- .../v2.0/security/secrets/manage-secrets.md | 69 ------------------- .../security/secrets/manage-secrets/_index.md | 35 ++++++++++ .../security/secrets/manage-secrets/add.md | 45 ++++++++++++ .../security/secrets/manage-secrets/delete.md | 45 ++++++++++++ .../security/secrets/manage-secrets/update.md | 45 ++++++++++++ .../security/secrets/manage-secrets/view.md | 34 +++++++++ 6 files changed, 204 insertions(+), 69 deletions(-) delete mode 100644 content/v2.0/security/secrets/manage-secrets.md create mode 100644 content/v2.0/security/secrets/manage-secrets/_index.md create mode 100644 content/v2.0/security/secrets/manage-secrets/add.md create mode 100644 content/v2.0/security/secrets/manage-secrets/delete.md create mode 100644 content/v2.0/security/secrets/manage-secrets/update.md create mode 100644 content/v2.0/security/secrets/manage-secrets/view.md diff --git a/content/v2.0/security/secrets/manage-secrets.md b/content/v2.0/security/secrets/manage-secrets.md deleted file mode 100644 index 9b4054267..000000000 --- a/content/v2.0/security/secrets/manage-secrets.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Manage secrets -description: Manage secrets in InfluxDB with the InfluxDB API. -v2.0/tags: [secrets, security] -menu: - v2_0: - parent: Store and use secrets -weight: 201 ---- - - -Manage secrets using the InfluxDB `/org/{orgID}/secrets` API endpoint. -All secrets belong to an organization and are stored in your [secret-store](/v2.0/security/secrets/). -Include your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) -and [authentication token](/v2.0/security/tokens/view-tokens/) with each request. - -### Add a secret -Use the `PATCH` request method to add a new secret to your organization. -Pass the secret key-value pair in the request body. - -```sh -curl -XPATCH http://localhost:9999/api/v2/orgs//secrets \ - -H 'authorization: Token YOURAUTHTOKEN' \ - -H 'Content-type: application/json' \ - --data '{ - "": "" -}' -``` - -### View secret keys -Use the `GET` request method to view your organization's secrets keys. - -```sh -curl -XGET http://localhost:9999/api/v2/orgs//secrets \ - -H 'authorization: Token YOURAUTHTOKEN' -``` - -### Delete a secret -Use the `POST` request method and the `orgs/{orgID}/secrets/delete` API endpoint -to delete one or more secrets. -Include an array of secret keys to delete in the requests body in the following format. - -```bash -curl -XGET http://localhost:9999/api/v2/orgs//secrets/delete \ - --H 'authorization: Token YOURAUTHTOKEN' - --data '{ - "secrets": [ - "" - ] -}' -``` - -## Use secrets in a query -Import the `influxdata/influxd/secrets` package and use the `secrets.get()` function -to populate sensitive data in queries with secrets from your secret store. - -```js -import "influxdata/influxdb/secrets" -import "sql" - -username = secrets.get(key: "POSTGRES_USERNAME") -password = secrets.get(key: "POSTGRES_PASSWORD") - -sql.from( - driverName: "postgres", - dataSourceName: "postgresql://${username}:${password}@localhost", - query:"SELECT * FROM example-table" -) -``` diff --git a/content/v2.0/security/secrets/manage-secrets/_index.md b/content/v2.0/security/secrets/manage-secrets/_index.md new file mode 100644 index 000000000..9f3e1c453 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/_index.md @@ -0,0 +1,35 @@ +--- +title: Manage secrets +description: Manage secrets in InfluxDB with the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Store and use secrets +weight: 201 +--- + + +Manage secrets using the [`influx` command line interface (CLI)](/v2.0/reference/cli/influx/) or the InfluxDB API. +All secrets belong to an organization and are stored in your [secret-store](/v2.0/security/secrets/). + +{{< children >}} + +--- + +## Use secrets in a query +Import the `influxdata/influxd/secrets` package and use the `secrets.get()` function +to populate sensitive data in queries with secrets from your secret store. + +```js +import "influxdata/influxdb/secrets" +import "sql" + +username = secrets.get(key: "POSTGRES_USERNAME") +password = secrets.get(key: "POSTGRES_PASSWORD") + +sql.from( + driverName: "postgres", + dataSourceName: "postgresql://${username}:${password}@localhost", + query:"SELECT * FROM example-table" +) +``` diff --git a/content/v2.0/security/secrets/manage-secrets/add.md b/content/v2.0/security/secrets/manage-secrets/add.md new file mode 100644 index 000000000..c3b5a7844 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/add.md @@ -0,0 +1,45 @@ +--- +title: Add secrets +description: Add secrets using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 301 +--- + +Add secrets using the `influx` command line interface (CLI) or the InfluxDB API. + +## Add a secret using the influx CLI +Use the [`influx secret update` command](/v2.0/reference/cli/influx/secret/update/) +to add a new secret to your organization. +Provide the secret key with the the `-k` or `--key` flag. +When prompted, enter and confirm the secret value. + +```sh +# Syntax +influx secret update -k + +# Example +influx secret update -k foo +``` + +## Add a secret using the InfluxDB API +Use the `PATCH` request method and the `/orgs/{orgID}/secrets` API endpoint to +add a new secret to your organization. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header +- The secret key-value pair in the request body + + +```sh +curl -XPATCH http://localhost:9999/api/v2/orgs//secrets \ + -H 'Authorization: Token YOURAUTHTOKEN' \ + -H 'Content-type: application/json' \ + --data '{ + "": "" +}' +``` diff --git a/content/v2.0/security/secrets/manage-secrets/delete.md b/content/v2.0/security/secrets/manage-secrets/delete.md new file mode 100644 index 000000000..b875eeb45 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/delete.md @@ -0,0 +1,45 @@ +--- +title: Delete secrets +description: Delete secrets using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 304 +--- + +Delete secrets using the `influx` command line interface (CLI) or the InfluxDB API. + +## Delete a secret using the influx CLI +Use the [`influx secret delete` command](/v2.0/reference/influx/secret/delete/) +to delete a secret key-value pair from your organization. +Provide the secret key to delete with the the `-k` or `--key` flag. + +```sh +# Syntax +influx secret delete -k + +# Example +influx secret delete -k foo +``` + +## Delete secrets using the InfluxDB API +Use the `POST` request method and the `orgs/{orgID}/secrets/delete` API endpoint +to delete one or more secrets. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header +- An array of secret keys to delete in the requests body + + +```bash +curl -XGET http://localhost:9999/api/v2/orgs//secrets/delete \ + --H 'Authorization: Token YOURAUTHTOKEN' + --data '{ + "secrets": [ + "" + ] +}' +``` diff --git a/content/v2.0/security/secrets/manage-secrets/update.md b/content/v2.0/security/secrets/manage-secrets/update.md new file mode 100644 index 000000000..b54c98f49 --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/update.md @@ -0,0 +1,45 @@ +--- +title: Update secrets +description: Update secrets using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 303 +--- + +Update secrets using the `influx` command line interface (CLI) or the InfluxDB API. + +## Update a secret using the influx CLI +Use the [`influx secret update` command](/v2.0/reference/cli/influx/secret/update/) +to update a secret in your organization. +Provide the secret key with the the `-k` or `--key` flag. +When prompted, enter and confirm the secret value. + +```sh +# Syntax +influx secret update -k + +# Example +influx secret update -k foo +``` + +## Update a secret using the InfluxDB API +Use the `PATCH` request method and the InfluxDB `/orgs/{orgID}/secrets` API endpoint +to update a secret in your organization. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header +- The updated secret key-value pair in the request body + + +```sh +curl -XPATCH http://localhost:9999/api/v2/orgs//secrets \ + -H 'Authorization: Token YOURAUTHTOKEN' \ + -H 'Content-type: application/json' \ + --data '{ + "": "" +}' +``` diff --git a/content/v2.0/security/secrets/manage-secrets/view.md b/content/v2.0/security/secrets/manage-secrets/view.md new file mode 100644 index 000000000..b14fdd0bb --- /dev/null +++ b/content/v2.0/security/secrets/manage-secrets/view.md @@ -0,0 +1,34 @@ +--- +title: View secret keys +description: View secret keys using the `influx` CLI or the InfluxDB API. +v2.0/tags: [secrets, security] +menu: + v2_0: + parent: Manage secrets +weight: 302 +--- + +View secret keys using the `influx` command line interface (CLI) or the InfluxDB API. + +## View secret keys using the influx CLI +Use the [`influx secret find` command](/v2.0/reference/cli/influx/secret/find/) +to list your organization's secret keys. + +```sh +influx secret find +``` + +## View secret keys using the InfluxDB API +Use the `GET` request method and the InfluxDB `/orgs/{orgID}/secrets` API endpoint +to view your organization's secrets keys. + +**Include the following:** + +- Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL +- Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header + + +```sh +curl -XGET http://localhost:9999/api/v2/orgs//secrets \ + -H 'Authorization: Token YOURAUTHTOKEN' +``` From d11c216076c4e0a3147bc9c9c2463d052506c921 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 11 Feb 2020 06:44:33 -0700 Subject: [PATCH 11/13] updates to secrets cli doc to address PR feedback --- content/v2.0/reference/cli/influx/secret/_index.md | 2 +- content/v2.0/reference/cli/influx/secret/delete.md | 3 +-- content/v2.0/reference/cli/influx/secret/find.md | 11 +++++------ content/v2.0/reference/cli/influx/secret/update.md | 5 ++--- .../v2.0/security/secrets/manage-secrets/_index.md | 1 - content/v2.0/security/secrets/manage-secrets/add.md | 2 +- .../v2.0/security/secrets/manage-secrets/delete.md | 4 ++-- .../v2.0/security/secrets/manage-secrets/update.md | 2 +- 8 files changed, 13 insertions(+), 17 deletions(-) diff --git a/content/v2.0/reference/cli/influx/secret/_index.md b/content/v2.0/reference/cli/influx/secret/_index.md index 31abfb84b..879891b2d 100644 --- a/content/v2.0/reference/cli/influx/secret/_index.md +++ b/content/v2.0/reference/cli/influx/secret/_index.md @@ -14,7 +14,7 @@ The `influx secret` command manages secrets. ## Usage ``` influx secret [flags] -influx secret [command] +influx secret [subcommand] ``` ## Subcommands diff --git a/content/v2.0/reference/cli/influx/secret/delete.md b/content/v2.0/reference/cli/influx/secret/delete.md index 2d100723f..5cb3185b5 100644 --- a/content/v2.0/reference/cli/influx/secret/delete.md +++ b/content/v2.0/reference/cli/influx/secret/delete.md @@ -14,13 +14,12 @@ The `influx secret delete` command deletes secrets. ## Usage ``` influx secret delete [flags] -influx secret delete [command] ``` ## Flags | Flag | Description | Input type | |:---- |:----------- |:----------:| -| `-h`, `--help` | Help for `delete` | | +| `-h`, `--help` | Help for `secret delete` | | | `-k`, `--key` | Secret key _**(required)**_ | string | | `-o`, `--org` | Organization name | string | | `--org-id` | Organization ID | string | diff --git a/content/v2.0/reference/cli/influx/secret/find.md b/content/v2.0/reference/cli/influx/secret/find.md index fee59ab19..7191e2a15 100644 --- a/content/v2.0/reference/cli/influx/secret/find.md +++ b/content/v2.0/reference/cli/influx/secret/find.md @@ -14,14 +14,13 @@ The `influx secret find` command lists secret keys. ## Usage ``` influx secret find [flags] -influx secret find [command] ``` ## Flags -| Flag | Description | Input type | -|:---- |:----------- |:----------:| -| `-h`, `--help` | Help for `find` | | -| `-o`, `--org` | Organization name | string | -| `--org-id` | Organization ID | string | +| Flag | Description | Input type | +|:---- |:----------- |:----------:| +| `-h`, `--help` | Help for `secret find` | | +| `-o`, `--org` | Organization name | string | +| `--org-id` | Organization ID | string | {{% influx-cli-global-flags %}} diff --git a/content/v2.0/reference/cli/influx/secret/update.md b/content/v2.0/reference/cli/influx/secret/update.md index d8924ff11..cf6f938be 100644 --- a/content/v2.0/reference/cli/influx/secret/update.md +++ b/content/v2.0/reference/cli/influx/secret/update.md @@ -10,19 +10,18 @@ v2.0/tags: [secrets] --- The `influx secret update` command adds and updates secrets. -Provide the secret key with the the `-k` or `--key` flag. +Provide the secret key with the `-k` or `--key` flag. When prompted, enter and confirm the secret value. ## Usage ``` influx secret update [flags] -influx secret update [command] ``` ## Flags | Flag | Description | Input type | |:---- |:----------- |:----------:| -| `-h`, `--help` | Help for `update` | | +| `-h`, `--help` | Help for `secret update` | | | `-k`, `--key` | Secret key _**(required)**_ | string | | `-o`, `--org` | Organization name | string | | `--org-id` | Organization ID | string | diff --git a/content/v2.0/security/secrets/manage-secrets/_index.md b/content/v2.0/security/secrets/manage-secrets/_index.md index 9f3e1c453..6f7723252 100644 --- a/content/v2.0/security/secrets/manage-secrets/_index.md +++ b/content/v2.0/security/secrets/manage-secrets/_index.md @@ -8,7 +8,6 @@ menu: weight: 201 --- - Manage secrets using the [`influx` command line interface (CLI)](/v2.0/reference/cli/influx/) or the InfluxDB API. All secrets belong to an organization and are stored in your [secret-store](/v2.0/security/secrets/). diff --git a/content/v2.0/security/secrets/manage-secrets/add.md b/content/v2.0/security/secrets/manage-secrets/add.md index c3b5a7844..4bdcefa25 100644 --- a/content/v2.0/security/secrets/manage-secrets/add.md +++ b/content/v2.0/security/secrets/manage-secrets/add.md @@ -13,7 +13,7 @@ Add secrets using the `influx` command line interface (CLI) or the InfluxDB API. ## Add a secret using the influx CLI Use the [`influx secret update` command](/v2.0/reference/cli/influx/secret/update/) to add a new secret to your organization. -Provide the secret key with the the `-k` or `--key` flag. +Provide the secret key with the `-k` or `--key` flag. When prompted, enter and confirm the secret value. ```sh diff --git a/content/v2.0/security/secrets/manage-secrets/delete.md b/content/v2.0/security/secrets/manage-secrets/delete.md index b875eeb45..9a25fa035 100644 --- a/content/v2.0/security/secrets/manage-secrets/delete.md +++ b/content/v2.0/security/secrets/manage-secrets/delete.md @@ -13,7 +13,7 @@ Delete secrets using the `influx` command line interface (CLI) or the InfluxDB A ## Delete a secret using the influx CLI Use the [`influx secret delete` command](/v2.0/reference/influx/secret/delete/) to delete a secret key-value pair from your organization. -Provide the secret key to delete with the the `-k` or `--key` flag. +Provide the secret key to delete with the `-k` or `--key` flag. ```sh # Syntax @@ -31,7 +31,7 @@ to delete one or more secrets. - Your [organization ID](/v2.0/organizations/view-orgs/#view-your-organization-id) in the request URL - Your [authentication token](/v2.0/security/tokens/view-tokens/) in the `Authorization` header -- An array of secret keys to delete in the requests body +- An array of secret keys to delete in the request body ```bash diff --git a/content/v2.0/security/secrets/manage-secrets/update.md b/content/v2.0/security/secrets/manage-secrets/update.md index b54c98f49..0ea92e509 100644 --- a/content/v2.0/security/secrets/manage-secrets/update.md +++ b/content/v2.0/security/secrets/manage-secrets/update.md @@ -13,7 +13,7 @@ Update secrets using the `influx` command line interface (CLI) or the InfluxDB A ## Update a secret using the influx CLI Use the [`influx secret update` command](/v2.0/reference/cli/influx/secret/update/) to update a secret in your organization. -Provide the secret key with the the `-k` or `--key` flag. +Provide the secret key to update with the `-k` or `--key` flag. When prompted, enter and confirm the secret value. ```sh From dc4650c1941d7b8ef4371ee711cf5cf0e8ec915c Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 11 Feb 2020 06:48:27 -0700 Subject: [PATCH 12/13] minor table formatting update in influx secret command doc --- content/v2.0/reference/cli/influx/secret/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/v2.0/reference/cli/influx/secret/_index.md b/content/v2.0/reference/cli/influx/secret/_index.md index 879891b2d..e61f397e2 100644 --- a/content/v2.0/reference/cli/influx/secret/_index.md +++ b/content/v2.0/reference/cli/influx/secret/_index.md @@ -25,8 +25,8 @@ influx secret [subcommand] | [update](/v2.0/reference/cli/influx/secret/update/) | Add or update a secret | ## Flags -| Flag | Description | -|:---- |:----------- | +| Flag | Description | +|:---- |:----------- | | `-h`, `--help` | Help for the `secret` command | {{% influx-cli-global-flags %}} From 6a704ad670dcdc89009844852c62f6c60a321440 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 11 Feb 2020 16:10:05 -0700 Subject: [PATCH 13/13] added beta-3 release notes --- content/v2.0/reference/release-notes/influxdb.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/content/v2.0/reference/release-notes/influxdb.md b/content/v2.0/reference/release-notes/influxdb.md index 121884b85..9382a5296 100644 --- a/content/v2.0/reference/release-notes/influxdb.md +++ b/content/v2.0/reference/release-notes/influxdb.md @@ -7,11 +7,20 @@ menu: parent: Release notes weight: 101 --- -## v3.0.0-beta.2 [2020-02-06] + +## v2.0.0-beta.3 [2020-02-11] + +### Features +- Extend `influx cli pkg command` with ability to take multiple files and directories. +- Extend `influx cli pkg command` with ability to take multiple URLs, files, + directories, and stdin at the same time. +- `influx` CLI can manage secrets. ### Bug Fixes - -- Fix notification rule renaming panics from UI. +- Fix notification rule renaming panics in UI. +- Fix the tooltip for stacked line graphs. +- Fixed false success notification for read-only users creating dashboards. +- Fix issue with pkger/http stack crashing on duplicate content type. ## v2.0.0-beta.2 [2020-01-24]