docs-v2/content/influxdb/cloud-dedicated/get-started/setup.md

7.1 KiB

title seotitle list_title description menu weight metadata related
Set up InfluxDB Cloud Dedicated Set up InfluxDB | Get started with InfluxDB Cloud Dedicated Set up InfluxDB Learn how to set up InfluxDB Cloud Dedicated for the "Get started with InfluxDB" tutorial and for general use.
influxdb_cloud_dedicated
name parent identifier
Set up InfluxDB Get started get-started-set-up
101
1 / 3
/influxdb/cloud-dedicated/admin/databases/
/influxdb/cloud-dedicated/reference/cli/influxctl/
/influxdb/cloud-dedicated/reference/api/

As you get started with this tutorial, do the following to make sure everything you need is in place.

  1. Request an InfluxDB Cloud Dedicated cluster.

    [Contact the InfluxData Sales team]({{< dedicated-link >}}) to request an InfluxDB Cloud Dedicated cluster. When your cluster is deployed, your InfluxData account representative provides the following:

    • An Auth0 login to authenticate access to your cluster
    • Your InfluxDB Cloud Dedicated account ID
    • Your InfluxDB Cloud Dedicated cluster ID
    • Your InfluxDB Cloud Dedicated cluster URL
  2. Download, install, and configure the influxctl CLI.

    The influxctl CLI provides a simple way to manage your InfluxDB Cloud Dedicated cluster from a command line. It lets you perform administrative tasks such as managing databases and tokens.

    1. Download the influxctl CLI.

      Contact InfluxData Support for information about downloading and installing the influxctl CLI.

    2. Create a connection profile and provide your InfluxDB Cloud Dedicated connection credentials.

      The influxctl CLI uses connection profiles to connect to and authenticate with your InfluxDB Cloud Dedicated cluster.

      To create a connection profile, run influxctl init to start an interactive prompt that creates and stores a connection profile.

      influxctl init
      

      Provide the following required credentials:

      • Account ID
      • Cluster ID

      For more information about influxctl profiles, see Configure connection profiles.

  3. Create a database.

    Use the influxctl database create command to create a database. You can use an existing database or create a new one specifically for this getting started tutorial. Examples in this getting started tutorial assume a database named "get-started".

    {{% note %}}

Authenticate with your cluster

The first time you run an influxctl CLI command, you are directed to login to Auth0. Once logged in, Auth0 issues a short-lived (1 hour) management token for the influxctl CLI that grants administrative access to your InfluxDB Cloud Dedicated cluster. {{% /note %}}

Provide the following:

- Database name.
- _Optional:_ Database [retention period](/influxdb/cloud-dedicated/admin/databases/#retention-periods)
  as a duration value. If no retention period is specified, the default is infinite.

{{< code-tabs-wrapper >}}

{{% code-tab-content %}}

{{% code-placeholders "get-started|1y" %}}

influxctl database create --retention-period 1y get-started

{{% /code-placeholders %}}

{{% /code-tab-content %}} {{< /code-tabs-wrapper >}}

  1. Create a database token.

    Use the influxctl token create command to create a database token with read and write permissions for your database.

    Provide the following:

    • Permission grants
      • --read-database: Grants read access to a database
      • --write-database Grants write access to a database
    • Token description

    {{< code-tabs-wrapper >}} {{% code-tab-content %}}

{{% code-placeholders "get-started" %}}

influxctl token create \
  --read-database get-started \
  --write-database get-started \
  "Read/write token for get-started database"

{{% /code-placeholders %}}

{{% /code-tab-content %}} {{< /code-tabs-wrapper >}}

The command returns the token ID and the token string.
Store the token string in a safe place.
You'll need it later.
**This is the only time the token string is available in plain text.**

{{% note %}}

Store secure tokens in a secret store

Token strings are returned only on token creation. We recommend storing database tokens in a secure secret store. For example, see how to authenticate Telegraf using tokens in your OS secret store. {{% /note %}}

  1. Configure authentication credentials.

    Code samples in later sections assume you assigned the token string to an INFLUX_TOKEN environment variable--for example:

    {{< tabs-wrapper >}} {{% tabs %}} MacOS and Linux PowerShell CMD {{% /tabs %}} {{% tab-content %}}

{{% code-placeholders "DATABASE_TOKEN" %}}

export INFLUX_TOKEN=DATABASE_TOKEN

{{% /code-placeholders %}}

{{% /tab-content %}} {{% tab-content %}}

{{% code-placeholders "DATABASE_TOKEN" %}}

$env:INFLUX_TOKEN = "DATABASE_TOKEN"

{{% /code-placeholders %}}

{{% /tab-content %}} {{% tab-content %}}

{{% code-placeholders "DATABASE_TOKEN" %}}

set INFLUX_TOKEN=DATABASE_TOKEN 
# Make sure to include a space character at the end of this command.

{{% /code-placeholders %}}

{{% /tab-content %}} {{< /tabs-wrapper >}}

Replace `DATABASE_TOKEN` with your [database token](#create-a-database-token) string.

{{< page-nav prev="/influxdb/cloud-dedicated/get-started/" next="/influxdb/cloud-dedicated/get-started/write/" keepTab=true >}}