From a02910d7853c94e248148f092ecfc3e33cf8deb3 Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 26 Aug 2020 12:32:49 -0700 Subject: [PATCH 1/6] add missing token flag --- content/influxdb/v2.0/reference/cli/influx/config/create.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/influxdb/v2.0/reference/cli/influx/config/create.md b/content/influxdb/v2.0/reference/cli/influx/config/create.md index a9b4d85ed..d57721cc5 100644 --- a/content/influxdb/v2.0/reference/cli/influx/config/create.md +++ b/content/influxdb/v2.0/reference/cli/influx/config/create.md @@ -28,6 +28,7 @@ influx config create [flags] | `-u` | `--host-url` | (**Required**) Connection URL for the new configuration. | string | | | | `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` | | `-o` | `--org` | Organization name | string | | +| `-t` | `--token` | Authentication token | string | `INFLUX_TOKEN` | ## Examples ```sh From 93af9ba1f2f06b2430b36e97a26190e6c7f2677a Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 26 Aug 2020 14:47:19 -0700 Subject: [PATCH 2/6] add more steps for Cloud CLI setup and use --- content/influxdb/v2.0/get-started.md | 40 +++++++++++++++------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/content/influxdb/v2.0/get-started.md b/content/influxdb/v2.0/get-started.md index 9a93672c2..f1104e5d1 100644 --- a/content/influxdb/v2.0/get-started.md +++ b/content/influxdb/v2.0/get-started.md @@ -89,7 +89,7 @@ References to the InfluxDB user interface (UI) or localhost:9999 refer to your {{< cloud-name >}} UI. {{% /cloud %}} -### (Optional) Download and install the influx CLI +### (Optional) Download, install, and use the influx CLI To use the `influx` CLI to manage and interact with your InfluxDB Cloud instance, complete the following steps: @@ -102,13 +102,13 @@ To use the `influx` CLI to manage and interact with your InfluxDB Cloud instance {{% tab-content %}} -#### Download influx CLI for macOS +#### Step 1 Download influx CLI for macOS Click the following button to download and install `influx` CLI for macOS. influx CLI (macOS) -#### Unpackage the influx binary +#### Step 2 Unpackage the influx binary **Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs. @@ -121,7 +121,7 @@ or run the following command in a macOS command prompt application such tar zxvf ~/Downloads/influxdb_client_2.0.0-beta.16_darwin_amd64.tar.gz ``` -#### (Optional) Place the binary in your $PATH +#### Step 3 (Optional) Place the binary in your $PATH If you choose, you can place `influx` in your `$PATH` or you can prefix the executable with `./` to run in place. If the binary is on your $PATH, you can run `influx` from any directory. Otherwise, you must specify the location of the CLI (for example, `./influx`or `path/to/influx`). @@ -137,11 +137,22 @@ sudo cp influxdb_client_2.0.0-beta.16_darwin_amd64/influx /usr/local/bin/ If you rename the binary, all references to `influx` in this documentation refer to the renamed binary. {{% /note %}} -##### Run influx CLI on macOS Catalina +#### Step 4 (macOS Catalina only) Authorize InfluxDB binaries If you're running `influx` on macOS Catalina, you must [manually authorize the InfluxDB binaries](/v2.0/get-started/#run-influxdb-on-macos-catalina). -Now, you're ready to [Use the influx CLI](#use-the-influx-cli). +#### Step 5 Set up a configuration profile + +To avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command, complete the following steps to set up a configuration profile that stores your credentials. + +1. In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. + This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. + + For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/) + +#### Step 6 Learn `influx` CLI commands + +To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). {{% /tab-content %}} @@ -500,21 +511,14 @@ You are ready to [write or collect data](/v2.0/write-data). {{% note %}} #### Use the influx CLI -To use the [`influx` CLI](/v2.0/reference/cli/influx) after setting up InfluxDB, provide your [authentication token](/v2.0/users/tokens/), which is automatically generated during the setup process. For instructions on viewing your token via CLI or UI, see [View tokens](/v2.0/security/tokens/view-tokens/). +If you set up InfluxDB through the UI and want to use the [`influx` CLI](/v2.0/reference/cli/influx), we recommend setting up a configuration profile. This lets you avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command. Complete the following steps to set up a configuration profile that stores your credentials. -Use one of the following methods to provide your authentication token to the CLI: +1. In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. + This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. -- Create a new InfluxDB connection configuration using the [`influx config create` command](/v2.0/reference/cli/influx/config/create/). -- Pass your token to the `influx` CLI using the `-t` or `--token` flag. -- Set the `INFLUX_TOKEN` environment variable using your token. + For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/) - ```bash - export INFLUX_TOKEN=oOooYourAuthTokenOoooOoOO== - ``` - -_See [View tokens](/v2.0/security/tokens/view-tokens/) for information about -retrieving authentication tokens._ -{{% /note %}} +2. Learn `influx` CLI commands. To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). {{% /tab-content %}} From c79167129fe0f155974f1109f0ac08f8f1bd0485 Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 26 Aug 2020 14:54:48 -0700 Subject: [PATCH 3/6] add steps for Linux --- content/influxdb/v2.0/get-started.md | 38 ++++++++++++++++++---------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/content/influxdb/v2.0/get-started.md b/content/influxdb/v2.0/get-started.md index f1104e5d1..d68ebae90 100644 --- a/content/influxdb/v2.0/get-started.md +++ b/content/influxdb/v2.0/get-started.md @@ -102,13 +102,13 @@ To use the `influx` CLI to manage and interact with your InfluxDB Cloud instance {{% tab-content %}} -#### Step 1 Download influx CLI for macOS +#### Step 1: Download influx CLI for macOS Click the following button to download and install `influx` CLI for macOS. influx CLI (macOS) -#### Step 2 Unpackage the influx binary +#### Step 2: Unpackage the influx binary **Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs. @@ -121,7 +121,7 @@ or run the following command in a macOS command prompt application such tar zxvf ~/Downloads/influxdb_client_2.0.0-beta.16_darwin_amd64.tar.gz ``` -#### Step 3 (Optional) Place the binary in your $PATH +#### Step 3: (Optional) Place the binary in your $PATH If you choose, you can place `influx` in your `$PATH` or you can prefix the executable with `./` to run in place. If the binary is on your $PATH, you can run `influx` from any directory. Otherwise, you must specify the location of the CLI (for example, `./influx`or `path/to/influx`). @@ -137,20 +137,20 @@ sudo cp influxdb_client_2.0.0-beta.16_darwin_amd64/influx /usr/local/bin/ If you rename the binary, all references to `influx` in this documentation refer to the renamed binary. {{% /note %}} -#### Step 4 (macOS Catalina only) Authorize InfluxDB binaries +#### Step 4: (macOS Catalina only) Authorize InfluxDB binaries If you're running `influx` on macOS Catalina, you must [manually authorize the InfluxDB binaries](/v2.0/get-started/#run-influxdb-on-macos-catalina). -#### Step 5 Set up a configuration profile +#### Step 5: Set up a configuration profile -To avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command, complete the following steps to set up a configuration profile that stores your credentials. +To avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command, set up a configuration profile that stores your credentials. -1. In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. +- In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. - For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/) + For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). -#### Step 6 Learn `influx` CLI commands +#### Step 6: Learn `influx` CLI commands To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). @@ -160,14 +160,14 @@ To see all available `influx` commands, check out [influx - InfluxDB command lin {{% tab-content %}} -#### Download influx CLI for Linux +#### Step 1: Download influx CLI for Linux Click one of the following buttons to download and install the `influx` CLI appropriate for your chipset. influx CLI (amd64) influx CLI (arm) -#### Unpackage the influx binary +#### Step 2: Unpackage the influx binary **Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs. @@ -176,7 +176,7 @@ Click one of the following buttons to download and install the `influx` CLI appr tar xvfz influxdb_client_2.0.0-beta.16_linux_amd64.tar.gz ``` -#### (Optional) Place the binary in your $PATH +#### Step 3: (Optional) Place the binary in your $PATH If you choose, you can place `influx` in your `$PATH` or you can prefix the executable with `./` to run in place. If the binary is on your $PATH, you can run `influx` from any directory. Otherwise, you must specify the location of the CLI (for example, `./influx`or `path/to/influx`). @@ -192,7 +192,19 @@ sudo cp influxdb_client_2.0.0-beta.16_linux_amd64/influx /usr/local/bin/ If you rename the binary, all references to `influx` in this documentation refer to the renamed binary. {{% /note %}} -Now, you're ready to [Use the influx CLI](#use-the-influx-cli). +#### Step 4: Set up a configuration profile + +To avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command, set up a configuration profile that stores your credentials. + +- In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. + This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. + + For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). + +#### Step 5: Learn `influx` CLI commands + +To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). + {{% /tab-content %}} From 57a9c160731650dfbd52d145cbbec9e7d8527ad7 Mon Sep 17 00:00:00 2001 From: Kelly Date: Wed, 26 Aug 2020 14:58:53 -0700 Subject: [PATCH 4/6] upd UI setup section --- content/influxdb/v2.0/get-started.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content/influxdb/v2.0/get-started.md b/content/influxdb/v2.0/get-started.md index d68ebae90..02e9062ee 100644 --- a/content/influxdb/v2.0/get-started.md +++ b/content/influxdb/v2.0/get-started.md @@ -520,15 +520,17 @@ the `influx` command line interface (CLI). InfluxDB is now initialized with a primary user, organization, and bucket. You are ready to [write or collect data](/v2.0/write-data). -{{% note %}} -#### Use the influx CLI +### (Optional) Set up and use the influx CLI If you set up InfluxDB through the UI and want to use the [`influx` CLI](/v2.0/reference/cli/influx), we recommend setting up a configuration profile. This lets you avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command. Complete the following steps to set up a configuration profile that stores your credentials. -1. In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. +1. In a terminal, run the following command: + ```sh + influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a + ``` This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. - For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/) + For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). 2. Learn `influx` CLI commands. To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). From 50922e1893a7462530915314f03d93f06952f65f Mon Sep 17 00:00:00 2001 From: Kelly Date: Fri, 28 Aug 2020 11:31:04 -0700 Subject: [PATCH 5/6] add edits f Russ --- content/influxdb/v2.0/get-started.md | 35 +++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/content/influxdb/v2.0/get-started.md b/content/influxdb/v2.0/get-started.md index 02e9062ee..f2b7bc5fc 100644 --- a/content/influxdb/v2.0/get-started.md +++ b/content/influxdb/v2.0/get-started.md @@ -145,14 +145,23 @@ If you're running `influx` on macOS Catalina, you must [manually authorize the I To avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command, set up a configuration profile that stores your credentials. -- In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. - This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. +In a terminal, run the following command: + +```sh + # Set up a configuration profile + influx config create -n default \ + -u http://localhost:9999 \ + -o example-org \ + -t mySuP3rS3cr3tT0keN \ + -a + ``` - For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). +This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. +For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). #### Step 6: Learn `influx` CLI commands -To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). +To see all available `influx` commands, type `influx -h` or check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). {{% /tab-content %}} @@ -525,14 +534,18 @@ You are ready to [write or collect data](/v2.0/write-data). If you set up InfluxDB through the UI and want to use the [`influx` CLI](/v2.0/reference/cli/influx), we recommend setting up a configuration profile. This lets you avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command. Complete the following steps to set up a configuration profile that stores your credentials. 1. In a terminal, run the following command: - ```sh - influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a - ``` - This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. + + ```sh + # Set up a configuration profile + influx config create -n default \ + -u http://localhost:9999 \ + -o example-org \ + -t mySuP3rS3cr3tT0keN \ + -a + ``` + This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). - For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). - -2. Learn `influx` CLI commands. To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). +2. Learn `influx` CLI commands. To see all available `influx` commands, type `influx -h` or check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). {{% /tab-content %}} From a3e769c82a7d5a357fdb0f13a712e36c2084c39b Mon Sep 17 00:00:00 2001 From: Kelly Date: Fri, 28 Aug 2020 11:34:49 -0700 Subject: [PATCH 6/6] update other section w edits --- content/influxdb/v2.0/get-started.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/content/influxdb/v2.0/get-started.md b/content/influxdb/v2.0/get-started.md index f2b7bc5fc..caf827347 100644 --- a/content/influxdb/v2.0/get-started.md +++ b/content/influxdb/v2.0/get-started.md @@ -205,14 +205,23 @@ If you rename the binary, all references to `influx` in this documentation refer To avoid having to pass your InfluxDB [authentication token](/v2.0/users/tokens/) with each `influx` command, set up a configuration profile that stores your credentials. -- In a terminal, run the following command: `influx config create -n default -u $INFLUX_URL -o $INFLUX_ORG -t $INFLUX_TOKEN -a`. - This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. +In a terminal, run the following command: + +```sh + # Set up a configuration profile + influx config create -n default \ + -u http://localhost:9999 \ + -o example-org \ + -t mySuP3rS3cr3tT0keN \ + -a + ``` - For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). +This configures a new profile named `default` and makes the profile active so your `influx` CLI commands run against this instance. +For more detail, see [influx config](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/). #### Step 5: Learn `influx` CLI commands -To see all available `influx` commands, check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). +To see all available `influx` commands, type `influx -h` or check out [influx - InfluxDB command line interface](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/). {{% /tab-content %}}