From d9cf884806a281d3ce90a717fbb8cc9666c22e17 Mon Sep 17 00:00:00 2001 From: meelahme Date: Tue, 17 Jun 2025 12:09:11 -0700 Subject: [PATCH 01/77] docs: add introduction to InfluxDB 3 Core and Enterprise editions --- influxdb/content.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/influxdb/content.md b/influxdb/content.md index e94ab3d60fae..6167f4c7741e 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,3 +1,14 @@ +# What is InfluxDB 3? + +InfluxDB 3 is a database built to collect, process, transform, and store event and time series data, and is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. + +InfluxDB 3 comes in two editions: + +- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. + +For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) + # What is InfluxDB? InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. From 534a0d20dc3914727ccfb623b718ae4952ccf511 Mon Sep 17 00:00:00 2001 From: meelahme Date: Tue, 17 Jun 2025 13:44:33 -0700 Subject: [PATCH 02/77] docs: add InfluxDB 3 Core and Enterprise startup sections to Docker README --- influxdb/content.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/influxdb/content.md b/influxdb/content.md index 6167f4c7741e..5389b60d0876 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -9,6 +9,44 @@ InfluxDB 3 comes in two editions: For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) + +# How to use this image + +## Start InfluxDB 3 Core + +To run the influxDB 3 Core container: + +```bash +docker run -d --name influxdb3-core -p 8086:8086 influxdb:3 +``` + +Once the container is running, generate an admin token and create a database: + +```bash +docker exec -it influxdb3-core influxdb3 generate token --admin +docker exec -it influxdb3-core influxdb3 create database my_db --token +``` + +To check the server health: + +```bash +curl localhost:8086/health +``` +## Start InfluxDB 3 Enterprise + +InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing: + +```bash +docker run -d --name influxdb3-enterprise -p 8086:8086 influxdb:enterprise +``` + +Them, generate a token and create a database: + +```bash +docker exec -it influxdb3-enterprise influxdb3 generate token --admin +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +``` + # What is InfluxDB? InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. From 4efaabc7f8c773f919909358acb6e33308a8710a Mon Sep 17 00:00:00 2001 From: meelahme Date: Tue, 17 Jun 2025 13:50:54 -0700 Subject: [PATCH 03/77] docs: add data persist section to Docker README --- influxdb/content.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/influxdb/content.md b/influxdb/content.md index 5389b60d0876..d69e4a41a93a 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -47,6 +47,28 @@ docker exec -it influxdb3-enterprise influxdb3 generate token --admin docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ``` +## Mount data to persist across restarts + +To persist the `/var/lib/influxdb3` directory, use a volume mount: + +```bash +docker run -d --name influxdb3-core \ + -v influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + influxdb:3 +``` + +Or bind a to a local host directory: + +```bash +docker run -d --name influxdb3-core \ + -v $PWD/influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + influxdb:3 +``` + +Ensure the directory exists and has appropriate write permissions. + # What is InfluxDB? InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. From 455bee9c1b443ee6479bcefc011e3975cabb38b4 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 18 Jun 2025 08:46:41 -0700 Subject: [PATCH 04/77] Updates to InfluxDB Core section --- influxdb/content.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index d69e4a41a93a..9224c45df5db 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -32,24 +32,38 @@ To check the server health: ```bash curl localhost:8086/health ``` + ## Start InfluxDB 3 Enterprise -InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing: +InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, make sure to provide your license key as an environment variable and include required flags: ```bash -docker run -d --name influxdb3-enterprise -p 8086:8086 influxdb:enterprise +docker run -d --name influxdb3-enterprise -p 8086:8086 \ + -v $PWD/plugins:/plugins \ + -v $PWD/data:/var/lib/influxdb3 \ + -e INFLUX_LICENSE_KEY="" \ + influxdb:enterprise serve \ + --cluster-id cluster1 \ + --node-id node1 \ + --plugin-dir /plugins \ + --object-store file \ + --data-dir /var/lib/influxdb3 ``` -Them, generate a token and create a database: +Them, generate an admin token: + +```bash +docker exec -it influxdb3-enterprise influxdb3 create token --admin +``` +Use the token from the output to create a database ```bash -docker exec -it influxdb3-enterprise influxdb3 generate token --admin docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ``` ## Mount data to persist across restarts -To persist the `/var/lib/influxdb3` directory, use a volume mount: +To persist the `/var/lib/influxdb3` directory in **InfluxDB 3 Core**, use a Docker volume: ```bash docker run -d --name influxdb3-core \ From db1f4f74201b38af187842ba883fac4f63a235b2 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 18 Jun 2025 14:23:31 -0700 Subject: [PATCH 05/77] docs: update Docker instructions for InfluxDB 3 Core with correct run and storage configuration --- influxdb/content.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 9224c45df5db..d0ee8fc8fcd6 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -14,7 +14,7 @@ For full documentation, visit the [InfluxDB 3 documentation site](https://docs.i ## Start InfluxDB 3 Core -To run the influxDB 3 Core container: +To run the InfluxDB 3 Core container: ```bash docker run -d --name influxdb3-core -p 8086:8086 influxdb:3 @@ -50,12 +50,12 @@ docker run -d --name influxdb3-enterprise -p 8086:8086 \ --data-dir /var/lib/influxdb3 ``` -Them, generate an admin token: +Then, generate an admin token: ```bash docker exec -it influxdb3-enterprise influxdb3 create token --admin ``` -Use the token from the output to create a database +Use the token from the output to create a database. ```bash docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token @@ -63,22 +63,26 @@ docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --t ## Mount data to persist across restarts -To persist the `/var/lib/influxdb3` directory in **InfluxDB 3 Core**, use a Docker volume: +To persist **InfluxDB 3 Core** data across container restarts, mount a Docker volume or bind to a local directory. Be sure to include the required `serve` command and storage configuration. + +### Using a Docker volume ```bash docker run -d --name influxdb3-core \ -v influxdb3-data:/var/lib/influxdb3 \ -p 8086:8086 \ - influxdb:3 + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -Or bind a to a local host directory: +### Using a local host directory ```bash docker run -d --name influxdb3-core \ -v $PWD/influxdb3-data:/var/lib/influxdb3 \ -p 8086:8086 \ - influxdb:3 + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` Ensure the directory exists and has appropriate write permissions. From 524fec54aea6dd8d96491ce6c627a6f7c1d5e524 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 18 Jun 2025 14:30:54 -0700 Subject: [PATCH 06/77] updates to data persist section --- influxdb/content.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index d0ee8fc8fcd6..a90cf2055970 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -24,6 +24,9 @@ Once the container is running, generate an admin token and create a database: ```bash docker exec -it influxdb3-core influxdb3 generate token --admin +``` + +```bash docker exec -it influxdb3-core influxdb3 create database my_db --token ``` @@ -67,6 +70,8 @@ To persist **InfluxDB 3 Core** data across container restarts, mount a Docker vo ### Using a Docker volume +To persist data using a Docker-managed volume, run the following command: + ```bash docker run -d --name influxdb3-core \ -v influxdb3-data:/var/lib/influxdb3 \ @@ -74,9 +79,16 @@ docker run -d --name influxdb3-core \ quay.io/influxdb/influxdb3:latest \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` +This command: + +- Creates or reuses a Docker volume named `influxdb3-data`. +- Maps the default InfluxDB port (`8086`) to your local machine. +- Starts the InfluxDB server with a required host ID and object store configuration. ### Using a local host directory +To persist data in a local directory on your host, use the following command: + ```bash docker run -d --name influxdb3-core \ -v $PWD/influxdb3-data:/var/lib/influxdb3 \ @@ -85,7 +97,7 @@ docker run -d --name influxdb3-core \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -Ensure the directory exists and has appropriate write permissions. +This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. # What is InfluxDB? From fa5477043822c88959d11335db642c32708c870d Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 18 Jun 2025 14:54:08 -0700 Subject: [PATCH 07/77] docs: explain official images hosted on Quay.io and other explainatory updates --- influxdb/content.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/influxdb/content.md b/influxdb/content.md index a90cf2055970..a7e025defe99 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -7,8 +7,28 @@ InfluxDB 3 comes in two editions: - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. +>[!Note] +> ## License key for Enterprise +>To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). + For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) +## Docker Images + +Use the official images hosted on Quay.io: + +- **Core:** `quay.io/influxdb/influxdb3:latest` +- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` + +## Parameter glossary + +| Parameter | Description | +|------------------|--------------------------------------------------------------| +| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | +| `--node-id` | Unique identifier for the node within an Enterprise cluster. | +| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | +| `--data-dir` | Path to the directory for data storage. | + # How to use this image From 0c1aba803c2bddf6e62aec640d35ae6b5fe81ac4 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 18 Jun 2025 15:50:11 -0700 Subject: [PATCH 08/77] minor updates to transistion into v2 and v1 Docker setup --- influxdb/content.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index a7e025defe99..3ea53e600035 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -119,17 +119,13 @@ docker run -d --name influxdb3-core \ This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. -# What is InfluxDB? - -InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. +# InfluxDB v2 and v1 Docker setup Use the InfluxDB Docker Hub image to write, query, and process time series data in [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) or [InfluxDB v1](https://docs.influxdata.com/influxdb/v1/). For more information, visit https://influxdata.com. -%%LOGO%% - -# How to use this image for InfluxDB v2 +## How to use this image for InfluxDB v2 **Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2. From 41c606a4a3cc0f2ccfbc450215f2aae3364ce341 Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 20 Jun 2025 14:53:45 -0700 Subject: [PATCH 09/77] docs: add Docker usage examples for InfluxDB 3 and simplify v1/v2 sections --- influxdb/content.md | 656 ++------------------------------------------ 1 file changed, 28 insertions(+), 628 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 3ea53e600035..ac5761d9fde2 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -29,25 +29,29 @@ Use the official images hosted on Quay.io: | `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | | `--data-dir` | Path to the directory for data storage. | - # How to use this image ## Start InfluxDB 3 Core -To run the InfluxDB 3 Core container: +To start the InfluxDB 3 Core container, run the following command: ```bash -docker run -d --name influxdb3-core -p 8086:8086 influxdb:3 +docker run -d --name influxdb3-core \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -Once the container is running, generate an admin token and create a database: +Once the container is running, generate an admin token: ```bash docker exec -it influxdb3-core influxdb3 generate token --admin ``` +Use the token to create a database: + ```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token +docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN ``` To check the server health: @@ -64,7 +68,7 @@ InfluxDB 3 Enterprise supports clustered deployments and advanced features. To s docker run -d --name influxdb3-enterprise -p 8086:8086 \ -v $PWD/plugins:/plugins \ -v $PWD/data:/var/lib/influxdb3 \ - -e INFLUX_LICENSE_KEY="" \ + -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ influxdb:enterprise serve \ --cluster-id cluster1 \ --node-id node1 \ @@ -86,7 +90,7 @@ docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --t ## Mount data to persist across restarts -To persist **InfluxDB 3 Core** data across container restarts, mount a Docker volume or bind to a local directory. Be sure to include the required `serve` command and storage configuration. +To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. ### Using a Docker volume @@ -121,640 +125,36 @@ This mounts a local folder named `influxdb3-data` in your current working direct # InfluxDB v2 and v1 Docker setup -Use the InfluxDB Docker Hub image to write, query, and process time series data in [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) or [InfluxDB v1](https://docs.influxdata.com/influxdb/v1/). - -For more information, visit https://influxdata.com. - -## How to use this image for InfluxDB v2 - -**Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2. - -## Start InfluxDB v2 and set up with the UI, CLI, or API - -To start an InfluxDB v2 container, enter the following command: - -```bash -docker run \ - -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - %%IMAGE%%:2 -``` - -Replace the following with your own values: +## Start InfluxDB v2 -- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path - -After the container starts, the InfluxDB UI and API are accessible at http://localhost:8086 on the host. You're ready to set up an initial admin user, token, and bucket from outside or inside the container--choose one of the following: - -- **Set up InfluxDB from outside the container**: [Set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) from the host or network using the InfluxDB UI, `influx` CLI, or HTTP API. - -- **Set up InfluxDB from inside the container**: Use `docker exec` to run the `influx` CLI installed in the container--for example: - - ```bash - docker exec influxdb2 influx setup \ - --username $USERNAME \ - --password $PASSWORD \ - --org $ORGANIZATION \ - --bucket $BUCKET \ - --force - ``` - -See the [`influx setup` documentation](https://docs.influxdata.com/influxdb/v2/reference/cli/influx/setup/) for the full list of options. - -*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* - -## Start InfluxDB v2 with automated setup - -To start and set up InfluxDB v2 with a single command, specify `-e DOCKER_INFLUXDB_INIT_MODE=setup` and `-e DOCKER_INFLUXDB_INIT_` environment variables for the initial user, password, bucket, and organization--for example: +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. ```bash docker run -d -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ + -v $PWD/data:/var/lib/influxdb2 \ + -v $PWD/config:/etc/influxdb2 \ -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME= \ - -e DOCKER_INFLUXDB_INIT_PASSWORD= \ - -e DOCKER_INFLUXDB_INIT_ORG= \ - -e DOCKER_INFLUXDB_INIT_BUCKET= \ - %%IMAGE%%:2 + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 ``` -Replace the following with your own values: +After the container starts, go to `http://localhost:8086` to access the UI. -- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- ``: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) -- ``: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) -- ``: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) -- ``: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) (database) +For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). -*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* +## Start InfluxDB v1 -### Automated setup options - -In setup mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or upgrade mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), you can specify the following Docker-specific environment variables to provide initial setup values: - -- `DOCKER_INFLUXDB_INIT_USERNAME`: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). -- `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). -- `DOCKER_INFLUXDB_INIT_ORG`: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/). -- `DOCKER_INFLUXDB_INIT_BUCKET`: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/). -- Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) to use as the initial bucket's [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data). -- Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A string value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: a generated token. - -The following example shows how to pass values for all initial setup options: +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: ```bash docker run -d -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_RETENTION=1w \ - -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token \ - %%IMAGE%%:2 + -v $PWD:/var/lib/influxdb \ + influxdb:1.8 ``` -*To upgrade from InfluxDB 1.x to InfluxDB 2.x, see the **Upgrading from InfluxDB 1.x** section below.\* - -With InfluxDB set up and running, see the [Get started](https://docs.influxdata.com/influxdb/v2/get-started/) tutorial to create tokens and write and query data. - -### Custom Initialization Scripts - -In `setup` mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or `upgrade` mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), the InfluxDB Docker Hub image supports running custom initialization scripts. After the setup process completes, scripts are executed in lexical sort order by name. - -For the container to run scripts, they must: - -- Be mounted in the container's `/docker-entrypoint-initdb.d` directory -- Be named using the `.sh` file name extension -- Be executable by the user running the `docker run` command--for example, to allow the current use to execute a script with `docker run`: - - ```bash - chmod +x ./scripts/ - ``` - -> #### Grant permissions to mounted files -> -> By default, Docker runs containers using the user and group IDs of the user executing the `docker run` command. When files are bind-mounted into the container, Docker preserves the user and group ownership from the host system. - -The image exports a number of variables into the environment before executing scripts. The following variables are available for you to use in your scripts: - -- `INFLUX_CONFIGS_PATH`: Path to the `influx` CLI connection configurations file written by `setup`/`upgrade` -- `INFLUX_HOST`: URL to the `influxd` instance running `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_USER_ID`: ID of the initial admin user created by `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_ORG_ID`: ID of the initial organization created by `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_BUCKET_ID`: ID of the initial bucket created by `setup`/`upgrade` - -For example, to grant an InfluxDB 1.x client *write* permission to your initial bucket, create a `$PWD/scripts/setup-v1.sh` file that contains the following: - -```bash -#!/bin/bash -set -e - -influx v1 dbrp create \ - --bucket-id ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ - --db ${V1_DB_NAME} \ - --rp ${V1_RP_NAME} \ - --default \ - --org ${DOCKER_INFLUXDB_INIT_ORG} - -influx v1 auth create \ - --username ${V1_AUTH_USERNAME} \ - --password ${V1_AUTH_PASSWORD} \ - --write-bucket ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ - --org ${DOCKER_INFLUXDB_INIT_ORG} -``` - -Then, run the following command to start and set up InfluxDB using custom scripts: - -```bash -docker run -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -v "$PWD/scripts:/docker-entrypoint-initdb.d" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e V1_DB_NAME=v1-db \ - -e V1_RP_NAME=v1-rp \ - -e V1_AUTH_USERNAME=v1-user \ - -e V1_AUTH_PASSWORD=v1-password \ - %%IMAGE%%:2 -``` - -> #### Automated setup and upgrade ignored if already setup -> -> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. -> -> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. - -## Access InfluxDB v2 file system and ports - -When starting an InfluxDB container, we recommend the following for easy access to your data, configurations, and InfluxDB v2 instance: - -- Publish the container's `8086` port to make the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) accessible from the host system. -- Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) outside of containers. - -### Default file system and networking ports - -For InfluxDB v2, the InfluxDB Docker Hub image uses the following default ports and file system paths: - -- TCP port `8086`: the default port for the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/). To specify a different port or address, use the [`http-bind-address` configuration option](https://docs.influxdata.com/influxdb/v2/reference/config-options/#http-bind-address). -- `/var/lib/influxdb2/`: the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) - - - `/engine/`: Default InfluxDB [Storage engine path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#engine-path) - - `influxd.bolt`: Default [Bolt path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#bolt-path) - - `influxd.sqlite`: Default [SQLite path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#sqlite-path) - -- `/etc/influxdb2`: the [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) - - - `/etc/influxdb2/configs`: `influx` CLI connection configurations file - - `/etc/influxdb2/influx-configs`: `influx` CLI connection configurations file, *if you run setup from within the container* - - Optional: `/etc/influxdb2/config.[yml, json, toml]`: Your customized InfluxDB [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/) file - -### Configure InfluxDB v2 in a container - -To customize InfluxDB, specify [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options) in a configuration file, environment variables, or command line flags. - -#### Use a configuration file - -To customize and mount an InfluxDB configuration file, do the following: - -1. If you haven't already, [set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) to initialize an API [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). You'll need the Operator token in the next step. - -2. Run the `influx server-config` CLI command to output the current server configuration to a file in the mounted configuration directory--for example, enter the following command to use the container's `influx` CLI and default Operator token: - - ```bash - docker exec -it influxdb2 influx server-config > "$PWD/config/config.yml" - ``` - -Replace `$PWD/config/` with the host directory that you mounted at the container's `/etc/influxdb2` InfluxDB configuration directory path. - -1. Edit the `config.yml` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). -2. Restart the container. - - ```bash - docker restart influxdb2 - ``` - -#### Use environment variables and command line flags - -To override specific [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options), use environment variables or command line flags. - -- Pass `INFLUXD_` environment variables to Docker to override the configuration file--for example: - - ```bash - docker run -p 8086:8086 \ - -e INFLUXD_STORAGE_WAL_FSYNC_DELAY=15m \ - influxdb:2 - ``` - -- Pass `influxd` command line flags to override environment variables and the configuration file--for example: - - ```bash - docker run -p 8086:8086 \ - %%IMAGE%%:2 --storage-wal-fsync-delay=15m - ``` - -To learn more, see [InfluxDB configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options). - -### Upgrading from InfluxDB 1.x - -InfluxDB 2.x provides a [1.x-compatible API](https://docs.influxdata.com/influxdb/v2/reference/api/influxdb-1x/), but expects a different storage layout on disk. To account for these differences, the InfluxDB Docker Hub image provides an `upgrade` feature that migrates 1.x data and configuration to 2.x before starting the `influxd` server. - -The automated upgrade process creates the following in the InfluxDB v2 container: - -- an initial admin user -- an initial organization -- an initial bucket -- InfluxDB v2 data files (the default path is `/var/lib/influxdb2`) -- InfluxDB v2 configuration files (the default path is `/etc/influxdb2`) - -*Mount volumes at both paths to avoid losing data.* - -To run the automated upgrade, specify the following when you start the container: - -- InfluxDB v2 initialization environment variables: - - - `DOCKER_INFLUXDB_INIT_MODE=upgrade` - - `DOCKER_INFLUXDB_INIT_USERNAME`: A name for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) - - `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) - - `DOCKER_INFLUXDB_INIT_ORG`: A name for the initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) - - `DOCKER_INFLUXDB_INIT_BUCKET`: A name for the initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) - - Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) for the bucket [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data) - - Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: generates a token. - -- 1.x data and configuration paths: - - - A 1.x data volume, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable or mounted at `/var/lib/influxdb` - - Optional: a 1.x custom configuration file, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable or mounted at `/etc/influxdb/influxdb.conf` - -The upgrade process searches for mounted 1.x data and configuration paths in the following order of precedence: - -1. A configuration file referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable -2. A data directory referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable -3. A configuration file mounted at `/etc/influxdb/influxdb.conf` -4. A data directory mounted at `/var/lib/influxdb` - -> #### Automated setup and upgrade ignored if already setup -> -> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. -> -> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. - -#### Upgrade InfluxDB 1.x: default data path and configuration - -Assume you've been running a minimal InfluxDB 1.x deployment: - -```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - %%IMAGE%%:1.8 -``` - -To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: - -```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v influxdb2:/var/lib/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - %%IMAGE%%:2 -``` - -#### Upgrade InfluxDB 1.x: custom configuration - -Assume you've been running an InfluxDB 1.x deployment with customized configuration (`/etc/influxdb/influxdb.conf`): - -```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ - %%IMAGE%%:1.8 -``` - -To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: - -```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v influxdb2:/var/lib/influxdb2 \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - %%IMAGE%%:2 -``` - -#### Upgrade InfluxDB 1.x: custom data and configuration paths - -Assume you've been running an InfluxDB 1.x deployment with data and configuration mounted at custom paths: - -```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - %%IMAGE%%:1.8 -config /root/influxdb/influxdb.conf -``` - -Before you upgrade to InfluxDB v2, decide whether to keep using your custom paths or to use the InfluxDB v2 defaults. - -To use InfluxDB v2 defaults, stop the running InfluxDB 1.x container, and then run the following command: - -```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v influxdb2:/var/lib/influxdb2 \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ - %%IMAGE%%:2 -``` - -To use your custom paths instead of InfluxDB v2 default paths, run the following command: - -```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v influxdb2:/root/influxdb2/data \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ - -e DOCKER_INFLUXDB_CONFIG_PATH=/root/influxdb2/config.toml \ - -e DOCKER_INFLUXDB_BOLT_PATH=/root/influxdb2/influxdb.bolt \ - -e DOCKER_INFLUXDB_ENGINE_PATH=/root/influxdb2/engine \ - %%IMAGE%%:2 -``` - -To learn more about the upgrade process, see the [v1-to-v2 upgrade guide](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/). - -### Upgrading from quay.io-hosted InfluxDB 2.x image - -Early Docker builds of InfluxDB 2.x were hosted at `quay.io/influxdb/influxdb` and contained the `influx` and `influxd` binaries without any default configuration or helper scripts. By default, the `influxd` process stored data in `/root/.influxdbv2`. - -Starting with `v2.0.4`, we restored the InfluxDB Docker Hub build, which defaults to storing data in `/var/lib/influxdb2`. If you upgrade directly from `quay.io/influxdb/influxdb` to `influxdb:2.0.4` using the default settings, InfluxDB won't be able to find your existing data files. - -To avoid this problem when migrating from `quay.io/influxdb/influxdb` to `influxdb:2.0`, choose one of the following: - -#### Update the mount to use the InfluxDB default - -To use the InfluxDB Docker Hub data path, start a container that mounts your data volume into `/var/lib/influxdb2`--for example, if you used the following command to start the InfluxDB quay.io container: - -```bash -# quay.io InfluxDB 2.x container -docker run -p 8086:8086 \ - -v "$PWD:/root/.influxdbv2" \ - quay.io/influxdb/influxdb:v2.0.3 -``` - -Use this command to start an InfluxDB v2 Docker Hub container: - -```bash -# Docker Hub InfluxDB 2.x container -docker run -p 8086:8086 \ - -v "$PWD:/var/lib/influxdb2" \ - %%IMAGE%%:2 -``` - -#### Configure InfluxDB to use the container home directory - -To continue using the `/root/.influxdbv2` data path, customize storage path configuration options ([bolt-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#bolt-path), [engine-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#engine-path), [sqlite-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#sqlite-path)) configuration options for your InfluxDB Docker Hub container--for example, if you used the following command to start the InfluxDB quay.io container: - -```bash -# quay.io-hosted InfluxDB 2.x -docker run -p 8086:8086 \ - -v "$PWD:/root/.influxdbv2" \ - quay.io/influxdb/influxdb:v2.0.3 -``` - -Use this command to start an InfluxDB v2 Docker Hub container: - -```bash -docker run -p 8086:8086 \ - -e INFLUXD_BOLT_PATH=/root/.influxdbv2/influxd.bolt \ - -e INFLUXD_ENGINE_PATH=/root/.influxdbv2/engine \ - -v "$PWD:/root/.influxdbv2" \ - %%IMAGE%%:2 -``` - -# How to use this image for InfluxDB v1 - -Use the InfluxDB Docker Hub image to run and set up an [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1/) container. - -## Running the container - -To start an InfluxDB 1.x container, enter the following command: - -```bash -docker run -p 8086:8086 \ - -v "$PWD:/var/lib/influxdb" \ - %%IMAGE%%:1.8 -``` - -The command passes the following arguments: - -- `-p 8086:8086`: Exposes the InfluxDB [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) on host port `8086`. -- `-v $PWD:/var/lib/influxdb`: Mounts the host's `$PWD` directory to the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/) to persist data outside the container. - -Replace `$PWD` with the host directory where you want InfluxDB to store data. - -*Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/).* - -## Networking ports - -InfluxDB uses the following networking ports: - -- TCP port `8086`: the default port for the [HTTP API](https://docs.influxdata.com/influxdb/v1/tools/api/) -- TCP port `2003`: the port for the Graphite protocol (if enabled) - -Using the `docker run` [`-P, --publish-all` flag](https://docs.docker.com/reference/cli/docker/container/run/#publish-all) exposes the InfluxDB HTTP API to the host. - -## Configure InfluxDB v1 in a container - -To configure InfluxDB v1 in a container, use a configuration file or environment variables. - -### Use a configuration file - -To customize and mount a configuration file, do the following: - -1. Output the current server configuration to a file in the mounted configuration directory--for example: - - ```bash - docker run --rm %%IMAGE%%:1.8 influxd config > influxdb.conf - ``` - -2. Edit the `influxdb.conf` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). - - ```bash - docker run -p 8086:8086 \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro" \ - %%IMAGE%%:1.8 -config /etc/influxdb/influxdb.conf - ``` - - Replace `$PWD` with the host directory where you want to store the configuration file. - -### Use environment variables - -Pass [`INFLUXDB_` environment variables](https://docs.influxdata.com/influxdb/v1/administration/config/#environment-variables) to override specific InfluxDB v1 configuration options. An environment variable overrides the equivalent option in the configuration file. - -```bash -docker run -p 8086:8086 \ - -e INFLUXDB_REPORTING_DISABLED=true \ - -e INFLUXDB_META_DIR=/path/to/metadir \ - -e INFLUXDB_DATA_QUERY_LOG_ENABLED=false \ - %%IMAGE%%:1.8 -``` - -Learn more about [configuring InfluxDB v1](https://docs.influxdata.com/influxdb/v1.8/administration/config/). - -## Graphite - -InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables. Run InfluxDB with the default Graphite configuration: - -```bash -docker run -p 8086:8086 -p 2003:2003 \ - -e INFLUXDB_GRAPHITE_ENABLED=true \ - %%IMAGE%%:1.8 -``` - -See the [README on GitHub](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md) for more detailed documentation to set up the Graphite service. In order to take advantage of graphite templates, you should use a configuration file by outputting a default configuration file using the steps above and modifying the `[[graphite]]` section. - -## InfluxDB v1 HTTP API - -Creating a DB named mydb: - -```bash -curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" -``` - -Inserting into the DB: - -```bash -curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000' -``` - -Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/). - -## CLI / SHELL - -Start the container: - -```bash -docker run --name=influxdb -d -p 8086:8086 %%IMAGE%%:1.8 -``` - -Run the influx client in this container: - -```bash -docker exec -it influxdb influx -``` - -Or run the influx client in a separate container: - -```bash -docker run --rm --link=influxdb -it %%IMAGE%%:1.8 influx -host influxdb -``` - -## InfluxDB v1 database initialization - -### Not recommended for production - -We **don't** recommend using initialization options for InfluxDB v1 production scenarios, but they're useful when running standalone instances for testing. - -The InfluxDB Docker Hub image lets you set initialization options when creating an InfluxDB v1 container. - -The database initialization script is only called when running `influxd`; it isn't executed by any other program. - -### Environment variables - -During the InfluxDB v1 set up process, the InfluxDB image uses environment variables to automatically configure some server options. You can override the following environment variables to customize set up options. - -#### INFLUXDB_DB - -Automatically initializes a database with the name of this environment variable. - -#### INFLUXDB_HTTP_AUTH_ENABLED - -Enables authentication. Either this must be set or `auth-enabled = true` must be set within the configuration file for any authentication-related options below to work. - -#### INFLUXDB_ADMIN_USER - -The name of the admin user to be created. If this is unset, no admin user is created. - -#### INFLUXDB_ADMIN_PASSWORD - -The password for the admin user configured with `INFLUXDB_ADMIN_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_USER - -The name of a user to be created with no privileges. If `INFLUXDB_DB` is set, this user will be granted read and write permissions for that database. - -#### INFLUXDB_USER_PASSWORD - -The password for the user configured with `INFLUXDB_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_READ_USER - -The name of a user to be created with read privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. - -#### INFLUXDB_READ_USER_PASSWORD - -The password for the user configured with `INFLUXDB_READ_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_WRITE_USER - -The name of a user to be created with write privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. - -#### INFLUXDB_WRITE_USER_PASSWORD - -The password for the user configured with `INFLUXDB_WRITE_USER`. If this is unset, a random password is generated and printed to standard out. - -### Initialization Files - -If the Docker image finds any files with the extensions `.sh` or `.iql` inside of the `/docker-entrypoint-initdb.d` folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. - -### Manually Initialize InfluxDB v1 - -To manually initialize an InfluxDB v1 database, use `docker run` to call the `/init-influxdb.sh` script directly. The script takes the same initialization options as the `influxd run` command--for example: - -```bash -docker run --rm \ - -e INFLUXDB_DB=db0 \ - -e INFLUXDB_ADMIN_USER=admin \ - -e INFLUXDB_ADMIN_PASSWORD=supersecretpassword \ - -e INFLUXDB_USER=telegraf -e \ - -e INFLUXDB_USER_PASSWORD=secretpassword \ - -v "$PWD:/var/lib/influxdb" \ - %%IMAGE%%:1.8 /init-influxdb.sh -``` - -The command creates the following: - -- a database named `db0` -- an admin user `admin` with the password `supersecretpassword` -- a `telegraf` user with the password `secretpassword` +This command maps port `8086` and mounts your current directory to persist data. -The `--rm` flag causes Docker to exit and delete the container after the script runs. The data and configuration files created during initialization remain in the mounted volume (the host's `$PWD` directory). +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). \ No newline at end of file From a13dda285eaed6b71d180c230e1c92f033a4bad6 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 25 Jun 2025 15:11:38 -0700 Subject: [PATCH 10/77] add a extra line at end of doc for troubleshooting --- influxdb/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index ac5761d9fde2..f7c7c3fba5ba 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -157,4 +157,4 @@ docker run -d -p 8086:8086 \ This command maps port `8086` and mounts your current directory to persist data. -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). \ No newline at end of file +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). From 2fdb58490ff8f096924d6c129840f1fb1232caaf Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 25 Jun 2025 16:23:09 -0700 Subject: [PATCH 11/77] updates to InfluxDB and InfluxDB 3 introductions --- influxdb/content.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index f7c7c3fba5ba..07c097532ebc 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,6 +1,16 @@ -# What is InfluxDB 3? +# What is InfluxDB? -InfluxDB 3 is a database built to collect, process, transform, and store event and time series data, and is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. +InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: + +- Monitoring infrastructure and applications +- Collecting data from IoT devices +- Storing log and event data + +InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. + +## InfluxDB 3 + +InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. InfluxDB 3 comes in two editions: From d84c97f8e6093b9937f03861707231a6ffe25b37 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 12:20:20 -0700 Subject: [PATCH 12/77] clarify version coverage and improve navigation for InfluxDB Docker README --- .template-helpers/arches.sh | 2 +- .../generate-dockerfile-links-partial.sh | 2 +- .template-helpers/variant.sh | 2 +- influxdb/README.md | 695 +++--------------- influxdb/README.md-e | 398 ++++++++++ influxdb/content.md | 26 +- 6 files changed, 531 insertions(+), 594 deletions(-) create mode 100644 influxdb/README.md-e diff --git a/.template-helpers/arches.sh b/.template-helpers/arches.sh index 4baf2fd659b6..9d2765820622 100755 --- a/.template-helpers/arches.sh +++ b/.template-helpers/arches.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/opt/homebrew/bin/bash set -Eeuo pipefail repo="${1:-}" diff --git a/.template-helpers/generate-dockerfile-links-partial.sh b/.template-helpers/generate-dockerfile-links-partial.sh index 126fcbea3920..2b04d5357744 100755 --- a/.template-helpers/generate-dockerfile-links-partial.sh +++ b/.template-helpers/generate-dockerfile-links-partial.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/opt/homebrew/bin/bash set -Eeuo pipefail repo="${1:-}" diff --git a/.template-helpers/variant.sh b/.template-helpers/variant.sh index dd802ec5c82d..72bfafad3e96 100755 --- a/.template-helpers/variant.sh +++ b/.template-helpers/variant.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/opt/homebrew/bin/bash set -eo pipefail repo="$1" diff --git a/influxdb/README.md b/influxdb/README.md index 42e1545d9884..204eaf2d4ae9 100644 --- a/influxdb/README.md +++ b/influxdb/README.md @@ -24,33 +24,33 @@ WARNING: # Supported tags and respective `Dockerfile` links -- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/Dockerfile) +- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/Dockerfile) -- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/alpine/Dockerfile) +- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/alpine/Dockerfile) -- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/data/Dockerfile) +- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/Dockerfile) -- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/data/alpine/Dockerfile) +- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/alpine/Dockerfile) -- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/meta/Dockerfile) +- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/Dockerfile) -- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/meta/alpine/Dockerfile) +- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/alpine/Dockerfile) -- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/data/Dockerfile) +- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/Dockerfile) -- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/data/alpine/Dockerfile) +- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/alpine/Dockerfile) -- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/meta/Dockerfile) +- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/Dockerfile) -- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/meta/alpine/Dockerfile) +- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/alpine/Dockerfile) -- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/2.7/Dockerfile) +- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) -- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/2.7/alpine/Dockerfile) +- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) -- [`3-core`, `3.1-core`, `3.1.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/3.1-core/Dockerfile) +- [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) -- [`3-enterprise`, `3.1-enterprise`, `3.1.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/3.1-enterprise/Dockerfile) +- [`3-enterprise`, `3.2-enterprise`, `3.2.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-enterprise/Dockerfile) # Quick reference (cont.) @@ -58,7 +58,7 @@ WARNING: [https://github.com/influxdata/influxdata-docker/issues](https://github.com/influxdata/influxdata-docker/issues?q=) - **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) - [`amd64`](https://hub.docker.com/r/amd64/influxdb/), [`arm64v8`](https://hub.docker.com/r/arm64v8/influxdb/) + `amd64`, `arm64v8` - **Published image artifact details**: [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) @@ -73,647 +73,174 @@ WARNING: # What is InfluxDB? -InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. +InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: -Use the InfluxDB Docker Hub image to write, query, and process time series data in [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) or [InfluxDB v1](https://docs.influxdata.com/influxdb/v1/). +- Monitoring infrastructure and applications +- Collecting data from IoT devices +- Storing log and event data -For more information, visit https://influxdata.com. +InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. -![logo](https://raw.githubusercontent.com/docker-library/docs/43d87118415bb75d7bb107683e79cd6d69186f67/influxdb/logo.png) +## InfluxDB 3 -# How to use this image for InfluxDB v2 +InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. -**Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2. +InfluxDB 3 comes in two editions: -## Start InfluxDB v2 and set up with the UI, CLI, or API +- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -To start an InfluxDB v2 container, enter the following command: +>[!Note] +> ## License key for Enterprise +>To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). -```bash -docker run \ - -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - influxdb:2 -``` +For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) -Replace the following with your own values: +## Docker Images -- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path +Use the official images hosted on Quay.io: -After the container starts, the InfluxDB UI and API are accessible at http://localhost:8086 on the host. You're ready to set up an initial admin user, token, and bucket from outside or inside the container--choose one of the following: +- **Core:** `quay.io/influxdb/influxdb3:latest` +- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` -- **Set up InfluxDB from outside the container**: [Set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) from the host or network using the InfluxDB UI, `influx` CLI, or HTTP API. +## Parameter glossary -- **Set up InfluxDB from inside the container**: Use `docker exec` to run the `influx` CLI installed in the container--for example: +| Parameter | Description | +|------------------|--------------------------------------------------------------| +| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | +| `--node-id` | Unique identifier for the node within an Enterprise cluster. | +| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | +| `--data-dir` | Path to the directory for data storage. | - ```bash - docker exec influxdb2 influx setup \ - --username $USERNAME \ - --password $PASSWORD \ - --org $ORGANIZATION \ - --bucket $BUCKET \ - --force - ``` +# How to use this image -See the [`influx setup` documentation](https://docs.influxdata.com/influxdb/v2/reference/cli/influx/setup/) for the full list of options. +## Start InfluxDB 3 Core -*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* - -## Start InfluxDB v2 with automated setup - -To start and set up InfluxDB v2 with a single command, specify `-e DOCKER_INFLUXDB_INIT_MODE=setup` and `-e DOCKER_INFLUXDB_INIT_` environment variables for the initial user, password, bucket, and organization--for example: +To start the InfluxDB 3 Core container, run the following command: ```bash -docker run -d -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME= \ - -e DOCKER_INFLUXDB_INIT_PASSWORD= \ - -e DOCKER_INFLUXDB_INIT_ORG= \ - -e DOCKER_INFLUXDB_INIT_BUCKET= \ - influxdb:2 +docker run -d --name influxdb3-core \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -Replace the following with your own values: - -- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- ``: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) -- ``: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) -- ``: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) -- ``: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) (database) - -*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* - -### Automated setup options - -In setup mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or upgrade mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), you can specify the following Docker-specific environment variables to provide initial setup values: - -- `DOCKER_INFLUXDB_INIT_USERNAME`: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). -- `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). -- `DOCKER_INFLUXDB_INIT_ORG`: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/). -- `DOCKER_INFLUXDB_INIT_BUCKET`: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/). -- Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) to use as the initial bucket's [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data). -- Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A string value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: a generated token. - -The following example shows how to pass values for all initial setup options: +Once the container is running, generate an admin token: ```bash -docker run -d -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_RETENTION=1w \ - -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token \ - influxdb:2 +docker exec -it influxdb3-core influxdb3 generate token --admin ``` -*To upgrade from InfluxDB 1.x to InfluxDB 2.x, see the **Upgrading from InfluxDB 1.x** section below.\* - -With InfluxDB set up and running, see the [Get started](https://docs.influxdata.com/influxdb/v2/get-started/) tutorial to create tokens and write and query data. - -### Custom Initialization Scripts - -In `setup` mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or `upgrade` mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), the InfluxDB Docker Hub image supports running custom initialization scripts. After the setup process completes, scripts are executed in lexical sort order by name. - -For the container to run scripts, they must: - -- Be mounted in the container's `/docker-entrypoint-initdb.d` directory -- Be named using the `.sh` file name extension -- Be executable by the user running the `docker run` command--for example, to allow the current use to execute a script with `docker run`: - - ```bash - chmod +x ./scripts/ - ``` - -> #### Grant permissions to mounted files -> -> By default, Docker runs containers using the user and group IDs of the user executing the `docker run` command. When files are bind-mounted into the container, Docker preserves the user and group ownership from the host system. - -The image exports a number of variables into the environment before executing scripts. The following variables are available for you to use in your scripts: - -- `INFLUX_CONFIGS_PATH`: Path to the `influx` CLI connection configurations file written by `setup`/`upgrade` -- `INFLUX_HOST`: URL to the `influxd` instance running `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_USER_ID`: ID of the initial admin user created by `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_ORG_ID`: ID of the initial organization created by `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_BUCKET_ID`: ID of the initial bucket created by `setup`/`upgrade` - -For example, to grant an InfluxDB 1.x client *write* permission to your initial bucket, create a `$PWD/scripts/setup-v1.sh` file that contains the following: - -```bash -#!/bin/bash -set -e - -influx v1 dbrp create \ - --bucket-id ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ - --db ${V1_DB_NAME} \ - --rp ${V1_RP_NAME} \ - --default \ - --org ${DOCKER_INFLUXDB_INIT_ORG} - -influx v1 auth create \ - --username ${V1_AUTH_USERNAME} \ - --password ${V1_AUTH_PASSWORD} \ - --write-bucket ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ - --org ${DOCKER_INFLUXDB_INIT_ORG} -``` - -Then, run the following command to start and set up InfluxDB using custom scripts: - -```bash -docker run -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -v "$PWD/scripts:/docker-entrypoint-initdb.d" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e V1_DB_NAME=v1-db \ - -e V1_RP_NAME=v1-rp \ - -e V1_AUTH_USERNAME=v1-user \ - -e V1_AUTH_PASSWORD=v1-password \ - influxdb:2 -``` - -> #### Automated setup and upgrade ignored if already setup -> -> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. -> -> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. - -## Access InfluxDB v2 file system and ports - -When starting an InfluxDB container, we recommend the following for easy access to your data, configurations, and InfluxDB v2 instance: - -- Publish the container's `8086` port to make the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) accessible from the host system. -- Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) outside of containers. - -### Default file system and networking ports - -For InfluxDB v2, the InfluxDB Docker Hub image uses the following default ports and file system paths: - -- TCP port `8086`: the default port for the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/). To specify a different port or address, use the [`http-bind-address` configuration option](https://docs.influxdata.com/influxdb/v2/reference/config-options/#http-bind-address). -- `/var/lib/influxdb2/`: the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) - - - `/engine/`: Default InfluxDB [Storage engine path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#engine-path) - - `influxd.bolt`: Default [Bolt path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#bolt-path) - - `influxd.sqlite`: Default [SQLite path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#sqlite-path) - -- `/etc/influxdb2`: the [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) - - - `/etc/influxdb2/configs`: `influx` CLI connection configurations file - - `/etc/influxdb2/influx-configs`: `influx` CLI connection configurations file, *if you run setup from within the container* - - Optional: `/etc/influxdb2/config.[yml, json, toml]`: Your customized InfluxDB [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/) file - -### Configure InfluxDB v2 in a container - -To customize InfluxDB, specify [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options) in a configuration file, environment variables, or command line flags. - -#### Use a configuration file - -To customize and mount an InfluxDB configuration file, do the following: - -1. If you haven't already, [set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) to initialize an API [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). You'll need the Operator token in the next step. - -2. Run the `influx server-config` CLI command to output the current server configuration to a file in the mounted configuration directory--for example, enter the following command to use the container's `influx` CLI and default Operator token: - - ```bash - docker exec -it influxdb2 influx server-config > "$PWD/config/config.yml" - ``` - -Replace `$PWD/config/` with the host directory that you mounted at the container's `/etc/influxdb2` InfluxDB configuration directory path. - -1. Edit the `config.yml` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). -2. Restart the container. - - ```bash - docker restart influxdb2 - ``` - -#### Use environment variables and command line flags - -To override specific [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options), use environment variables or command line flags. - -- Pass `INFLUXD_` environment variables to Docker to override the configuration file--for example: - - ```bash - docker run -p 8086:8086 \ - -e INFLUXD_STORAGE_WAL_FSYNC_DELAY=15m \ - influxdb:2 - ``` - -- Pass `influxd` command line flags to override environment variables and the configuration file--for example: - - ```bash - docker run -p 8086:8086 \ - influxdb:2 --storage-wal-fsync-delay=15m - ``` - -To learn more, see [InfluxDB configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options). - -### Upgrading from InfluxDB 1.x - -InfluxDB 2.x provides a [1.x-compatible API](https://docs.influxdata.com/influxdb/v2/reference/api/influxdb-1x/), but expects a different storage layout on disk. To account for these differences, the InfluxDB Docker Hub image provides an `upgrade` feature that migrates 1.x data and configuration to 2.x before starting the `influxd` server. - -The automated upgrade process creates the following in the InfluxDB v2 container: - -- an initial admin user -- an initial organization -- an initial bucket -- InfluxDB v2 data files (the default path is `/var/lib/influxdb2`) -- InfluxDB v2 configuration files (the default path is `/etc/influxdb2`) - -*Mount volumes at both paths to avoid losing data.* - -To run the automated upgrade, specify the following when you start the container: - -- InfluxDB v2 initialization environment variables: - - - `DOCKER_INFLUXDB_INIT_MODE=upgrade` - - `DOCKER_INFLUXDB_INIT_USERNAME`: A name for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) - - `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) - - `DOCKER_INFLUXDB_INIT_ORG`: A name for the initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) - - `DOCKER_INFLUXDB_INIT_BUCKET`: A name for the initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) - - Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) for the bucket [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data) - - Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: generates a token. - -- 1.x data and configuration paths: - - - A 1.x data volume, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable or mounted at `/var/lib/influxdb` - - Optional: a 1.x custom configuration file, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable or mounted at `/etc/influxdb/influxdb.conf` - -The upgrade process searches for mounted 1.x data and configuration paths in the following order of precedence: - -1. A configuration file referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable -2. A data directory referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable -3. A configuration file mounted at `/etc/influxdb/influxdb.conf` -4. A data directory mounted at `/var/lib/influxdb` - -> #### Automated setup and upgrade ignored if already setup -> -> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. -> -> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. - -#### Upgrade InfluxDB 1.x: default data path and configuration - -Assume you've been running a minimal InfluxDB 1.x deployment: +Use the token to create a database: ```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - influxdb:1.8 +docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN ``` -To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: +To check the server health: ```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v influxdb2:/var/lib/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 +curl localhost:8086/health ``` -#### Upgrade InfluxDB 1.x: custom configuration +## Start InfluxDB 3 Enterprise -Assume you've been running an InfluxDB 1.x deployment with customized configuration (`/etc/influxdb/influxdb.conf`): +InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, make sure to provide your license key as an environment variable and include required flags: ```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ - influxdb:1.8 +docker run -d --name influxdb3-enterprise -p 8086:8086 \ + -v $PWD/plugins:/plugins \ + -v $PWD/data:/var/lib/influxdb3 \ + -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ + influxdb:enterprise serve \ + --cluster-id cluster1 \ + --node-id node1 \ + --plugin-dir /plugins \ + --object-store file \ + --data-dir /var/lib/influxdb3 ``` -To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: +Then, generate an admin token: ```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v influxdb2:/var/lib/influxdb2 \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 +docker exec -it influxdb3-enterprise influxdb3 create token --admin ``` - -#### Upgrade InfluxDB 1.x: custom data and configuration paths - -Assume you've been running an InfluxDB 1.x deployment with data and configuration mounted at custom paths: +Use the token from the output to create a database. ```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - influxdb:1.8 -config /root/influxdb/influxdb.conf +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ``` -Before you upgrade to InfluxDB v2, decide whether to keep using your custom paths or to use the InfluxDB v2 defaults. +## Mount data to persist across restarts -To use InfluxDB v2 defaults, stop the running InfluxDB 1.x container, and then run the following command: +To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. -```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v influxdb2:/var/lib/influxdb2 \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ - influxdb:2 -``` +### Using a Docker volume -To use your custom paths instead of InfluxDB v2 default paths, run the following command: +To persist data using a Docker-managed volume, run the following command: ```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v influxdb2:/root/influxdb2/data \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ - -e DOCKER_INFLUXDB_CONFIG_PATH=/root/influxdb2/config.toml \ - -e DOCKER_INFLUXDB_BOLT_PATH=/root/influxdb2/influxdb.bolt \ - -e DOCKER_INFLUXDB_ENGINE_PATH=/root/influxdb2/engine \ - influxdb:2 +docker run -d --name influxdb3-core \ + -v influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` +This command: -To learn more about the upgrade process, see the [v1-to-v2 upgrade guide](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/). - -### Upgrading from quay.io-hosted InfluxDB 2.x image +- Creates or reuses a Docker volume named `influxdb3-data`. +- Maps the default InfluxDB port (`8086`) to your local machine. +- Starts the InfluxDB server with a required host ID and object store configuration. -Early Docker builds of InfluxDB 2.x were hosted at `quay.io/influxdb/influxdb` and contained the `influx` and `influxd` binaries without any default configuration or helper scripts. By default, the `influxd` process stored data in `/root/.influxdbv2`. +### Using a local host directory -Starting with `v2.0.4`, we restored the InfluxDB Docker Hub build, which defaults to storing data in `/var/lib/influxdb2`. If you upgrade directly from `quay.io/influxdb/influxdb` to `influxdb:2.0.4` using the default settings, InfluxDB won't be able to find your existing data files. - -To avoid this problem when migrating from `quay.io/influxdb/influxdb` to `influxdb:2.0`, choose one of the following: - -#### Update the mount to use the InfluxDB default - -To use the InfluxDB Docker Hub data path, start a container that mounts your data volume into `/var/lib/influxdb2`--for example, if you used the following command to start the InfluxDB quay.io container: +To persist data in a local directory on your host, use the following command: ```bash -# quay.io InfluxDB 2.x container -docker run -p 8086:8086 \ - -v "$PWD:/root/.influxdbv2" \ - quay.io/influxdb/influxdb:v2.0.3 +docker run -d --name influxdb3-core \ + -v $PWD/influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -Use this command to start an InfluxDB v2 Docker Hub container: +This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. -```bash -# Docker Hub InfluxDB 2.x container -docker run -p 8086:8086 \ - -v "$PWD:/var/lib/influxdb2" \ - influxdb:2 -``` +# InfluxDB v2 and v1 Docker setup -#### Configure InfluxDB to use the container home directory +## Start InfluxDB v2 -To continue using the `/root/.influxdbv2` data path, customize storage path configuration options ([bolt-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#bolt-path), [engine-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#engine-path), [sqlite-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#sqlite-path)) configuration options for your InfluxDB Docker Hub container--for example, if you used the following command to start the InfluxDB quay.io container: +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. ```bash -# quay.io-hosted InfluxDB 2.x -docker run -p 8086:8086 \ - -v "$PWD:/root/.influxdbv2" \ - quay.io/influxdb/influxdb:v2.0.3 -``` - -Use this command to start an InfluxDB v2 Docker Hub container: - -```bash -docker run -p 8086:8086 \ - -e INFLUXD_BOLT_PATH=/root/.influxdbv2/influxd.bolt \ - -e INFLUXD_ENGINE_PATH=/root/.influxdbv2/engine \ - -v "$PWD:/root/.influxdbv2" \ - influxdb:2 -``` - -# How to use this image for InfluxDB v1 - -Use the InfluxDB Docker Hub image to run and set up an [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1/) container. - -## Running the container - -To start an InfluxDB 1.x container, enter the following command: - -```bash -docker run -p 8086:8086 \ - -v "$PWD:/var/lib/influxdb" \ - influxdb:1.8 -``` - -The command passes the following arguments: - -- `-p 8086:8086`: Exposes the InfluxDB [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) on host port `8086`. -- `-v $PWD:/var/lib/influxdb`: Mounts the host's `$PWD` directory to the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/) to persist data outside the container. - -Replace `$PWD` with the host directory where you want InfluxDB to store data. - -*Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/).* - -## Networking ports - -InfluxDB uses the following networking ports: - -- TCP port `8086`: the default port for the [HTTP API](https://docs.influxdata.com/influxdb/v1/tools/api/) -- TCP port `2003`: the port for the Graphite protocol (if enabled) - -Using the `docker run` [`-P, --publish-all` flag](https://docs.docker.com/reference/cli/docker/container/run/#publish-all) exposes the InfluxDB HTTP API to the host. - -## Configure InfluxDB v1 in a container - -To configure InfluxDB v1 in a container, use a configuration file or environment variables. - -### Use a configuration file - -To customize and mount a configuration file, do the following: - -1. Output the current server configuration to a file in the mounted configuration directory--for example: - - ```bash - docker run --rm influxdb:1.8 influxd config > influxdb.conf - ``` - -2. Edit the `influxdb.conf` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). - - ```bash - docker run -p 8086:8086 \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro" \ - influxdb:1.8 -config /etc/influxdb/influxdb.conf - ``` - - Replace `$PWD` with the host directory where you want to store the configuration file. - -### Use environment variables - -Pass [`INFLUXDB_` environment variables](https://docs.influxdata.com/influxdb/v1/administration/config/#environment-variables) to override specific InfluxDB v1 configuration options. An environment variable overrides the equivalent option in the configuration file. - -```bash -docker run -p 8086:8086 \ - -e INFLUXDB_REPORTING_DISABLED=true \ - -e INFLUXDB_META_DIR=/path/to/metadir \ - -e INFLUXDB_DATA_QUERY_LOG_ENABLED=false \ - influxdb:1.8 -``` - -Learn more about [configuring InfluxDB v1](https://docs.influxdata.com/influxdb/v1.8/administration/config/). - -## Graphite - -InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables. Run InfluxDB with the default Graphite configuration: - -```bash -docker run -p 8086:8086 -p 2003:2003 \ - -e INFLUXDB_GRAPHITE_ENABLED=true \ - influxdb:1.8 -``` - -See the [README on GitHub](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md) for more detailed documentation to set up the Graphite service. In order to take advantage of graphite templates, you should use a configuration file by outputting a default configuration file using the steps above and modifying the `[[graphite]]` section. - -## InfluxDB v1 HTTP API - -Creating a DB named mydb: - -```bash -curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" -``` - -Inserting into the DB: - -```bash -curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000' -``` - -Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/). - -## CLI / SHELL - -Start the container: - -```bash -docker run --name=influxdb -d -p 8086:8086 influxdb:1.8 -``` - -Run the influx client in this container: - -```bash -docker exec -it influxdb influx -``` - -Or run the influx client in a separate container: - -```bash -docker run --rm --link=influxdb -it influxdb:1.8 influx -host influxdb +docker run -d -p 8086:8086 \ + -v $PWD/data:/var/lib/influxdb2 \ + -v $PWD/config:/etc/influxdb2 \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 ``` -## InfluxDB v1 database initialization - -### Not recommended for production - -We **don't** recommend using initialization options for InfluxDB v1 production scenarios, but they're useful when running standalone instances for testing. - -The InfluxDB Docker Hub image lets you set initialization options when creating an InfluxDB v1 container. - -The database initialization script is only called when running `influxd`; it isn't executed by any other program. - -### Environment variables - -During the InfluxDB v1 set up process, the InfluxDB image uses environment variables to automatically configure some server options. You can override the following environment variables to customize set up options. - -#### INFLUXDB_DB +After the container starts, go to `http://localhost:8086` to access the UI. -Automatically initializes a database with the name of this environment variable. +For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). -#### INFLUXDB_HTTP_AUTH_ENABLED +## Start InfluxDB v1 -Enables authentication. Either this must be set or `auth-enabled = true` must be set within the configuration file for any authentication-related options below to work. - -#### INFLUXDB_ADMIN_USER - -The name of the admin user to be created. If this is unset, no admin user is created. - -#### INFLUXDB_ADMIN_PASSWORD - -The password for the admin user configured with `INFLUXDB_ADMIN_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_USER - -The name of a user to be created with no privileges. If `INFLUXDB_DB` is set, this user will be granted read and write permissions for that database. - -#### INFLUXDB_USER_PASSWORD - -The password for the user configured with `INFLUXDB_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_READ_USER - -The name of a user to be created with read privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. - -#### INFLUXDB_READ_USER_PASSWORD - -The password for the user configured with `INFLUXDB_READ_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_WRITE_USER - -The name of a user to be created with write privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. - -#### INFLUXDB_WRITE_USER_PASSWORD - -The password for the user configured with `INFLUXDB_WRITE_USER`. If this is unset, a random password is generated and printed to standard out. - -### Initialization Files - -If the Docker image finds any files with the extensions `.sh` or `.iql` inside of the `/docker-entrypoint-initdb.d` folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. - -### Manually Initialize InfluxDB v1 - -To manually initialize an InfluxDB v1 database, use `docker run` to call the `/init-influxdb.sh` script directly. The script takes the same initialization options as the `influxd run` command--for example: +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: ```bash -docker run --rm \ - -e INFLUXDB_DB=db0 \ - -e INFLUXDB_ADMIN_USER=admin \ - -e INFLUXDB_ADMIN_PASSWORD=supersecretpassword \ - -e INFLUXDB_USER=telegraf -e \ - -e INFLUXDB_USER_PASSWORD=secretpassword \ - -v "$PWD:/var/lib/influxdb" \ - influxdb:1.8 /init-influxdb.sh +docker run -d -p 8086:8086 \ + -v $PWD:/var/lib/influxdb \ + influxdb:1.8 ``` -The command creates the following: - -- a database named `db0` -- an admin user `admin` with the password `supersecretpassword` -- a `telegraf` user with the password `secretpassword` +This command maps port `8086` and mounts your current directory to persist data. -The `--rm` flag causes Docker to exit and delete the container after the script runs. The data and configuration files created during initialization remain in the mounted volume (the host's `$PWD` directory). +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). # Image Variants diff --git a/influxdb/README.md-e b/influxdb/README.md-e new file mode 100644 index 000000000000..3dd25f96bbab --- /dev/null +++ b/influxdb/README.md-e @@ -0,0 +1,398 @@ + + +# Quick reference + +- **Maintained by**: + [InfluxData](%%GITHUB-REPO%%) + +- **Where to get help**: + [the Docker Community Slack](https://dockr.ly/comm-slack), [Server Fault](https://serverfault.com/help/on-topic), [Unix & Linux](https://unix.stackexchange.com/help/on-topic), or [Stack Overflow](https://stackoverflow.com/help/on-topic) + +# Supported tags and respective `Dockerfile` links + +- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/Dockerfile) + +- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/alpine/Dockerfile) + +- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/Dockerfile) + +- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/alpine/Dockerfile) + +- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/Dockerfile) + +- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/alpine/Dockerfile) + +- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/Dockerfile) + +- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/alpine/Dockerfile) + +- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/Dockerfile) + +- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/alpine/Dockerfile) + +- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) + +- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) + +- [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) + +- [`3-enterprise`, `3.2-enterprise`, `3.2.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-enterprise/Dockerfile) + +# Quick reference (cont.) + +- **Where to file issues**: + [%%GITHUB-REPO%%/issues](%%GITHUB-REPO%%/issues?q=) + +- **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) + `amd64`, `arm64v8` + +- **Published image artifact details**: + [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) + (image metadata, transfer size, etc) + +- **Image updates**: + [official-images repo's `library/influxdb` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Finfluxdb) + [official-images repo's `library/influxdb` file](https://github.com/docker-library/official-images/blob/master/library/influxdb) ([history](https://github.com/docker-library/official-images/commits/master/library/influxdb)) + +- **Source of this description**: + [docs repo's `influxdb/` directory](https://github.com/docker-library/docs/tree/master/influxdb) ([history](https://github.com/docker-library/docs/commits/master/influxdb)) + +# What is InfluxDB? + +InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: + +- Monitoring infrastructure and applications +- Collecting data from IoT devices +- Storing log and event data + +InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. + +## InfluxDB 3 + +InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. + +InfluxDB 3 comes in two editions: + +- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. + +>[!Note] +> ## License key for Enterprise +>To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). + +For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) + +## Docker Images + +Use the official images hosted on Quay.io: + +- **Core:** `quay.io/influxdb/influxdb3:latest` +- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` + +## Parameter glossary + +| Parameter | Description | +|------------------|--------------------------------------------------------------| +| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | +| `--node-id` | Unique identifier for the node within an Enterprise cluster. | +| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | +| `--data-dir` | Path to the directory for data storage. | + +# How to use this image + +## Start InfluxDB 3 Core + +To start the InfluxDB 3 Core container, run the following command: + +```bash +docker run -d --name influxdb3-core \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +``` + +Once the container is running, generate an admin token: + +```bash +docker exec -it influxdb3-core influxdb3 generate token --admin +``` + +Use the token to create a database: + +```bash +docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN +``` + +To check the server health: + +```bash +curl localhost:8086/health +``` + +## Start InfluxDB 3 Enterprise + +InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, make sure to provide your license key as an environment variable and include required flags: + +```bash +docker run -d --name influxdb3-enterprise -p 8086:8086 \ + -v $PWD/plugins:/plugins \ + -v $PWD/data:/var/lib/influxdb3 \ + -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ + influxdb:enterprise serve \ + --cluster-id cluster1 \ + --node-id node1 \ + --plugin-dir /plugins \ + --object-store file \ + --data-dir /var/lib/influxdb3 +``` + +Then, generate an admin token: + +```bash +docker exec -it influxdb3-enterprise influxdb3 create token --admin +``` +Use the token from the output to create a database. + +```bash +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +``` + +## Mount data to persist across restarts + +To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. + +### Using a Docker volume + +To persist data using a Docker-managed volume, run the following command: + +```bash +docker run -d --name influxdb3-core \ + -v influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +``` +This command: + +- Creates or reuses a Docker volume named `influxdb3-data`. +- Maps the default InfluxDB port (`8086`) to your local machine. +- Starts the InfluxDB server with a required host ID and object store configuration. + +### Using a local host directory + +To persist data in a local directory on your host, use the following command: + +```bash +docker run -d --name influxdb3-core \ + -v $PWD/influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +``` + +This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. + +# InfluxDB v2 and v1 Docker setup + +## Start InfluxDB v2 + +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. + +```bash +docker run -d -p 8086:8086 \ + -v $PWD/data:/var/lib/influxdb2 \ + -v $PWD/config:/etc/influxdb2 \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 +``` + +After the container starts, go to `http://localhost:8086` to access the UI. + +For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). + +## Start InfluxDB v1 + +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: + +```bash +docker run -d -p 8086:8086 \ + -v $PWD:/var/lib/influxdb \ + influxdb:1.8 +``` + +This command maps port `8086` and mounts your current directory to persist data. + +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). + +# Image Variants + +The `influxdb` images come in many flavors, each designed for a specific use case. + +## `influxdb:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `influxdb:-alpine` + +This image is based on the popular [Alpine Linux project](https://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use [musl libc](https://musl.libc.org) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), so software will often run into issues depending on the depth of their libc requirements/assumptions. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `influxdb:data` + +*Using this image for [InfluxDB Enterprise](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file) requires a valid InfluxData [license key](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file).* + +This image contains the enterprise data node package for clustering. It supports all of the same options as the InfluxDB 1.x OSS image, but it needs port 8088 to be exposed to the meta nodes. + +Refer to the `influxdb:meta` variant for directions on how to setup a cluster. + +## `influxdb:meta` + +*This image requires a valid license key from InfluxData.* Please visit our [products page](https://www.influxdata.com/products/) to learn more. + +This image contains the enterprise meta node package for clustering. It is meant to be used in conjunction with the `influxdb:data` package of the same version. + +### Using this Image + +#### Specifying the license key + +The license key can be specified using either an environment variable or by overriding the configuration file. If you specify the license key directly, the container needs to be able to access the InfluxData portal. + +```console +docker run -p 8089:8089 -p 8091:8091 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= + influxdb:meta +``` + +#### Running the container + +The examples below will use docker's built-in networking capability. If you use the port exposing feature, the host port and the container port need to be the same. + +First, create a docker network: + +```console +docker network create influxdb +``` + +Start three meta nodes. This is the suggested number of meta nodes. We do not recommend running more or less. If you choose to run more or less, be sure that the number of meta nodes is odd. The hostname must be set on each container to the address that will be used to access the meta node. When using docker networks, the hostname should be made the same as the name of the container. + +```console +docker run -d --name=influxdb-meta-0 --network=influxdb \ + -h influxdb-meta-0 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta +docker run -d --name=influxdb-meta-1 --network=influxdb \ + -h influxdb-meta-1 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta +docker run -d --name=influxdb-meta-2 --network=influxdb \ + -h influxdb-meta-2 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta +``` + +When setting the hostname, you can use `-h ` or you can directly set the environment variable using `-e INFLUXDB_HOSTNAME=`. + +After starting the meta nodes, you need to tell them about each other. Choose one of the meta nodes and run `influxd-ctl` in the container. + +```console +docker exec influxdb-meta-0 \ + influxd-ctl add-meta influxdb-meta-1:8091 +docker exec influxdb-meta-0 \ + influxd-ctl add-meta influxdb-meta-2:8091 +``` + +Or you can just start a single meta node. If you setup a single meta node, you do not need to use `influxd-ctl add-meta`. + +```console +docker run -d --name=influxdb-meta --network=influxdb \ + -h influxdb-meta \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta -single-server +``` + +#### Connecting the data nodes + +Start the data nodes using `influxdb:data` with similar command line arguments to the meta nodes. You can start as many data nodes as are allowed by your license. + +```console +docker run -d --name=influxdb-data-0 --network=influxdb \ + -h influxdb-data-0 \ + -e INFLUXDB_LICENSE_KEY= \ + influxdb:data +``` + +You can add `-p 8086:8086` to expose the http port to the host machine. After starting the container, choose one of the meta nodes and add the data node to it. + +```console +docker exec influxdb-meta-0 \ + influxd-ctl add-data influxdb-data-0:8088 +``` + +Perform these same steps for any other data nodes that you want to add. + +You can now connect to any of the running data nodes to use your cluster. + +See the [influxdb](https://hub.docker.com/_/influxdb/) image documentation for more details on how to use the data node images. + +#### Configuration + +InfluxDB Meta can be either configured from a config file or using environment variables. To mount a configuration file and use it with the server, you can use this command: + +Generate the default configuration file: + +```console +docker run --rm influxdb:meta influxd-meta config > influxdb-meta.conf +``` + +Modify the default configuration, which will now be available under `$PWD`. Then start the InfluxDB Meta container. + +```console +docker run \ + -v $PWD/influxdb-meta.conf:/etc/influxdb/influxdb-meta.conf:ro \ + influxdb -config /etc/influxdb/influxdb-meta.conf +``` + +Modify `$PWD` to the directory where you want to store the configuration file. + +For environment variables, the format is `INFLUXDB_$SECTION_$NAME`. All dashes (`-`) are replaced with underscores (`_`). If the variable isn't in a section, then omit that part. + +Examples: + +```console +INFLUXDB_REPORTING_DISABLED=true +INFLUXDB_META_DIR=/path/to/metadir +INFLUXDB_ENTERPRISE_REGISTRATION_ENABLED=true +``` + +For more information, see how to [Install InfluxDB Enterprise meta nodes](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/). + +# License + +View [license information](https://github.com/influxdata/influxdb/blob/master/LICENSE) for the software contained in this image. + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +Some additional license information which was able to be auto-detected might be found in [the `repo-info` repository's `influxdb/` directory](https://github.com/docker-library/repo-info/tree/master/repos/influxdb). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/influxdb/content.md b/influxdb/content.md index 07c097532ebc..2ace332b397a 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,4 +1,12 @@ -# What is InfluxDB? +**This README covers all currently supported versions of InfluxDB:** + +- **InfluxDB 3** (Core and Enterprise) +- **InfluxDB v2** +- **InfluxDB v1** + +Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. + +# InfluxDB Docker Image Overview InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: @@ -17,9 +25,8 @@ InfluxDB 3 comes in two editions: - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. ->[!Note] -> ## License key for Enterprise ->To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). +**License key for Enterprise** +To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) @@ -133,9 +140,10 @@ docker run -d --name influxdb3-core \ This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. -# InfluxDB v2 and v1 Docker setup -## Start InfluxDB v2 +# InfluxDB v2 + +## How to use the InfluxDB v2 Docker image Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. @@ -155,7 +163,9 @@ After the container starts, go to `http://localhost:8086` to access the UI. For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). -## Start InfluxDB v1 +# InfluxDB v1 + +## How to use the InfluxDB v1 Docker image Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: @@ -168,3 +178,5 @@ docker run -d -p 8086:8086 \ This command maps port `8086` and mounts your current directory to persist data. For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). + + From 0ad6b9f815daffab135cfd4fb854f955db9bf67e Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 12:30:14 -0700 Subject: [PATCH 13/77] remove autogenerated README.md and backup file from PR --- influxdb/README.md | 667 ++++++++++++++++++++++++++++++++++++------- influxdb/README.md-e | 398 -------------------------- 2 files changed, 570 insertions(+), 495 deletions(-) delete mode 100644 influxdb/README.md-e diff --git a/influxdb/README.md b/influxdb/README.md index 204eaf2d4ae9..08e2fc855058 100644 --- a/influxdb/README.md +++ b/influxdb/README.md @@ -58,7 +58,7 @@ WARNING: [https://github.com/influxdata/influxdata-docker/issues](https://github.com/influxdata/influxdata-docker/issues?q=) - **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) - `amd64`, `arm64v8` + [`amd64`](https://hub.docker.com/r/amd64/influxdb/), [`arm64v8`](https://hub.docker.com/r/arm64v8/influxdb/) - **Published image artifact details**: [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) @@ -73,174 +73,647 @@ WARNING: # What is InfluxDB? -InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: +InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. -- Monitoring infrastructure and applications -- Collecting data from IoT devices -- Storing log and event data +Use the InfluxDB Docker Hub image to write, query, and process time series data in [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) or [InfluxDB v1](https://docs.influxdata.com/influxdb/v1/). -InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. +For more information, visit https://influxdata.com. -## InfluxDB 3 +![logo](https://raw.githubusercontent.com/docker-library/docs/43d87118415bb75d7bb107683e79cd6d69186f67/influxdb/logo.png) -InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. +# How to use this image for InfluxDB v2 -InfluxDB 3 comes in two editions: +**Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2. -- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. +## Start InfluxDB v2 and set up with the UI, CLI, or API ->[!Note] -> ## License key for Enterprise ->To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). +To start an InfluxDB v2 container, enter the following command: -For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) +```bash +docker run \ + -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + influxdb:2 +``` -## Docker Images +Replace the following with your own values: -Use the official images hosted on Quay.io: +- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path +- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- **Core:** `quay.io/influxdb/influxdb3:latest` -- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` +After the container starts, the InfluxDB UI and API are accessible at http://localhost:8086 on the host. You're ready to set up an initial admin user, token, and bucket from outside or inside the container--choose one of the following: -## Parameter glossary +- **Set up InfluxDB from outside the container**: [Set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) from the host or network using the InfluxDB UI, `influx` CLI, or HTTP API. -| Parameter | Description | -|------------------|--------------------------------------------------------------| -| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | -| `--node-id` | Unique identifier for the node within an Enterprise cluster. | -| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | -| `--data-dir` | Path to the directory for data storage. | +- **Set up InfluxDB from inside the container**: Use `docker exec` to run the `influx` CLI installed in the container--for example: -# How to use this image + ```bash + docker exec influxdb2 influx setup \ + --username $USERNAME \ + --password $PASSWORD \ + --org $ORGANIZATION \ + --bucket $BUCKET \ + --force + ``` -## Start InfluxDB 3 Core +See the [`influx setup` documentation](https://docs.influxdata.com/influxdb/v2/reference/cli/influx/setup/) for the full list of options. -To start the InfluxDB 3 Core container, run the following command: +*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* + +## Start InfluxDB v2 with automated setup + +To start and set up InfluxDB v2 with a single command, specify `-e DOCKER_INFLUXDB_INIT_MODE=setup` and `-e DOCKER_INFLUXDB_INIT_` environment variables for the initial user, password, bucket, and organization--for example: ```bash -docker run -d --name influxdb3-core \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +docker run -d -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME= \ + -e DOCKER_INFLUXDB_INIT_PASSWORD= \ + -e DOCKER_INFLUXDB_INIT_ORG= \ + -e DOCKER_INFLUXDB_INIT_BUCKET= \ + influxdb:2 ``` -Once the container is running, generate an admin token: +Replace the following with your own values: + +- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path +- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path +- ``: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) +- ``: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) +- ``: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) +- ``: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) (database) + +*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* + +### Automated setup options + +In setup mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or upgrade mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), you can specify the following Docker-specific environment variables to provide initial setup values: + +- `DOCKER_INFLUXDB_INIT_USERNAME`: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). +- `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). +- `DOCKER_INFLUXDB_INIT_ORG`: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/). +- `DOCKER_INFLUXDB_INIT_BUCKET`: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/). +- Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) to use as the initial bucket's [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data). +- Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A string value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: a generated token. + +The following example shows how to pass values for all initial setup options: ```bash -docker exec -it influxdb3-core influxdb3 generate token --admin +docker run -d -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e DOCKER_INFLUXDB_INIT_RETENTION=1w \ + -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token \ + influxdb:2 ``` -Use the token to create a database: +*To upgrade from InfluxDB 1.x to InfluxDB 2.x, see the **Upgrading from InfluxDB 1.x** section below.\* + +With InfluxDB set up and running, see the [Get started](https://docs.influxdata.com/influxdb/v2/get-started/) tutorial to create tokens and write and query data. + +### Custom Initialization Scripts + +In `setup` mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or `upgrade` mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), the InfluxDB Docker Hub image supports running custom initialization scripts. After the setup process completes, scripts are executed in lexical sort order by name. + +For the container to run scripts, they must: + +- Be mounted in the container's `/docker-entrypoint-initdb.d` directory +- Be named using the `.sh` file name extension +- Be executable by the user running the `docker run` command--for example, to allow the current use to execute a script with `docker run`: + + ```bash + chmod +x ./scripts/ + ``` + +> #### Grant permissions to mounted files +> +> By default, Docker runs containers using the user and group IDs of the user executing the `docker run` command. When files are bind-mounted into the container, Docker preserves the user and group ownership from the host system. + +The image exports a number of variables into the environment before executing scripts. The following variables are available for you to use in your scripts: + +- `INFLUX_CONFIGS_PATH`: Path to the `influx` CLI connection configurations file written by `setup`/`upgrade` +- `INFLUX_HOST`: URL to the `influxd` instance running `setup`/`upgrade` +- `DOCKER_INFLUXDB_INIT_USER_ID`: ID of the initial admin user created by `setup`/`upgrade` +- `DOCKER_INFLUXDB_INIT_ORG_ID`: ID of the initial organization created by `setup`/`upgrade` +- `DOCKER_INFLUXDB_INIT_BUCKET_ID`: ID of the initial bucket created by `setup`/`upgrade` + +For example, to grant an InfluxDB 1.x client *write* permission to your initial bucket, create a `$PWD/scripts/setup-v1.sh` file that contains the following: ```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN +#!/bin/bash +set -e + +influx v1 dbrp create \ + --bucket-id ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ + --db ${V1_DB_NAME} \ + --rp ${V1_RP_NAME} \ + --default \ + --org ${DOCKER_INFLUXDB_INIT_ORG} + +influx v1 auth create \ + --username ${V1_AUTH_USERNAME} \ + --password ${V1_AUTH_PASSWORD} \ + --write-bucket ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ + --org ${DOCKER_INFLUXDB_INIT_ORG} ``` -To check the server health: +Then, run the following command to start and set up InfluxDB using custom scripts: ```bash -curl localhost:8086/health +docker run -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + -v "$PWD/scripts:/docker-entrypoint-initdb.d" \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e V1_DB_NAME=v1-db \ + -e V1_RP_NAME=v1-rp \ + -e V1_AUTH_USERNAME=v1-user \ + -e V1_AUTH_PASSWORD=v1-password \ + influxdb:2 ``` -## Start InfluxDB 3 Enterprise +> #### Automated setup and upgrade ignored if already setup +> +> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. +> +> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. + +## Access InfluxDB v2 file system and ports + +When starting an InfluxDB container, we recommend the following for easy access to your data, configurations, and InfluxDB v2 instance: + +- Publish the container's `8086` port to make the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) accessible from the host system. +- Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) outside of containers. + +### Default file system and networking ports + +For InfluxDB v2, the InfluxDB Docker Hub image uses the following default ports and file system paths: + +- TCP port `8086`: the default port for the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/). To specify a different port or address, use the [`http-bind-address` configuration option](https://docs.influxdata.com/influxdb/v2/reference/config-options/#http-bind-address). +- `/var/lib/influxdb2/`: the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) + + - `/engine/`: Default InfluxDB [Storage engine path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#engine-path) + - `influxd.bolt`: Default [Bolt path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#bolt-path) + - `influxd.sqlite`: Default [SQLite path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#sqlite-path) + +- `/etc/influxdb2`: the [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) + + - `/etc/influxdb2/configs`: `influx` CLI connection configurations file + - `/etc/influxdb2/influx-configs`: `influx` CLI connection configurations file, *if you run setup from within the container* + - Optional: `/etc/influxdb2/config.[yml, json, toml]`: Your customized InfluxDB [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/) file + +### Configure InfluxDB v2 in a container + +To customize InfluxDB, specify [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options) in a configuration file, environment variables, or command line flags. + +#### Use a configuration file + +To customize and mount an InfluxDB configuration file, do the following: + +1. If you haven't already, [set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) to initialize an API [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). You'll need the Operator token in the next step. + +2. Run the `influx server-config` CLI command to output the current server configuration to a file in the mounted configuration directory--for example, enter the following command to use the container's `influx` CLI and default Operator token: + + ```bash + docker exec -it influxdb2 influx server-config > "$PWD/config/config.yml" + ``` + +Replace `$PWD/config/` with the host directory that you mounted at the container's `/etc/influxdb2` InfluxDB configuration directory path. + +1. Edit the `config.yml` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). +2. Restart the container. + + ```bash + docker restart influxdb2 + ``` + +#### Use environment variables and command line flags -InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, make sure to provide your license key as an environment variable and include required flags: +To override specific [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options), use environment variables or command line flags. + +- Pass `INFLUXD_` environment variables to Docker to override the configuration file--for example: + + ```bash + docker run -p 8086:8086 \ + -e INFLUXD_STORAGE_WAL_FSYNC_DELAY=15m \ + influxdb:2 + ``` + +- Pass `influxd` command line flags to override environment variables and the configuration file--for example: + + ```bash + docker run -p 8086:8086 \ + influxdb:2 --storage-wal-fsync-delay=15m + ``` + +To learn more, see [InfluxDB configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options). + +### Upgrading from InfluxDB 1.x + +InfluxDB 2.x provides a [1.x-compatible API](https://docs.influxdata.com/influxdb/v2/reference/api/influxdb-1x/), but expects a different storage layout on disk. To account for these differences, the InfluxDB Docker Hub image provides an `upgrade` feature that migrates 1.x data and configuration to 2.x before starting the `influxd` server. + +The automated upgrade process creates the following in the InfluxDB v2 container: + +- an initial admin user +- an initial organization +- an initial bucket +- InfluxDB v2 data files (the default path is `/var/lib/influxdb2`) +- InfluxDB v2 configuration files (the default path is `/etc/influxdb2`) + +*Mount volumes at both paths to avoid losing data.* + +To run the automated upgrade, specify the following when you start the container: + +- InfluxDB v2 initialization environment variables: + + - `DOCKER_INFLUXDB_INIT_MODE=upgrade` + - `DOCKER_INFLUXDB_INIT_USERNAME`: A name for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) + - `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) + - `DOCKER_INFLUXDB_INIT_ORG`: A name for the initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) + - `DOCKER_INFLUXDB_INIT_BUCKET`: A name for the initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) + - Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) for the bucket [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data) + - Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: generates a token. + +- 1.x data and configuration paths: + + - A 1.x data volume, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable or mounted at `/var/lib/influxdb` + - Optional: a 1.x custom configuration file, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable or mounted at `/etc/influxdb/influxdb.conf` + +The upgrade process searches for mounted 1.x data and configuration paths in the following order of precedence: + +1. A configuration file referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable +2. A data directory referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable +3. A configuration file mounted at `/etc/influxdb/influxdb.conf` +4. A data directory mounted at `/var/lib/influxdb` + +> #### Automated setup and upgrade ignored if already setup +> +> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. +> +> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. + +#### Upgrade InfluxDB 1.x: default data path and configuration + +Assume you've been running a minimal InfluxDB 1.x deployment: ```bash -docker run -d --name influxdb3-enterprise -p 8086:8086 \ - -v $PWD/plugins:/plugins \ - -v $PWD/data:/var/lib/influxdb3 \ - -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ - influxdb:enterprise serve \ - --cluster-id cluster1 \ - --node-id node1 \ - --plugin-dir /plugins \ - --object-store file \ - --data-dir /var/lib/influxdb3 +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + influxdb:1.8 ``` -Then, generate an admin token: +To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: ```bash -docker exec -it influxdb3-enterprise influxdb3 create token --admin +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + -v influxdb2:/var/lib/influxdb2 \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 ``` -Use the token from the output to create a database. + +#### Upgrade InfluxDB 1.x: custom configuration + +Assume you've been running an InfluxDB 1.x deployment with customized configuration (`/etc/influxdb/influxdb.conf`): ```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ + influxdb:1.8 ``` -## Mount data to persist across restarts +To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: -To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. +```bash +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + -v influxdb2:/var/lib/influxdb2 \ + -v influxdb2-config:/etc/influxdb2 \ + -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 +``` -### Using a Docker volume +#### Upgrade InfluxDB 1.x: custom data and configuration paths -To persist data using a Docker-managed volume, run the following command: +Assume you've been running an InfluxDB 1.x deployment with data and configuration mounted at custom paths: ```bash -docker run -d --name influxdb3-core \ - -v influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +docker run -p 8086:8086 \ + -v influxdb:/root/influxdb/data \ + -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ + influxdb:1.8 -config /root/influxdb/influxdb.conf ``` -This command: -- Creates or reuses a Docker volume named `influxdb3-data`. -- Maps the default InfluxDB port (`8086`) to your local machine. -- Starts the InfluxDB server with a required host ID and object store configuration. +Before you upgrade to InfluxDB v2, decide whether to keep using your custom paths or to use the InfluxDB v2 defaults. + +To use InfluxDB v2 defaults, stop the running InfluxDB 1.x container, and then run the following command: -### Using a local host directory +```bash +docker run -p 8086:8086 \ + -v influxdb:/root/influxdb/data \ + -v influxdb2:/var/lib/influxdb2 \ + -v influxdb2-config:/etc/influxdb2 \ + -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ + influxdb:2 +``` -To persist data in a local directory on your host, use the following command: +To use your custom paths instead of InfluxDB v2 default paths, run the following command: ```bash -docker run -d --name influxdb3-core \ - -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +docker run -p 8086:8086 \ + -v influxdb:/root/influxdb/data \ + -v influxdb2:/root/influxdb2/data \ + -v influxdb2-config:/etc/influxdb2 \ + -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ + -e DOCKER_INFLUXDB_CONFIG_PATH=/root/influxdb2/config.toml \ + -e DOCKER_INFLUXDB_BOLT_PATH=/root/influxdb2/influxdb.bolt \ + -e DOCKER_INFLUXDB_ENGINE_PATH=/root/influxdb2/engine \ + influxdb:2 ``` -This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. +To learn more about the upgrade process, see the [v1-to-v2 upgrade guide](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/). + +### Upgrading from quay.io-hosted InfluxDB 2.x image + +Early Docker builds of InfluxDB 2.x were hosted at `quay.io/influxdb/influxdb` and contained the `influx` and `influxd` binaries without any default configuration or helper scripts. By default, the `influxd` process stored data in `/root/.influxdbv2`. -# InfluxDB v2 and v1 Docker setup +Starting with `v2.0.4`, we restored the InfluxDB Docker Hub build, which defaults to storing data in `/var/lib/influxdb2`. If you upgrade directly from `quay.io/influxdb/influxdb` to `influxdb:2.0.4` using the default settings, InfluxDB won't be able to find your existing data files. -## Start InfluxDB v2 +To avoid this problem when migrating from `quay.io/influxdb/influxdb` to `influxdb:2.0`, choose one of the following: -Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. +#### Update the mount to use the InfluxDB default + +To use the InfluxDB Docker Hub data path, start a container that mounts your data volume into `/var/lib/influxdb2`--for example, if you used the following command to start the InfluxDB quay.io container: ```bash -docker run -d -p 8086:8086 \ - -v $PWD/data:/var/lib/influxdb2 \ - -v $PWD/config:/etc/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 +# quay.io InfluxDB 2.x container +docker run -p 8086:8086 \ + -v "$PWD:/root/.influxdbv2" \ + quay.io/influxdb/influxdb:v2.0.3 +``` + +Use this command to start an InfluxDB v2 Docker Hub container: + +```bash +# Docker Hub InfluxDB 2.x container +docker run -p 8086:8086 \ + -v "$PWD:/var/lib/influxdb2" \ + influxdb:2 ``` -After the container starts, go to `http://localhost:8086` to access the UI. +#### Configure InfluxDB to use the container home directory -For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). +To continue using the `/root/.influxdbv2` data path, customize storage path configuration options ([bolt-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#bolt-path), [engine-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#engine-path), [sqlite-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#sqlite-path)) configuration options for your InfluxDB Docker Hub container--for example, if you used the following command to start the InfluxDB quay.io container: -## Start InfluxDB v1 +```bash +# quay.io-hosted InfluxDB 2.x +docker run -p 8086:8086 \ + -v "$PWD:/root/.influxdbv2" \ + quay.io/influxdb/influxdb:v2.0.3 +``` -Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: +Use this command to start an InfluxDB v2 Docker Hub container: ```bash -docker run -d -p 8086:8086 \ - -v $PWD:/var/lib/influxdb \ - influxdb:1.8 +docker run -p 8086:8086 \ + -e INFLUXD_BOLT_PATH=/root/.influxdbv2/influxd.bolt \ + -e INFLUXD_ENGINE_PATH=/root/.influxdbv2/engine \ + -v "$PWD:/root/.influxdbv2" \ + influxdb:2 ``` -This command maps port `8086` and mounts your current directory to persist data. +# How to use this image for InfluxDB v1 + +Use the InfluxDB Docker Hub image to run and set up an [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1/) container. + +## Running the container + +To start an InfluxDB 1.x container, enter the following command: + +```bash +docker run -p 8086:8086 \ + -v "$PWD:/var/lib/influxdb" \ + influxdb:1.8 +``` + +The command passes the following arguments: + +- `-p 8086:8086`: Exposes the InfluxDB [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) on host port `8086`. +- `-v $PWD:/var/lib/influxdb`: Mounts the host's `$PWD` directory to the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/) to persist data outside the container. + +Replace `$PWD` with the host directory where you want InfluxDB to store data. + +*Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/).* + +## Networking ports + +InfluxDB uses the following networking ports: + +- TCP port `8086`: the default port for the [HTTP API](https://docs.influxdata.com/influxdb/v1/tools/api/) +- TCP port `2003`: the port for the Graphite protocol (if enabled) + +Using the `docker run` [`-P, --publish-all` flag](https://docs.docker.com/reference/cli/docker/container/run/#publish-all) exposes the InfluxDB HTTP API to the host. + +## Configure InfluxDB v1 in a container + +To configure InfluxDB v1 in a container, use a configuration file or environment variables. + +### Use a configuration file + +To customize and mount a configuration file, do the following: + +1. Output the current server configuration to a file in the mounted configuration directory--for example: + + ```bash + docker run --rm influxdb:1.8 influxd config > influxdb.conf + ``` + +2. Edit the `influxdb.conf` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). + + ```bash + docker run -p 8086:8086 \ + -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro" \ + influxdb:1.8 -config /etc/influxdb/influxdb.conf + ``` + + Replace `$PWD` with the host directory where you want to store the configuration file. + +### Use environment variables + +Pass [`INFLUXDB_` environment variables](https://docs.influxdata.com/influxdb/v1/administration/config/#environment-variables) to override specific InfluxDB v1 configuration options. An environment variable overrides the equivalent option in the configuration file. + +```bash +docker run -p 8086:8086 \ + -e INFLUXDB_REPORTING_DISABLED=true \ + -e INFLUXDB_META_DIR=/path/to/metadir \ + -e INFLUXDB_DATA_QUERY_LOG_ENABLED=false \ + influxdb:1.8 +``` + +Learn more about [configuring InfluxDB v1](https://docs.influxdata.com/influxdb/v1.8/administration/config/). + +## Graphite + +InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables. Run InfluxDB with the default Graphite configuration: + +```bash +docker run -p 8086:8086 -p 2003:2003 \ + -e INFLUXDB_GRAPHITE_ENABLED=true \ + influxdb:1.8 +``` + +See the [README on GitHub](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md) for more detailed documentation to set up the Graphite service. In order to take advantage of graphite templates, you should use a configuration file by outputting a default configuration file using the steps above and modifying the `[[graphite]]` section. + +## InfluxDB v1 HTTP API + +Creating a DB named mydb: + +```bash +curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" +``` + +Inserting into the DB: + +```bash +curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000' +``` + +Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/). + +## CLI / SHELL + +Start the container: + +```bash +docker run --name=influxdb -d -p 8086:8086 influxdb:1.8 +``` + +Run the influx client in this container: + +```bash +docker exec -it influxdb influx +``` + +Or run the influx client in a separate container: + +```bash +docker run --rm --link=influxdb -it influxdb:1.8 influx -host influxdb +``` + +## InfluxDB v1 database initialization + +### Not recommended for production + +We **don't** recommend using initialization options for InfluxDB v1 production scenarios, but they're useful when running standalone instances for testing. + +The InfluxDB Docker Hub image lets you set initialization options when creating an InfluxDB v1 container. + +The database initialization script is only called when running `influxd`; it isn't executed by any other program. + +### Environment variables + +During the InfluxDB v1 set up process, the InfluxDB image uses environment variables to automatically configure some server options. You can override the following environment variables to customize set up options. + +#### INFLUXDB_DB + +Automatically initializes a database with the name of this environment variable. + +#### INFLUXDB_HTTP_AUTH_ENABLED + +Enables authentication. Either this must be set or `auth-enabled = true` must be set within the configuration file for any authentication-related options below to work. + +#### INFLUXDB_ADMIN_USER + +The name of the admin user to be created. If this is unset, no admin user is created. + +#### INFLUXDB_ADMIN_PASSWORD + +The password for the admin user configured with `INFLUXDB_ADMIN_USER`. If this is unset, a random password is generated and printed to standard out. + +#### INFLUXDB_USER + +The name of a user to be created with no privileges. If `INFLUXDB_DB` is set, this user will be granted read and write permissions for that database. + +#### INFLUXDB_USER_PASSWORD + +The password for the user configured with `INFLUXDB_USER`. If this is unset, a random password is generated and printed to standard out. + +#### INFLUXDB_READ_USER + +The name of a user to be created with read privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. + +#### INFLUXDB_READ_USER_PASSWORD + +The password for the user configured with `INFLUXDB_READ_USER`. If this is unset, a random password is generated and printed to standard out. + +#### INFLUXDB_WRITE_USER + +The name of a user to be created with write privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. + +#### INFLUXDB_WRITE_USER_PASSWORD + +The password for the user configured with `INFLUXDB_WRITE_USER`. If this is unset, a random password is generated and printed to standard out. + +### Initialization Files + +If the Docker image finds any files with the extensions `.sh` or `.iql` inside of the `/docker-entrypoint-initdb.d` folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. + +### Manually Initialize InfluxDB v1 + +To manually initialize an InfluxDB v1 database, use `docker run` to call the `/init-influxdb.sh` script directly. The script takes the same initialization options as the `influxd run` command--for example: + +```bash +docker run --rm \ + -e INFLUXDB_DB=db0 \ + -e INFLUXDB_ADMIN_USER=admin \ + -e INFLUXDB_ADMIN_PASSWORD=supersecretpassword \ + -e INFLUXDB_USER=telegraf -e \ + -e INFLUXDB_USER_PASSWORD=secretpassword \ + -v "$PWD:/var/lib/influxdb" \ + influxdb:1.8 /init-influxdb.sh +``` + +The command creates the following: + +- a database named `db0` +- an admin user `admin` with the password `supersecretpassword` +- a `telegraf` user with the password `secretpassword` -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). +The `--rm` flag causes Docker to exit and delete the container after the script runs. The data and configuration files created during initialization remain in the mounted volume (the host's `$PWD` directory). # Image Variants diff --git a/influxdb/README.md-e b/influxdb/README.md-e deleted file mode 100644 index 3dd25f96bbab..000000000000 --- a/influxdb/README.md-e +++ /dev/null @@ -1,398 +0,0 @@ - - -# Quick reference - -- **Maintained by**: - [InfluxData](%%GITHUB-REPO%%) - -- **Where to get help**: - [the Docker Community Slack](https://dockr.ly/comm-slack), [Server Fault](https://serverfault.com/help/on-topic), [Unix & Linux](https://unix.stackexchange.com/help/on-topic), or [Stack Overflow](https://stackoverflow.com/help/on-topic) - -# Supported tags and respective `Dockerfile` links - -- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/Dockerfile) - -- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/alpine/Dockerfile) - -- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/Dockerfile) - -- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/alpine/Dockerfile) - -- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/Dockerfile) - -- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/alpine/Dockerfile) - -- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/Dockerfile) - -- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/alpine/Dockerfile) - -- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/Dockerfile) - -- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/alpine/Dockerfile) - -- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) - -- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) - -- [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) - -- [`3-enterprise`, `3.2-enterprise`, `3.2.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-enterprise/Dockerfile) - -# Quick reference (cont.) - -- **Where to file issues**: - [%%GITHUB-REPO%%/issues](%%GITHUB-REPO%%/issues?q=) - -- **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) - `amd64`, `arm64v8` - -- **Published image artifact details**: - [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) - (image metadata, transfer size, etc) - -- **Image updates**: - [official-images repo's `library/influxdb` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Finfluxdb) - [official-images repo's `library/influxdb` file](https://github.com/docker-library/official-images/blob/master/library/influxdb) ([history](https://github.com/docker-library/official-images/commits/master/library/influxdb)) - -- **Source of this description**: - [docs repo's `influxdb/` directory](https://github.com/docker-library/docs/tree/master/influxdb) ([history](https://github.com/docker-library/docs/commits/master/influxdb)) - -# What is InfluxDB? - -InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: - -- Monitoring infrastructure and applications -- Collecting data from IoT devices -- Storing log and event data - -InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. - -## InfluxDB 3 - -InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. - -InfluxDB 3 comes in two editions: - -- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. - ->[!Note] -> ## License key for Enterprise ->To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). - -For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) - -## Docker Images - -Use the official images hosted on Quay.io: - -- **Core:** `quay.io/influxdb/influxdb3:latest` -- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` - -## Parameter glossary - -| Parameter | Description | -|------------------|--------------------------------------------------------------| -| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | -| `--node-id` | Unique identifier for the node within an Enterprise cluster. | -| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | -| `--data-dir` | Path to the directory for data storage. | - -# How to use this image - -## Start InfluxDB 3 Core - -To start the InfluxDB 3 Core container, run the following command: - -```bash -docker run -d --name influxdb3-core \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 -``` - -Once the container is running, generate an admin token: - -```bash -docker exec -it influxdb3-core influxdb3 generate token --admin -``` - -Use the token to create a database: - -```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN -``` - -To check the server health: - -```bash -curl localhost:8086/health -``` - -## Start InfluxDB 3 Enterprise - -InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, make sure to provide your license key as an environment variable and include required flags: - -```bash -docker run -d --name influxdb3-enterprise -p 8086:8086 \ - -v $PWD/plugins:/plugins \ - -v $PWD/data:/var/lib/influxdb3 \ - -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ - influxdb:enterprise serve \ - --cluster-id cluster1 \ - --node-id node1 \ - --plugin-dir /plugins \ - --object-store file \ - --data-dir /var/lib/influxdb3 -``` - -Then, generate an admin token: - -```bash -docker exec -it influxdb3-enterprise influxdb3 create token --admin -``` -Use the token from the output to create a database. - -```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token -``` - -## Mount data to persist across restarts - -To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. - -### Using a Docker volume - -To persist data using a Docker-managed volume, run the following command: - -```bash -docker run -d --name influxdb3-core \ - -v influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 -``` -This command: - -- Creates or reuses a Docker volume named `influxdb3-data`. -- Maps the default InfluxDB port (`8086`) to your local machine. -- Starts the InfluxDB server with a required host ID and object store configuration. - -### Using a local host directory - -To persist data in a local directory on your host, use the following command: - -```bash -docker run -d --name influxdb3-core \ - -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 -``` - -This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. - -# InfluxDB v2 and v1 Docker setup - -## Start InfluxDB v2 - -Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. - -```bash -docker run -d -p 8086:8086 \ - -v $PWD/data:/var/lib/influxdb2 \ - -v $PWD/config:/etc/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 -``` - -After the container starts, go to `http://localhost:8086` to access the UI. - -For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). - -## Start InfluxDB v1 - -Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: - -```bash -docker run -d -p 8086:8086 \ - -v $PWD:/var/lib/influxdb \ - influxdb:1.8 -``` - -This command maps port `8086` and mounts your current directory to persist data. - -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). - -# Image Variants - -The `influxdb` images come in many flavors, each designed for a specific use case. - -## `influxdb:` - -This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. - -## `influxdb:-alpine` - -This image is based on the popular [Alpine Linux project](https://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. - -This variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use [musl libc](https://musl.libc.org) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), so software will often run into issues depending on the depth of their libc requirements/assumptions. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. - -To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). - -## `influxdb:data` - -*Using this image for [InfluxDB Enterprise](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file) requires a valid InfluxData [license key](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file).* - -This image contains the enterprise data node package for clustering. It supports all of the same options as the InfluxDB 1.x OSS image, but it needs port 8088 to be exposed to the meta nodes. - -Refer to the `influxdb:meta` variant for directions on how to setup a cluster. - -## `influxdb:meta` - -*This image requires a valid license key from InfluxData.* Please visit our [products page](https://www.influxdata.com/products/) to learn more. - -This image contains the enterprise meta node package for clustering. It is meant to be used in conjunction with the `influxdb:data` package of the same version. - -### Using this Image - -#### Specifying the license key - -The license key can be specified using either an environment variable or by overriding the configuration file. If you specify the license key directly, the container needs to be able to access the InfluxData portal. - -```console -docker run -p 8089:8089 -p 8091:8091 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= - influxdb:meta -``` - -#### Running the container - -The examples below will use docker's built-in networking capability. If you use the port exposing feature, the host port and the container port need to be the same. - -First, create a docker network: - -```console -docker network create influxdb -``` - -Start three meta nodes. This is the suggested number of meta nodes. We do not recommend running more or less. If you choose to run more or less, be sure that the number of meta nodes is odd. The hostname must be set on each container to the address that will be used to access the meta node. When using docker networks, the hostname should be made the same as the name of the container. - -```console -docker run -d --name=influxdb-meta-0 --network=influxdb \ - -h influxdb-meta-0 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -docker run -d --name=influxdb-meta-1 --network=influxdb \ - -h influxdb-meta-1 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -docker run -d --name=influxdb-meta-2 --network=influxdb \ - -h influxdb-meta-2 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -``` - -When setting the hostname, you can use `-h ` or you can directly set the environment variable using `-e INFLUXDB_HOSTNAME=`. - -After starting the meta nodes, you need to tell them about each other. Choose one of the meta nodes and run `influxd-ctl` in the container. - -```console -docker exec influxdb-meta-0 \ - influxd-ctl add-meta influxdb-meta-1:8091 -docker exec influxdb-meta-0 \ - influxd-ctl add-meta influxdb-meta-2:8091 -``` - -Or you can just start a single meta node. If you setup a single meta node, you do not need to use `influxd-ctl add-meta`. - -```console -docker run -d --name=influxdb-meta --network=influxdb \ - -h influxdb-meta \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -single-server -``` - -#### Connecting the data nodes - -Start the data nodes using `influxdb:data` with similar command line arguments to the meta nodes. You can start as many data nodes as are allowed by your license. - -```console -docker run -d --name=influxdb-data-0 --network=influxdb \ - -h influxdb-data-0 \ - -e INFLUXDB_LICENSE_KEY= \ - influxdb:data -``` - -You can add `-p 8086:8086` to expose the http port to the host machine. After starting the container, choose one of the meta nodes and add the data node to it. - -```console -docker exec influxdb-meta-0 \ - influxd-ctl add-data influxdb-data-0:8088 -``` - -Perform these same steps for any other data nodes that you want to add. - -You can now connect to any of the running data nodes to use your cluster. - -See the [influxdb](https://hub.docker.com/_/influxdb/) image documentation for more details on how to use the data node images. - -#### Configuration - -InfluxDB Meta can be either configured from a config file or using environment variables. To mount a configuration file and use it with the server, you can use this command: - -Generate the default configuration file: - -```console -docker run --rm influxdb:meta influxd-meta config > influxdb-meta.conf -``` - -Modify the default configuration, which will now be available under `$PWD`. Then start the InfluxDB Meta container. - -```console -docker run \ - -v $PWD/influxdb-meta.conf:/etc/influxdb/influxdb-meta.conf:ro \ - influxdb -config /etc/influxdb/influxdb-meta.conf -``` - -Modify `$PWD` to the directory where you want to store the configuration file. - -For environment variables, the format is `INFLUXDB_$SECTION_$NAME`. All dashes (`-`) are replaced with underscores (`_`). If the variable isn't in a section, then omit that part. - -Examples: - -```console -INFLUXDB_REPORTING_DISABLED=true -INFLUXDB_META_DIR=/path/to/metadir -INFLUXDB_ENTERPRISE_REGISTRATION_ENABLED=true -``` - -For more information, see how to [Install InfluxDB Enterprise meta nodes](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/). - -# License - -View [license information](https://github.com/influxdata/influxdb/blob/master/LICENSE) for the software contained in this image. - -As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). - -Some additional license information which was able to be auto-detected might be found in [the `repo-info` repository's `influxdb/` directory](https://github.com/docker-library/repo-info/tree/master/repos/influxdb). - -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. From 1b105b68db06d50477090888167ff30b2d4980b6 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 12:42:02 -0700 Subject: [PATCH 14/77] trying to resolve markdown formatting to pass CI --- influxdb/content.md | 56 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 2ace332b397a..760797f585cf 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,32 +1,31 @@ **This README covers all currently supported versions of InfluxDB:** -- **InfluxDB 3** (Core and Enterprise) -- **InfluxDB v2** -- **InfluxDB v1** +- **InfluxDB 3** (Core and Enterprise) +- **InfluxDB v2** +- **InfluxDB v1** Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. # InfluxDB Docker Image Overview -InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: +InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: -- Monitoring infrastructure and applications -- Collecting data from IoT devices -- Storing log and event data +- Monitoring infrastructure and applications +- Collecting data from IoT devices +- Storing log and event data InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. -## InfluxDB 3 +## InfluxDB 3 InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. InfluxDB 3 comes in two editions: -- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. +- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -**License key for Enterprise** -To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). +**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) @@ -34,19 +33,19 @@ For full documentation, visit the [InfluxDB 3 documentation site](https://docs.i Use the official images hosted on Quay.io: -- **Core:** `quay.io/influxdb/influxdb3:latest` -- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` +- **Core:** `quay.io/influxdb/influxdb3:latest` +- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` ## Parameter glossary -| Parameter | Description | -|------------------|--------------------------------------------------------------| -| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | -| `--node-id` | Unique identifier for the node within an Enterprise cluster. | +| Parameter | Description | +|------------------|-----------------------------------------------------------------| +| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | +| `--node-id` | Unique identifier for the node within an Enterprise cluster. | | `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | -| `--data-dir` | Path to the directory for data storage. | +| `--data-dir` | Path to the directory for data storage. | -# How to use this image +# How to use this image ## Start InfluxDB 3 Core @@ -99,6 +98,7 @@ Then, generate an admin token: ```bash docker exec -it influxdb3-enterprise influxdb3 create token --admin ``` + Use the token from the output to create a database. ```bash @@ -120,11 +120,12 @@ docker run -d --name influxdb3-core \ quay.io/influxdb/influxdb3:latest \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` + This command: -- Creates or reuses a Docker volume named `influxdb3-data`. -- Maps the default InfluxDB port (`8086`) to your local machine. -- Starts the InfluxDB server with a required host ID and object store configuration. +- Creates or reuses a Docker volume named `influxdb3-data`. +- Maps the default InfluxDB port (`8086`) to your local machine. +- Starts the InfluxDB server with a required host ID and object store configuration. ### Using a local host directory @@ -138,12 +139,11 @@ docker run -d --name influxdb3-core \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. - +This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. # InfluxDB v2 -## How to use the InfluxDB v2 Docker image +## How to use the InfluxDB v2 Docker image Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. @@ -165,7 +165,7 @@ For more information, see the [InfluxDB v2 Docker documentation](https://docs.in # InfluxDB v1 -## How to use the InfluxDB v1 Docker image +## How to use the InfluxDB v1 Docker image Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: @@ -178,5 +178,3 @@ docker run -d -p 8086:8086 \ This command maps port `8086` and mounts your current directory to persist data. For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). - - From 3d694267f66519b95f97f29da302a9fa5ffe251a Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 13:04:33 -0700 Subject: [PATCH 15/77] docs: testing TOC --- influxdb/content.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 760797f585cf..2236af3ce1ad 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,8 +1,8 @@ **This README covers all currently supported versions of InfluxDB:** -- **InfluxDB 3** (Core and Enterprise) -- **InfluxDB v2** -- **InfluxDB v1** +[InfluxDB 3 (Core and Enterprise)](#influxdb-3) +[InfluxDB v2](#influxdb-v2) +[InfluxDB v1](#influxdb-v1) Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. From 56f072eb50087409afa660d4fce586cb8aea9df6 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 13:22:20 -0700 Subject: [PATCH 16/77] docs: updates to TOC test --- influxdb/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 2236af3ce1ad..a1d8ee671d18 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,6 +1,6 @@ **This README covers all currently supported versions of InfluxDB:** -[InfluxDB 3 (Core and Enterprise)](#influxdb-3) +[InfluxDB 3](#influxdb-3) [InfluxDB v2](#influxdb-v2) [InfluxDB v1](#influxdb-v1) From c8fa07103ccd42ddb7f516c9d48dac18e89ebc09 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 13:35:34 -0700 Subject: [PATCH 17/77] docs: reverting TOC --- influxdb/content.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index a1d8ee671d18..760797f585cf 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,8 +1,8 @@ **This README covers all currently supported versions of InfluxDB:** -[InfluxDB 3](#influxdb-3) -[InfluxDB v2](#influxdb-v2) -[InfluxDB v1](#influxdb-v1) +- **InfluxDB 3** (Core and Enterprise) +- **InfluxDB v2** +- **InfluxDB v1** Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. From 2b9d5660536130b7f93819b19d223eed626f39a4 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 14:34:55 -0700 Subject: [PATCH 18/77] docs: adding docker compose section to Core and embedding compose --- influxdb/content.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/influxdb/content.md b/influxdb/content.md index 760797f585cf..d1330647fadc 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -8,6 +8,8 @@ Scroll to the appropriate section below for Docker setup instructions, configura # InfluxDB Docker Image Overview +%%LOGO%% + InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: - Monitoring infrastructure and applications @@ -49,6 +51,22 @@ Use the official images hosted on Quay.io: ## Start InfluxDB 3 Core +Run InfluxDB 3 Core using either Docker Compose or the CLI. + +### Docker Compose + +Create a `compose.yml` file with configuration: + +%%COMPOSE%% + +You can start your docker container by using the following command: + +```bash +docker compose up -d +``` + +### Docker CLI + To start the InfluxDB 3 Core container, run the following command: ```bash From 0403c8ba5c2c0d6b9c8d8cb7171fe99f91eaf723 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 15:11:31 -0700 Subject: [PATCH 19/77] docs: updates to docker compose and cli sections --- influxdb/content.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index d1330647fadc..739db67c4f59 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -55,19 +55,26 @@ Run InfluxDB 3 Core using either Docker Compose or the CLI. ### Docker Compose -Create a `compose.yml` file with configuration: +Create a `compose.yml` file with the configuration: %%COMPOSE%% -You can start your docker container by using the following command: +Start the container by using the following command: ```bash -docker compose up -d +docker compose pull && docker compose run influxdb3-core +``` + +Stop your container by using following command: + +```bash +docker container ls --filter "name=influxdb3" +docker kill ``` ### Docker CLI -To start the InfluxDB 3 Core container, run the following command: +Run this command to start the InfluxDB 3 Core container: ```bash docker run -d --name influxdb3-core \ @@ -96,7 +103,23 @@ curl localhost:8086/health ## Start InfluxDB 3 Enterprise -InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, make sure to provide your license key as an environment variable and include required flags: +InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, provide your license key as an environment variable. + +### Docker Compose + +Create a `compose.yml` file with the following configuration: + +%%COMPOSE%% + +Start your container: + +```bash +docker compose pull && docker compose run influxdb3-enterprise +``` + +## Docker with mounted file style object store + +Run this command to start the InfluxDB 3 Enterprise container ```bash docker run -d --name influxdb3-enterprise -p 8086:8086 \ From 6af3a7630e286896740bc21f33cde6be844d5566 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 26 Jun 2025 15:16:28 -0700 Subject: [PATCH 20/77] adding compose.yaml --- influxdb/compose.yaml | 15 +++++++++++++++ influxdb/content.md | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 influxdb/compose.yaml diff --git a/influxdb/compose.yaml b/influxdb/compose.yaml new file mode 100644 index 000000000000..429c09c87461 --- /dev/null +++ b/influxdb/compose.yaml @@ -0,0 +1,15 @@ +# compose.yaml +services: + influxdb3-core: + container_name: influxdb3-core + image: influxdb:3-core + ports: + - 8181:8181 + command: + - influxdb3 + - serve + - --node-id=node0 + - --object-store=file + - --data-dir=/var/lib/influxdb3 + - --plugin-dir=/var/lib/influxdb3-plugins + diff --git a/influxdb/content.md b/influxdb/content.md index 739db67c4f59..750d9ac3901a 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -55,7 +55,7 @@ Run InfluxDB 3 Core using either Docker Compose or the CLI. ### Docker Compose -Create a `compose.yml` file with the configuration: +Create a `compose.yml` file with the configuration: %%COMPOSE%% From f44aba37e32519547406b2659f53e152e4db7530 Mon Sep 17 00:00:00 2001 From: Ruffin Date: Fri, 20 Jun 2025 18:59:30 -0500 Subject: [PATCH 21/77] [ROS] Update Official Docker image docs (#2578) * Remove references to dedicated ROS distros as final ROS 1 version, Noetic, is now EOL * Redirect primary links to documentation landing page as docs page is more up-to-date and pertinent for users * Remove retired ROS blog - https://www.ros.org/news/2020/01/ros-blog-retired.html * Update OSRF URL redirect * Update example image tag to rolling to avoid docs from becoming stale * Consolidate branding and dated references * Update Q&A links to stackexchange given migration - https://discourse.ros.org/t/planned-migration-of-ros-answers-and-gazebo-answers-to-robotics-stack-exchange/28068 - https://discourse.ros.org/t/new-static-archives-for-ros-and-gazebo-answers/41346 * Simplify cloning overlay source * Simplify use of mixin setting * Split runner and builder stages as example to save on image size as well as on build time using caching * Simplify scripting for dependencies * Lint use of ARGs for readability of each stage * Simplify example cache mount for apt and update rosdep along with apt list to ensure package index is fresh * Update categories for ROS to include additional relevant entries * Shorten derivation script * Use ros-core tag for minimal installer * Stage example image sizes for demos * Simplify naming * Omit cacher from size table to focus on primary targets * Modify and mount custom apt config accounting for included docker-clean default * Simplify RUN directive for apt config * Stage WIP edits * Update package cache before cloning source to avoid running rosdep update for each source change as docker build --no-cache can still be used to force update * Fix use of EOF in Dockerfile * Simply RUN directives * Expand bullet points about optimizations * Expand upon runner vs installer comparison * Linting * Fix grammar and spelling * Linting * Rename stage in apt get example while keeping with uniquely spelled noun that is self descriptive yet unmistakable * Comment on overwriting defaults to persist minimal cache --- ros/content.md | 193 +++++++++++++++++++++++----------------------- ros/metadata.json | 2 + 2 files changed, 99 insertions(+), 96 deletions(-) diff --git a/ros/content.md b/ros/content.md index 86033fbbfda8..4544e8ab5141 100644 --- a/ros/content.md +++ b/ros/content.md @@ -1,10 +1,10 @@ -# What is [ROS](https://www.ros.org/)? +# What is [ROS](https://docs.ros.org/)? The Robot Operating System (ROS) is a set of software libraries and tools that help you build robot applications. From drivers to state-of-the-art algorithms, and with powerful developer tools, ROS has what you need for your next robotics project. And it's all open source. > [wikipedia.org/wiki/Robot_Operating_System](https://en.wikipedia.org/wiki/Robot_Operating_System) -[%%LOGO%%](https://www.ros.org/) +[%%LOGO%%](https://docs.ros.org/) # How to use this image @@ -13,7 +13,7 @@ The Robot Operating System (ROS) is a set of software libraries and tools that h To create your own ROS docker images and install custom packages, here's a simple example of installing the C++, Python client library demos using the official released Debian packages via apt-get. ```dockerfile -FROM %%IMAGE%%:foxy +FROM %%IMAGE%%:rolling-ros-core as aptgetter # install ros package RUN apt-get update && apt-get install -y \ @@ -28,8 +28,8 @@ CMD ["ros2", "launch", "demo_nodes_cpp", "talker_listener_launch.py"] Note: all ROS images include a default entrypoint that sources the ROS environment setup before executing the configured command, in this case the demo packages launch file. You can then build and run the Docker image like so: ```console -$ docker build -t my/ros:app . -$ docker run -it --rm my/ros:app +$ docker build -t my/ros:aptgetter . +$ docker run -it --rm my/ros:aptgetter [INFO] [launch]: process[talker-1]: started with pid [813] [INFO] [launch]: process[listener-2]: started with pid [814] [INFO] [talker]: Publishing: 'Hello World: 1' @@ -44,59 +44,85 @@ $ docker run -it --rm my/ros:app To create your own ROS docker images and build custom packages, here's a simple example of installing a package's build dependencies, compiling it from source, and installing the resulting build artifacts into a final multi-stage image layer. ```dockerfile -ARG FROM_IMAGE=%%IMAGE%%:foxy +ARG FROM_IMAGE=%%IMAGE%%:rolling ARG OVERLAY_WS=/opt/ros/overlay_ws # multi-stage for caching FROM $FROM_IMAGE AS cacher +ARG OVERLAY_WS + +# overwrite defaults to persist minimal cache +RUN rosdep update --rosdistro $ROS_DISTRO && \ + cat < /etc/apt/apt.conf.d/docker-clean && apt-get update +APT::Install-Recommends "false"; +APT::Install-Suggests "false"; +EOF # clone overlay source -ARG OVERLAY_WS WORKDIR $OVERLAY_WS/src -RUN echo "\ -repositories: \n\ - ros2/demos: \n\ - type: git \n\ - url: https://github.com/ros2/demos.git \n\ - version: ${ROS_DISTRO} \n\ -" > ../overlay.repos -RUN vcs import ./ < ../overlay.repos - -# copy manifests for caching -WORKDIR /opt -RUN mkdir -p /tmp/opt && \ - find ./ -name "package.xml" | \ - xargs cp --parents -t /tmp/opt && \ - find ./ -name "COLCON_IGNORE" | \ - xargs cp --parents -t /tmp/opt || true +RUN cat < /tmp/${type}_debs.txt +done +EOF # multi-stage for building FROM $FROM_IMAGE AS builder - -# install overlay dependencies ARG OVERLAY_WS -WORKDIR $OVERLAY_WS -COPY --from=cacher /tmp/$OVERLAY_WS/src ./src -RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ - apt-get update && rosdep install -y \ - --from-paths \ - src/ros2/demos/demo_nodes_cpp \ - src/ros2/demos/demo_nodes_py \ - --ignore-src \ - && rm -rf /var/lib/apt/lists/* + +# install build dependencies +COPY --from=cacher /tmp/build_debs.txt /tmp/build_debs.txt +RUN --mount=type=cache,target=/etc/apt/apt.conf.d,from=cacher,source=/etc/apt/apt.conf.d \ + --mount=type=cache,target=/var/lib/apt/lists,from=cacher,source=/var/lib/apt/lists \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + < /tmp/build_debs.txt xargs apt-get install -y # build overlay source +WORKDIR $OVERLAY_WS COPY --from=cacher $OVERLAY_WS/src ./src -ARG OVERLAY_MIXINS="release" RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ colcon build \ --packages-select \ demo_nodes_cpp \ demo_nodes_py \ - --mixin $OVERLAY_MIXINS + --mixin release + +# multi-stage for running +FROM $FROM_IMAGE-ros-core AS runner +ARG OVERLAY_WS + +# install exec dependencies +COPY --from=cacher /tmp/exec_debs.txt /tmp/exec_debs.txt +RUN --mount=type=cache,target=/etc/apt/apt.conf.d,from=cacher,source=/etc/apt/apt.conf.d \ + --mount=type=cache,target=/var/lib/apt/lists,from=cacher,source=/var/lib/apt/lists \ + --mount=type=cache,target=/var/cache/apt,sharing=locked \ + < /tmp/exec_debs.txt xargs apt-get install -y -# source entrypoint setup -ENV OVERLAY_WS $OVERLAY_WS +# setup overlay install +ENV OVERLAY_WS=$OVERLAY_WS +COPY --from=builder $OVERLAY_WS/install $OVERLAY_WS/install RUN sed --in-place --expression \ '$isource "$OVERLAY_WS/install/setup.bash"' \ /ros_entrypoint.sh @@ -105,11 +131,36 @@ RUN sed --in-place --expression \ CMD ["ros2", "launch", "demo_nodes_cpp", "talker_listener_launch.py"] ``` -The example above starts by using [`vcstool`](https://github.com/dirk-thomas/vcstool) to clone source repos of interest into the cacher stage. One could similarly `COPY` code from the local build context into the source directory as well. Package manifest files are then cached in a temporary directory where the following builder stage may copy from to install necessary dependencies with [`rosdep`](https://github.com/ros-infrastructure/rosdep). This is done prior to copying the rest of the source files to preserve the multi-stage build cache, given unaltered manifests do not alter declared dependencies, saving time and bandwidth. The overlay is then built using [`colcon`](https://colcon.readthedocs.io/en/released/), the entrypoint updated to source the workspace, and the default command set to launch the demo. +The example above consists of three sequential stages. The `cacher` stage first updates the apt lists and ROS index, uses [`vcstool`](https://github.com/dirk-thomas/vcstool) to clone a demo repo into the workspace source directory, and derives build and runtime dependency sets using [`rosdep`](https://docs.ros.org/en/rolling/Tutorials/Intermediate/Rosdep.html). The `builder` stage installs the derived build dependencies, sources the ROS install underlay, and compiles the source in release mode using [`colcon`](https://docs.ros.org/en/rolling/Tutorials/Beginner-Client-Libraries/Colcon-Tutorial.html). Finally, the `runner` stage installs only runtime dependencies, copies the compiled workspace artifacts, and sets up the environment to launch the demo. Note the example consists of several subtle optimizations: + +- Multi-Stage Build + - Dependency derivation, compilation, and runtime setup are partitioned + - Maximizes cache retention despite package source or build/runtime changes + - Greater concurrency, e.g., colcon build while runtime apt installs +- Persistent Cache Propagation + - Use of [`--mount`](https://docs.docker.com/engine/reference/builder/#run---mount) to cache temp data without bloating layers + - Maintain temporally consistent apt lists between parallel stages + - Avoid needless network I/O between stages or across Docker rebuilds +- Minimal Image Size + - Final stage builds from `ros-core` for smallest runtime image + - Builds and installs only a select few packages in the workspace + - Only workspace install artifacts are copied into final layers -Note: `--from-paths` and `--packages-select` are set here as so to only install the dependencies and build for the demo C++ and Python packages, among many in the demo git repo that was cloned. To install the dependencies and build all the packages in the source workspace, merely change the scope by setting `--from-paths src/` and dropping the `--packages-select` arguments. +For comparison, the resulting `runner` image is similar in size to the earlier `aptgetter` example. This allows you to develop and distribute custom ROS packages without significantly increasing image size compared to pre-built Debian installations: -For more advance examples such as daisy chaining multiple overlay workspaces to improve caching of docker image build layers, using tools such as ccache to accelerate compilation with colcon, or using buildkit to save build time and bandwidth even when dependencies change, the project `Dockerfile`s in the ROS 2 [Navigation2](https://github.com/ros-planning/navigation2) repo are excellent resources. +```console +$ docker image ls my/ros --format "table {{.Tag}}\t{{.Size}}" +TAG SIZE +aptgetter 504MB +runner 510MB +builder 941MB +$ docker image ls ros --format "table {{.Tag}}\t{{.Size}}" +TAG SIZE +rolling-ros-core 489MB +rolling 876MB +``` + +For more advance examples such as daisy chaining multiple overlay workspaces to improve caching of docker image build layers, using tools such as ccache to accelerate compilation with colcon, or using buildkit to save build time and bandwidth even when dependencies change, the project `Dockerfile`s in the [Navigation2](https://github.com/ros-planning/navigation2) repo are excellent resources. ## Deployment use cases @@ -119,7 +170,7 @@ Developing such complex systems with cutting edge implementations of newly publi With the advancements and standardization of software containers, roboticists are primed to acquire a host of improved developer tooling for building and shipping software. To help alleviate the growing pains and technical challenges of adopting new practices, we have focused on providing an official resource for using ROS with these new technologies. -For a complete listing of supported architectures and base images for each ROS Distribution Release, please read the official REP on target platforms for either [ROS 1](https://www.ros.org/reps/rep-0003.html) or for [ROS 2](https://www.ros.org/reps/rep-2000.html). +For a complete listing of supported architectures and base images for each ROS Distribution Release, please read the official REP on target platforms [here](https://www.ros.org/reps/rep-2001.html). ## Deployment suggestions @@ -127,11 +178,10 @@ The available tags include supported distros along with a hierarchy tags based o - `ros-core`: minimal ROS install - `ros-base`: basic tools and libraries (also tagged with distro name with LTS version as `latest`) -- `ros1-bridge`: tools and libraries to run hybrid ROS 1 - ROS 2 systems and bridge messages between them In the interest of keeping `ros-core` tag minimal in image size, developer tools such as `rosdep`, `colcon` and `vcstools` are not shipped in `ros_core`, but in `ros-base` instead. -The rest of the common meta-packages such as `desktop` are hosted on repos under OSRF's Docker Hub profile [here](https://hub.docker.com/r/osrf/ros/). These meta-packages include graphical dependencies and hook a host of other large packages such as X11, X server, etc. So in the interest of keeping the official images lean and secure, the desktop packages are just being hosted with OSRF's profile. For an extensive list of available variants, please read the official REP on target platforms for either [ROS 1](https://ros.org/reps/rep-0150.html) or for [ROS 2](https://www.ros.org/reps/rep-2001.html). +The rest of the common meta-packages such as `desktop` are hosted on repos under OSRF's Docker Hub profile [here](https://hub.docker.com/r/osrf/ros/). These meta-packages include graphical dependencies and hook a host of other large packages such as X11, X server, etc. So in the interest of keeping the official images lean and secure, the desktop packages are just being hosted with OSRF's profile. ### Volumes @@ -201,59 +251,10 @@ $ docker compose rm > Note: the auto-generated network, `ros_demos_default`, will persist until you explicitly remove it using `docker compose down`. -### ROS 1 Bridge - -To ease ROS 2 migration, [`ros1_bridge`](https://index.ros.org/p/ros1_bridge) is a ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2. As a minimal example, given the ROS 2 Dockerfile above, we'll create the ROS 1 equivalent below, and name the Dockerfile appropriately. - -```dockerfile -FROM %%IMAGE%%:noetic - -# install ros package -RUN apt-get update && apt-get install -y \ - ros-${ROS_DISTRO}-ros-tutorials \ - ros-${ROS_DISTRO}-common-tutorials && \ - rm -rf /var/lib/apt/lists/* - -# launch ros package -CMD ["roslaunch", "roscpp_tutorials", "talker_listener_launch"] -``` - -The compose file bellow spawns services for both talker listener demos while connecting the two via a dynamic bridge. You may then view the log output from both pairs of talker and listener nodes cross talking over the `/chatter` topic. - -```yaml -services: - ros1: - build: - context: ./ - dockerfile: ros1.Dockerfile - - ros2: - build: - context: ./ - dockerfile: ros2.Dockerfile - - bridge: - image: ros:foxy-ros1-bridge - environment: - - "ROS_HOSTNAME=bridge" - - "ROS_MASTER_URI=http://ros1:11311" - command: ros2 run ros1_bridge dynamic_bridge -``` - # More Resources -[ROS.org](http://www.ros.org/): Main ROS website -[Q&A](https://answers.ros.org/questions/): Ask questions. Get answers +[Docs](https://docs.ros.org/): ROS Developer Documentation +[Q&A](https://robotics.stackexchange.com/): Ask questions. Get answers [Forums](https://discourse.ros.org/): Hear the latest discussions -[Blog](http://www.ros.org/news/): Stay up-to-date [Packages](https://index.ros.org/?search_packages=true): Discover indexed packages -[OSRF](https://www.osrfoundation.org/): Open Source Robotics Foundation - -## ROS 2 - -[Index](https://docs.ros.org): ROS 2 Documentation -[Design](https://design.ros2.org/): ROS 2 Design Articles - -## ROS 1 - -[Wiki](http://wiki.ros.org/Documentation): ROS 1 Documentation +[OSRF](https://www.openrobotics.org/): Open Source Robotics Foundation diff --git a/ros/metadata.json b/ros/metadata.json index df07586b5b35..de234f00b76c 100644 --- a/ros/metadata.json +++ b/ros/metadata.json @@ -1,6 +1,8 @@ { "hub": { "categories": [ + "languages-and-frameworks", + "machine-learning-and-ai", "operating-systems" ] } From 8a60865c015a707faebef778755c5d7d52234acd Mon Sep 17 00:00:00 2001 From: Simran Date: Thu, 26 Jun 2025 23:18:27 +0200 Subject: [PATCH 22/77] ArangoDB: Slightly update license and setting the language (#2587) --- arangodb/content.md | 6 +++--- arangodb/license.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arangodb/content.md b/arangodb/content.md index 159a5569c66f..2cc2b4a207b0 100644 --- a/arangodb/content.md +++ b/arangodb/content.md @@ -49,11 +49,11 @@ docker inspect --format '{{ .NetworkSettings.IPAddress }}' arangodb-instance When using Docker, you need to specify the language you want to initialize the server to on the first run in one of the following ways: -- Set the environment variable `LANG` to a locale in the `docker run` command, e.g. `-e LANG=sv` for a Swedish locale. +- From v3.12.2 onward: Append the `--icu-language` startup option to the end of the Docker command, like `docker run ... %%IMAGE%% --icu-language sv` for a Swedish locale. -- Use an `arangod.conf` configuration file that sets a language and mount it into the container. For example, create a configuration file on your host system in which you set `icu-language = sv` at the top (before any `[section]`) and then mount the file over the default configuration file like `docker run -v /your-host-path/arangod.conf:/etc/arangodb3/arangod.conf ...`. +- Set the environment variable `LANG` to a locale in the `docker run` command, e.g. `-e LANG=sv`. -Note that you cannot set the language using only a startup option on the command-line, like `docker run ... %%IMAGE%% --icu-language sv`. +- Use an `arangod.conf` configuration file that sets a language and mount it into the container. For example, create a configuration file on your host system in which you set `icu-language = sv` at the top (before any `[section]`) and then mount the file over the default configuration file like `docker run -v /your-host-path/arangod.conf:/etc/arangodb3/arangod.conf ...`. If you don't specify a language explicitly, the default is `en_US` up to ArangoDB v3.11 and `en_US_POSIX` from ArangoDB v3.12 onward. diff --git a/arangodb/license.md b/arangodb/license.md index 0bd79adbca15..8e8b5b9a6a41 100644 --- a/arangodb/license.md +++ b/arangodb/license.md @@ -1,4 +1,4 @@ -The official Docker images of the ArangoDB Community Edition are governed by the [ArangoDB Community License](https://arangodb.com/community-license/). It limits deployments to a 100 GB on dataset size in production and you cannot use it for any commercial purposes, only internal business purposes. +The official Docker images of the ArangoDB Community Edition are governed by the [ArangoDB Community License](https://arangodb.com/community-license/). It limits deployments to a 100 GB on dataset size in production and you cannot use it for any commercial purposes, only internal business purposes. It does not include the right to distribute, embed within other products, or combine with ArangoDB's Enterprise Edition of the software. The source code of the Community Edition is available under the [Business Source License 1.1 (BUSL-1.1)](https://github.com/arangodb/arangodb/blob/devel/LICENSE). Copying, modification, redistribution, non-commercial use, and commercial use in a non-production context are always allowed. Additionally, you can deploy BUSL-licensed ArangoDB source code for any purpose (including production) as long as you are not creating a commercial derivative work or offering, or are including it in a commercial product, application, or service. On the fourth anniversary of the first publicly available distribution of a specific version, the license changes to the permissive Apache 2.0 open-source license. From 74e14f30394bb090bfde2db378d33141d17d232b Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Thu, 26 Jun 2025 11:48:21 +0200 Subject: [PATCH 23/77] Add .gitattributes: Ensure Unix line endings for text files On Windows, Git may be configured to checkout LF line endings as CRLF, but this breaks shell scripts. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000000..6313b56c5784 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf From 61b72a438fa0916978aca9127d6c2f7515b6318e Mon Sep 17 00:00:00 2001 From: disservin Date: Fri, 27 Jun 2025 10:56:56 +0200 Subject: [PATCH 24/77] Update content.md --- mysql/content.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mysql/content.md b/mysql/content.md index 0e24f5399fd6..9b21973bd9ca 100644 --- a/mysql/content.md +++ b/mysql/content.md @@ -56,7 +56,13 @@ $ docker logs some-%%REPO%% ## Using a custom MySQL configuration file -The default configuration for MySQL can be found in `/etc/mysql/my.cnf`, which may `!includedir` additional directories such as `/etc/mysql/conf.d` or `/etc/mysql/mysql.conf.d`. Please inspect the relevant files and directories within the `%%IMAGE%%` image itself for more details. +The default configuration for MySQL varies depending on the base image: + +**Oracle-based images (default):** The default configuration is located at `/etc/my.cnf`, which may `!includedir` additional directories such as `/etc/mysql/conf.d`. + +**Debian-based MySQL 8 images:** The default configuration can be found in `/etc/mysql/my.cnf`, which may `!includedir` additional directories such as `/etc/mysql/conf.d`. + +Please inspect the relevant files and directories within the `%%IMAGE%%` image itself for more details. If `/my/custom/config-file.cnf` is the path and name of your custom configuration file, you can start your `%%IMAGE%%` container like this (note that only the directory path of the custom config file is used in this command): @@ -64,7 +70,7 @@ If `/my/custom/config-file.cnf` is the path and name of your custom configuratio $ docker run --name some-%%REPO%% -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag ``` -This will start a new container `some-%%REPO%%` where the MySQL instance uses the combined startup settings from `/etc/mysql/my.cnf` and `/etc/mysql/conf.d/config-file.cnf`, with settings from the latter taking precedence. +This will start a new container `some-%%REPO%%` where the MySQL instance uses the combined startup settings from the default configuration file and `/etc/mysql/conf.d/config-file.cnf`, with settings from the latter taking precedence. ### Configuration without a `cnf` file From d695f6c09707ec65687344fda7646342ee2faf9f Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:04:57 -0700 Subject: [PATCH 25/77] Update influxdb/content.md Co-authored-by: Jason Stirnaman --- influxdb/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 750d9ac3901a..ae449486e5eb 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -200,7 +200,7 @@ docker run -d -p 8086:8086 \ influxdb:2 ``` -After the container starts, go to `http://localhost:8086` to access the UI. +After the container starts, visit [http://localhost:8086](http://localhost:8086) in your browser to view the UI. For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). From 95ad5f37ccc76b11ebf753b7d01a05e3015ff3af Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:05:16 -0700 Subject: [PATCH 26/77] Update influxdb/content.md Co-authored-by: Jason Stirnaman --- influxdb/content.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index ae449486e5eb..3990b3894cdc 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -20,7 +20,8 @@ InfluxDB offers multiple versions and deployment options to meet diverse technic ## InfluxDB 3 -InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. +InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, the DataFusion SQL engine, and diskless + object storage architecture. It delivers sub-10ms query response times, unlimited cardinality, and supports both SQL and InfluxQL. InfluxDB 3 comes in two editions: From 9d9d6677cfada4b6a1577c54ab641e2251868b3a Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:05:36 -0700 Subject: [PATCH 27/77] Update influxdb/content.md Co-authored-by: Jason Stirnaman --- influxdb/content.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 3990b3894cdc..1ccd6e1ed910 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -23,7 +23,8 @@ InfluxDB offers multiple versions and deployment options to meet diverse technic InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, the DataFusion SQL engine, and diskless object storage architecture. It delivers sub-10ms query response times, unlimited cardinality, and supports both SQL and InfluxQL. -InfluxDB 3 comes in two editions: +InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time + data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. From e0ff6d75bcd3ca9f83b439036475871006d45d07 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:05:51 -0700 Subject: [PATCH 28/77] Update influxdb/content.md Co-authored-by: Jason Stirnaman --- influxdb/content.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 1ccd6e1ed910..02450b75de41 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -29,7 +29,8 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). +**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by + selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) From 907407ecb6e7c20607995ee55f018eb3b8ba6438 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:06:18 -0700 Subject: [PATCH 29/77] Update influxdb/content.md Co-authored-by: Jason Stirnaman --- influxdb/content.md | 1 - 1 file changed, 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 02450b75de41..59eda01e583c 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -32,7 +32,6 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities **License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). -For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) ## Docker Images From 50e33d9d2dc8f7de6caeef4c395118a9ddda712f Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:06:27 -0700 Subject: [PATCH 30/77] Update influxdb/content.md Co-authored-by: Jason Stirnaman --- influxdb/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 59eda01e583c..04972c39f57c 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -167,7 +167,7 @@ docker run -d --name influxdb3-core \ This command: - Creates or reuses a Docker volume named `influxdb3-data`. -- Maps the default InfluxDB port (`8086`) to your local machine. +- Maps the default InfluxDB port (`8181`) to your local machine. - Starts the InfluxDB server with a required host ID and object store configuration. ### Using a local host directory From f16e0a37f9af503cca5424a552d6c45234c6fdba Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:52:45 -0700 Subject: [PATCH 31/77] Update influxdb/content.md Co-authored-by: Jason Stirnaman --- influxdb/content.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 04972c39f57c..f91c2b8a3313 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -100,7 +100,8 @@ docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMI To check the server health: ```bash -curl localhost:8086/health +curl http://localhost:8181/health + --header "Authorization: Bearer YOUR_ADMIN_TOKEN" ``` ## Start InfluxDB 3 Enterprise From 164e5010365ae09cae3d64f49de85828b7eedf3e Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 2 Jul 2025 14:38:35 -0700 Subject: [PATCH 32/77] docs: correcting port connections --- influxdb/README.md | 688 ++++++++++--------------------------------- influxdb/README.md-e | 487 ++++++++++++++++++++++++++++++ influxdb/content.md | 18 +- 3 files changed, 648 insertions(+), 545 deletions(-) create mode 100644 influxdb/README.md-e diff --git a/influxdb/README.md b/influxdb/README.md index 08e2fc855058..3599b80d4f40 100644 --- a/influxdb/README.md +++ b/influxdb/README.md @@ -46,7 +46,7 @@ WARNING: - [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) -- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) +- [`2-alpine`, `2.7-alpine`, `2.7.12-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) - [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) @@ -58,7 +58,7 @@ WARNING: [https://github.com/influxdata/influxdata-docker/issues](https://github.com/influxdata/influxdata-docker/issues?q=) - **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) - [`amd64`](https://hub.docker.com/r/amd64/influxdb/), [`arm64v8`](https://hub.docker.com/r/arm64v8/influxdb/) + `amd64`, `arm64v8` - **Published image artifact details**: [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) @@ -71,649 +71,265 @@ WARNING: - **Source of this description**: [docs repo's `influxdb/` directory](https://github.com/docker-library/docs/tree/master/influxdb) ([history](https://github.com/docker-library/docs/commits/master/influxdb)) -# What is InfluxDB? +**This README covers all currently supported versions of InfluxDB:** -InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. +- **InfluxDB 3** (Core and Enterprise) +- **InfluxDB v2** +- **InfluxDB v1** -Use the InfluxDB Docker Hub image to write, query, and process time series data in [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) or [InfluxDB v1](https://docs.influxdata.com/influxdb/v1/). +Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. -For more information, visit https://influxdata.com. +# InfluxDB Docker Image Overview ![logo](https://raw.githubusercontent.com/docker-library/docs/43d87118415bb75d7bb107683e79cd6d69186f67/influxdb/logo.png) -# How to use this image for InfluxDB v2 +InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: -**Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2. +- Monitoring infrastructure and applications +- Collecting data from IoT devices +- Storing log and event data -## Start InfluxDB v2 and set up with the UI, CLI, or API +InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. -To start an InfluxDB v2 container, enter the following command: +## InfluxDB 3 -```bash -docker run \ - -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - influxdb:2 -``` - -Replace the following with your own values: - -- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path - -After the container starts, the InfluxDB UI and API are accessible at http://localhost:8086 on the host. You're ready to set up an initial admin user, token, and bucket from outside or inside the container--choose one of the following: - -- **Set up InfluxDB from outside the container**: [Set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) from the host or network using the InfluxDB UI, `influx` CLI, or HTTP API. - -- **Set up InfluxDB from inside the container**: Use `docker exec` to run the `influx` CLI installed in the container--for example: - - ```bash - docker exec influxdb2 influx setup \ - --username $USERNAME \ - --password $PASSWORD \ - --org $ORGANIZATION \ - --bucket $BUCKET \ - --force - ``` - -See the [`influx setup` documentation](https://docs.influxdata.com/influxdb/v2/reference/cli/influx/setup/) for the full list of options. - -*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* - -## Start InfluxDB v2 with automated setup - -To start and set up InfluxDB v2 with a single command, specify `-e DOCKER_INFLUXDB_INIT_MODE=setup` and `-e DOCKER_INFLUXDB_INIT_` environment variables for the initial user, password, bucket, and organization--for example: - -```bash -docker run -d -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME= \ - -e DOCKER_INFLUXDB_INIT_PASSWORD= \ - -e DOCKER_INFLUXDB_INIT_ORG= \ - -e DOCKER_INFLUXDB_INIT_BUCKET= \ - influxdb:2 -``` - -Replace the following with your own values: - -- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path -- ``: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) -- ``: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) -- ``: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) -- ``: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) (database) - -*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* - -### Automated setup options +InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. -In setup mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or upgrade mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), you can specify the following Docker-specific environment variables to provide initial setup values: +InfluxDB 3 comes in two editions: -- `DOCKER_INFLUXDB_INIT_USERNAME`: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). -- `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). -- `DOCKER_INFLUXDB_INIT_ORG`: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/). -- `DOCKER_INFLUXDB_INIT_BUCKET`: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/). -- Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) to use as the initial bucket's [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data). -- Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A string value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: a generated token. +- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -The following example shows how to pass values for all initial setup options: - -```bash -docker run -d -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_RETENTION=1w \ - -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token \ - influxdb:2 -``` +**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). -*To upgrade from InfluxDB 1.x to InfluxDB 2.x, see the **Upgrading from InfluxDB 1.x** section below.\* +For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) -With InfluxDB set up and running, see the [Get started](https://docs.influxdata.com/influxdb/v2/get-started/) tutorial to create tokens and write and query data. +## Docker Images -### Custom Initialization Scripts +Use the official images hosted on Quay.io: -In `setup` mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or `upgrade` mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), the InfluxDB Docker Hub image supports running custom initialization scripts. After the setup process completes, scripts are executed in lexical sort order by name. +- **Core:** `quay.io/influxdb/influxdb3:latest` +- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` -For the container to run scripts, they must: +## Parameter glossary -- Be mounted in the container's `/docker-entrypoint-initdb.d` directory -- Be named using the `.sh` file name extension -- Be executable by the user running the `docker run` command--for example, to allow the current use to execute a script with `docker run`: +| Parameter | Description | +|------------------|-----------------------------------------------------------------| +| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | +| `--node-id` | Unique identifier for the node within an Enterprise cluster. | +| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | +| `--data-dir` | Path to the directory for data storage. | - ```bash - chmod +x ./scripts/ - ``` +# How to use this image -> #### Grant permissions to mounted files -> -> By default, Docker runs containers using the user and group IDs of the user executing the `docker run` command. When files are bind-mounted into the container, Docker preserves the user and group ownership from the host system. +## Start InfluxDB 3 Core -The image exports a number of variables into the environment before executing scripts. The following variables are available for you to use in your scripts: +Run InfluxDB 3 Core using either Docker Compose or the CLI. -- `INFLUX_CONFIGS_PATH`: Path to the `influx` CLI connection configurations file written by `setup`/`upgrade` -- `INFLUX_HOST`: URL to the `influxd` instance running `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_USER_ID`: ID of the initial admin user created by `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_ORG_ID`: ID of the initial organization created by `setup`/`upgrade` -- `DOCKER_INFLUXDB_INIT_BUCKET_ID`: ID of the initial bucket created by `setup`/`upgrade` +### Docker Compose -For example, to grant an InfluxDB 1.x client *write* permission to your initial bucket, create a `$PWD/scripts/setup-v1.sh` file that contains the following: +Create a `compose.yml` file with the configuration: -```bash -#!/bin/bash -set -e - -influx v1 dbrp create \ - --bucket-id ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ - --db ${V1_DB_NAME} \ - --rp ${V1_RP_NAME} \ - --default \ - --org ${DOCKER_INFLUXDB_INIT_ORG} - -influx v1 auth create \ - --username ${V1_AUTH_USERNAME} \ - --password ${V1_AUTH_PASSWORD} \ - --write-bucket ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ - --org ${DOCKER_INFLUXDB_INIT_ORG} -``` +... via [`docker compose`](https://github.com/docker/compose) -Then, run the following command to start and set up InfluxDB using custom scripts: +Example `compose.yaml` for `influxdb`: -```bash -docker run -p 8086:8086 \ - -v "$PWD/data:/var/lib/influxdb2" \ - -v "$PWD/config:/etc/influxdb2" \ - -v "$PWD/scripts:/docker-entrypoint-initdb.d" \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e V1_DB_NAME=v1-db \ - -e V1_RP_NAME=v1-rp \ - -e V1_AUTH_USERNAME=v1-user \ - -e V1_AUTH_PASSWORD=v1-password \ - influxdb:2 +```yaml +# compose.yaml +services: + influxdb3-core: + container_name: influxdb3-core + image: influxdb:3-core + ports: + - 8181:8181 + command: + - influxdb3 + - serve + - --node-id=node0 + - --object-store=file + - --data-dir=/var/lib/influxdb3 + - --plugin-dir=/var/lib/influxdb3-plugins ``` -> #### Automated setup and upgrade ignored if already setup -> -> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. -> -> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. - -## Access InfluxDB v2 file system and ports - -When starting an InfluxDB container, we recommend the following for easy access to your data, configurations, and InfluxDB v2 instance: - -- Publish the container's `8086` port to make the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) accessible from the host system. -- Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) outside of containers. - -### Default file system and networking ports - -For InfluxDB v2, the InfluxDB Docker Hub image uses the following default ports and file system paths: - -- TCP port `8086`: the default port for the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/). To specify a different port or address, use the [`http-bind-address` configuration option](https://docs.influxdata.com/influxdb/v2/reference/config-options/#http-bind-address). -- `/var/lib/influxdb2/`: the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) - - - `/engine/`: Default InfluxDB [Storage engine path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#engine-path) - - `influxd.bolt`: Default [Bolt path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#bolt-path) - - `influxd.sqlite`: Default [SQLite path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#sqlite-path) - -- `/etc/influxdb2`: the [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) - - - `/etc/influxdb2/configs`: `influx` CLI connection configurations file - - `/etc/influxdb2/influx-configs`: `influx` CLI connection configurations file, *if you run setup from within the container* - - Optional: `/etc/influxdb2/config.[yml, json, toml]`: Your customized InfluxDB [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/) file - -### Configure InfluxDB v2 in a container - -To customize InfluxDB, specify [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options) in a configuration file, environment variables, or command line flags. - -#### Use a configuration file - -To customize and mount an InfluxDB configuration file, do the following: - -1. If you haven't already, [set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) to initialize an API [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). You'll need the Operator token in the next step. - -2. Run the `influx server-config` CLI command to output the current server configuration to a file in the mounted configuration directory--for example, enter the following command to use the container's `influx` CLI and default Operator token: - - ```bash - docker exec -it influxdb2 influx server-config > "$PWD/config/config.yml" - ``` - -Replace `$PWD/config/` with the host directory that you mounted at the container's `/etc/influxdb2` InfluxDB configuration directory path. - -1. Edit the `config.yml` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). -2. Restart the container. - - ```bash - docker restart influxdb2 - ``` - -#### Use environment variables and command line flags - -To override specific [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options), use environment variables or command line flags. - -- Pass `INFLUXD_` environment variables to Docker to override the configuration file--for example: - - ```bash - docker run -p 8086:8086 \ - -e INFLUXD_STORAGE_WAL_FSYNC_DELAY=15m \ - influxdb:2 - ``` - -- Pass `influxd` command line flags to override environment variables and the configuration file--for example: - - ```bash - docker run -p 8086:8086 \ - influxdb:2 --storage-wal-fsync-delay=15m - ``` - -To learn more, see [InfluxDB configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options). - -### Upgrading from InfluxDB 1.x - -InfluxDB 2.x provides a [1.x-compatible API](https://docs.influxdata.com/influxdb/v2/reference/api/influxdb-1x/), but expects a different storage layout on disk. To account for these differences, the InfluxDB Docker Hub image provides an `upgrade` feature that migrates 1.x data and configuration to 2.x before starting the `influxd` server. - -The automated upgrade process creates the following in the InfluxDB v2 container: - -- an initial admin user -- an initial organization -- an initial bucket -- InfluxDB v2 data files (the default path is `/var/lib/influxdb2`) -- InfluxDB v2 configuration files (the default path is `/etc/influxdb2`) - -*Mount volumes at both paths to avoid losing data.* - -To run the automated upgrade, specify the following when you start the container: - -- InfluxDB v2 initialization environment variables: - - - `DOCKER_INFLUXDB_INIT_MODE=upgrade` - - `DOCKER_INFLUXDB_INIT_USERNAME`: A name for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) - - `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) - - `DOCKER_INFLUXDB_INIT_ORG`: A name for the initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) - - `DOCKER_INFLUXDB_INIT_BUCKET`: A name for the initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) - - Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) for the bucket [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data) - - Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: generates a token. - -- 1.x data and configuration paths: - - - A 1.x data volume, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable or mounted at `/var/lib/influxdb` - - Optional: a 1.x custom configuration file, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable or mounted at `/etc/influxdb/influxdb.conf` - -The upgrade process searches for mounted 1.x data and configuration paths in the following order of precedence: - -1. A configuration file referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable -2. A data directory referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable -3. A configuration file mounted at `/etc/influxdb/influxdb.conf` -4. A data directory mounted at `/var/lib/influxdb` - -> #### Automated setup and upgrade ignored if already setup -> -> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. -> -> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. - -#### Upgrade InfluxDB 1.x: default data path and configuration - -Assume you've been running a minimal InfluxDB 1.x deployment: +Start the container by using the following command: ```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - influxdb:1.8 +docker compose pull && docker compose run influxdb3-core ``` -To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: +Stop your container by using following command: ```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v influxdb2:/var/lib/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 +docker container ls --filter "name=influxdb3" +docker kill ``` -#### Upgrade InfluxDB 1.x: custom configuration - -Assume you've been running an InfluxDB 1.x deployment with customized configuration (`/etc/influxdb/influxdb.conf`): +### Docker CLI -```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ - influxdb:1.8 -``` - -To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: +Run this command to start the InfluxDB 3 Core container: ```bash -docker run -p 8086:8086 \ - -v influxdb:/var/lib/influxdb \ - -v influxdb2:/var/lib/influxdb2 \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 +docker run -d --name influxdb3-core \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -#### Upgrade InfluxDB 1.x: custom data and configuration paths - -Assume you've been running an InfluxDB 1.x deployment with data and configuration mounted at custom paths: +Once the container is running, generate an admin token: ```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - influxdb:1.8 -config /root/influxdb/influxdb.conf +docker exec -it influxdb3-core influxdb3 generate token --admin ``` -Before you upgrade to InfluxDB v2, decide whether to keep using your custom paths or to use the InfluxDB v2 defaults. - -To use InfluxDB v2 defaults, stop the running InfluxDB 1.x container, and then run the following command: +Use the token to create a database: ```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v influxdb2:/var/lib/influxdb2 \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ - influxdb:2 +docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN ``` -To use your custom paths instead of InfluxDB v2 default paths, run the following command: +To check the server health: ```bash -docker run -p 8086:8086 \ - -v influxdb:/root/influxdb/data \ - -v influxdb2:/root/influxdb2/data \ - -v influxdb2-config:/etc/influxdb2 \ - -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ - -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ - -e DOCKER_INFLUXDB_CONFIG_PATH=/root/influxdb2/config.toml \ - -e DOCKER_INFLUXDB_BOLT_PATH=/root/influxdb2/influxdb.bolt \ - -e DOCKER_INFLUXDB_ENGINE_PATH=/root/influxdb2/engine \ - influxdb:2 +curl localhost:8086/health ``` -To learn more about the upgrade process, see the [v1-to-v2 upgrade guide](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/). +## Start InfluxDB 3 Enterprise -### Upgrading from quay.io-hosted InfluxDB 2.x image +InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, provide your license key as an environment variable. -Early Docker builds of InfluxDB 2.x were hosted at `quay.io/influxdb/influxdb` and contained the `influx` and `influxd` binaries without any default configuration or helper scripts. By default, the `influxd` process stored data in `/root/.influxdbv2`. +### Docker Compose -Starting with `v2.0.4`, we restored the InfluxDB Docker Hub build, which defaults to storing data in `/var/lib/influxdb2`. If you upgrade directly from `quay.io/influxdb/influxdb` to `influxdb:2.0.4` using the default settings, InfluxDB won't be able to find your existing data files. +Create a `compose.yml` file with the following configuration: -To avoid this problem when migrating from `quay.io/influxdb/influxdb` to `influxdb:2.0`, choose one of the following: +... via [`docker compose`](https://github.com/docker/compose) -#### Update the mount to use the InfluxDB default +Example `compose.yaml` for `influxdb`: -To use the InfluxDB Docker Hub data path, start a container that mounts your data volume into `/var/lib/influxdb2`--for example, if you used the following command to start the InfluxDB quay.io container: - -```bash -# quay.io InfluxDB 2.x container -docker run -p 8086:8086 \ - -v "$PWD:/root/.influxdbv2" \ - quay.io/influxdb/influxdb:v2.0.3 +```yaml +# compose.yaml +services: + influxdb3-core: + container_name: influxdb3-core + image: influxdb:3-core + ports: + - 8181:8181 + command: + - influxdb3 + - serve + - --node-id=node0 + - --object-store=file + - --data-dir=/var/lib/influxdb3 + - --plugin-dir=/var/lib/influxdb3-plugins ``` -Use this command to start an InfluxDB v2 Docker Hub container: +Start your container: ```bash -# Docker Hub InfluxDB 2.x container -docker run -p 8086:8086 \ - -v "$PWD:/var/lib/influxdb2" \ - influxdb:2 +docker compose pull && docker compose run influxdb3-enterprise ``` -#### Configure InfluxDB to use the container home directory +## Docker with mounted file style object store -To continue using the `/root/.influxdbv2` data path, customize storage path configuration options ([bolt-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#bolt-path), [engine-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#engine-path), [sqlite-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#sqlite-path)) configuration options for your InfluxDB Docker Hub container--for example, if you used the following command to start the InfluxDB quay.io container: +Run this command to start the InfluxDB 3 Enterprise container ```bash -# quay.io-hosted InfluxDB 2.x -docker run -p 8086:8086 \ - -v "$PWD:/root/.influxdbv2" \ - quay.io/influxdb/influxdb:v2.0.3 +docker run -d --name influxdb3-enterprise -p 8086:8086 \ + -v $PWD/plugins:/plugins \ + -v $PWD/data:/var/lib/influxdb3 \ + -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ + influxdb:enterprise serve \ + --cluster-id cluster1 \ + --node-id node1 \ + --plugin-dir /plugins \ + --object-store file \ + --data-dir /var/lib/influxdb3 ``` -Use this command to start an InfluxDB v2 Docker Hub container: +Then, generate an admin token: ```bash -docker run -p 8086:8086 \ - -e INFLUXD_BOLT_PATH=/root/.influxdbv2/influxd.bolt \ - -e INFLUXD_ENGINE_PATH=/root/.influxdbv2/engine \ - -v "$PWD:/root/.influxdbv2" \ - influxdb:2 +docker exec -it influxdb3-enterprise influxdb3 create token --admin ``` -# How to use this image for InfluxDB v1 - -Use the InfluxDB Docker Hub image to run and set up an [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1/) container. - -## Running the container - -To start an InfluxDB 1.x container, enter the following command: +Use the token from the output to create a database. ```bash -docker run -p 8086:8086 \ - -v "$PWD:/var/lib/influxdb" \ - influxdb:1.8 +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ``` -The command passes the following arguments: - -- `-p 8086:8086`: Exposes the InfluxDB [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) on host port `8086`. -- `-v $PWD:/var/lib/influxdb`: Mounts the host's `$PWD` directory to the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/) to persist data outside the container. - -Replace `$PWD` with the host directory where you want InfluxDB to store data. - -*Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/).* - -## Networking ports - -InfluxDB uses the following networking ports: - -- TCP port `8086`: the default port for the [HTTP API](https://docs.influxdata.com/influxdb/v1/tools/api/) -- TCP port `2003`: the port for the Graphite protocol (if enabled) - -Using the `docker run` [`-P, --publish-all` flag](https://docs.docker.com/reference/cli/docker/container/run/#publish-all) exposes the InfluxDB HTTP API to the host. - -## Configure InfluxDB v1 in a container +## Mount data to persist across restarts -To configure InfluxDB v1 in a container, use a configuration file or environment variables. +To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. -### Use a configuration file +### Using a Docker volume -To customize and mount a configuration file, do the following: - -1. Output the current server configuration to a file in the mounted configuration directory--for example: - - ```bash - docker run --rm influxdb:1.8 influxd config > influxdb.conf - ``` - -2. Edit the `influxdb.conf` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). - - ```bash - docker run -p 8086:8086 \ - -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro" \ - influxdb:1.8 -config /etc/influxdb/influxdb.conf - ``` - - Replace `$PWD` with the host directory where you want to store the configuration file. - -### Use environment variables - -Pass [`INFLUXDB_` environment variables](https://docs.influxdata.com/influxdb/v1/administration/config/#environment-variables) to override specific InfluxDB v1 configuration options. An environment variable overrides the equivalent option in the configuration file. - -```bash -docker run -p 8086:8086 \ - -e INFLUXDB_REPORTING_DISABLED=true \ - -e INFLUXDB_META_DIR=/path/to/metadir \ - -e INFLUXDB_DATA_QUERY_LOG_ENABLED=false \ - influxdb:1.8 -``` - -Learn more about [configuring InfluxDB v1](https://docs.influxdata.com/influxdb/v1.8/administration/config/). - -## Graphite - -InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables. Run InfluxDB with the default Graphite configuration: +To persist data using a Docker-managed volume, run the following command: ```bash -docker run -p 8086:8086 -p 2003:2003 \ - -e INFLUXDB_GRAPHITE_ENABLED=true \ - influxdb:1.8 +docker run -d --name influxdb3-core \ + -v influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -See the [README on GitHub](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md) for more detailed documentation to set up the Graphite service. In order to take advantage of graphite templates, you should use a configuration file by outputting a default configuration file using the steps above and modifying the `[[graphite]]` section. +This command: -## InfluxDB v1 HTTP API +- Creates or reuses a Docker volume named `influxdb3-data`. +- Maps the default InfluxDB port (`8086`) to your local machine. +- Starts the InfluxDB server with a required host ID and object store configuration. -Creating a DB named mydb: +### Using a local host directory -```bash -curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" -``` - -Inserting into the DB: +To persist data in a local directory on your host, use the following command: ```bash -curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000' +docker run -d --name influxdb3-core \ + -v $PWD/influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` -Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/). - -## CLI / SHELL - -Start the container: +This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. -```bash -docker run --name=influxdb -d -p 8086:8086 influxdb:1.8 -``` - -Run the influx client in this container: +# InfluxDB v2 -```bash -docker exec -it influxdb influx -``` +## How to use the InfluxDB v2 Docker image -Or run the influx client in a separate container: +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. ```bash -docker run --rm --link=influxdb -it influxdb:1.8 influx -host influxdb +docker run -d -p 8086:8086 \ + -v $PWD/data:/var/lib/influxdb2 \ + -v $PWD/config:/etc/influxdb2 \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 ``` -## InfluxDB v1 database initialization - -### Not recommended for production - -We **don't** recommend using initialization options for InfluxDB v1 production scenarios, but they're useful when running standalone instances for testing. - -The InfluxDB Docker Hub image lets you set initialization options when creating an InfluxDB v1 container. - -The database initialization script is only called when running `influxd`; it isn't executed by any other program. - -### Environment variables - -During the InfluxDB v1 set up process, the InfluxDB image uses environment variables to automatically configure some server options. You can override the following environment variables to customize set up options. - -#### INFLUXDB_DB - -Automatically initializes a database with the name of this environment variable. - -#### INFLUXDB_HTTP_AUTH_ENABLED - -Enables authentication. Either this must be set or `auth-enabled = true` must be set within the configuration file for any authentication-related options below to work. +After the container starts, go to `http://localhost:8086` to access the UI. -#### INFLUXDB_ADMIN_USER +For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). -The name of the admin user to be created. If this is unset, no admin user is created. +# InfluxDB v1 -#### INFLUXDB_ADMIN_PASSWORD +## How to use the InfluxDB v1 Docker image -The password for the admin user configured with `INFLUXDB_ADMIN_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_USER - -The name of a user to be created with no privileges. If `INFLUXDB_DB` is set, this user will be granted read and write permissions for that database. - -#### INFLUXDB_USER_PASSWORD - -The password for the user configured with `INFLUXDB_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_READ_USER - -The name of a user to be created with read privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. - -#### INFLUXDB_READ_USER_PASSWORD - -The password for the user configured with `INFLUXDB_READ_USER`. If this is unset, a random password is generated and printed to standard out. - -#### INFLUXDB_WRITE_USER - -The name of a user to be created with write privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. - -#### INFLUXDB_WRITE_USER_PASSWORD - -The password for the user configured with `INFLUXDB_WRITE_USER`. If this is unset, a random password is generated and printed to standard out. - -### Initialization Files - -If the Docker image finds any files with the extensions `.sh` or `.iql` inside of the `/docker-entrypoint-initdb.d` folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. - -### Manually Initialize InfluxDB v1 - -To manually initialize an InfluxDB v1 database, use `docker run` to call the `/init-influxdb.sh` script directly. The script takes the same initialization options as the `influxd run` command--for example: +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: ```bash -docker run --rm \ - -e INFLUXDB_DB=db0 \ - -e INFLUXDB_ADMIN_USER=admin \ - -e INFLUXDB_ADMIN_PASSWORD=supersecretpassword \ - -e INFLUXDB_USER=telegraf -e \ - -e INFLUXDB_USER_PASSWORD=secretpassword \ - -v "$PWD:/var/lib/influxdb" \ - influxdb:1.8 /init-influxdb.sh +docker run -d -p 8086:8086 \ + -v $PWD:/var/lib/influxdb \ + influxdb:1.8 ``` -The command creates the following: - -- a database named `db0` -- an admin user `admin` with the password `supersecretpassword` -- a `telegraf` user with the password `secretpassword` +This command maps port `8086` and mounts your current directory to persist data. -The `--rm` flag causes Docker to exit and delete the container after the script runs. The data and configuration files created during initialization remain in the mounted volume (the host's `$PWD` directory). +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). # Image Variants diff --git a/influxdb/README.md-e b/influxdb/README.md-e new file mode 100644 index 000000000000..b1a79854a838 --- /dev/null +++ b/influxdb/README.md-e @@ -0,0 +1,487 @@ + + +# Quick reference + +- **Maintained by**: + [InfluxData](%%GITHUB-REPO%%) + +- **Where to get help**: + [the Docker Community Slack](https://dockr.ly/comm-slack), [Server Fault](https://serverfault.com/help/on-topic), [Unix & Linux](https://unix.stackexchange.com/help/on-topic), or [Stack Overflow](https://stackoverflow.com/help/on-topic) + +# Supported tags and respective `Dockerfile` links + +- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/Dockerfile) + +- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/alpine/Dockerfile) + +- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/Dockerfile) + +- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/alpine/Dockerfile) + +- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/Dockerfile) + +- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/alpine/Dockerfile) + +- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/Dockerfile) + +- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/alpine/Dockerfile) + +- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/Dockerfile) + +- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/alpine/Dockerfile) + +- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) + +- [`2-alpine`, `2.7-alpine`, `2.7.12-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) + +- [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) + +- [`3-enterprise`, `3.2-enterprise`, `3.2.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-enterprise/Dockerfile) + +# Quick reference (cont.) + +- **Where to file issues**: + [%%GITHUB-REPO%%/issues](%%GITHUB-REPO%%/issues?q=) + +- **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) + `amd64`, `arm64v8` + +- **Published image artifact details**: + [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) + (image metadata, transfer size, etc) + +- **Image updates**: + [official-images repo's `library/influxdb` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Finfluxdb) + [official-images repo's `library/influxdb` file](https://github.com/docker-library/official-images/blob/master/library/influxdb) ([history](https://github.com/docker-library/official-images/commits/master/library/influxdb)) + +- **Source of this description**: + [docs repo's `influxdb/` directory](https://github.com/docker-library/docs/tree/master/influxdb) ([history](https://github.com/docker-library/docs/commits/master/influxdb)) + +**This README covers all currently supported versions of InfluxDB:** + +- **InfluxDB 3** (Core and Enterprise) +- **InfluxDB v2** +- **InfluxDB v1** + +Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. + +# InfluxDB Docker Image Overview + +![logo](https://raw.githubusercontent.com/docker-library/docs/43d87118415bb75d7bb107683e79cd6d69186f67/influxdb/logo.png) + +InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: + +- Monitoring infrastructure and applications +- Collecting data from IoT devices +- Storing log and event data + +InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. + +## InfluxDB 3 + +InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. + +InfluxDB 3 comes in two editions: + +- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. + +**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). + +For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) + +## Docker Images + +Use the official images hosted on Quay.io: + +- **Core:** `quay.io/influxdb/influxdb3:latest` +- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` + +## Parameter glossary + +| Parameter | Description | +|------------------|-----------------------------------------------------------------| +| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | +| `--node-id` | Unique identifier for the node within an Enterprise cluster. | +| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | +| `--data-dir` | Path to the directory for data storage. | + +# How to use this image + +## Start InfluxDB 3 Core + +Run InfluxDB 3 Core using either Docker Compose or the CLI. + +### Docker Compose + +Create a `compose.yml` file with the configuration: + +... via [`docker compose`](https://github.com/docker/compose) + +Example `compose.yaml` for `influxdb`: + +```yaml +# compose.yaml +services: + influxdb3-core: + container_name: influxdb3-core + image: influxdb:3-core + ports: + - 8181:8181 + command: + - influxdb3 + - serve + - --node-id=node0 + - --object-store=file + - --data-dir=/var/lib/influxdb3 + - --plugin-dir=/var/lib/influxdb3-plugins +``` + +Start the container by using the following command: + +```bash +docker compose pull && docker compose run influxdb3-core +``` + +Stop your container by using following command: + +```bash +docker container ls --filter "name=influxdb3" +docker kill +``` + +### Docker CLI + +Run this command to start the InfluxDB 3 Core container: + +```bash +docker run -d --name influxdb3-core \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +``` + +Once the container is running, generate an admin token: + +```bash +docker exec -it influxdb3-core influxdb3 generate token --admin +``` + +Use the token to create a database: + +```bash +docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN +``` + +To check the server health: + +```bash +curl localhost:8086/health +``` + +## Start InfluxDB 3 Enterprise + +InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, provide your license key as an environment variable. + +### Docker Compose + +Create a `compose.yml` file with the following configuration: + +... via [`docker compose`](https://github.com/docker/compose) + +Example `compose.yaml` for `influxdb`: + +```yaml +# compose.yaml +services: + influxdb3-core: + container_name: influxdb3-core + image: influxdb:3-core + ports: + - 8181:8181 + command: + - influxdb3 + - serve + - --node-id=node0 + - --object-store=file + - --data-dir=/var/lib/influxdb3 + - --plugin-dir=/var/lib/influxdb3-plugins +``` + +Start your container: + +```bash +docker compose pull && docker compose run influxdb3-enterprise +``` + +## Docker with mounted file style object store + +Run this command to start the InfluxDB 3 Enterprise container + +```bash +docker run -d --name influxdb3-enterprise -p 8086:8086 \ + -v $PWD/plugins:/plugins \ + -v $PWD/data:/var/lib/influxdb3 \ + -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ + influxdb:enterprise serve \ + --cluster-id cluster1 \ + --node-id node1 \ + --plugin-dir /plugins \ + --object-store file \ + --data-dir /var/lib/influxdb3 +``` + +Then, generate an admin token: + +```bash +docker exec -it influxdb3-enterprise influxdb3 create token --admin +``` + +Use the token from the output to create a database. + +```bash +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +``` + +## Mount data to persist across restarts + +To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. + +### Using a Docker volume + +To persist data using a Docker-managed volume, run the following command: + +```bash +docker run -d --name influxdb3-core \ + -v influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +``` + +This command: + +- Creates or reuses a Docker volume named `influxdb3-data`. +- Maps the default InfluxDB port (`8086`) to your local machine. +- Starts the InfluxDB server with a required host ID and object store configuration. + +### Using a local host directory + +To persist data in a local directory on your host, use the following command: + +```bash +docker run -d --name influxdb3-core \ + -v $PWD/influxdb3-data:/var/lib/influxdb3 \ + -p 8086:8086 \ + quay.io/influxdb/influxdb3:latest \ + serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +``` + +This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. + +# InfluxDB v2 + +## How to use the InfluxDB v2 Docker image + +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. + +```bash +docker run -d -p 8086:8086 \ + -v $PWD/data:/var/lib/influxdb2 \ + -v $PWD/config:/etc/influxdb2 \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 +``` + +After the container starts, go to `http://localhost:8086` to access the UI. + +For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). + +# InfluxDB v1 + +## How to use the InfluxDB v1 Docker image + +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: + +```bash +docker run -d -p 8086:8086 \ + -v $PWD:/var/lib/influxdb \ + influxdb:1.8 +``` + +This command maps port `8086` and mounts your current directory to persist data. + +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). + +# Image Variants + +The `influxdb` images come in many flavors, each designed for a specific use case. + +## `influxdb:` + +This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. + +## `influxdb:-alpine` + +This image is based on the popular [Alpine Linux project](https://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. + +This variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use [musl libc](https://musl.libc.org) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), so software will often run into issues depending on the depth of their libc requirements/assumptions. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. + +To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). + +## `influxdb:data` + +*Using this image for [InfluxDB Enterprise](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file) requires a valid InfluxData [license key](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file).* + +This image contains the enterprise data node package for clustering. It supports all of the same options as the InfluxDB 1.x OSS image, but it needs port 8088 to be exposed to the meta nodes. + +Refer to the `influxdb:meta` variant for directions on how to setup a cluster. + +## `influxdb:meta` + +*This image requires a valid license key from InfluxData.* Please visit our [products page](https://www.influxdata.com/products/) to learn more. + +This image contains the enterprise meta node package for clustering. It is meant to be used in conjunction with the `influxdb:data` package of the same version. + +### Using this Image + +#### Specifying the license key + +The license key can be specified using either an environment variable or by overriding the configuration file. If you specify the license key directly, the container needs to be able to access the InfluxData portal. + +```console +docker run -p 8089:8089 -p 8091:8091 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= + influxdb:meta +``` + +#### Running the container + +The examples below will use docker's built-in networking capability. If you use the port exposing feature, the host port and the container port need to be the same. + +First, create a docker network: + +```console +docker network create influxdb +``` + +Start three meta nodes. This is the suggested number of meta nodes. We do not recommend running more or less. If you choose to run more or less, be sure that the number of meta nodes is odd. The hostname must be set on each container to the address that will be used to access the meta node. When using docker networks, the hostname should be made the same as the name of the container. + +```console +docker run -d --name=influxdb-meta-0 --network=influxdb \ + -h influxdb-meta-0 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta +docker run -d --name=influxdb-meta-1 --network=influxdb \ + -h influxdb-meta-1 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta +docker run -d --name=influxdb-meta-2 --network=influxdb \ + -h influxdb-meta-2 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta +``` + +When setting the hostname, you can use `-h ` or you can directly set the environment variable using `-e INFLUXDB_HOSTNAME=`. + +After starting the meta nodes, you need to tell them about each other. Choose one of the meta nodes and run `influxd-ctl` in the container. + +```console +docker exec influxdb-meta-0 \ + influxd-ctl add-meta influxdb-meta-1:8091 +docker exec influxdb-meta-0 \ + influxd-ctl add-meta influxdb-meta-2:8091 +``` + +Or you can just start a single meta node. If you setup a single meta node, you do not need to use `influxd-ctl add-meta`. + +```console +docker run -d --name=influxdb-meta --network=influxdb \ + -h influxdb-meta \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ + influxdb:meta -single-server +``` + +#### Connecting the data nodes + +Start the data nodes using `influxdb:data` with similar command line arguments to the meta nodes. You can start as many data nodes as are allowed by your license. + +```console +docker run -d --name=influxdb-data-0 --network=influxdb \ + -h influxdb-data-0 \ + -e INFLUXDB_LICENSE_KEY= \ + influxdb:data +``` + +You can add `-p 8086:8086` to expose the http port to the host machine. After starting the container, choose one of the meta nodes and add the data node to it. + +```console +docker exec influxdb-meta-0 \ + influxd-ctl add-data influxdb-data-0:8088 +``` + +Perform these same steps for any other data nodes that you want to add. + +You can now connect to any of the running data nodes to use your cluster. + +See the [influxdb](https://hub.docker.com/_/influxdb/) image documentation for more details on how to use the data node images. + +#### Configuration + +InfluxDB Meta can be either configured from a config file or using environment variables. To mount a configuration file and use it with the server, you can use this command: + +Generate the default configuration file: + +```console +docker run --rm influxdb:meta influxd-meta config > influxdb-meta.conf +``` + +Modify the default configuration, which will now be available under `$PWD`. Then start the InfluxDB Meta container. + +```console +docker run \ + -v $PWD/influxdb-meta.conf:/etc/influxdb/influxdb-meta.conf:ro \ + influxdb -config /etc/influxdb/influxdb-meta.conf +``` + +Modify `$PWD` to the directory where you want to store the configuration file. + +For environment variables, the format is `INFLUXDB_$SECTION_$NAME`. All dashes (`-`) are replaced with underscores (`_`). If the variable isn't in a section, then omit that part. + +Examples: + +```console +INFLUXDB_REPORTING_DISABLED=true +INFLUXDB_META_DIR=/path/to/metadir +INFLUXDB_ENTERPRISE_REGISTRATION_ENABLED=true +``` + +For more information, see how to [Install InfluxDB Enterprise meta nodes](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/). + +# License + +View [license information](https://github.com/influxdata/influxdb/blob/master/LICENSE) for the software contained in this image. + +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). + +Some additional license information which was able to be auto-detected might be found in [the `repo-info` repository's `influxdb/` directory](https://github.com/docker-library/repo-info/tree/master/repos/influxdb). + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. diff --git a/influxdb/content.md b/influxdb/content.md index f91c2b8a3313..c2e7a81c033b 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -35,10 +35,10 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities ## Docker Images -Use the official images hosted on Quay.io: +You can pull docker images using these commands: -- **Core:** `quay.io/influxdb/influxdb3:latest` -- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` +- **Core:**: `docker pull influxdb:3-core` +- **Enterprise:**: `docker pull influxdb:3-enterprise` ## Parameter glossary @@ -80,7 +80,7 @@ Run this command to start the InfluxDB 3 Core container: ```bash docker run -d --name influxdb3-core \ - -p 8086:8086 \ + -p 8181:8181 \ quay.io/influxdb/influxdb3:latest \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` @@ -125,7 +125,7 @@ docker compose pull && docker compose run influxdb3-enterprise Run this command to start the InfluxDB 3 Enterprise container ```bash -docker run -d --name influxdb3-enterprise -p 8086:8086 \ +docker run -d --name influxdb3-enterprise -p 8181:8181 \ -v $PWD/plugins:/plugins \ -v $PWD/data:/var/lib/influxdb3 \ -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ @@ -160,8 +160,8 @@ To persist data using a Docker-managed volume, run the following command: ```bash docker run -d --name influxdb3-core \ -v influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ + -p 8181:8181 \ + influxdb3:core \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` @@ -178,8 +178,8 @@ To persist data in a local directory on your host, use the following command: ```bash docker run -d --name influxdb3-core \ -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ + -p 8181:8181 \ + influxdb3:core \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` From 89fe4eea1cf84d7764587300fa74626fd8b2c536 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 2 Jul 2025 14:55:41 -0700 Subject: [PATCH 33/77] docs: updates to connection ports and docker volume sections --- influxdb/content.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index c2e7a81c033b..55f4d7a6a8da 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -67,7 +67,7 @@ Start the container by using the following command: docker compose pull && docker compose run influxdb3-core ``` -Stop your container by using following command: +Stop the container by using following command: ```bash docker container ls --filter "name=influxdb3" @@ -81,7 +81,7 @@ Run this command to start the InfluxDB 3 Core container: ```bash docker run -d --name influxdb3-core \ -p 8181:8181 \ - quay.io/influxdb/influxdb3:latest \ + influxdb:3-core \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` @@ -137,7 +137,7 @@ docker run -d --name influxdb3-enterprise -p 8181:8181 \ --data-dir /var/lib/influxdb3 ``` -Then, generate an admin token: +Generate an admin token: ```bash docker exec -it influxdb3-enterprise influxdb3 create token --admin @@ -158,11 +158,12 @@ To retain data across container restarts, mount a Docker volume or bind a local To persist data using a Docker-managed volume, run the following command: ```bash -docker run -d --name influxdb3-core \ - -v influxdb3-data:/var/lib/influxdb3 \ - -p 8181:8181 \ - influxdb3:core \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +docker run -it \ + --volume /path/on/host:/path/in/container \ + influxdb:3-core influxdb3 serve \ + --node-id my_host \ + --object-store file \ + --data-dir /path/in/container ``` This command: @@ -179,7 +180,7 @@ To persist data in a local directory on your host, use the following command: docker run -d --name influxdb3-core \ -v $PWD/influxdb3-data:/var/lib/influxdb3 \ -p 8181:8181 \ - influxdb3:core \ + influxdb:3-core \ serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 ``` From 1cb855f2501d6521a706210790057b3c7c01cbce Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 2 Jul 2025 15:59:58 -0700 Subject: [PATCH 34/77] docs: updates to core and enterpirse Docker and CLi sections --- influxdb/content.md | 105 +++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 55f4d7a6a8da..c2d1d75356af 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -53,11 +53,11 @@ You can pull docker images using these commands: ## Start InfluxDB 3 Core -Run InfluxDB 3 Core using either Docker Compose or the CLI. +Run InfluxDB 3 Core using either Docker Compose or Docker CLI. ### Docker Compose -Create a `compose.yml` file with the configuration: +To use Docker Compose with persistent storage, create a `compose.yml` file with the following configuration: %%COMPOSE%% @@ -74,17 +74,26 @@ docker container ls --filter "name=influxdb3" docker kill ``` -### Docker CLI +### File system object store with docker -Run this command to start the InfluxDB 3 Core container: +To start InfluxDB 3 Core with persistent storage and expose the default HTTP port (`8181`), run: ```bash docker run -d --name influxdb3-core \ -p 8181:8181 \ - influxdb:3-core \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 + -v $PWD/influxdb3-data:/var/lib/influxdb3 \ + influxdb:3-core influxdb3 serve \ + --node-id my-influxdb-node \ + --object-store file \ + --data-dir /var/lib/influxdb3 ``` +This command: + +- Maps container port `8181` (HTTP API) to your host +- Mounts the local `influxdb3-data` directory to persist data +- Configures InfluxDB 3 Core to use a file system object store + Once the container is running, generate an admin token: ```bash @@ -106,13 +115,32 @@ curl http://localhost:8181/health ## Start InfluxDB 3 Enterprise -InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, provide your license key as an environment variable. +Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker CLI or Docker Compose. ### Docker Compose -Create a `compose.yml` file with the following configuration: +To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. + +```yaml +services: + influxdb3-enterprise: + container_name: influxdb3-enterprise + image: influxdb:3-enterprise + ports: + - 8181:8181 + command: + - influxdb3 + - serve + - --node-id=node0 + - --cluster-id=cluster0 + - --object-store=file + - --data-dir=/var/lib/influxdb3 + - --plugin-dir=/var/lib/influxdb3-plugins + environment: + - INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS +``` -%%COMPOSE%% +- Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt when generating a trial or at-home license. Start your container: @@ -120,72 +148,41 @@ Start your container: docker compose pull && docker compose run influxdb3-enterprise ``` -## Docker with mounted file style object store - -Run this command to start the InfluxDB 3 Enterprise container - -```bash -docker run -d --name influxdb3-enterprise -p 8181:8181 \ - -v $PWD/plugins:/plugins \ - -v $PWD/data:/var/lib/influxdb3 \ - -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ - influxdb:enterprise serve \ - --cluster-id cluster1 \ - --node-id node1 \ - --plugin-dir /plugins \ - --object-store file \ - --data-dir /var/lib/influxdb3 -``` - -Generate an admin token: - -```bash -docker exec -it influxdb3-enterprise influxdb3 create token --admin -``` +- InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections. -Use the token from the output to create a database. +To stop your container run: ```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +docker container ls --filter "name=influxdb3" +docker kill ``` -## Mount data to persist across restarts +### File system object store with Docker -To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. - -### Using a Docker volume - -To persist data using a Docker-managed volume, run the following command: +To run the Docker image and persist data to the local file system, mount a volume for the object store. ```bash docker run -it \ --volume /path/on/host:/path/in/container \ - influxdb:3-core influxdb3 serve \ + influxdb:3-enterprise influxdb3 serve \ --node-id my_host \ + --cluster-id my_cluster \ --object-store file \ --data-dir /path/in/container ``` -This command: - -- Creates or reuses a Docker volume named `influxdb3-data`. -- Maps the default InfluxDB port (`8181`) to your local machine. -- Starts the InfluxDB server with a required host ID and object store configuration. +Generate an admin token: -### Using a local host directory +```bash +docker exec -it influxdb3-enterprise influxdb3 create token --admin +``` -To persist data in a local directory on your host, use the following command: +Use the token from the output to create a database. ```bash -docker run -d --name influxdb3-core \ - -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - -p 8181:8181 \ - influxdb:3-core \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ``` -This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. - # InfluxDB v2 ## How to use the InfluxDB v2 Docker image From 25b689dc0fec53bc8f585d03c69d0e17434b3d83 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 2 Jul 2025 16:04:42 -0700 Subject: [PATCH 35/77] fixing mardown formatting for content.md --- influxdb/content.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index c2d1d75356af..524a82dea2d5 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -20,18 +20,14 @@ InfluxDB offers multiple versions and deployment options to meet diverse technic ## InfluxDB 3 -InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, the DataFusion SQL engine, and diskless - object storage architecture. It delivers sub-10ms query response times, unlimited cardinality, and supports both SQL and InfluxQL. +InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, the DataFusion SQL engine, and diskless object storage architecture. It delivers sub-10ms query response times, unlimited cardinality, and supports both SQL and InfluxQL. -InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time - data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: +InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by - selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). - +**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). ## Docker Images @@ -90,9 +86,9 @@ docker run -d --name influxdb3-core \ This command: -- Maps container port `8181` (HTTP API) to your host -- Mounts the local `influxdb3-data` directory to persist data -- Configures InfluxDB 3 Core to use a file system object store +- Maps container port `8181` (HTTP API) to your host +- Mounts the local `influxdb3-data` directory to persist data +- Configures InfluxDB 3 Core to use a file system object store Once the container is running, generate an admin token: @@ -119,7 +115,7 @@ Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered inst ### Docker Compose -To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. +To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. ```yaml services: @@ -140,7 +136,7 @@ services: - INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS ``` -- Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt when generating a trial or at-home license. +- Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt when generating a trial or at-home license. Start your container: @@ -148,7 +144,7 @@ Start your container: docker compose pull && docker compose run influxdb3-enterprise ``` -- InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections. +- InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections. To stop your container run: From 0478678d65e64748003a16e955a7ef225093d51c Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 3 Jul 2025 07:06:56 -0700 Subject: [PATCH 36/77] Remove autogenerated README.md accidentally introduced in merge commit 7759bf2 --- influxdb/README.md | 688 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 536 insertions(+), 152 deletions(-) diff --git a/influxdb/README.md b/influxdb/README.md index 3599b80d4f40..08e2fc855058 100644 --- a/influxdb/README.md +++ b/influxdb/README.md @@ -46,7 +46,7 @@ WARNING: - [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) -- [`2-alpine`, `2.7-alpine`, `2.7.12-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) +- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) - [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) @@ -58,7 +58,7 @@ WARNING: [https://github.com/influxdata/influxdata-docker/issues](https://github.com/influxdata/influxdata-docker/issues?q=) - **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) - `amd64`, `arm64v8` + [`amd64`](https://hub.docker.com/r/amd64/influxdb/), [`arm64v8`](https://hub.docker.com/r/arm64v8/influxdb/) - **Published image artifact details**: [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) @@ -71,265 +71,649 @@ WARNING: - **Source of this description**: [docs repo's `influxdb/` directory](https://github.com/docker-library/docs/tree/master/influxdb) ([history](https://github.com/docker-library/docs/commits/master/influxdb)) -**This README covers all currently supported versions of InfluxDB:** +# What is InfluxDB? -- **InfluxDB 3** (Core and Enterprise) -- **InfluxDB v2** -- **InfluxDB v1** +InfluxDB is the time series data platform designed to handle high write and query workloads. Using InfluxDB, you can collect, store, and process large amounts of timestamped data, including metrics and events for use cases such as DevOps monitoring, application metrics, IoT sensors, and event monitoring. -Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. +Use the InfluxDB Docker Hub image to write, query, and process time series data in [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/) or [InfluxDB v1](https://docs.influxdata.com/influxdb/v1/). -# InfluxDB Docker Image Overview +For more information, visit https://influxdata.com. ![logo](https://raw.githubusercontent.com/docker-library/docs/43d87118415bb75d7bb107683e79cd6d69186f67/influxdb/logo.png) -InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: +# How to use this image for InfluxDB v2 -- Monitoring infrastructure and applications -- Collecting data from IoT devices -- Storing log and event data +**Quick start**: See the guide to [Install InfluxDB v2 for Docker](https://docs.influxdata.com/influxdb/v2/install/?t=Docker) and get started using InfluxDB v2. -InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. +## Start InfluxDB v2 and set up with the UI, CLI, or API -## InfluxDB 3 +To start an InfluxDB v2 container, enter the following command: -InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. +```bash +docker run \ + -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + influxdb:2 +``` + +Replace the following with your own values: + +- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path +- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path + +After the container starts, the InfluxDB UI and API are accessible at http://localhost:8086 on the host. You're ready to set up an initial admin user, token, and bucket from outside or inside the container--choose one of the following: + +- **Set up InfluxDB from outside the container**: [Set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) from the host or network using the InfluxDB UI, `influx` CLI, or HTTP API. + +- **Set up InfluxDB from inside the container**: Use `docker exec` to run the `influx` CLI installed in the container--for example: + + ```bash + docker exec influxdb2 influx setup \ + --username $USERNAME \ + --password $PASSWORD \ + --org $ORGANIZATION \ + --bucket $BUCKET \ + --force + ``` + +See the [`influx setup` documentation](https://docs.influxdata.com/influxdb/v2/reference/cli/influx/setup/) for the full list of options. + +*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* + +## Start InfluxDB v2 with automated setup + +To start and set up InfluxDB v2 with a single command, specify `-e DOCKER_INFLUXDB_INIT_MODE=setup` and `-e DOCKER_INFLUXDB_INIT_` environment variables for the initial user, password, bucket, and organization--for example: + +```bash +docker run -d -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME= \ + -e DOCKER_INFLUXDB_INIT_PASSWORD= \ + -e DOCKER_INFLUXDB_INIT_ORG= \ + -e DOCKER_INFLUXDB_INIT_BUCKET= \ + influxdb:2 +``` + +Replace the following with your own values: + +- `$PWD/data`: A host directory to mount at the container's [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path +- `$PWD/config`: A host directory to mount at the container's [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) path +- ``: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) +- ``: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) +- ``: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) +- ``: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) (database) + +*If you run setup from within the container, InfluxDB stores `influx` CLI [connection configurations](/influxdb/v2/reference/cli/influx/#provide-required-authentication-credentials) in the container's `/etc/influxdb2/influx-configs` file.* + +### Automated setup options -InfluxDB 3 comes in two editions: +In setup mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or upgrade mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), you can specify the following Docker-specific environment variables to provide initial setup values: -- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. +- `DOCKER_INFLUXDB_INIT_USERNAME`: A name for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). +- `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for your initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/). +- `DOCKER_INFLUXDB_INIT_ORG`: A name for your initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/). +- `DOCKER_INFLUXDB_INIT_BUCKET`: A name for your initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/). +- Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) to use as the initial bucket's [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data). +- Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A string value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: a generated token. -**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). +The following example shows how to pass values for all initial setup options: + +```bash +docker run -d -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e DOCKER_INFLUXDB_INIT_RETENTION=1w \ + -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=my-super-secret-auth-token \ + influxdb:2 +``` -For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) +*To upgrade from InfluxDB 1.x to InfluxDB 2.x, see the **Upgrading from InfluxDB 1.x** section below.\* -## Docker Images +With InfluxDB set up and running, see the [Get started](https://docs.influxdata.com/influxdb/v2/get-started/) tutorial to create tokens and write and query data. -Use the official images hosted on Quay.io: +### Custom Initialization Scripts -- **Core:** `quay.io/influxdb/influxdb3:latest` -- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` +In `setup` mode (`DOCKER_INFLUXDB_INIT_MODE=setup`) or `upgrade` mode (`DOCKER_INFLUXDB_INIT_MODE=upgrade`), the InfluxDB Docker Hub image supports running custom initialization scripts. After the setup process completes, scripts are executed in lexical sort order by name. -## Parameter glossary +For the container to run scripts, they must: -| Parameter | Description | -|------------------|-----------------------------------------------------------------| -| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | -| `--node-id` | Unique identifier for the node within an Enterprise cluster. | -| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | -| `--data-dir` | Path to the directory for data storage. | +- Be mounted in the container's `/docker-entrypoint-initdb.d` directory +- Be named using the `.sh` file name extension +- Be executable by the user running the `docker run` command--for example, to allow the current use to execute a script with `docker run`: -# How to use this image + ```bash + chmod +x ./scripts/ + ``` -## Start InfluxDB 3 Core +> #### Grant permissions to mounted files +> +> By default, Docker runs containers using the user and group IDs of the user executing the `docker run` command. When files are bind-mounted into the container, Docker preserves the user and group ownership from the host system. -Run InfluxDB 3 Core using either Docker Compose or the CLI. +The image exports a number of variables into the environment before executing scripts. The following variables are available for you to use in your scripts: -### Docker Compose +- `INFLUX_CONFIGS_PATH`: Path to the `influx` CLI connection configurations file written by `setup`/`upgrade` +- `INFLUX_HOST`: URL to the `influxd` instance running `setup`/`upgrade` +- `DOCKER_INFLUXDB_INIT_USER_ID`: ID of the initial admin user created by `setup`/`upgrade` +- `DOCKER_INFLUXDB_INIT_ORG_ID`: ID of the initial organization created by `setup`/`upgrade` +- `DOCKER_INFLUXDB_INIT_BUCKET_ID`: ID of the initial bucket created by `setup`/`upgrade` -Create a `compose.yml` file with the configuration: +For example, to grant an InfluxDB 1.x client *write* permission to your initial bucket, create a `$PWD/scripts/setup-v1.sh` file that contains the following: -... via [`docker compose`](https://github.com/docker/compose) +```bash +#!/bin/bash +set -e + +influx v1 dbrp create \ + --bucket-id ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ + --db ${V1_DB_NAME} \ + --rp ${V1_RP_NAME} \ + --default \ + --org ${DOCKER_INFLUXDB_INIT_ORG} + +influx v1 auth create \ + --username ${V1_AUTH_USERNAME} \ + --password ${V1_AUTH_PASSWORD} \ + --write-bucket ${DOCKER_INFLUXDB_INIT_BUCKET_ID} \ + --org ${DOCKER_INFLUXDB_INIT_ORG} +``` -Example `compose.yaml` for `influxdb`: +Then, run the following command to start and set up InfluxDB using custom scripts: -```yaml -# compose.yaml -services: - influxdb3-core: - container_name: influxdb3-core - image: influxdb:3-core - ports: - - 8181:8181 - command: - - influxdb3 - - serve - - --node-id=node0 - - --object-store=file - - --data-dir=/var/lib/influxdb3 - - --plugin-dir=/var/lib/influxdb3-plugins +```bash +docker run -p 8086:8086 \ + -v "$PWD/data:/var/lib/influxdb2" \ + -v "$PWD/config:/etc/influxdb2" \ + -v "$PWD/scripts:/docker-entrypoint-initdb.d" \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e V1_DB_NAME=v1-db \ + -e V1_RP_NAME=v1-rp \ + -e V1_AUTH_USERNAME=v1-user \ + -e V1_AUTH_PASSWORD=v1-password \ + influxdb:2 ``` -Start the container by using the following command: +> #### Automated setup and upgrade ignored if already setup +> +> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. +> +> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. + +## Access InfluxDB v2 file system and ports + +When starting an InfluxDB container, we recommend the following for easy access to your data, configurations, and InfluxDB v2 instance: + +- Publish the container's `8086` port to make the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) accessible from the host system. +- Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) outside of containers. + +### Default file system and networking ports + +For InfluxDB v2, the InfluxDB Docker Hub image uses the following default ports and file system paths: + +- TCP port `8086`: the default port for the InfluxDB [UI](https://docs.influxdata.com/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/). To specify a different port or address, use the [`http-bind-address` configuration option](https://docs.influxdata.com/influxdb/v2/reference/config-options/#http-bind-address). +- `/var/lib/influxdb2/`: the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) + + - `/engine/`: Default InfluxDB [Storage engine path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#engine-path) + - `influxd.bolt`: Default [Bolt path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#bolt-path) + - `influxd.sqlite`: Default [SQLite path](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/#sqlite-path) + +- `/etc/influxdb2`: the [InfluxDB configuration directory](https://docs.influxdata.com/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) + + - `/etc/influxdb2/configs`: `influx` CLI connection configurations file + - `/etc/influxdb2/influx-configs`: `influx` CLI connection configurations file, *if you run setup from within the container* + - Optional: `/etc/influxdb2/config.[yml, json, toml]`: Your customized InfluxDB [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/) file + +### Configure InfluxDB v2 in a container + +To customize InfluxDB, specify [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options) in a configuration file, environment variables, or command line flags. + +#### Use a configuration file + +To customize and mount an InfluxDB configuration file, do the following: + +1. If you haven't already, [set up InfluxDB](https://docs.influxdata.com/influxdb/v2/get-started/setup/) to initialize an API [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). You'll need the Operator token in the next step. + +2. Run the `influx server-config` CLI command to output the current server configuration to a file in the mounted configuration directory--for example, enter the following command to use the container's `influx` CLI and default Operator token: + + ```bash + docker exec -it influxdb2 influx server-config > "$PWD/config/config.yml" + ``` + +Replace `$PWD/config/` with the host directory that you mounted at the container's `/etc/influxdb2` InfluxDB configuration directory path. + +1. Edit the `config.yml` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). +2. Restart the container. + + ```bash + docker restart influxdb2 + ``` + +#### Use environment variables and command line flags + +To override specific [configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options), use environment variables or command line flags. + +- Pass `INFLUXD_` environment variables to Docker to override the configuration file--for example: + + ```bash + docker run -p 8086:8086 \ + -e INFLUXD_STORAGE_WAL_FSYNC_DELAY=15m \ + influxdb:2 + ``` + +- Pass `influxd` command line flags to override environment variables and the configuration file--for example: + + ```bash + docker run -p 8086:8086 \ + influxdb:2 --storage-wal-fsync-delay=15m + ``` + +To learn more, see [InfluxDB configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options). + +### Upgrading from InfluxDB 1.x + +InfluxDB 2.x provides a [1.x-compatible API](https://docs.influxdata.com/influxdb/v2/reference/api/influxdb-1x/), but expects a different storage layout on disk. To account for these differences, the InfluxDB Docker Hub image provides an `upgrade` feature that migrates 1.x data and configuration to 2.x before starting the `influxd` server. + +The automated upgrade process creates the following in the InfluxDB v2 container: + +- an initial admin user +- an initial organization +- an initial bucket +- InfluxDB v2 data files (the default path is `/var/lib/influxdb2`) +- InfluxDB v2 configuration files (the default path is `/etc/influxdb2`) + +*Mount volumes at both paths to avoid losing data.* + +To run the automated upgrade, specify the following when you start the container: + +- InfluxDB v2 initialization environment variables: + + - `DOCKER_INFLUXDB_INIT_MODE=upgrade` + - `DOCKER_INFLUXDB_INIT_USERNAME`: A name for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) + - `DOCKER_INFLUXDB_INIT_PASSWORD`: A password for the initial admin [user](https://docs.influxdata.com/influxdb/v2/admin/users/) + - `DOCKER_INFLUXDB_INIT_ORG`: A name for the initial [organization](https://docs.influxdata.com/influxdb/v2/admin/organizations/) + - `DOCKER_INFLUXDB_INIT_BUCKET`: A name for the initial [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/) + - Optional: `DOCKER_INFLUXDB_INIT_RETENTION`: A [duration](https://docs.influxdata.com/influxdb/v2/reference/glossary/#duration) for the bucket [retention period](https://docs.influxdata.com/influxdb/v2/reference/internals/data-retention/#bucket-retention-period). Default: `0` (infinite; doesn't delete data) + - Optional: `DOCKER_INFLUXDB_INIT_ADMIN_TOKEN`: A value to set for the [Operator token](https://docs.influxdata.com/influxdb/v2/admin/tokens/#operator-token). Default: generates a token. + +- 1.x data and configuration paths: + + - A 1.x data volume, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable or mounted at `/var/lib/influxdb` + - Optional: a 1.x custom configuration file, specified by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable or mounted at `/etc/influxdb/influxdb.conf` + +The upgrade process searches for mounted 1.x data and configuration paths in the following order of precedence: + +1. A configuration file referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG` environment variable +2. A data directory referenced by the `DOCKER_INFLUXDB_INIT_UPGRADE_V1_DIR` environment variable +3. A configuration file mounted at `/etc/influxdb/influxdb.conf` +4. A data directory mounted at `/var/lib/influxdb` + +> #### Automated setup and upgrade ignored if already setup +> +> Automated `setup`, `upgrade`, and custom initialization scripts won't run if an existing `influxd.bolt` boltdb file from a previous setup is found in the configured data directory. +> +> This behavior allows for the InfluxDB container to reboot post-setup and avoid overwriting migrated data, `DB is already set up` errors, and errors from non-idempotent script commands. + +#### Upgrade InfluxDB 1.x: default data path and configuration + +Assume you've been running a minimal InfluxDB 1.x deployment: ```bash -docker compose pull && docker compose run influxdb3-core +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + influxdb:1.8 ``` -Stop your container by using following command: +To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: ```bash -docker container ls --filter "name=influxdb3" -docker kill +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + -v influxdb2:/var/lib/influxdb2 \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 ``` -### Docker CLI +#### Upgrade InfluxDB 1.x: custom configuration + +Assume you've been running an InfluxDB 1.x deployment with customized configuration (`/etc/influxdb/influxdb.conf`): -Run this command to start the InfluxDB 3 Core container: +```bash +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ + influxdb:1.8 +``` + +To upgrade this deployment to InfluxDB 2.x, stop the running InfluxDB 1.x container, and then run the following command: ```bash -docker run -d --name influxdb3-core \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +docker run -p 8086:8086 \ + -v influxdb:/var/lib/influxdb \ + -v influxdb2:/var/lib/influxdb2 \ + -v influxdb2-config:/etc/influxdb2 \ + -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf" \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 ``` -Once the container is running, generate an admin token: +#### Upgrade InfluxDB 1.x: custom data and configuration paths + +Assume you've been running an InfluxDB 1.x deployment with data and configuration mounted at custom paths: ```bash -docker exec -it influxdb3-core influxdb3 generate token --admin +docker run -p 8086:8086 \ + -v influxdb:/root/influxdb/data \ + -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ + influxdb:1.8 -config /root/influxdb/influxdb.conf ``` -Use the token to create a database: +Before you upgrade to InfluxDB v2, decide whether to keep using your custom paths or to use the InfluxDB v2 defaults. + +To use InfluxDB v2 defaults, stop the running InfluxDB 1.x container, and then run the following command: ```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN +docker run -p 8086:8086 \ + -v influxdb:/root/influxdb/data \ + -v influxdb2:/var/lib/influxdb2 \ + -v influxdb2-config:/etc/influxdb2 \ + -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ + influxdb:2 ``` -To check the server health: +To use your custom paths instead of InfluxDB v2 default paths, run the following command: ```bash -curl localhost:8086/health +docker run -p 8086:8086 \ + -v influxdb:/root/influxdb/data \ + -v influxdb2:/root/influxdb2/data \ + -v influxdb2-config:/etc/influxdb2 \ + -v "$PWD/influxdb.conf:/root/influxdb/influxdb.conf" \ + -e DOCKER_INFLUXDB_INIT_MODE=upgrade \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + -e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/root/influxdb/influxdb.conf \ + -e DOCKER_INFLUXDB_CONFIG_PATH=/root/influxdb2/config.toml \ + -e DOCKER_INFLUXDB_BOLT_PATH=/root/influxdb2/influxdb.bolt \ + -e DOCKER_INFLUXDB_ENGINE_PATH=/root/influxdb2/engine \ + influxdb:2 ``` -## Start InfluxDB 3 Enterprise +To learn more about the upgrade process, see the [v1-to-v2 upgrade guide](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/). -InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, provide your license key as an environment variable. +### Upgrading from quay.io-hosted InfluxDB 2.x image -### Docker Compose +Early Docker builds of InfluxDB 2.x were hosted at `quay.io/influxdb/influxdb` and contained the `influx` and `influxd` binaries without any default configuration or helper scripts. By default, the `influxd` process stored data in `/root/.influxdbv2`. -Create a `compose.yml` file with the following configuration: +Starting with `v2.0.4`, we restored the InfluxDB Docker Hub build, which defaults to storing data in `/var/lib/influxdb2`. If you upgrade directly from `quay.io/influxdb/influxdb` to `influxdb:2.0.4` using the default settings, InfluxDB won't be able to find your existing data files. -... via [`docker compose`](https://github.com/docker/compose) +To avoid this problem when migrating from `quay.io/influxdb/influxdb` to `influxdb:2.0`, choose one of the following: -Example `compose.yaml` for `influxdb`: +#### Update the mount to use the InfluxDB default -```yaml -# compose.yaml -services: - influxdb3-core: - container_name: influxdb3-core - image: influxdb:3-core - ports: - - 8181:8181 - command: - - influxdb3 - - serve - - --node-id=node0 - - --object-store=file - - --data-dir=/var/lib/influxdb3 - - --plugin-dir=/var/lib/influxdb3-plugins +To use the InfluxDB Docker Hub data path, start a container that mounts your data volume into `/var/lib/influxdb2`--for example, if you used the following command to start the InfluxDB quay.io container: + +```bash +# quay.io InfluxDB 2.x container +docker run -p 8086:8086 \ + -v "$PWD:/root/.influxdbv2" \ + quay.io/influxdb/influxdb:v2.0.3 ``` -Start your container: +Use this command to start an InfluxDB v2 Docker Hub container: ```bash -docker compose pull && docker compose run influxdb3-enterprise +# Docker Hub InfluxDB 2.x container +docker run -p 8086:8086 \ + -v "$PWD:/var/lib/influxdb2" \ + influxdb:2 ``` -## Docker with mounted file style object store +#### Configure InfluxDB to use the container home directory -Run this command to start the InfluxDB 3 Enterprise container +To continue using the `/root/.influxdbv2` data path, customize storage path configuration options ([bolt-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#bolt-path), [engine-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#engine-path), [sqlite-path](https://docs.influxdata.com/influxdb/v2/reference/config-options/#sqlite-path)) configuration options for your InfluxDB Docker Hub container--for example, if you used the following command to start the InfluxDB quay.io container: ```bash -docker run -d --name influxdb3-enterprise -p 8086:8086 \ - -v $PWD/plugins:/plugins \ - -v $PWD/data:/var/lib/influxdb3 \ - -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ - influxdb:enterprise serve \ - --cluster-id cluster1 \ - --node-id node1 \ - --plugin-dir /plugins \ - --object-store file \ - --data-dir /var/lib/influxdb3 +# quay.io-hosted InfluxDB 2.x +docker run -p 8086:8086 \ + -v "$PWD:/root/.influxdbv2" \ + quay.io/influxdb/influxdb:v2.0.3 ``` -Then, generate an admin token: +Use this command to start an InfluxDB v2 Docker Hub container: ```bash -docker exec -it influxdb3-enterprise influxdb3 create token --admin +docker run -p 8086:8086 \ + -e INFLUXD_BOLT_PATH=/root/.influxdbv2/influxd.bolt \ + -e INFLUXD_ENGINE_PATH=/root/.influxdbv2/engine \ + -v "$PWD:/root/.influxdbv2" \ + influxdb:2 ``` -Use the token from the output to create a database. +# How to use this image for InfluxDB v1 + +Use the InfluxDB Docker Hub image to run and set up an [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1/) container. + +## Running the container + +To start an InfluxDB 1.x container, enter the following command: ```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +docker run -p 8086:8086 \ + -v "$PWD:/var/lib/influxdb" \ + influxdb:1.8 ``` -## Mount data to persist across restarts +The command passes the following arguments: + +- `-p 8086:8086`: Exposes the InfluxDB [HTTP API](https://docs.influxdata.com/influxdb/v2/reference/api/) on host port `8086`. +- `-v $PWD:/var/lib/influxdb`: Mounts the host's `$PWD` directory to the [InfluxDB data directory](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/) to persist data outside the container. + +Replace `$PWD` with the host directory where you want InfluxDB to store data. + +*Use Docker [Volumes](https://docs.docker.com/storage/volumes/) or [Bind mounts](https://docs.docker.com/storage/bind-mounts/) to persist InfluxDB [data and configuration directories](https://docs.influxdata.com/influxdb/v1/concepts/file-system-layout/).* + +## Networking ports + +InfluxDB uses the following networking ports: + +- TCP port `8086`: the default port for the [HTTP API](https://docs.influxdata.com/influxdb/v1/tools/api/) +- TCP port `2003`: the port for the Graphite protocol (if enabled) + +Using the `docker run` [`-P, --publish-all` flag](https://docs.docker.com/reference/cli/docker/container/run/#publish-all) exposes the InfluxDB HTTP API to the host. + +## Configure InfluxDB v1 in a container -To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. +To configure InfluxDB v1 in a container, use a configuration file or environment variables. -### Using a Docker volume +### Use a configuration file -To persist data using a Docker-managed volume, run the following command: +To customize and mount a configuration file, do the following: + +1. Output the current server configuration to a file in the mounted configuration directory--for example: + + ```bash + docker run --rm influxdb:1.8 influxd config > influxdb.conf + ``` + +2. Edit the `influxdb.conf` file to customize [server configuration options](https://docs.influxdata.com/influxdb/v2/reference/config-options/#configuration-options). + + ```bash + docker run -p 8086:8086 \ + -v "$PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro" \ + influxdb:1.8 -config /etc/influxdb/influxdb.conf + ``` + + Replace `$PWD` with the host directory where you want to store the configuration file. + +### Use environment variables + +Pass [`INFLUXDB_` environment variables](https://docs.influxdata.com/influxdb/v1/administration/config/#environment-variables) to override specific InfluxDB v1 configuration options. An environment variable overrides the equivalent option in the configuration file. ```bash -docker run -d --name influxdb3-core \ - -v influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +docker run -p 8086:8086 \ + -e INFLUXDB_REPORTING_DISABLED=true \ + -e INFLUXDB_META_DIR=/path/to/metadir \ + -e INFLUXDB_DATA_QUERY_LOG_ENABLED=false \ + influxdb:1.8 ``` -This command: +Learn more about [configuring InfluxDB v1](https://docs.influxdata.com/influxdb/v1.8/administration/config/). + +## Graphite + +InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables. Run InfluxDB with the default Graphite configuration: -- Creates or reuses a Docker volume named `influxdb3-data`. -- Maps the default InfluxDB port (`8086`) to your local machine. -- Starts the InfluxDB server with a required host ID and object store configuration. +```bash +docker run -p 8086:8086 -p 2003:2003 \ + -e INFLUXDB_GRAPHITE_ENABLED=true \ + influxdb:1.8 +``` + +See the [README on GitHub](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md) for more detailed documentation to set up the Graphite service. In order to take advantage of graphite templates, you should use a configuration file by outputting a default configuration file using the steps above and modifying the `[[graphite]]` section. -### Using a local host directory +## InfluxDB v1 HTTP API -To persist data in a local directory on your host, use the following command: +Creating a DB named mydb: ```bash -docker run -d --name influxdb3-core \ - -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 +curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" ``` -This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. +Inserting into the DB: -# InfluxDB v2 +```bash +curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000' +``` -## How to use the InfluxDB v2 Docker image +Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/). -Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. +## CLI / SHELL + +Start the container: ```bash -docker run -d -p 8086:8086 \ - -v $PWD/data:/var/lib/influxdb2 \ - -v $PWD/config:/etc/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 +docker run --name=influxdb -d -p 8086:8086 influxdb:1.8 ``` -After the container starts, go to `http://localhost:8086` to access the UI. +Run the influx client in this container: -For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). +```bash +docker exec -it influxdb influx +``` + +Or run the influx client in a separate container: + +```bash +docker run --rm --link=influxdb -it influxdb:1.8 influx -host influxdb +``` + +## InfluxDB v1 database initialization + +### Not recommended for production + +We **don't** recommend using initialization options for InfluxDB v1 production scenarios, but they're useful when running standalone instances for testing. + +The InfluxDB Docker Hub image lets you set initialization options when creating an InfluxDB v1 container. + +The database initialization script is only called when running `influxd`; it isn't executed by any other program. + +### Environment variables + +During the InfluxDB v1 set up process, the InfluxDB image uses environment variables to automatically configure some server options. You can override the following environment variables to customize set up options. + +#### INFLUXDB_DB + +Automatically initializes a database with the name of this environment variable. + +#### INFLUXDB_HTTP_AUTH_ENABLED + +Enables authentication. Either this must be set or `auth-enabled = true` must be set within the configuration file for any authentication-related options below to work. + +#### INFLUXDB_ADMIN_USER -# InfluxDB v1 +The name of the admin user to be created. If this is unset, no admin user is created. -## How to use the InfluxDB v1 Docker image +#### INFLUXDB_ADMIN_PASSWORD -Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: +The password for the admin user configured with `INFLUXDB_ADMIN_USER`. If this is unset, a random password is generated and printed to standard out. + +#### INFLUXDB_USER + +The name of a user to be created with no privileges. If `INFLUXDB_DB` is set, this user will be granted read and write permissions for that database. + +#### INFLUXDB_USER_PASSWORD + +The password for the user configured with `INFLUXDB_USER`. If this is unset, a random password is generated and printed to standard out. + +#### INFLUXDB_READ_USER + +The name of a user to be created with read privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. + +#### INFLUXDB_READ_USER_PASSWORD + +The password for the user configured with `INFLUXDB_READ_USER`. If this is unset, a random password is generated and printed to standard out. + +#### INFLUXDB_WRITE_USER + +The name of a user to be created with write privileges on `INFLUXDB_DB`. If `INFLUXDB_DB` is not set, this user will have no granted permissions. + +#### INFLUXDB_WRITE_USER_PASSWORD + +The password for the user configured with `INFLUXDB_WRITE_USER`. If this is unset, a random password is generated and printed to standard out. + +### Initialization Files + +If the Docker image finds any files with the extensions `.sh` or `.iql` inside of the `/docker-entrypoint-initdb.d` folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. + +### Manually Initialize InfluxDB v1 + +To manually initialize an InfluxDB v1 database, use `docker run` to call the `/init-influxdb.sh` script directly. The script takes the same initialization options as the `influxd run` command--for example: ```bash -docker run -d -p 8086:8086 \ - -v $PWD:/var/lib/influxdb \ - influxdb:1.8 +docker run --rm \ + -e INFLUXDB_DB=db0 \ + -e INFLUXDB_ADMIN_USER=admin \ + -e INFLUXDB_ADMIN_PASSWORD=supersecretpassword \ + -e INFLUXDB_USER=telegraf -e \ + -e INFLUXDB_USER_PASSWORD=secretpassword \ + -v "$PWD:/var/lib/influxdb" \ + influxdb:1.8 /init-influxdb.sh ``` -This command maps port `8086` and mounts your current directory to persist data. +The command creates the following: + +- a database named `db0` +- an admin user `admin` with the password `supersecretpassword` +- a `telegraf` user with the password `secretpassword` -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). +The `--rm` flag causes Docker to exit and delete the container after the script runs. The data and configuration files created during initialization remain in the mounted volume (the host's `$PWD` directory). # Image Variants From 13f03877b0536bf94338938eb7a6f7e8f921caed Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 3 Jul 2025 07:14:32 -0700 Subject: [PATCH 37/77] Trying to restore README.md to match origin/master --- influxdb/README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/influxdb/README.md b/influxdb/README.md index 08e2fc855058..42e1545d9884 100644 --- a/influxdb/README.md +++ b/influxdb/README.md @@ -24,33 +24,33 @@ WARNING: # Supported tags and respective `Dockerfile` links -- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/Dockerfile) +- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/Dockerfile) -- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/alpine/Dockerfile) +- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/alpine/Dockerfile) -- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/Dockerfile) +- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/data/Dockerfile) -- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/alpine/Dockerfile) +- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/data/alpine/Dockerfile) -- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/Dockerfile) +- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/meta/Dockerfile) -- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/alpine/Dockerfile) +- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.10/meta/alpine/Dockerfile) -- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/Dockerfile) +- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/data/Dockerfile) -- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/alpine/Dockerfile) +- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/data/alpine/Dockerfile) -- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/Dockerfile) +- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/meta/Dockerfile) -- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/alpine/Dockerfile) +- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/1.11/meta/alpine/Dockerfile) -- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) +- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/2.7/Dockerfile) -- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) +- [`2-alpine`, `2.7-alpine`, `2.7.11-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/2.7/alpine/Dockerfile) -- [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) +- [`3-core`, `3.1-core`, `3.1.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/3.1-core/Dockerfile) -- [`3-enterprise`, `3.2-enterprise`, `3.2.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-enterprise/Dockerfile) +- [`3-enterprise`, `3.1-enterprise`, `3.1.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/063caa0d729da41b70760c8f7362345f1bb79779/influxdb/3.1-enterprise/Dockerfile) # Quick reference (cont.) From 7d04d886b31a8941571ce84dfcd85fa4ef0bb556 Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 3 Jul 2025 07:16:31 -0700 Subject: [PATCH 38/77] Remove stray README.md-e file --- influxdb/README.md-e | 487 ------------------------------------------- 1 file changed, 487 deletions(-) delete mode 100644 influxdb/README.md-e diff --git a/influxdb/README.md-e b/influxdb/README.md-e deleted file mode 100644 index b1a79854a838..000000000000 --- a/influxdb/README.md-e +++ /dev/null @@ -1,487 +0,0 @@ - - -# Quick reference - -- **Maintained by**: - [InfluxData](%%GITHUB-REPO%%) - -- **Where to get help**: - [the Docker Community Slack](https://dockr.ly/comm-slack), [Server Fault](https://serverfault.com/help/on-topic), [Unix & Linux](https://unix.stackexchange.com/help/on-topic), or [Stack Overflow](https://stackoverflow.com/help/on-topic) - -# Supported tags and respective `Dockerfile` links - -- [`1.11`, `1.11.8`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/Dockerfile) - -- [`1.11-alpine`, `1.11.8-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/alpine/Dockerfile) - -- [`1.10-data`, `1.10.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/Dockerfile) - -- [`1.10-data-alpine`, `1.10.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/data/alpine/Dockerfile) - -- [`1.10-meta`, `1.10.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/Dockerfile) - -- [`1.10-meta-alpine`, `1.10.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.10/meta/alpine/Dockerfile) - -- [`1.11-data`, `1.11.8-data`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/Dockerfile) - -- [`1.11-data-alpine`, `1.11.8-data-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/data/alpine/Dockerfile) - -- [`1.11-meta`, `1.11.8-meta`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/Dockerfile) - -- [`1.11-meta-alpine`, `1.11.8-meta-alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/1.11/meta/alpine/Dockerfile) - -- [`2`, `2.7`, `2.7.12`, `latest`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/Dockerfile) - -- [`2-alpine`, `2.7-alpine`, `2.7.12-alpine`, `alpine`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/2.7/alpine/Dockerfile) - -- [`3-core`, `3.2-core`, `3.2.0-core`, `core`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-core/Dockerfile) - -- [`3-enterprise`, `3.2-enterprise`, `3.2.0-enterprise`, `enterprise`](https://github.com/influxdata/influxdata-docker/blob/abb94994d78be45ccaa56282f36c36ad16bd5a5e/influxdb/3.2-enterprise/Dockerfile) - -# Quick reference (cont.) - -- **Where to file issues**: - [%%GITHUB-REPO%%/issues](%%GITHUB-REPO%%/issues?q=) - -- **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) - `amd64`, `arm64v8` - -- **Published image artifact details**: - [repo-info repo's `repos/influxdb/` directory](https://github.com/docker-library/repo-info/blob/master/repos/influxdb) ([history](https://github.com/docker-library/repo-info/commits/master/repos/influxdb)) - (image metadata, transfer size, etc) - -- **Image updates**: - [official-images repo's `library/influxdb` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Finfluxdb) - [official-images repo's `library/influxdb` file](https://github.com/docker-library/official-images/blob/master/library/influxdb) ([history](https://github.com/docker-library/official-images/commits/master/library/influxdb)) - -- **Source of this description**: - [docs repo's `influxdb/` directory](https://github.com/docker-library/docs/tree/master/influxdb) ([history](https://github.com/docker-library/docs/commits/master/influxdb)) - -**This README covers all currently supported versions of InfluxDB:** - -- **InfluxDB 3** (Core and Enterprise) -- **InfluxDB v2** -- **InfluxDB v1** - -Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. - -# InfluxDB Docker Image Overview - -![logo](https://raw.githubusercontent.com/docker-library/docs/43d87118415bb75d7bb107683e79cd6d69186f67/influxdb/logo.png) - -InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: - -- Monitoring infrastructure and applications -- Collecting data from IoT devices -- Storing log and event data - -InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. - -## InfluxDB 3 - -InfluxDB 3 is a new InfluxDB engine that uses an object store-backed architecture. It stores time series and event data using Apache Arrow and Parquet. It supports high-ingest workloads and fast queries. - -InfluxDB 3 comes in two editions: - -- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. - -**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Obtain one from [InfluxData's pricing page](https://www.influxdata.com/pricing/). - -For full documentation, visit the [InfluxDB 3 documentation site](https://docs.influxdata.com) - -## Docker Images - -Use the official images hosted on Quay.io: - -- **Core:** `quay.io/influxdb/influxdb3:latest` -- **Enterprise:** `quay.io/influxdb/influxdb3-enterprise:latest` - -## Parameter glossary - -| Parameter | Description | -|------------------|-----------------------------------------------------------------| -| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | -| `--node-id` | Unique identifier for the node within an Enterprise cluster. | -| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | -| `--data-dir` | Path to the directory for data storage. | - -# How to use this image - -## Start InfluxDB 3 Core - -Run InfluxDB 3 Core using either Docker Compose or the CLI. - -### Docker Compose - -Create a `compose.yml` file with the configuration: - -... via [`docker compose`](https://github.com/docker/compose) - -Example `compose.yaml` for `influxdb`: - -```yaml -# compose.yaml -services: - influxdb3-core: - container_name: influxdb3-core - image: influxdb:3-core - ports: - - 8181:8181 - command: - - influxdb3 - - serve - - --node-id=node0 - - --object-store=file - - --data-dir=/var/lib/influxdb3 - - --plugin-dir=/var/lib/influxdb3-plugins -``` - -Start the container by using the following command: - -```bash -docker compose pull && docker compose run influxdb3-core -``` - -Stop your container by using following command: - -```bash -docker container ls --filter "name=influxdb3" -docker kill -``` - -### Docker CLI - -Run this command to start the InfluxDB 3 Core container: - -```bash -docker run -d --name influxdb3-core \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 -``` - -Once the container is running, generate an admin token: - -```bash -docker exec -it influxdb3-core influxdb3 generate token --admin -``` - -Use the token to create a database: - -```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN -``` - -To check the server health: - -```bash -curl localhost:8086/health -``` - -## Start InfluxDB 3 Enterprise - -InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, provide your license key as an environment variable. - -### Docker Compose - -Create a `compose.yml` file with the following configuration: - -... via [`docker compose`](https://github.com/docker/compose) - -Example `compose.yaml` for `influxdb`: - -```yaml -# compose.yaml -services: - influxdb3-core: - container_name: influxdb3-core - image: influxdb:3-core - ports: - - 8181:8181 - command: - - influxdb3 - - serve - - --node-id=node0 - - --object-store=file - - --data-dir=/var/lib/influxdb3 - - --plugin-dir=/var/lib/influxdb3-plugins -``` - -Start your container: - -```bash -docker compose pull && docker compose run influxdb3-enterprise -``` - -## Docker with mounted file style object store - -Run this command to start the InfluxDB 3 Enterprise container - -```bash -docker run -d --name influxdb3-enterprise -p 8086:8086 \ - -v $PWD/plugins:/plugins \ - -v $PWD/data:/var/lib/influxdb3 \ - -e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \ - influxdb:enterprise serve \ - --cluster-id cluster1 \ - --node-id node1 \ - --plugin-dir /plugins \ - --object-store file \ - --data-dir /var/lib/influxdb3 -``` - -Then, generate an admin token: - -```bash -docker exec -it influxdb3-enterprise influxdb3 create token --admin -``` - -Use the token from the output to create a database. - -```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token -``` - -## Mount data to persist across restarts - -To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration. - -### Using a Docker volume - -To persist data using a Docker-managed volume, run the following command: - -```bash -docker run -d --name influxdb3-core \ - -v influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 -``` - -This command: - -- Creates or reuses a Docker volume named `influxdb3-data`. -- Maps the default InfluxDB port (`8086`) to your local machine. -- Starts the InfluxDB server with a required host ID and object store configuration. - -### Using a local host directory - -To persist data in a local directory on your host, use the following command: - -```bash -docker run -d --name influxdb3-core \ - -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - -p 8086:8086 \ - quay.io/influxdb/influxdb3:latest \ - serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3 -``` - -This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions. - -# InfluxDB v2 - -## How to use the InfluxDB v2 Docker image - -Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. - -```bash -docker run -d -p 8086:8086 \ - -v $PWD/data:/var/lib/influxdb2 \ - -v $PWD/config:/etc/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 -``` - -After the container starts, go to `http://localhost:8086` to access the UI. - -For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). - -# InfluxDB v1 - -## How to use the InfluxDB v1 Docker image - -Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: - -```bash -docker run -d -p 8086:8086 \ - -v $PWD:/var/lib/influxdb \ - influxdb:1.8 -``` - -This command maps port `8086` and mounts your current directory to persist data. - -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). - -# Image Variants - -The `influxdb` images come in many flavors, each designed for a specific use case. - -## `influxdb:` - -This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of. - -## `influxdb:-alpine` - -This image is based on the popular [Alpine Linux project](https://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general. - -This variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use [musl libc](https://musl.libc.org) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), so software will often run into issues depending on the depth of their libc requirements/assumptions. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images. - -To minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar). - -## `influxdb:data` - -*Using this image for [InfluxDB Enterprise](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file) requires a valid InfluxData [license key](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/#license-key-or-file).* - -This image contains the enterprise data node package for clustering. It supports all of the same options as the InfluxDB 1.x OSS image, but it needs port 8088 to be exposed to the meta nodes. - -Refer to the `influxdb:meta` variant for directions on how to setup a cluster. - -## `influxdb:meta` - -*This image requires a valid license key from InfluxData.* Please visit our [products page](https://www.influxdata.com/products/) to learn more. - -This image contains the enterprise meta node package for clustering. It is meant to be used in conjunction with the `influxdb:data` package of the same version. - -### Using this Image - -#### Specifying the license key - -The license key can be specified using either an environment variable or by overriding the configuration file. If you specify the license key directly, the container needs to be able to access the InfluxData portal. - -```console -docker run -p 8089:8089 -p 8091:8091 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= - influxdb:meta -``` - -#### Running the container - -The examples below will use docker's built-in networking capability. If you use the port exposing feature, the host port and the container port need to be the same. - -First, create a docker network: - -```console -docker network create influxdb -``` - -Start three meta nodes. This is the suggested number of meta nodes. We do not recommend running more or less. If you choose to run more or less, be sure that the number of meta nodes is odd. The hostname must be set on each container to the address that will be used to access the meta node. When using docker networks, the hostname should be made the same as the name of the container. - -```console -docker run -d --name=influxdb-meta-0 --network=influxdb \ - -h influxdb-meta-0 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -docker run -d --name=influxdb-meta-1 --network=influxdb \ - -h influxdb-meta-1 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -docker run -d --name=influxdb-meta-2 --network=influxdb \ - -h influxdb-meta-2 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -``` - -When setting the hostname, you can use `-h ` or you can directly set the environment variable using `-e INFLUXDB_HOSTNAME=`. - -After starting the meta nodes, you need to tell them about each other. Choose one of the meta nodes and run `influxd-ctl` in the container. - -```console -docker exec influxdb-meta-0 \ - influxd-ctl add-meta influxdb-meta-1:8091 -docker exec influxdb-meta-0 \ - influxd-ctl add-meta influxdb-meta-2:8091 -``` - -Or you can just start a single meta node. If you setup a single meta node, you do not need to use `influxd-ctl add-meta`. - -```console -docker run -d --name=influxdb-meta --network=influxdb \ - -h influxdb-meta \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY= \ - influxdb:meta -single-server -``` - -#### Connecting the data nodes - -Start the data nodes using `influxdb:data` with similar command line arguments to the meta nodes. You can start as many data nodes as are allowed by your license. - -```console -docker run -d --name=influxdb-data-0 --network=influxdb \ - -h influxdb-data-0 \ - -e INFLUXDB_LICENSE_KEY= \ - influxdb:data -``` - -You can add `-p 8086:8086` to expose the http port to the host machine. After starting the container, choose one of the meta nodes and add the data node to it. - -```console -docker exec influxdb-meta-0 \ - influxd-ctl add-data influxdb-data-0:8088 -``` - -Perform these same steps for any other data nodes that you want to add. - -You can now connect to any of the running data nodes to use your cluster. - -See the [influxdb](https://hub.docker.com/_/influxdb/) image documentation for more details on how to use the data node images. - -#### Configuration - -InfluxDB Meta can be either configured from a config file or using environment variables. To mount a configuration file and use it with the server, you can use this command: - -Generate the default configuration file: - -```console -docker run --rm influxdb:meta influxd-meta config > influxdb-meta.conf -``` - -Modify the default configuration, which will now be available under `$PWD`. Then start the InfluxDB Meta container. - -```console -docker run \ - -v $PWD/influxdb-meta.conf:/etc/influxdb/influxdb-meta.conf:ro \ - influxdb -config /etc/influxdb/influxdb-meta.conf -``` - -Modify `$PWD` to the directory where you want to store the configuration file. - -For environment variables, the format is `INFLUXDB_$SECTION_$NAME`. All dashes (`-`) are replaced with underscores (`_`). If the variable isn't in a section, then omit that part. - -Examples: - -```console -INFLUXDB_REPORTING_DISABLED=true -INFLUXDB_META_DIR=/path/to/metadir -INFLUXDB_ENTERPRISE_REGISTRATION_ENABLED=true -``` - -For more information, see how to [Install InfluxDB Enterprise meta nodes](https://docs.influxdata.com/enterprise_influxdb/v1/introduction/installation/meta_node_installation/). - -# License - -View [license information](https://github.com/influxdata/influxdb/blob/master/LICENSE) for the software contained in this image. - -As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). - -Some additional license information which was able to be auto-detected might be found in [the `repo-info` repository's `influxdb/` directory](https://github.com/docker-library/repo-info/tree/master/repos/influxdb). - -As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. From cd71c0a5c6f0f7310c4a29792a7edae38bc0229a Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 3 Jul 2025 07:46:31 -0700 Subject: [PATCH 39/77] docs: minor changes to influxdb 3 and docker images sections --- influxdb/content.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 524a82dea2d5..edd8bb4c975d 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -27,14 +27,27 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -**License key for Enterprise** To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). +**License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). ## Docker Images -You can pull docker images using these commands: +Docker images are pre-configured templates that allow you to quickly deploy InfluxDB 3 Core or Enterprise in a containerized environment. These images include all necessary dependencies and configurations to run InfluxDB efficiently. -- **Core:**: `docker pull influxdb:3-core` -- **Enterprise:**: `docker pull influxdb:3-enterprise` +To pull the latest Docker images, use the following commands: + +- **Core**: Pull the latest InfluxDB 3 Core image for local development and prototyping: + + ```bash + docker pull influxdb:3-core + ``` + +- **Enterprise:**: Pull the latest InfluxDB 3 Enterprise image for production-grade deployments + + ```bash + docker pull influxdb:3-enterprise + ``` + +**Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements. ## Parameter glossary From 6787f27b135bdeae28e9b82d77041580e62e8ada Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 3 Jul 2025 07:55:06 -0700 Subject: [PATCH 40/77] docs: minor update to enterprise section --- influxdb/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index edd8bb4c975d..a93cbf9d2818 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -124,7 +124,7 @@ curl http://localhost:8181/health ## Start InfluxDB 3 Enterprise -Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker CLI or Docker Compose. +Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. ### Docker Compose From 0a91d78ea896669a86d8d794a587dc7cb99bbbbf Mon Sep 17 00:00:00 2001 From: meelahme Date: Thu, 3 Jul 2025 08:31:42 -0700 Subject: [PATCH 41/77] WIP: adding Docker enviroment variable --- influxdb/content.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/influxdb/content.md b/influxdb/content.md index a93cbf9d2818..d7edfbe9f96a 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -180,6 +180,36 @@ docker run -it \ --data-dir /path/in/container ``` +### Configure Docker environment variable + +To defne environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. + +Create a `.env` file: + +```bash +INFLUX_LICENSE_KEY=your_license_key_here +INFLUXDB3_LICENSE_EMAIL=you@example.com +``` + +Start the container: + +```bash +docker run -d --name influxdb3-enterprise \ + --env-file .env \ + -v $PWD/data:/var/lib/influxdb3 \ + -p 8181:8181 \ + influxdb:3-enterprise influxdb3 serve \ + --cluster-id cluster1 \ + --node-id node1 \ + --object-store file \ + --data-dir /var/lib/influxdb3 +``` + +This approach lets you: + +- Store sensitive credentials and configuration separately from your shell history or scripts. +- Reuse the same `.env` file in Docker Compose or CI pipelines. + Generate an admin token: ```bash From 1512d24361541d65290bc5fb5095b365c688d4d8 Mon Sep 17 00:00:00 2001 From: meelahme Date: Mon, 7 Jul 2025 12:32:17 -0700 Subject: [PATCH 42/77] docs: Adding in a section to refernce InfluxDB Explorer --- influxdb/content.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/influxdb/content.md b/influxdb/content.md index d7edfbe9f96a..3f73a1c29e62 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,6 +1,7 @@ **This README covers all currently supported versions of InfluxDB:** - **InfluxDB 3** (Core and Enterprise) +- **InfluxDB Explorer** - **InfluxDB v2** - **InfluxDB v1** @@ -26,6 +27,7 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. +- **InfluxDB Explorer**: A web-based interface for visualizing exploring, and managing time series data stored in InfluxDB 3 databases. **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). @@ -222,6 +224,18 @@ Use the token from the output to create a database. docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ``` +# InfluxDB Explorer + +InfluxDB Explorer provides a graphical interface for visualizing and managing your time series data. Use it alongside your InfluxDB instance to create dashboards, explore metrics, and monitor your systems in real time. + +Access Explorer through the official Docker image: + +```bash +docker pull influxdata/influxdb3-ui:1.0.0 +``` + +For detailed instructions on connecting Explorer to your InfluxDB instance, see [InfluxDB Explorer documentation](https://docs.influxdata.com/influxdb/v3/explorer/) + # InfluxDB v2 ## How to use the InfluxDB v2 Docker image @@ -240,6 +254,9 @@ docker run -d -p 8086:8086 \ influxdb:2 ``` + +[Link to dock comppoes in the documentation] + After the container starts, visit [http://localhost:8086](http://localhost:8086) in your browser to view the UI. For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). From 34805bb92560919f33f01adbfc2cc700a666a5c8 Mon Sep 17 00:00:00 2001 From: meelahme Date: Mon, 7 Jul 2025 13:07:01 -0700 Subject: [PATCH 43/77] docs: update to v2 section --- influxdb/content.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 3f73a1c29e62..e244968d758c 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -234,7 +234,7 @@ Access Explorer through the official Docker image: docker pull influxdata/influxdb3-ui:1.0.0 ``` -For detailed instructions on connecting Explorer to your InfluxDB instance, see [InfluxDB Explorer documentation](https://docs.influxdata.com/influxdb/v3/explorer/) +For detailed instructions on connecting Explorer to your InfluxDB instance, see [InfluxDB Explorer documentation](https://docs.influxdata.com/influxdb/v3/explorer/). # InfluxDB v2 @@ -254,12 +254,9 @@ docker run -d -p 8086:8086 \ influxdb:2 ``` - -[Link to dock comppoes in the documentation] - After the container starts, visit [http://localhost:8086](http://localhost:8086) in your browser to view the UI. -For more information, see the [InfluxDB v2 Docker documentation](https://docs.influxdata.com/influxdb/v2/install/?t=docker). +For detailed instructions on using Docker Compose with InfluxDB v2, see the [Docker Compose installation guide](https://docs.influxdata.com/influxdb/v2/install/use-docker-compose/). # InfluxDB v1 From b36b948118a451b5cf5e46df70f769ca6e8efd58 Mon Sep 17 00:00:00 2001 From: meelahme Date: Mon, 7 Jul 2025 13:39:00 -0700 Subject: [PATCH 44/77] fixing markdown lint --- influxdb/content.fixed.md | 275 ++++++++++++++++++++++++++++++++++++++ influxdb/content.md | 6 +- 2 files changed, 278 insertions(+), 3 deletions(-) create mode 100644 influxdb/content.fixed.md diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md new file mode 100644 index 000000000000..d366be2bfeb5 --- /dev/null +++ b/influxdb/content.fixed.md @@ -0,0 +1,275 @@ +**This README covers all currently supported versions of InfluxDB:** + +- **InfluxDB 3** (Core and Enterprise) +- **InfluxDB Explorer** +- **InfluxDB v2** +- **InfluxDB v1** + +Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. + +# InfluxDB Docker Image Overview + +%%LOGO%% + +InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: + +- Monitoring infrastructure and applications +- Collecting data from IoT devices +- Storing log and event data + +InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. + +## InfluxDB 3 + +InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, the DataFusion SQL engine, and diskless object storage architecture. It delivers sub-10ms query response times, unlimited cardinality, and supports both SQL and InfluxQL. + +InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: + +- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. +- **InfluxDB Explorer**: A web-based interface for visualizing exploring, and managing time series data stored in InfluxDB 3 databases. + +**License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). + +## Docker Images + +Docker images are pre-configured templates that allow you to quickly deploy InfluxDB 3 Core or Enterprise in a containerized environment. These images include all necessary dependencies and configurations to run InfluxDB efficiently. + +To pull the latest Docker images, use the following commands: + +- **Core**: Pull the latest InfluxDB 3 Core image for local development and prototyping: + + ```bash + docker pull influxdb:3-core + ``` + +- **Enterprise:**: Pull the latest InfluxDB 3 Enterprise image for production-grade deployments + + ```bash + docker pull influxdb:3-enterprise + ``` + +**Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements. + +## Parameter glossary + +| Parameter | Description | +|------------------|-----------------------------------------------------------------| +| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | +| `--node-id` | Unique identifier for the node within an Enterprise cluster. | +| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | +| `--data-dir` | Path to the directory for data storage. | + +# How to use this image + +## Start InfluxDB 3 Core + +Run InfluxDB 3 Core using either Docker Compose or Docker CLI. + +### Docker Compose + +To use Docker Compose with persistent storage, create a `compose.yml` file with the following configuration: + +%%COMPOSE%% + +Start the container by using the following command: + +```bash +docker compose pull && docker compose run influxdb3-core +``` + +Stop the container by using following command: + +```bash +docker container ls --filter "name=influxdb3" +docker kill +``` + +### File system object store with docker + +To start InfluxDB 3 Core with persistent storage and expose the default HTTP port (`8181`), run: + +```bash +docker run -d --name influxdb3-core \ + -p 8181:8181 \ + -v $PWD/influxdb3-data:/var/lib/influxdb3 \ + influxdb:3-core influxdb3 serve \ + --node-id my-influxdb-node \ + --object-store file \ + --data-dir /var/lib/influxdb3 +``` + +This command: + +- Maps container port `8181` (HTTP API) to your host +- Mounts the local `influxdb3-data` directory to persist data +- Configures InfluxDB 3 Core to use a file system object store + +Once the container is running, generate an admin token: + +```bash +docker exec -it influxdb3-core influxdb3 generate token --admin +``` + +Use the token to create a database: + +```bash +docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN +``` + +To check the server health: + +```bash +curl http://localhost:8181/health + --header "Authorization: Bearer YOUR_ADMIN_TOKEN" +``` + +## Start InfluxDB 3 Enterprise + +Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. + +### Docker Compose + +To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. + +```yaml +services: + influxdb3-enterprise: + container_name: influxdb3-enterprise + image: influxdb:3-enterprise + ports: + - 8181:8181 + command: + - influxdb3 + - serve + - --node-id=node0 + - --cluster-id=cluster0 + - --object-store=file + - --data-dir=/var/lib/influxdb3 + - --plugin-dir=/var/lib/influxdb3-plugins + environment: + - INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS +``` + +- Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt when generating a trial or at-home license. + +Start your container: + +```bash +docker compose pull && docker compose run influxdb3-enterprise +``` + +- InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections. + +To stop your container run: + +```bash +docker container ls --filter "name=influxdb3" +docker kill +``` + +### File system object store with Docker + +To run the Docker image and persist data to the local file system, mount a volume for the object store. + +```bash +docker run -it \ + --volume /path/on/host:/path/in/container \ + influxdb:3-enterprise influxdb3 serve \ + --node-id my_host \ + --cluster-id my_cluster \ + --object-store file \ + --data-dir /path/in/container +``` + +### Configure Docker environment variable + +To defne environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. + +Create a `.env` file: + +```bash +INFLUX_LICENSE_KEY=your_license_key_here +INFLUXDB3_LICENSE_EMAIL=you@example.com +``` + +Start the container: + +```bash +docker run -d --name influxdb3-enterprise \ + --env-file .env \ + -v $PWD/data:/var/lib/influxdb3 \ + -p 8181:8181 \ + influxdb:3-enterprise influxdb3 serve \ + --cluster-id cluster1 \ + --node-id node1 \ + --object-store file \ + --data-dir /var/lib/influxdb3 +``` + +This approach lets you: + +- Store sensitive credentials and configuration separately from your shell history or scripts. +- Reuse the same `.env` file in Docker Compose or CI pipelines. + +Generate an admin token: + +```bash +docker exec -it influxdb3-enterprise influxdb3 create token --admin +``` + +Use the token from the output to create a database. + +```bash +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +``` + +# InfluxDB Explorer + +InfluxDB Explorer provides a graphical interface for visualizing and managing your time series data. Use it alongside your InfluxDB instance to create dashboards, explore metrics, and monitor your systems in real time. + +Access Explorer through the official Docker image: + +```bash +docker pull influxdata/influxdb3-ui:1.0.0 +``` + +For detailed instructions on connecting Explorer to your InfluxDB instance, see [InfluxDB Explorer documentation](https://docs.influxdata.com/influxdb/v3/explorer/). + +# InfluxDB v2 + +## How to use the InfluxDB v2 Docker image + +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. + +```bash +docker run -d -p 8086:8086 \ + -v $PWD/data:/var/lib/influxdb2 \ + -v $PWD/config:/etc/influxdb2 \ + -e DOCKER_INFLUXDB_INIT_MODE=setup \ + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ + -e DOCKER_INFLUXDB_INIT_ORG=my-org \ + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ + influxdb:2 +``` + +After the container starts, visit [http://localhost:8086](http://localhost:8086) in your browser to view the UI. + +For detailed instructions on using Docker Compose with InfluxDB v2, see the [Docker Compose installation guide](https://docs.influxdata.com/influxdb/v2/install/use-docker-compose/). + +# InfluxDB v1 + +## How to use the InfluxDB v1 Docker image + +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: + +```bash +docker run -d -p 8086:8086 \ + -v $PWD:/var/lib/influxdb \ + influxdb:1.8 +``` + +This command maps port `8086` and mounts your current directory to persist data. + +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). diff --git a/influxdb/content.md b/influxdb/content.md index e244968d758c..d366be2bfeb5 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,7 +1,7 @@ **This README covers all currently supported versions of InfluxDB:** - **InfluxDB 3** (Core and Enterprise) -- **InfluxDB Explorer** +- **InfluxDB Explorer** - **InfluxDB v2** - **InfluxDB v1** @@ -27,7 +27,7 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -- **InfluxDB Explorer**: A web-based interface for visualizing exploring, and managing time series data stored in InfluxDB 3 databases. +- **InfluxDB Explorer**: A web-based interface for visualizing exploring, and managing time series data stored in InfluxDB 3 databases. **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). @@ -224,7 +224,7 @@ Use the token from the output to create a database. docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ``` -# InfluxDB Explorer +# InfluxDB Explorer InfluxDB Explorer provides a graphical interface for visualizing and managing your time series data. Use it alongside your InfluxDB instance to create dashboards, explore metrics, and monitor your systems in real time. From a903c3ec1030463039ab7651306847438fef9f44 Mon Sep 17 00:00:00 2001 From: meelahme Date: Mon, 7 Jul 2025 14:02:04 -0700 Subject: [PATCH 45/77] docs: updating v2 section with start and stop docker instructions --- influxdb/content.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index d366be2bfeb5..aefbd2b17193 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -238,9 +238,11 @@ For detailed instructions on connecting Explorer to your InfluxDB instance, see # InfluxDB v2 -## How to use the InfluxDB v2 Docker image +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start a containerized instance of InfluxDB v2. -Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. +## Start InfluxDB v2 + +To start InfluxDB v2 in a container with mounted volumes for persistent configuration and data, run: ```bash docker run -d -p 8086:8086 \ @@ -254,7 +256,33 @@ docker run -d -p 8086:8086 \ influxdb:2 ``` -After the container starts, visit [http://localhost:8086](http://localhost:8086) in your browser to view the UI. +This command: + +- Starts a detached container named `influxdb2` +- Mounts volumes for persistent storage of data and configuration +- Initializes InfluxDB with a user, organization, and bucket + +To access the InfluxDB UI, visit [http://localhost:8086](http://localhost:8086) in your browser. + +## Start an existing InfluxDB v2 container + +If you previously created the container and it has been stopped, restart it with: + +```bash +docker start influxdb2 +``` + +Replace `influxdb2` with the name of your container if different. + +## Stop InfluxDB v2 + +To stop a running container: + +```bash +docker stop influxdb2 +``` + +This gracefully shuts down the container. For detailed instructions on using Docker Compose with InfluxDB v2, see the [Docker Compose installation guide](https://docs.influxdata.com/influxdb/v2/install/use-docker-compose/). From 6be22e5da219c646c67d1aed7579a2f5e6d5af84 Mon Sep 17 00:00:00 2001 From: meelahme Date: Mon, 7 Jul 2025 21:30:41 -0700 Subject: [PATCH 46/77] docs: fixed grammar mistakes, updated v1 section, and added a section for Explorer --- influxdb/content.md | 60 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index aefbd2b17193..66422fd9f5f5 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -27,7 +27,7 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -- **InfluxDB Explorer**: A web-based interface for visualizing exploring, and managing time series data stored in InfluxDB 3 databases. +- **InfluxDB Explorer**: A web-based interface for visualizing, exploring, and managing time series data stored in InfluxDB 3 databases. **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). @@ -184,7 +184,7 @@ docker run -it \ ### Configure Docker environment variable -To defne environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. +To define environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. Create a `.env` file: @@ -290,14 +290,64 @@ For detailed instructions on using Docker Compose with InfluxDB v2, see the [Doc ## How to use the InfluxDB v1 Docker image -Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing. + +## Start InfluxDB v1 + +Start a container with persistent storage: ```bash docker run -d -p 8086:8086 \ -v $PWD:/var/lib/influxdb \ - influxdb:1.8 + influxdb +``` + +This starts InfluxDB and mounts your local `./data` directory to persist data across container lifecycles. After the container starts, InfluxDB is available at `http://localhost:8086`. + +Configure the container using environment variables: + +```bash +docker run -p 8086:8086 \ + -v $PWD/data:/var/lib/influxdb \ + -e INFLUXDB_REPORTING_DISABLED=true \ + -e INFLUXDB_HTTP_AUTH_ENABLED=true \ + -e INFLUXDB_HTTP_LOG_ENABLED=true \ + influxdb +``` + +Configure with file: + +```bash +docker run --rm influxdb influxd config > influxdb.conf + +docker run -p 8086:8086 \ + -v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \ + -v $PWD/data:/var/lib/influxdb \ + influxdb +``` + +## Access the CLI + +To open the InfluxDB CLI inside the container: + +```bash +docker exec -it influx ``` -This command maps port `8086` and mounts your current directory to persist data. +Replace `` with the name or ID of your running InfluxDB container. + +## Stop InfluxDB v1 + +To stop the container: + +```bash +docker stop +``` + +To restart it later: + +```bash +docker start +``` For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). From 6b881ba3df3022216242c2d15ecf62af17bf3c2f Mon Sep 17 00:00:00 2001 From: meelahme Date: Mon, 7 Jul 2025 21:32:03 -0700 Subject: [PATCH 47/77] docs: adding a link to influxdb v1 documentation --- influxdb/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.md b/influxdb/content.md index 66422fd9f5f5..92a99155e02d 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -350,4 +350,4 @@ To restart it later: docker start ``` -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/introduction/install/docker/). From 9371c1a590bac53354fa395810d5e474a65b46f0 Mon Sep 17 00:00:00 2001 From: meelahme Date: Mon, 7 Jul 2025 21:43:41 -0700 Subject: [PATCH 48/77] docs: minor changes for tone --- influxdb/content.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 92a99155e02d..75ebf9156caa 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -72,13 +72,13 @@ To use Docker Compose with persistent storage, create a `compose.yml` file with %%COMPOSE%% -Start the container by using the following command: +Use the following command to start the container: ```bash docker compose pull && docker compose run influxdb3-core ``` -Stop the container by using following command: +Use the following command to stop the container: ```bash docker container ls --filter "name=influxdb3" @@ -99,7 +99,7 @@ docker run -d --name influxdb3-core \ --data-dir /var/lib/influxdb3 ``` -This command: +The `docker run` command performs the following: - Maps container port `8181` (HTTP API) to your host - Mounts the local `influxdb3-data` directory to persist data @@ -184,7 +184,7 @@ docker run -it \ ### Configure Docker environment variable -To define environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. +Define environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. Create a `.env` file: @@ -266,7 +266,7 @@ To access the InfluxDB UI, visit [http://localhost:8086](http://localhost:8086) ## Start an existing InfluxDB v2 container -If you previously created the container and it has been stopped, restart it with: +If you previously created the container and then stopped it, you can restart it with: ```bash docker start influxdb2 @@ -282,7 +282,7 @@ To stop a running container: docker stop influxdb2 ``` -This gracefully shuts down the container. +The `docker stop` command gracefully shuts down the container. For detailed instructions on using Docker Compose with InfluxDB v2, see the [Docker Compose installation guide](https://docs.influxdata.com/influxdb/v2/install/use-docker-compose/). @@ -302,7 +302,7 @@ docker run -d -p 8086:8086 \ influxdb ``` -This starts InfluxDB and mounts your local `./data` directory to persist data across container lifecycles. After the container starts, InfluxDB is available at `http://localhost:8086`. +This starts InfluxDB and mounts your local `./data` directory to persist data across container lifecycles. After the container starts, you can access InfluxDB at `http://localhost:8086`. Configure the container using environment variables: From f7d81aef28b0a0745b59a3e4512a88ab2c9f42ca Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:12:42 -0700 Subject: [PATCH 49/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 1 - 1 file changed, 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index d366be2bfeb5..2c81d68e16f5 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -1,7 +1,6 @@ **This README covers all currently supported versions of InfluxDB:** - **InfluxDB 3** (Core and Enterprise) -- **InfluxDB Explorer** - **InfluxDB v2** - **InfluxDB v1** From 439fc0300c9bb00a572cbd3ff5e4ebb27e26906c Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:13:28 -0700 Subject: [PATCH 50/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 2c81d68e16f5..9ea91e993e08 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -266,7 +266,7 @@ Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) t ```bash docker run -d -p 8086:8086 \ -v $PWD:/var/lib/influxdb \ - influxdb:1.8 + influxdb:1.11 ``` This command maps port `8086` and mounts your current directory to persist data. From fcf040f7cb6720dd760e34602941177637ea1b37 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:17:09 -0700 Subject: [PATCH 51/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 1 + 1 file changed, 1 insertion(+) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 9ea91e993e08..3183b7083af4 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -3,6 +3,7 @@ - **InfluxDB 3** (Core and Enterprise) - **InfluxDB v2** - **InfluxDB v1** +- **InfluxDB Enterprise v1** Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. From 2b6274209d953b9deac1d1812939883470f3cd01 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:17:30 -0700 Subject: [PATCH 52/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 3183b7083af4..a5563352d39d 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -27,8 +27,6 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -- **InfluxDB Explorer**: A web-based interface for visualizing exploring, and managing time series data stored in InfluxDB 3 databases. - **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). ## Docker Images From f7599391ffd060649d4c173d429aa34e638c20a3 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:17:42 -0700 Subject: [PATCH 53/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index a5563352d39d..b4031a34976d 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -29,6 +29,8 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). +**InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. + ## Docker Images Docker images are pre-configured templates that allow you to quickly deploy InfluxDB 3 Core or Enterprise in a containerized environment. These images include all necessary dependencies and configurations to run InfluxDB efficiently. From cafa100d67372a5be54f3b12042c03f2efb1210d Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:17:52 -0700 Subject: [PATCH 54/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index b4031a34976d..d1bf3c80efe8 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -226,7 +226,7 @@ docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --t # InfluxDB Explorer -InfluxDB Explorer provides a graphical interface for visualizing and managing your time series data. Use it alongside your InfluxDB instance to create dashboards, explore metrics, and monitor your systems in real time. +InfluxDB 3 Explorer provides a graphical interface for visualizing and managing your time series data stored in an InfluxDB 3 instance. Use Explorer to write data, create dashboards, explore metrics, and manage your databases. Access Explorer through the official Docker image: From 4cdfcabd9a32dd63c1c313a822251afa2c6feadb Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:19:29 -0700 Subject: [PATCH 55/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index d1bf3c80efe8..2f83f6cbd060 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -31,7 +31,7 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities **InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. -## Docker Images +### InfluxDB 3 images Docker images are pre-configured templates that allow you to quickly deploy InfluxDB 3 Core or Enterprise in a containerized environment. These images include all necessary dependencies and configurations to run InfluxDB efficiently. From a64ffc716a076b185e6e47cfd5f189b49c01a296 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:19:55 -0700 Subject: [PATCH 56/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 2f83f6cbd060..0ce8a5b3993f 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -33,7 +33,7 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities ### InfluxDB 3 images -Docker images are pre-configured templates that allow you to quickly deploy InfluxDB 3 Core or Enterprise in a containerized environment. These images include all necessary dependencies and configurations to run InfluxDB efficiently. +The InfluxDB 3 Core and Enterprise images include the necessary dependencies and configurations to run InfluxDB 3 efficiently. To pull the latest Docker images, use the following commands: From 070376ec37f751e4116f1e3ed327f7b020be4a20 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:20:53 -0700 Subject: [PATCH 57/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 0ce8a5b3993f..0ce08c7a04d3 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -87,7 +87,7 @@ docker kill ### File system object store with docker -To start InfluxDB 3 Core with persistent storage and expose the default HTTP port (`8181`), run: +To use the Docker CLI to start InfluxDB 3 Core with persistent file system storage and expose the default HTTP port (`8181`), run: ```bash docker run -d --name influxdb3-core \ From d36b3419fedc26b62c2e5fe4843bbeb3451525f5 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:21:35 -0700 Subject: [PATCH 58/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 0ce08c7a04d3..e223e59737fc 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -78,13 +78,6 @@ Start the container by using the following command: docker compose pull && docker compose run influxdb3-core ``` -Stop the container by using following command: - -```bash -docker container ls --filter "name=influxdb3" -docker kill -``` - ### File system object store with docker To use the Docker CLI to start InfluxDB 3 Core with persistent file system storage and expose the default HTTP port (`8181`), run: From 4345351f47836652e01851f66e8cff03610384ae Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:22:04 -0700 Subject: [PATCH 59/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index e223e59737fc..7341d31124ff 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -107,7 +107,7 @@ docker exec -it influxdb3-core influxdb3 generate token --admin Use the token to create a database: ```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN +docker exec -it influxdb3-core influxdb3 create database my_db --token AUTH_TOKEN ``` To check the server health: From 9e0a0fed986418c8dcdc24f855af925135f7e3c5 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:22:23 -0700 Subject: [PATCH 60/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 7341d31124ff..e5cef3076ccb 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -114,7 +114,7 @@ To check the server health: ```bash curl http://localhost:8181/health - --header "Authorization: Bearer YOUR_ADMIN_TOKEN" + --header "Authorization: Bearer AUTH_TOKEN" ``` ## Start InfluxDB 3 Enterprise From 39fcd34c0543b787e17c768a3bea5a8562387d20 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:22:43 -0700 Subject: [PATCH 61/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index e5cef3076ccb..9e3ee05e4203 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -149,7 +149,7 @@ services: Start your container: ```bash -docker compose pull && docker compose run influxdb3-enterprise +docker compose pull && docker compose up influxdb3-enterprise ``` - InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections. From d65fc31539d3334da63a159127ab1ea54880647e Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:23:35 -0700 Subject: [PATCH 62/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 9e3ee05e4203..e77813d25c97 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -152,7 +152,7 @@ Start your container: docker compose pull && docker compose up influxdb3-enterprise ``` -- InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections. +- InfluxDB 3 starts in a container with host port 8181 mapped to container port `8181`, the server default for HTTP connections. To stop your container run: From f3adf9f3be2e8852753ba5a4896722f96ca55b7d Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:24:01 -0700 Subject: [PATCH 63/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index e77813d25c97..e65b0e60bd04 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -154,13 +154,6 @@ docker compose pull && docker compose up influxdb3-enterprise - InfluxDB 3 starts in a container with host port 8181 mapped to container port `8181`, the server default for HTTP connections. -To stop your container run: - -```bash -docker container ls --filter "name=influxdb3" -docker kill -``` - ### File system object store with Docker To run the Docker image and persist data to the local file system, mount a volume for the object store. From 82fca5d164098fd70c708df5c87d78c903cb599b Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:24:29 -0700 Subject: [PATCH 64/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index e65b0e60bd04..184dff475cec 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -168,35 +168,6 @@ docker run -it \ --data-dir /path/in/container ``` -### Configure Docker environment variable - -To defne environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. - -Create a `.env` file: - -```bash -INFLUX_LICENSE_KEY=your_license_key_here -INFLUXDB3_LICENSE_EMAIL=you@example.com -``` - -Start the container: - -```bash -docker run -d --name influxdb3-enterprise \ - --env-file .env \ - -v $PWD/data:/var/lib/influxdb3 \ - -p 8181:8181 \ - influxdb:3-enterprise influxdb3 serve \ - --cluster-id cluster1 \ - --node-id node1 \ - --object-store file \ - --data-dir /var/lib/influxdb3 -``` - -This approach lets you: - -- Store sensitive credentials and configuration separately from your shell history or scripts. -- Reuse the same `.env` file in Docker Compose or CI pipelines. Generate an admin token: From c0b99c88a2d18c608fd10e8c0f9881c1c43782a3 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:25:04 -0700 Subject: [PATCH 65/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 1 + 1 file changed, 1 insertion(+) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 184dff475cec..adcb91f8e265 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -166,6 +166,7 @@ docker run -it \ --cluster-id my_cluster \ --object-store file \ --data-dir /path/in/container + --license-email EMAIL_ADDRESS ``` From 3ffa52eba47f8cd0c54ada7f3cc4434e5ce12e64 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:25:29 -0700 Subject: [PATCH 66/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index adcb91f8e265..127d4db252f4 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -120,7 +120,13 @@ curl http://localhost:8181/health ## Start InfluxDB 3 Enterprise Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. +To skip the email prompt when starting the server, you can provide your email +address using one of the following methods: +- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command +- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable + +For licensing options, see how to [Manage licenses](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). ### Docker Compose To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. From a10a869acb48e16a9325bdcbe564e13078b945df Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:25:50 -0700 Subject: [PATCH 67/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 127d4db252f4..629c7a5fea09 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -150,7 +150,7 @@ services: - INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS ``` -- Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt when generating a trial or at-home license. +- Replace `EMAIL_ADDRESS` with your email address Start your container: From 2d07a2c36fb08fee1ce0b9556e411969d50f8534 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:26:13 -0700 Subject: [PATCH 68/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index 629c7a5fea09..fd7d96bf9494 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -185,7 +185,7 @@ docker exec -it influxdb3-enterprise influxdb3 create token --admin Use the token from the output to create a database. ```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ADMIN_TOKEN ``` # InfluxDB Explorer From 8791b70febfe529968656bf38eb62243967a0295 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Tue, 8 Jul 2025 11:26:37 -0700 Subject: [PATCH 69/77] Update influxdb/content.fixed.md Co-authored-by: Jason Stirnaman --- influxdb/content.fixed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md index fd7d96bf9494..4681584a9d22 100644 --- a/influxdb/content.fixed.md +++ b/influxdb/content.fixed.md @@ -188,7 +188,7 @@ Use the token from the output to create a database. docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ADMIN_TOKEN ``` -# InfluxDB Explorer +# InfluxDB 3 Explorer InfluxDB 3 Explorer provides a graphical interface for visualizing and managing your time series data stored in an InfluxDB 3 instance. Use Explorer to write data, create dashboards, explore metrics, and manage your databases. From f0a4459a07bd547a032c5e10313f70231ad06f58 Mon Sep 17 00:00:00 2001 From: meelahme Date: Tue, 8 Jul 2025 11:36:56 -0700 Subject: [PATCH 70/77] fix: consolidate updates into content.md and remove content.fixed.md --- influxdb/content.md | 174 ++++++++------------------------------------ 1 file changed, 30 insertions(+), 144 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 75ebf9156caa..4681584a9d22 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,9 +1,9 @@ **This README covers all currently supported versions of InfluxDB:** - **InfluxDB 3** (Core and Enterprise) -- **InfluxDB Explorer** - **InfluxDB v2** - **InfluxDB v1** +- **InfluxDB Enterprise v1** Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. @@ -27,13 +27,13 @@ InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. - **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -- **InfluxDB Explorer**: A web-based interface for visualizing, exploring, and managing time series data stored in InfluxDB 3 databases. - **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). -## Docker Images +**InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. + +### InfluxDB 3 images -Docker images are pre-configured templates that allow you to quickly deploy InfluxDB 3 Core or Enterprise in a containerized environment. These images include all necessary dependencies and configurations to run InfluxDB efficiently. +The InfluxDB 3 Core and Enterprise images include the necessary dependencies and configurations to run InfluxDB 3 efficiently. To pull the latest Docker images, use the following commands: @@ -72,22 +72,15 @@ To use Docker Compose with persistent storage, create a `compose.yml` file with %%COMPOSE%% -Use the following command to start the container: +Start the container by using the following command: ```bash docker compose pull && docker compose run influxdb3-core ``` -Use the following command to stop the container: - -```bash -docker container ls --filter "name=influxdb3" -docker kill -``` - ### File system object store with docker -To start InfluxDB 3 Core with persistent storage and expose the default HTTP port (`8181`), run: +To use the Docker CLI to start InfluxDB 3 Core with persistent file system storage and expose the default HTTP port (`8181`), run: ```bash docker run -d --name influxdb3-core \ @@ -99,7 +92,7 @@ docker run -d --name influxdb3-core \ --data-dir /var/lib/influxdb3 ``` -The `docker run` command performs the following: +This command: - Maps container port `8181` (HTTP API) to your host - Mounts the local `influxdb3-data` directory to persist data @@ -114,20 +107,26 @@ docker exec -it influxdb3-core influxdb3 generate token --admin Use the token to create a database: ```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token YOUR_ADMIN_TOKEN +docker exec -it influxdb3-core influxdb3 create database my_db --token AUTH_TOKEN ``` To check the server health: ```bash curl http://localhost:8181/health - --header "Authorization: Bearer YOUR_ADMIN_TOKEN" + --header "Authorization: Bearer AUTH_TOKEN" ``` ## Start InfluxDB 3 Enterprise Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. +To skip the email prompt when starting the server, you can provide your email +address using one of the following methods: +- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command +- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable + +For licensing options, see how to [Manage licenses](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). ### Docker Compose To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. @@ -151,22 +150,15 @@ services: - INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS ``` -- Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt when generating a trial or at-home license. +- Replace `EMAIL_ADDRESS` with your email address Start your container: ```bash -docker compose pull && docker compose run influxdb3-enterprise +docker compose pull && docker compose up influxdb3-enterprise ``` -- InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections. - -To stop your container run: - -```bash -docker container ls --filter "name=influxdb3" -docker kill -``` +- InfluxDB 3 starts in a container with host port 8181 mapped to container port `8181`, the server default for HTTP connections. ### File system object store with Docker @@ -180,37 +172,9 @@ docker run -it \ --cluster-id my_cluster \ --object-store file \ --data-dir /path/in/container + --license-email EMAIL_ADDRESS ``` -### Configure Docker environment variable - -Define environment variables in a `.env` file and reference them when starting your InfluxDB 3 Enterprise container. - -Create a `.env` file: - -```bash -INFLUX_LICENSE_KEY=your_license_key_here -INFLUXDB3_LICENSE_EMAIL=you@example.com -``` - -Start the container: - -```bash -docker run -d --name influxdb3-enterprise \ - --env-file .env \ - -v $PWD/data:/var/lib/influxdb3 \ - -p 8181:8181 \ - influxdb:3-enterprise influxdb3 serve \ - --cluster-id cluster1 \ - --node-id node1 \ - --object-store file \ - --data-dir /var/lib/influxdb3 -``` - -This approach lets you: - -- Store sensitive credentials and configuration separately from your shell history or scripts. -- Reuse the same `.env` file in Docker Compose or CI pipelines. Generate an admin token: @@ -221,12 +185,12 @@ docker exec -it influxdb3-enterprise influxdb3 create token --admin Use the token from the output to create a database. ```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token +docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ADMIN_TOKEN ``` -# InfluxDB Explorer +# InfluxDB 3 Explorer -InfluxDB Explorer provides a graphical interface for visualizing and managing your time series data. Use it alongside your InfluxDB instance to create dashboards, explore metrics, and monitor your systems in real time. +InfluxDB 3 Explorer provides a graphical interface for visualizing and managing your time series data stored in an InfluxDB 3 instance. Use Explorer to write data, create dashboards, explore metrics, and manage your databases. Access Explorer through the official Docker image: @@ -238,11 +202,9 @@ For detailed instructions on connecting Explorer to your InfluxDB instance, see # InfluxDB v2 -Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start a containerized instance of InfluxDB v2. +## How to use the InfluxDB v2 Docker image -## Start InfluxDB v2 - -To start InfluxDB v2 in a container with mounted volumes for persistent configuration and data, run: +Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. ```bash docker run -d -p 8086:8086 \ @@ -256,33 +218,7 @@ docker run -d -p 8086:8086 \ influxdb:2 ``` -This command: - -- Starts a detached container named `influxdb2` -- Mounts volumes for persistent storage of data and configuration -- Initializes InfluxDB with a user, organization, and bucket - -To access the InfluxDB UI, visit [http://localhost:8086](http://localhost:8086) in your browser. - -## Start an existing InfluxDB v2 container - -If you previously created the container and then stopped it, you can restart it with: - -```bash -docker start influxdb2 -``` - -Replace `influxdb2` with the name of your container if different. - -## Stop InfluxDB v2 - -To stop a running container: - -```bash -docker stop influxdb2 -``` - -The `docker stop` command gracefully shuts down the container. +After the container starts, visit [http://localhost:8086](http://localhost:8086) in your browser to view the UI. For detailed instructions on using Docker Compose with InfluxDB v2, see the [Docker Compose installation guide](https://docs.influxdata.com/influxdb/v2/install/use-docker-compose/). @@ -290,64 +226,14 @@ For detailed instructions on using Docker Compose with InfluxDB v2, see the [Doc ## How to use the InfluxDB v1 Docker image -Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing. - -## Start InfluxDB v1 - -Start a container with persistent storage: +Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: ```bash docker run -d -p 8086:8086 \ -v $PWD:/var/lib/influxdb \ - influxdb -``` - -This starts InfluxDB and mounts your local `./data` directory to persist data across container lifecycles. After the container starts, you can access InfluxDB at `http://localhost:8086`. - -Configure the container using environment variables: - -```bash -docker run -p 8086:8086 \ - -v $PWD/data:/var/lib/influxdb \ - -e INFLUXDB_REPORTING_DISABLED=true \ - -e INFLUXDB_HTTP_AUTH_ENABLED=true \ - -e INFLUXDB_HTTP_LOG_ENABLED=true \ - influxdb -``` - -Configure with file: - -```bash -docker run --rm influxdb influxd config > influxdb.conf - -docker run -p 8086:8086 \ - -v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \ - -v $PWD/data:/var/lib/influxdb \ - influxdb + influxdb:1.11 ``` -## Access the CLI - -To open the InfluxDB CLI inside the container: - -```bash -docker exec -it influx -``` - -Replace `` with the name or ID of your running InfluxDB container. - -## Stop InfluxDB v1 - -To stop the container: - -```bash -docker stop -``` - -To restart it later: - -```bash -docker start -``` +This command maps port `8086` and mounts your current directory to persist data. -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/introduction/install/docker/). +For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). From a3fd2d56a3b5b276804847f7f2b5b0a258f67c95 Mon Sep 17 00:00:00 2001 From: meelahme Date: Tue, 8 Jul 2025 12:19:14 -0700 Subject: [PATCH 71/77] chore(format): trying to fix format and pass CI for markdownfmt --- influxdb/content.fixed.md | 239 -------------------------------------- influxdb/content.md | 15 +-- 2 files changed, 6 insertions(+), 248 deletions(-) delete mode 100644 influxdb/content.fixed.md diff --git a/influxdb/content.fixed.md b/influxdb/content.fixed.md deleted file mode 100644 index 4681584a9d22..000000000000 --- a/influxdb/content.fixed.md +++ /dev/null @@ -1,239 +0,0 @@ -**This README covers all currently supported versions of InfluxDB:** - -- **InfluxDB 3** (Core and Enterprise) -- **InfluxDB v2** -- **InfluxDB v1** -- **InfluxDB Enterprise v1** - -Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. - -# InfluxDB Docker Image Overview - -%%LOGO%% - -InfluxDB is the time series database platform designed to collect, store, and process large amounts of timestamped data. InfluxDB supports high write and query workloads and is commonly used for: - -- Monitoring infrastructure and applications -- Collecting data from IoT devices -- Storing log and event data - -InfluxDB offers multiple versions and deployment options to meet diverse technical and operational requirements. - -## InfluxDB 3 - -InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, the DataFusion SQL engine, and diskless object storage architecture. It delivers sub-10ms query response times, unlimited cardinality, and supports both SQL and InfluxQL. - -InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: - -- **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -**License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). - -**InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. - -### InfluxDB 3 images - -The InfluxDB 3 Core and Enterprise images include the necessary dependencies and configurations to run InfluxDB 3 efficiently. - -To pull the latest Docker images, use the following commands: - -- **Core**: Pull the latest InfluxDB 3 Core image for local development and prototyping: - - ```bash - docker pull influxdb:3-core - ``` - -- **Enterprise:**: Pull the latest InfluxDB 3 Enterprise image for production-grade deployments - - ```bash - docker pull influxdb:3-enterprise - ``` - -**Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements. - -## Parameter glossary - -| Parameter | Description | -|------------------|-----------------------------------------------------------------| -| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | -| `--node-id` | Unique identifier for the node within an Enterprise cluster. | -| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | -| `--data-dir` | Path to the directory for data storage. | - -# How to use this image - -## Start InfluxDB 3 Core - -Run InfluxDB 3 Core using either Docker Compose or Docker CLI. - -### Docker Compose - -To use Docker Compose with persistent storage, create a `compose.yml` file with the following configuration: - -%%COMPOSE%% - -Start the container by using the following command: - -```bash -docker compose pull && docker compose run influxdb3-core -``` - -### File system object store with docker - -To use the Docker CLI to start InfluxDB 3 Core with persistent file system storage and expose the default HTTP port (`8181`), run: - -```bash -docker run -d --name influxdb3-core \ - -p 8181:8181 \ - -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - influxdb:3-core influxdb3 serve \ - --node-id my-influxdb-node \ - --object-store file \ - --data-dir /var/lib/influxdb3 -``` - -This command: - -- Maps container port `8181` (HTTP API) to your host -- Mounts the local `influxdb3-data` directory to persist data -- Configures InfluxDB 3 Core to use a file system object store - -Once the container is running, generate an admin token: - -```bash -docker exec -it influxdb3-core influxdb3 generate token --admin -``` - -Use the token to create a database: - -```bash -docker exec -it influxdb3-core influxdb3 create database my_db --token AUTH_TOKEN -``` - -To check the server health: - -```bash -curl http://localhost:8181/health - --header "Authorization: Bearer AUTH_TOKEN" -``` - -## Start InfluxDB 3 Enterprise - -Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. -To skip the email prompt when starting the server, you can provide your email -address using one of the following methods: - -- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command -- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable - -For licensing options, see how to [Manage licenses](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). -### Docker Compose - -To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. - -```yaml -services: - influxdb3-enterprise: - container_name: influxdb3-enterprise - image: influxdb:3-enterprise - ports: - - 8181:8181 - command: - - influxdb3 - - serve - - --node-id=node0 - - --cluster-id=cluster0 - - --object-store=file - - --data-dir=/var/lib/influxdb3 - - --plugin-dir=/var/lib/influxdb3-plugins - environment: - - INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS -``` - -- Replace `EMAIL_ADDRESS` with your email address - -Start your container: - -```bash -docker compose pull && docker compose up influxdb3-enterprise -``` - -- InfluxDB 3 starts in a container with host port 8181 mapped to container port `8181`, the server default for HTTP connections. - -### File system object store with Docker - -To run the Docker image and persist data to the local file system, mount a volume for the object store. - -```bash -docker run -it \ - --volume /path/on/host:/path/in/container \ - influxdb:3-enterprise influxdb3 serve \ - --node-id my_host \ - --cluster-id my_cluster \ - --object-store file \ - --data-dir /path/in/container - --license-email EMAIL_ADDRESS -``` - - -Generate an admin token: - -```bash -docker exec -it influxdb3-enterprise influxdb3 create token --admin -``` - -Use the token from the output to create a database. - -```bash -docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ADMIN_TOKEN -``` - -# InfluxDB 3 Explorer - -InfluxDB 3 Explorer provides a graphical interface for visualizing and managing your time series data stored in an InfluxDB 3 instance. Use Explorer to write data, create dashboards, explore metrics, and manage your databases. - -Access Explorer through the official Docker image: - -```bash -docker pull influxdata/influxdb3-ui:1.0.0 -``` - -For detailed instructions on connecting Explorer to your InfluxDB instance, see [InfluxDB Explorer documentation](https://docs.influxdata.com/influxdb/v3/explorer/). - -# InfluxDB v2 - -## How to use the InfluxDB v2 Docker image - -Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. - -```bash -docker run -d -p 8086:8086 \ - -v $PWD/data:/var/lib/influxdb2 \ - -v $PWD/config:/etc/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ - influxdb:2 -``` - -After the container starts, visit [http://localhost:8086](http://localhost:8086) in your browser to view the UI. - -For detailed instructions on using Docker Compose with InfluxDB v2, see the [Docker Compose installation guide](https://docs.influxdata.com/influxdb/v2/install/use-docker-compose/). - -# InfluxDB v1 - -## How to use the InfluxDB v1 Docker image - -Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: - -```bash -docker run -d -p 8086:8086 \ - -v $PWD:/var/lib/influxdb \ - influxdb:1.11 -``` - -This command maps port `8086` and mounts your current directory to persist data. - -For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). diff --git a/influxdb/content.md b/influxdb/content.md index 4681584a9d22..6b6026723e44 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -3,7 +3,7 @@ - **InfluxDB 3** (Core and Enterprise) - **InfluxDB v2** - **InfluxDB v1** -- **InfluxDB Enterprise v1** +- **InfluxDB Enterprise v1** Scroll to the appropriate section below for Docker setup instructions, configuration flags, and usage examples. @@ -26,8 +26,7 @@ InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. -**License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features.**License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). **InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. @@ -119,14 +118,13 @@ curl http://localhost:8181/health ## Start InfluxDB 3 Enterprise -Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. -To skip the email prompt when starting the server, you can provide your email -address using one of the following methods: +Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. To skip the email prompt when starting the server, you can provide your email address using one of the following methods: -- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command -- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable +- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command +- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable For licensing options, see how to [Manage licenses](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). + ### Docker Compose To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. @@ -175,7 +173,6 @@ docker run -it \ --license-email EMAIL_ADDRESS ``` - Generate an admin token: ```bash From 2763223de871c78f67f35e5c4a2408fee29cc855 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 9 Jul 2025 09:56:22 -0700 Subject: [PATCH 72/77] docs: adding v1.11 enterprise docker section --- influxdb/content.md | 145 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 125 insertions(+), 20 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 6b6026723e44..5a6d80ade1f1 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -48,24 +48,21 @@ To pull the latest Docker images, use the following commands: docker pull influxdb:3-enterprise ``` -**Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements. +- **Explorer**: Pull the latest InfluxDB 3 Explorer image -## Parameter glossary +```bash +docker pull influxdata/influxdb3-ui:1.0.0 +``` -| Parameter | Description | -|------------------|-----------------------------------------------------------------| -| `--host-id` | Unique identifier for the InfluxDB Core server node. Required. | -| `--node-id` | Unique identifier for the node within an Enterprise cluster. | -| `--object-store` | Backend storage type for metadata and WAL files (e.g., `file`). | -| `--data-dir` | Path to the directory for data storage. | +**Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements. -# How to use this image +## How to use this image -## Start InfluxDB 3 Core +### Start InfluxDB 3 Core Run InfluxDB 3 Core using either Docker Compose or Docker CLI. -### Docker Compose +#### Docker Compose To use Docker Compose with persistent storage, create a `compose.yml` file with the following configuration: @@ -77,7 +74,7 @@ Start the container by using the following command: docker compose pull && docker compose run influxdb3-core ``` -### File system object store with docker +#### File system object store with docker To use the Docker CLI to start InfluxDB 3 Core with persistent file system storage and expose the default HTTP port (`8181`), run: @@ -116,7 +113,7 @@ curl http://localhost:8181/health --header "Authorization: Bearer AUTH_TOKEN" ``` -## Start InfluxDB 3 Enterprise +### Start InfluxDB 3 Enterprise Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. To skip the email prompt when starting the server, you can provide your email address using one of the following methods: @@ -125,7 +122,7 @@ Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered inst For licensing options, see how to [Manage licenses](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). -### Docker Compose +#### Docker Compose To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise. @@ -158,7 +155,7 @@ docker compose pull && docker compose up influxdb3-enterprise - InfluxDB 3 starts in a container with host port 8181 mapped to container port `8181`, the server default for HTTP connections. -### File system object store with Docker +#### File system object store with Docker To run the Docker image and persist data to the local file system, mount a volume for the object store. @@ -185,7 +182,7 @@ Use the token from the output to create a database. docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ADMIN_TOKEN ``` -# InfluxDB 3 Explorer +## InfluxDB 3 Explorer InfluxDB 3 Explorer provides a graphical interface for visualizing and managing your time series data stored in an InfluxDB 3 instance. Use Explorer to write data, create dashboards, explore metrics, and manage your databases. @@ -197,9 +194,9 @@ docker pull influxdata/influxdb3-ui:1.0.0 For detailed instructions on connecting Explorer to your InfluxDB instance, see [InfluxDB Explorer documentation](https://docs.influxdata.com/influxdb/v3/explorer/). -# InfluxDB v2 +## InfluxDB v2 -## How to use the InfluxDB v2 Docker image +### How to use the InfluxDB v2 Docker image Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. @@ -219,9 +216,9 @@ After the container starts, visit [http://localhost:8086](http://localhost:8086) For detailed instructions on using Docker Compose with InfluxDB v2, see the [Docker Compose installation guide](https://docs.influxdata.com/influxdb/v2/install/use-docker-compose/). -# InfluxDB v1 +## InfluxDB v1 -## How to use the InfluxDB v1 Docker image +### How to use the InfluxDB v1 Docker image Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: @@ -234,3 +231,111 @@ docker run -d -p 8086:8086 \ This command maps port `8086` and mounts your current directory to persist data. For more information, see the [InfluxDB v1 Docker documentation](https://docs.influxdata.com/influxdb/v1/). + +## Start and Stop InfluxDB v1 Enterprise + +Use the official `influxdb:meta` and `influxdb:data` Docker images to deploy and manage an InfluxDB v1 Enterprise cluster. A valid license is required. + +### Start InfluxDB v1 Enterprise Cluster + +1. Create a custom Docker network for node communication: + +```bash +docker network create influxdb +``` + +2. Start three meta nodes (each with a unique hostname and license key): + +```bash +# Meta node 0 +docker run -d \ + --name=influxdb-meta-0 \ + --network=influxdb \ + -h influxdb-meta-0 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ + influxdb:meta + +# Meta node 1 +docker run -d \ + --name=influxdb-meta-1 \ + --network=influxdb \ + -h influxdb-meta-1 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ + influxdb:meta + +# Meta node 2 +docker run -d \ + --name=influxdb-meta-2 \ + --network=influxdb \ + -h influxdb-meta-2 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ + influxdb:meta +``` + +3. Join meta nodes into the cluster: + +```bash +docker exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-1:8091 +docker exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-2:8091 +``` + +4. Start data nodes: + +```bash +# Data node 0 +docker run -d \ + --name=influxdb-data-0 \ + --network=influxdb \ + -h influxdb-data-0 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ + influxdb:data + +# Data node 1 +docker run -d \ + --name=influxdb-data-1 \ + --network=influxdb \ + -h influxdb-data-1 \ + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ + influxdb:data +``` + +5. Add data nodes to the cluster: + +```bash +docker exec influxdb-meta-0 influxd-ctl add-data influxdb-data-0:8088 +docker exec influxdb-meta-0 influxd-ctl add-data influxdb-data-1:8088 +``` + +6. Verify cluster status: + +```bash +docker exec influxdb-meta-0 influxd-ctl show +``` + +This displays all registered data and meta nodes. + +### Stop InfluxDB v1 Enterprise Containers + +To stop individual containers: + +```bash +docker stop influxdb-meta-0 +docker stop influxdb-meta-1 +docker stop influxdb-meta-2 +docker stop influxdb-data-0 +docker stop influxdb-data-1 +``` + +### Restart Containers + +To restart stopped containers: + +```bash +docker start influxdb-meta-0 +docker start influxdb-meta-1 +docker start influxdb-meta-2 +docker start influxdb-data-0 +docker start influxdb-data-1 +``` + +For more information, see the [InfluxDB v1.11 Enterprise documentation](https://docs.influxdata.com/enterprise_influxdb/v1/). From 8c0f774a69468ed464dadd0c7b62c6f1f59cddfc Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 9 Jul 2025 10:54:29 -0700 Subject: [PATCH 73/77] docs: updating heading structure, style, and applying markdownfmt --- influxdb/content.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 5a6d80ade1f1..45e09b8dbfd5 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -50,9 +50,9 @@ To pull the latest Docker images, use the following commands: - **Explorer**: Pull the latest InfluxDB 3 Explorer image -```bash -docker pull influxdata/influxdb3-ui:1.0.0 -``` + ```bash + docker pull influxdata/influxdb3-ui:1.0.0 + ``` **Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements. @@ -117,8 +117,8 @@ curl http://localhost:8181/health Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. To skip the email prompt when starting the server, you can provide your email address using one of the following methods: -- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command -- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable +- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command +- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable For licensing options, see how to [Manage licenses](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). @@ -161,13 +161,13 @@ To run the Docker image and persist data to the local file system, mount a volum ```bash docker run -it \ - --volume /path/on/host:/path/in/container \ - influxdb:3-enterprise influxdb3 serve \ - --node-id my_host \ - --cluster-id my_cluster \ - --object-store file \ - --data-dir /path/in/container - --license-email EMAIL_ADDRESS + --volume /path/on/host:/path/in/container \ + influxdb:3-enterprise influxdb3 serve \ + --node-id my_host \ + --cluster-id my_cluster \ + --object-store file \ + --data-dir /path/in/container \ + --license-email EMAIL_ADDRESS ``` Generate an admin token: From 73ebb907d80f75385c2b41d8e0d5bd37e7750859 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 9 Jul 2025 10:57:40 -0700 Subject: [PATCH 74/77] fix: remove trailing whitespace to pass markdownfmt CI --- influxdb/content.md | 122 ++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 45e09b8dbfd5..9b3d2d38d17b 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -48,11 +48,11 @@ To pull the latest Docker images, use the following commands: docker pull influxdb:3-enterprise ``` -- **Explorer**: Pull the latest InfluxDB 3 Explorer image +- **Explorer**: Pull the latest InfluxDB 3 Explorer image - ```bash +```bash docker pull influxdata/influxdb3-ui:1.0.0 - ``` +``` **Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements. @@ -79,18 +79,18 @@ docker compose pull && docker compose run influxdb3-core To use the Docker CLI to start InfluxDB 3 Core with persistent file system storage and expose the default HTTP port (`8181`), run: ```bash -docker run -d --name influxdb3-core \ - -p 8181:8181 \ - -v $PWD/influxdb3-data:/var/lib/influxdb3 \ - influxdb:3-core influxdb3 serve \ - --node-id my-influxdb-node \ - --object-store file \ +docker run -d --name influxdb3-core + -p 8181:8181 + -v $PWD/influxdb3-data:/var/lib/influxdb3 + influxdb:3-core influxdb3 serve + --node-id my-influxdb-node + --object-store file --data-dir /var/lib/influxdb3 ``` This command: -- Maps container port `8181` (HTTP API) to your host +- Maps container port `8181` (HTTP API) to your hos - Mounts the local `influxdb3-data` directory to persist data - Configures InfluxDB 3 Core to use a file system object store @@ -117,8 +117,8 @@ curl http://localhost:8181/health Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker Compose or Docker CLI. To skip the email prompt when starting the server, you can provide your email address using one of the following methods: -- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command -- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable +- Use the [`--license-email`](https://docs.influxdata.com/influxdb3/enterprise/reference/config-options/#license-email) option with the `influxdb3 serve` command +- Set the `INFLUXDB3_ENTERPRISE_LICENSE_EMAIL` environment variable For licensing options, see how to [Manage licenses](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). @@ -132,7 +132,7 @@ services: container_name: influxdb3-enterprise image: influxdb:3-enterprise ports: - - 8181:8181 + - 8181:8181 command: - influxdb3 - serve @@ -160,13 +160,13 @@ docker compose pull && docker compose up influxdb3-enterprise To run the Docker image and persist data to the local file system, mount a volume for the object store. ```bash -docker run -it \ - --volume /path/on/host:/path/in/container \ - influxdb:3-enterprise influxdb3 serve \ - --node-id my_host \ - --cluster-id my_cluster \ - --object-store file \ - --data-dir /path/in/container \ +docker run -i + --volume /path/on/host:/path/in/container + influxdb:3-enterprise influxdb3 serve + --node-id my_hos + --cluster-id my_cluster + --object-store file + --data-dir /path/in/container --license-email EMAIL_ADDRESS ``` @@ -201,14 +201,14 @@ For detailed instructions on connecting Explorer to your InfluxDB instance, see Use the official [InfluxDB v2 Docker image](https://hub.docker.com/_/influxdb) to start an instance for development or testing. ```bash -docker run -d -p 8086:8086 \ - -v $PWD/data:/var/lib/influxdb2 \ - -v $PWD/config:/etc/influxdb2 \ - -e DOCKER_INFLUXDB_INIT_MODE=setup \ - -e DOCKER_INFLUXDB_INIT_USERNAME=my-user \ - -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password \ - -e DOCKER_INFLUXDB_INIT_ORG=my-org \ - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket \ +docker run -d -p 8086:8086 + -v $PWD/data:/var/lib/influxdb2 + -v $PWD/config:/etc/influxdb2 + -e DOCKER_INFLUXDB_INIT_MODE=setup + -e DOCKER_INFLUXDB_INIT_USERNAME=my-user + -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password + -e DOCKER_INFLUXDB_INIT_ORG=my-org + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucke influxdb:2 ``` @@ -223,8 +223,8 @@ For detailed instructions on using Docker Compose with InfluxDB v2, see the [Doc Use the official [InfluxDB v1 Docker image](https://hub.docker.com/_/influxdb) to start a basic instance for development or testing: ```bash -docker run -d -p 8086:8086 \ - -v $PWD:/var/lib/influxdb \ +docker run -d -p 8086:8086 + -v $PWD:/var/lib/influxdb influxdb:1.11 ``` @@ -238,75 +238,75 @@ Use the official `influxdb:meta` and `influxdb:data` Docker images to deploy and ### Start InfluxDB v1 Enterprise Cluster -1. Create a custom Docker network for node communication: +1. Create a custom Docker network for node communication: ```bash docker network create influxdb ``` -2. Start three meta nodes (each with a unique hostname and license key): +1. Start three meta nodes (each with a unique hostname and license key): ```bash # Meta node 0 -docker run -d \ - --name=influxdb-meta-0 \ - --network=influxdb \ - -h influxdb-meta-0 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ +docker run -d + --name=influxdb-meta-0 + --network=influxdb + -h influxdb-meta-0 + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key influxdb:meta # Meta node 1 -docker run -d \ - --name=influxdb-meta-1 \ - --network=influxdb \ - -h influxdb-meta-1 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ +docker run -d + --name=influxdb-meta-1 + --network=influxdb + -h influxdb-meta-1 + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key influxdb:meta # Meta node 2 -docker run -d \ - --name=influxdb-meta-2 \ - --network=influxdb \ - -h influxdb-meta-2 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ +docker run -d + --name=influxdb-meta-2 + --network=influxdb + -h influxdb-meta-2 + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key influxdb:meta ``` -3. Join meta nodes into the cluster: +1. Join meta nodes into the cluster: ```bash docker exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-1:8091 docker exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-2:8091 ``` -4. Start data nodes: +1. Start data nodes: ```bash # Data node 0 -docker run -d \ - --name=influxdb-data-0 \ - --network=influxdb \ - -h influxdb-data-0 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ +docker run -d + --name=influxdb-data-0 + --network=influxdb + -h influxdb-data-0 + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key influxdb:data # Data node 1 -docker run -d \ - --name=influxdb-data-1 \ - --network=influxdb \ - -h influxdb-data-1 \ - -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ +docker run -d + --name=influxdb-data-1 + --network=influxdb + -h influxdb-data-1 + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key influxdb:data ``` -5. Add data nodes to the cluster: +1. Add data nodes to the cluster: ```bash docker exec influxdb-meta-0 influxd-ctl add-data influxdb-data-0:8088 docker exec influxdb-meta-0 influxd-ctl add-data influxdb-data-1:8088 ``` -6. Verify cluster status: +1. Verify cluster status: ```bash docker exec influxdb-meta-0 influxd-ctl show From d0c04e5b4a1e87e9e96c776cedbc7b6d3bba0486 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 9 Jul 2025 11:08:25 -0700 Subject: [PATCH 75/77] docs: correcting typos and removing numbered lists --- influxdb/content.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index 9b3d2d38d17b..aacc9c9d4eff 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -238,13 +238,13 @@ Use the official `influxdb:meta` and `influxdb:data` Docker images to deploy and ### Start InfluxDB v1 Enterprise Cluster -1. Create a custom Docker network for node communication: +Create a custom Docker network for node communication: ```bash docker network create influxdb ``` -1. Start three meta nodes (each with a unique hostname and license key): +Start three meta nodes (each with a unique hostname and license key): ```bash # Meta node 0 @@ -272,14 +272,14 @@ docker run -d influxdb:meta ``` -1. Join meta nodes into the cluster: +Join meta nodes into the cluster: ```bash docker exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-1:8091 docker exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-2:8091 ``` -1. Start data nodes: +Start data nodes: ```bash # Data node 0 @@ -299,14 +299,14 @@ docker run -d influxdb:data ``` -1. Add data nodes to the cluster: +Add data nodes to the cluster: ```bash docker exec influxdb-meta-0 influxd-ctl add-data influxdb-data-0:8088 docker exec influxdb-meta-0 influxd-ctl add-data influxdb-data-1:8088 ``` -1. Verify cluster status: +Verify cluster status: ```bash docker exec influxdb-meta-0 influxd-ctl show From 0bf8e369bf934631ae5968f63406933e5b6b746e Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 11 Jul 2025 12:38:37 -0700 Subject: [PATCH 76/77] docs: minor updates to grammar etc --- influxdb/content.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index aacc9c9d4eff..c63c57de79af 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -26,7 +26,7 @@ InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features.**License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). **InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. @@ -42,7 +42,7 @@ To pull the latest Docker images, use the following commands: docker pull influxdb:3-core ``` -- **Enterprise:**: Pull the latest InfluxDB 3 Enterprise image for production-grade deployments +- **Enterprise:** Pull the latest InfluxDB 3 Enterprise image for production-grade deployments ```bash docker pull influxdb:3-enterprise @@ -163,7 +163,7 @@ To run the Docker image and persist data to the local file system, mount a volum docker run -i --volume /path/on/host:/path/in/container influxdb:3-enterprise influxdb3 serve - --node-id my_hos + --node-id my_host --cluster-id my_cluster --object-store file --data-dir /path/in/container @@ -176,7 +176,7 @@ Generate an admin token: docker exec -it influxdb3-enterprise influxdb3 create token --admin ``` -Use the token from the output to create a database. +Use the token from the output to create a database: ```bash docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token ADMIN_TOKEN @@ -208,7 +208,7 @@ docker run -d -p 8086:8086 -e DOCKER_INFLUXDB_INIT_USERNAME=my-user -e DOCKER_INFLUXDB_INIT_PASSWORD=my-password -e DOCKER_INFLUXDB_INIT_ORG=my-org - -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucke + -e DOCKER_INFLUXDB_INIT_BUCKET=my-bucket influxdb:2 ``` From cb23872f787ffd280bdca7192410f9392a56c698 Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 11 Jul 2025 13:17:24 -0700 Subject: [PATCH 77/77] chore: fixed Explorer spacing in the InfluxDB 3 image section. Added Explorer to TOC, and made a minor adjustment to InfluxDB 3 overview section formatting --- influxdb/content.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/influxdb/content.md b/influxdb/content.md index c63c57de79af..1184bd431360 100644 --- a/influxdb/content.md +++ b/influxdb/content.md @@ -1,6 +1,6 @@ **This README covers all currently supported versions of InfluxDB:** -- **InfluxDB 3** (Core and Enterprise) +- **InfluxDB 3** (Core, Enterprise, and Explorer) - **InfluxDB v2** - **InfluxDB v1** - **InfluxDB Enterprise v1** @@ -26,9 +26,10 @@ InfluxDB 3, the latest InfluxDB engine, uses Apache Arrow in-memory processing, InfluxDB 3 offers two editions--both provide SQL and InfluxQL query capabilities, an integrated processing engine for real-time data transformation, and seamless integration with InfluxDB 3 Explorer for data visualization and management: - **InfluxDB 3 Core**: A free, open source version of the new engine for local development and prototyping. -- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). - -**InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. +- **InfluxDB 3 Enterprise**: A production-grade, scalable time series database that includes support for clustering, security, and enterprise features. + + **License key for Enterprise**: To run InfluxDB 3 Enterprise, you need a license key. Start with a free 30-day trial license by selecting the trial option when you first start the server. For more license options, see the [InfluxDB 3 Enterprise documentation](https://docs.influxdata.com/influxdb3/enterprise/admin/license/). +- **InfluxDB 3 Explorer UI**: After starting your InfluxDB 3 container, run the [InfluxDB 3 Explorer](https://docs.influxdata.com/influxdb3/explorer/) standalone web interface to write and explore data and manage databases. ### InfluxDB 3 images @@ -42,17 +43,17 @@ To pull the latest Docker images, use the following commands: docker pull influxdb:3-core ``` -- **Enterprise:** Pull the latest InfluxDB 3 Enterprise image for production-grade deployments +- **Enterprise:** Pull the latest InfluxDB 3 Enterprise image for production-grade deployments: ```bash docker pull influxdb:3-enterprise ``` -- **Explorer**: Pull the latest InfluxDB 3 Explorer image +- **Explorer:** Pull the latest InfluxDB 3 Explorer image to access the graphical interface: -```bash - docker pull influxdata/influxdb3-ui:1.0.0 -``` + ```bash + docker pull influxdata/influxdb3-ui:1.0.0 + ``` **Note**: Always pull the latest images to ensure you have the most up-to-date features, security patches, and performance improvements.