### Install Flask Source: https://github.com/influxdata/influxdb/blob/main/influxdb3_load_generator/analysis/README.md Install the Flask library using pip. This is a prerequisite for running the analysis app. ```bash pip install flask ``` -------------------------------- ### Install Plugin Package Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Installs a plugin package. After installation, plugins can import the installed package. ```bash $ /here/influxdb3 install package bar ``` -------------------------------- ### Install Thrift Compiler Source: https://github.com/influxdata/influxdb/blob/main/core/trace_exporters/README.md Installs the thrift-compiler and wget within the Debian environment. ```bash $ apt-get update $ apt-get install thrift-compiler wget ``` -------------------------------- ### Install rustfmt Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Installs the `rustfmt` component using `rustup`, which is necessary for code formatting checks. ```shell rustup component add rustfmt ``` -------------------------------- ### Install clippy Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Installs the `clippy` component using `rustup`, which is a Rust linter that helps catch common mistakes and enforce best practices. ```shell rustup component add clippy ``` -------------------------------- ### Start InfluxDB Server with Plugin Directory Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Starts the InfluxDB server, enabling the processing engine and plugins. The virtual environment for plugins is automatically created in the specified directory. ```bash $ /here/influxdb3 serve --plugin-dir /path/to/plugins ... ``` -------------------------------- ### Start Server with Pre-created Virtual Environment Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Starts the InfluxDB server, directing it to use a pre-created virtual environment for plugins. This is useful when you have a specific Python environment setup. ```bash $ /here/influxdb3 serve --plugin-dir /path/to/plugins --virtual-env-location /path/to/another-venv ``` -------------------------------- ### Install cargo-fuzz Source: https://github.com/influxdata/influxdb/blob/main/core/mutable_batch_lp/fuzz/README.md Installs the cargo-fuzz tool. Ensure you have a locked version for stability. ```bash $ cargo install cargo-fuzz --locked ``` -------------------------------- ### Install nightly Rust Source: https://github.com/influxdata/influxdb/blob/main/core/mutable_batch_lp/fuzz/README.md Installs the nightly Rust toolchain, which is required for cargo-fuzz. ```bash $ rustup install nightly ``` -------------------------------- ### Run Debian Trixie Image Source: https://github.com/influxdata/influxdb/blob/main/core/trace_exporters/README.md Starts a Debian Trixie Docker image, mounting the current directory to /out. ```bash docker run -it -v $PWD:/out debian:trixie-slim ``` -------------------------------- ### Create Annotated Git Tags Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Examples of creating annotated Git tags for different release types (beta, RC, stable). ```bash git tag -a 'v3.0.0-0.beta.1' -m '3.0.0-beta.1 release' ``` ```bash git tag -a 'v3.0.0-0.beta.2' -m '3.0.0-beta.2 release' ``` ```bash git tag -a 'v3.0.0-0.rc.1' -m '3.0.0-rc.1 release' ``` ```bash git tag -a 'v3.0.0' -m '3.0.0 release' ``` ```bash git tag -a 'v3.0.1' -m '3.0.1 release' ``` ```bash git tag -a 'v3.1.0' -m '3.1.0 release' ``` -------------------------------- ### Run InfluxDB 3 with AWS S3 Object Storage Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Example of starting the InfluxDB 3 server configured to use AWS S3 for data storage. Requires specifying node ID, object store type, bucket name, and AWS credentials. ```bash influxdb3 serve --node-id node1 --object-store s3 --bucket influxdb-data \ --aws-access-key-id KEY --aws-secret-access-key SECRET ``` -------------------------------- ### Start Server with Alternate Virtual Environment Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Starts the InfluxDB server, specifying an alternate location for the plugin virtual environment. This allows for managing different plugin dependencies. ```bash $ /here/influxdb3 serve --plugin-dir /path/to/plugins --virtual-env-location /path/to/other-venv ``` -------------------------------- ### Freeze Requirements in Virtual Environment Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Generates a list of installed packages and their versions in the current virtual environment, saving them to a requirements file. ```bash (venv)$ python3 -m pip freeze > /path/to/another-venv/requirements.txt ``` -------------------------------- ### Install Package in Virtual Environment Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Installs a Python package into the currently active virtual environment using pip. ```bash (venv)$ python3 -m pip install foo ``` -------------------------------- ### Unpacking and Running InfluxDB from Tarball Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Example of unpacking an InfluxDB tarball on Linux and running the serve and query commands without the processing engine. ```bash # unpack tarball to /here $ tar -C /here --strip-components=1 -zxvf /path/to/build/influxdb3-_linux_amd64.tar.gz # without processing engine $ /here/influxdb3 serve ... $ /here/influxdb3 query ... ``` -------------------------------- ### Run InfluxDB 3 Core Server Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/influxdb3.txt Use this command to start the InfluxDB 3 Core server. Specify a node ID, object store type, and data directory. ```bash influxdb3 serve --node-id my_node_name --object-store file --data-dir ~/.influxdb3_data ``` -------------------------------- ### Run InfluxDB 3 Server with File Storage Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Starts the InfluxDB 3 server using local file storage. Specify a unique node ID and the directory for data persistence. ```bash influxdb3 serve --node-id node1 --object-store file --data-dir ~/.influxdb_data ``` -------------------------------- ### Install cargo-nextest Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Installs the `cargo-nextest` tool, which is required for running tests in the InfluxDB workspace. Use the `--locked` flag to ensure all dependencies are resolved according to the `Cargo.lock` file. ```shell cargo install cargo-nextest --locked ``` -------------------------------- ### Clone and build InfluxDB from source Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Clones the InfluxDB repository from GitHub and builds the `influxdb3` binary using `cargo build`. This process requires a Rust toolchain installed via `rustup`. ```shell git clone https://github.com/influxdata/influxdb.git cd influxdb cargo build ``` -------------------------------- ### Update README.md with Rustdoc Comments Source: https://github.com/influxdata/influxdb/blob/main/core/influxdb_line_protocol/RELEASE.md Use the `cargo-rdme` tool to update the README.md file with rustdoc comments. Ensure `cargo-rdme` is installed via `cargo install cargo-rdme --locked`. ```shell cargo rdme ``` -------------------------------- ### Install InfluxDB 3 Build and Runtime Dependencies Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Installs necessary build and runtime dependencies for InfluxDB 3 on Debian/Ubuntu systems, including Python and its development headers. ```shell # build dependencies $ sudo apt-get install build-essential pkg-config libssl-dev clang lld \ git protobuf-compiler python3 python3-dev python3-pip # runtime dependencies $ sudo apt-get install python3 python3-pip python3-venv # build $ cargo build ``` -------------------------------- ### Format code with rustfmt Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Applies code formatting to all files in the workspace according to the `rustfmt` style guide. This command ensures consistent code style across the project. ```shell cargo fmt --all ``` -------------------------------- ### Create Alternate Virtual Environment Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Creates a new virtual environment using Python's venv module. This environment can then be activated and used for installing Python packages. ```bash $ /here/python/bin/python3 -m venv /path/to/another-venv ``` -------------------------------- ### Verify Thrift Compiler Version Source: https://github.com/influxdata/influxdb/blob/main/core/trace_exporters/README.md Checks the installed thrift compiler version. Ensure it matches the version specified in Cargo.toml. ```bash $ thrift --version Thrift version 0.13.0 ``` -------------------------------- ### Serve with Azure Blob Storage Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve_all.txt Starts the InfluxDB 3.0 server using Azure Blob Storage for object storage. Requires Azure storage account and access key configuration. ```bash influxdb3 serve --node-id node1 --object-store azure --bucket influxdb-data \ --azure-storage-account STORAGE_ACCOUNT \ --azure-storage-access-key STORAGE_ACCESS_KEY ``` -------------------------------- ### Customize log levels for tests Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md An example of customizing log levels using `RUST_LOG` to filter specific modules. This command runs tests with `INFO` level logs for `hyper::proto::h1` and `h2` modules, while other modules default to `debug`. ```shell RUST_LOG=debug,hyper::proto::h1=info,h2=info RUST_LOG_SPAN_EVENTS=full cargo nextest run --workspace --nocapture ``` -------------------------------- ### Plugin and Environment Configuration Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Options for specifying plugin directory, virtual environment location, and package manager. ```bash --plugin-dir Location of plugins [env: INFLUXDB3_PLUGIN_DIR=] ``` ```bash --virtual-env-location Location of your virtual environment [env: VIRTUAL_ENV=] ``` ```bash --package-manager Deprecated. Python and pip are bundled with InfluxDB; this option does not need to be set [possible values: discover, pip, uv, disabled] [default: discover] [env: INFLUXDB3_PACKAGE_MANAGER=] ``` ```bash --restrict-plugin-triggers-to ... Restrict plugin triggers to the provided trigger type(s) [possible values: wal, schedule, request] [env: INFLUXDB3_RESTRICT_PLUGIN_TRIGGERS_TO=] ``` -------------------------------- ### General Help and Verbosity Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Standard command-line options for displaying help information and increasing logging verbosity. ```bash -h, --help Print help information ``` ```bash -v, --verbose Increase logging verbosity ``` ```bash --help-all Show all available options ``` -------------------------------- ### Data Directory and Bucket Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve_all.txt Options for specifying the local data directory and the bucket name for cloud object storage. ```bash --data-dir Location to store files locally [env: INFLUXDB3_DB_DIR=] --bucket Bucket name for cloud object storage [env: INFLUXDB3_BUCKET=] ``` -------------------------------- ### Create pyo3_config_file.txt Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Defines configuration for PyO3, a framework for building Python extensions in Rust. This file specifies Python implementation details, paths, and build flags. ```text implementation=CPython version=3.13 shared=true abi3=false lib_name=python3.13 lib_dir=/tmp/python/lib executable=/tmp/python/bin/python3.13 pointer_width=64 build_flags= suppress_build_script_link_lines=false ``` -------------------------------- ### Local Data Directory and Bucket Configuration Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Options for specifying the local directory for data storage and the bucket name for cloud object storage. ```bash --data-dir Location to store files locally [env: INFLUXDB3_DB_DIR=] ``` ```bash --bucket Bucket name for cloud object storage [env: INFLUXDB3_BUCKET=] ``` -------------------------------- ### HTTP and Logging Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve_all.txt Configuration options for the HTTP API bind address and log filtering. ```bash --http-bind Address for HTTP API requests [default: 0.0.0.0:8181] [env: INFLUXDB3_HTTP_BIND_ADDR=] --log-filter Logs: filter directive. When the filter starts with "debug" or "trace", noise-reduction directives are automatically appended (e.g. reqwest=info, datafusion=info, object_store_metrics=info). Use --disable-log-filter-noise-reduction to suppress this. [default: info,iox_query::query_log=warn,influxdb3_query_executor::query_planner=warn] [env: INFLUXDB3_LOG_FILTER=] --disable-log-filter-noise-reduction When set, debug/trace log filters are not automatically expanded with noise-reduction directives. [env: INFLUXDB3_DISABLE_LOG_FILTER_NOISE_REDUCTION=] ``` -------------------------------- ### Tag and Push Official Release Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Tag the official release and push it to trigger the build. Ensure the tag format is correct. ```sh git tag -a 'v3.5.0' -m '3.5.0 release' git push origin v3.5.0 ``` -------------------------------- ### InfluxDB 3 Processing Engine Commands Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/influxdb3.txt Commands related to the InfluxDB 3 Processing Engine. Use these to install Python packages and test plugins. ```bash influxdb3 processing install Python packages for the Processing Engine ``` ```bash influxdb3 processing test Test that Processing Engine plugins work the way you expect ``` -------------------------------- ### Update Version in Cargo.toml Source: https://github.com/influxdata/influxdb/blob/main/core/influxdb_line_protocol/RELEASE.md Modify the `version` field in the `Cargo.toml` file to reflect the new release version. This example shows updating from 1.0.0 to 2.0.0. ```diff --- a/influxdb_line_protocol/Cargo.toml +++ b/influxdb_line_protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "influxdb_line_protocol" -version = "1.0.0" +version = "2.0.0" authors = "InfluxDB IOx Project Developers" edition = "2024" license = "MIT OR Apache-2.0" ``` -------------------------------- ### Tag and Push Release Candidate Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Tag the release candidate and push it to trigger the release build. Ensure the tag format is correct. ```sh git tag -a 'v3.5.0-0.rc.1' -m '3.5.0-0.rc.1 release' git push origin v3.5.0-0.rc.1 ``` -------------------------------- ### Run Load Generator Analysis App Source: https://github.com/influxdata/influxdb/blob/main/influxdb3_load_generator/analysis/README.md Navigate to the analysis directory and execute the Python script, providing the path to the results directory as an argument. Access the app in your browser at http://127.0.0.1:5000/. ```bash python app.py ``` -------------------------------- ### InfluxDB 3 Runtime Configuration Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/influxdb3.txt Access detailed runtime configuration options for InfluxDB 3 by using the --help-all flag. ```bash Use --help-all to see runtime configuration options ``` -------------------------------- ### Run influxdb3 with file object store Source: https://github.com/influxdata/influxdb/blob/main/PROFILING.md Profile a running influxdb3 instance using Instruments on macOS, configured to use the local file system for object storage. Provide the necessary command-line arguments for the serve command. ```bash serve --object-store=file --data-dir=~/.influxdb3 ``` -------------------------------- ### TLS and Authentication Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve_all.txt Options for configuring TLS encryption and disabling authentication for specific resources. ```bash --tls-key The path to the key file for TLS to be enabled [env: INFLUXDB3_TLS_KEY=] --tls-cert The path to the cert file for TLS to be enabled [env: INFLUXDB3_TLS_CERT=] --tls-minimum-version The minimum version for TLS. Valid values are tls-1.2 and tls-1.3, default is tls-1.2 [env: INFLUXDB3_TLS_MINIMUM_VERSION=] --without-auth Run InfluxDB 3 server without authorization --disable-authz Optionally disable authz by passing in a comma separated list of resources. Valid values are health, ping, metrics, ready, and pprof. To disable auth for multiple resources pass in a list, eg. `--disable-authz health,ping` --admin-token-recovery-http-bind Enable admin token recovery endpoint. Use flag alone for default address (127.0.0.1:8182) or with value for custom address. WARNING: This endpoint allows unauthenticated admin token regeneration! [env: INFLUXDB3_ADMIN_TOKEN_RECOVERY_HTTP_BIND_ADDR=] --admin-token-file File containing offline admin tokens The token will be loaded at server startup if no admin token exists. Generated using: influxdb3 create token --admin --offline [env: INFLUXDB3_ADMIN_TOKEN_FILE=] ``` -------------------------------- ### Catalog Limits Initialization (None) Source: https://github.com/influxdata/influxdb/blob/main/influxdb3_catalog/README.md Provides effectively unbounded limits, suitable for tests and internal paths that must not enforce limits. This is achieved by calling `CatalogLimits::none()`. ```rust CatalogLimits::none() ``` -------------------------------- ### Network and Logging Configuration Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Configuration options for the HTTP API bind address and log filtering. ```bash --http-bind Address for HTTP API requests [default: 0.0.0.0:8181] [env: INFLUXDB3_HTTP_BIND_ADDR=] ``` ```bash --log-filter Logs: filter directive. When the filter starts with "debug" or "trace", noise-reduction directives are automatically appended (e.g. reqwest=info, datafusion=info, object_store=off). Use --disable-log-filter-noise-reduction to suppress this. [default: info,iox_query::query_log=warn,influxdb3_query_executor::query_planner=warn] [env: INFLUXDB3_LOG_FILTER=] ``` -------------------------------- ### Run InfluxDB with Plugins (Linux/macOS) Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Executes the InfluxDB binary with the processing engine enabled, specifying a directory for plugins. Ensure the Python runtime is correctly linked in previous steps. ```bash # linux and osx (if can't find libpython or the runtime, check previous steps) $ ./target//influxdb3 ... --plugin-dir /path/to/plugin/dir ``` -------------------------------- ### Open New Branch for Cherry-Picking Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Open a new branch off the base version branch to cherry-pick commits for the release. ```bash git checkout -b chore/3.0/my-branch-name ``` -------------------------------- ### Run influxdb3 server Source: https://github.com/influxdata/influxdb/blob/main/PROFILING.md Execute the compiled influxdb3 server binary with specific command-line arguments. Ensure you use the fully-qualified path to the binary. ```bash /target//influxdb3 serve ``` -------------------------------- ### PyO3 Build Configuration for Python Standalone Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Configure PyO3 to use a python-build-standalone distribution by specifying the path to a custom configuration file. This is necessary because PyO3 may not auto-detect unpacked standalone distributions correctly. ```text implementation=CPython version=3.13 shared=true abi3=false lib_name=python3.13 lib_dir=/path/to/python-standalone/python/lib executable=/path/to/python-standalone/python/bin/python3.13 pointer_width=64 build_flags= suppress_build_script_link_lines=false ``` -------------------------------- ### InfluxDB 3 Serve Command Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Overview of common options for the 'influxdb3 serve' command, including node ID and object store configuration. ```bash influxdb3 serve [OPTIONS] --node-id --object-store ``` -------------------------------- ### Activate Virtual Environment Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Activates a virtual environment, indicated by a prefix in the shell prompt. Commands executed after activation will use the environment's Python interpreter and packages. ```bash $ source /path/to/another-venv/bin/activate ``` -------------------------------- ### Download Jaeger IDL Definitions Source: https://github.com/influxdata/influxdb/blob/main/core/trace_exporters/README.md Downloads the necessary Thrift IDL files for Jaeger, Zipkin, and the agent. ```bash $ wget https://raw.githubusercontent.com/jaegertracing/jaeger-idl/master/thrift/jaeger.thrift https://raw.githubusercontent.com/jaegertracing/jaeger-idl/master/thrift/zipkincore.thrift https://raw.githubusercontent.com/jaegertracing/jaeger-idl/master/thrift/agent.thrift ``` -------------------------------- ### Build with Cargo and PyO3 Configuration Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Builds a Rust project using Cargo, with PyO3 features enabled. The PYO3_CONFIG_FILE environment variable must point to an absolute path for the configuration file. ```bash # note: PYO3_CONFIG_FILE must be an absolute path $ PYO3_CONFIG_FILE=${PWD}/pyo3_config_file.txt cargo build --features "aws,gcp,azure,jemalloc_replacing_malloc" ``` -------------------------------- ### Checkout Base Version Branch and Log Commits Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Checkout the base version branch for the point release and list commits to identify the latest tagged release. ```bash git checkout 3.0 git log --oneline --graph ``` -------------------------------- ### Azure Blob Storage Configuration Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Configuration options for connecting to Azure Blob Storage, including storage account name and access key. ```bash --azure-storage-account Azure storage account name [env: AZURE_STORAGE_ACCOUNT=] ``` ```bash --azure-storage-access-key Azure storage access key [env: AZURE_STORAGE_ACCESS_KEY=] ``` -------------------------------- ### Publish to crates.io Source: https://github.com/influxdata/influxdb/blob/main/core/influxdb_line_protocol/RELEASE.md Once the dry run is successful, publish the package to crates.io using the `cargo publish` command. ```shell cargo publish ``` -------------------------------- ### InfluxDB 3 CLI Commands Overview Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/influxdb3_all.txt Provides a high-level overview of the InfluxDB 3 CLI commands. Use these commands to interact with a running InfluxDB 3 Core server for queries, writes, and resource management. ```bash influxdb3 serve Run the InfluxDB 3 Core server ``` ```bash influxdb3 query Perform a query against a running InfluxDB 3 Core server ``` ```bash influxdb3 write Perform a set of writes to a running InfluxDB 3 Core server ``` ```bash influxdb3 update Update resources on the InfluxDB 3 Core server ``` ```bash influxdb3 create Create a resource such as a database or auth token ``` ```bash influxdb3 list List resources on the InfluxDB 3 Core server ``` ```bash influxdb3 delete Delete a resource such as a database or table ``` ```bash influxdb3 enable Enable a resource such as a trigger ``` ```bash influxdb3 disable Disable a resource such as a trigger ``` ```bash influxdb3 install Install Python packages for the Processing Engine ``` ```bash influxdb3 test Test that Processing Engine plugins work the way you expect ``` -------------------------------- ### Implement UPGRADE_SAFE Record Source: https://github.com/influxdata/influxdb/blob/main/influxdb3_catalog/README.md For records that must be written at startup before accepting traffic, use the `upgrade_safe()` flag. This exempts the record from feature gating during rolling upgrades. ```rust impl CatalogRecord for SetNodeLicenseDigest { const ID: RecordId = record_ids::SET_NODE_LICENSE_DIGEST; const FLAGS: RecordFlags = RecordFlags::upgrade_safe(); // gate-exempt const NAME: &'static str = "SetNodeLicenseDigest"; // apply / event as usual } ``` -------------------------------- ### Object Store Configuration Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Details on configuring the object store for InfluxDB 3, including supported types and environment variable settings. ```bash --object-store Which object storage to use. If not specified, defaults to file. [env: INFLUXDB3_OBJECT_STORE=] [possible values: memory, memory-throttled, file, s3, google, azure] ``` -------------------------------- ### Object Store Configuration Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve_all.txt Details on configuring the object store for InfluxDB 3.0, including supported types and specific parameters. ```bash --node-id Node identifier used as prefix in object store file paths [env: INFLUXDB3_NODE_IDENTIFIER_PREFIX=] --object-store Object storage to use [possible values: memory, memory-throttled, file, s3, google, azure] ``` -------------------------------- ### List available fuzz targets Source: https://github.com/influxdata/influxdb/blob/main/core/mutable_batch_lp/fuzz/README.md Lists all available fuzz targets within the fuzz/fuzz_targets directory. ```bash $ cargo fuzz list ``` -------------------------------- ### Google Cloud Storage Configuration Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Option to specify the path to Google Cloud service account credentials for GCS integration. ```bash --google-service-account Path to Google credentials JSON [env: GOOGLE_SERVICE_ACCOUNT=] ``` -------------------------------- ### Create InfluxDB Database Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Creates a new database using the InfluxDB client. ```bash $ /here/influxdb3 create database foo ``` -------------------------------- ### InfluxDB 3 CLI Commands Overview Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/influxdb3.txt Overview of the main commands available in the InfluxDB 3 CLI. These commands allow interaction with a running InfluxDB 3 Core server. ```bash influxdb3 [OPTIONS] [COMMAND] ``` ```bash influxdb3 serve Run the InfluxDB 3 Core server ``` ```bash influxdb3 query Perform a query against a running InfluxDB 3 Core server ``` ```bash influxdb3 write Perform a set of writes to a running InfluxDB 3 Core server ``` ```bash influxdb3 resources Update resources on the InfluxDB 3 Core server ``` -------------------------------- ### Run end-to-end tests with server logs Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Executes end-to-end tests for the `influxdb3` crate and captures logs from the running server by setting the `TEST_LOG` environment variable. The `-p influxdb3` flag targets the specific crate, and `--nocapture` displays the output. ```shell TEST_LOG= cargo nextest run -p influxdb3 --nocapture ``` -------------------------------- ### Fetch and Display Benchmark Data Source: https://github.com/influxdata/influxdb/blob/main/influxdb3_load_generator/analysis/templates/index.html This JavaScript code fetches test names and configuration details from API endpoints. It populates dropdowns for selecting tests and configurations, and then fetches aggregated data to render comparison graphs when a button is clicked. Use this for interactive benchmark result visualization. ```javascript const testNameSelect = document.getElementById('test-name'); const configName1Select = document.getElementById('config-name-1'); const configName2Select = document.getElementById('config-name-2'); const compareBtn = document.getElementById('compare-btn'); // Fetch test names and populate the drop-down fetch('/api/test-names') .then(response => response.json()) .then(testNames => { testNames.forEach(testName => { const option = document.createElement('option'); option.value = testName; option.textContent = testName; testNameSelect.appendChild(option); }); // If there is only one test, select it and populate the configuration names if (testNames.length === 1) { testNameSelect.value = testNames[0]; updateConfigNames(testNames[0]); } }); // Update configuration names when a test name is selected testNameSelect.addEventListener('change', () => { const selectedTestName = testNameSelect.value; updateConfigNames(selectedTestName); }); // Fetch configuration names and populate the drop-downs function updateConfigNames(testName) { configName1Select.innerHTML = ''; configName2Select.innerHTML = ''; fetch(`/api/config-names?test_name=${testName}`) .then(response => response.json()) .then(configNames => { for (const configName in configNames) { const runTimes = configNames[configName]; runTimes.forEach(runTime => { const option1 = document.createElement('option'); option1.value = `${configName}/${runTime}`; option1.textContent = `${configName}/${runTime}`; configName1Select.appendChild(option1); const option2 = document.createElement('option'); option2.value = `${configName}/${runTime}`; option2.textContent = `${configName}/${runTime}`; configName2Select.appendChild(option2); }); } }); } // Fetch aggregated data and render graphs when the compare button is clicked compareBtn.addEventListener('click', () => { const selectedTestName = testNameSelect.value; const [selectedConfigName1, selectedRunTime1] = configName1Select.value.split('/'); const [selectedConfigName2, selectedRunTime2] = configName2Select.value.split('/'); Promise.all([ fetch(`/api/aggregated-data?test_name=${selectedTestName}&config_name=${selectedConfigName1}&run_time=${selectedRunTime1}`), fetch(`/api/aggregated-data?test_name=${selectedTestName}&config_name=${selectedConfigName2}&run_time=${selectedRunTime2}`) ]) .then(responses => Promise.all(responses.map(response => response.json()))) .then(data => { const config1Data = data[0]; const config2Data = data[1]; if (config1Data.write_data && config2Data.write_data) { renderGraph('Lines per Second', config1Data.write_data, config2Data.write_data, 'lines', 10000); renderGraph('Write Latency (ms)', config1Data.write_data, config2Data.write_data, 'latency', 10000, 'median'); } if (config1Data.query_data && config2Data.query_data) { renderGraph('Queries per Second', config1Data.query_data, config2Data.query_data, 'lines', 10000); renderGraph('Query Latency (ms)', config1Data.query_data, config2Data.query_data, 'latency', 10000, 'median'); } if (config1Data.system_data && config2Data.system_data) { renderGraph('CPU Usage (%)', config1Data.system_data, config2Data.system_data, 'cpu_usage'); renderGraph('Memory Usage (MB)', config1Data.system_data, config2Data.system_data, 'memory_bytes'); } }); }); // Render a graph using Chart.js function renderGraph(title, config1Data, config2Data, yAxisKey, interval = 10000, aggregateFunction = 'sum') { const container = document.getElementById('graph-container'); const canvas = document.createElement("canvas"); container.appendChild(canvas); const ctx = canvas.getContext('2d'); const labels = getXLabels(config1Data, interval); const config1Values = getYValues(config1Data, yAxisKey, interval, aggregateFunction); const config2Values = getYValues(config2Data, yAxisKey, interval, aggregateFunction); new Chart(ctx, { type: 'line', data: { labels: labels, datasets: [ { label: configName1Select.value, data: config1Values, borderColor: 'blue', fill: false }, { label: configName2Select.value, data: config2Values, borderColor: 'orange', fill: false } ] }, options: { responsive: true, maintainAspectRatio: false, plugins: { title: { display: true, text: title, font: { size: 30 } }, legend: { labels: { font: { size: 26 } } } }, scales: { x: { title: { display: true, text: 'Time (seconds)', font: { size: 28 } }, ticks: { font: { size: 26 } } }, y: { title: { display: true, text: title, font: { size: 28 } }, ticks: { font: { size: 26 } } } } } }); } // Get the x-axis labels based on the interval function getXLabels(data, interval) { const labels = []; const numInt ``` -------------------------------- ### Building InfluxDB with PyO3 and Custom Config Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Build InfluxDB using Cargo, specifying the PYO3_CONFIG_FILE environment variable to point to the custom configuration file for the python-build-standalone distribution. ```bash PYO3_CONFIG_FILE=/path/to/pyo3_config_file.txt cargo build ``` -------------------------------- ### Create Branch for Version Bump Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Create a new branch to update the version in Cargo.toml for the new release. ```bash git checkout -b chore/3.0/three-zero-two ``` -------------------------------- ### TLS Configuration Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Options for enabling and configuring TLS for secure communication with the InfluxDB 3 server. ```bash --tls-key The path to the key file for TLS to be enabled [env: INFLUXDB3_TLS_KEY=] ``` ```bash --tls-cert The path to the cert file for TLS to be enabled [env: INFLUXDB3_TLS_CERT=] ``` ```bash --tls-minimum-version The minimum version for TLS. Valid values are tls-1.2 and tls-1.3, default is tls-1.2 [env: INFLUXDB3_TLS_MINIMUM_VERSION=] ``` -------------------------------- ### Tag and Push Release Commit Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Tag the release commit and push it to the remote repository. ```bash git tag -a 'v3.0.2' -m '3.0.2 release' git push origin v3.0.2 ``` -------------------------------- ### Download Release Candidate Artifact Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Use curl to download the release candidate artifact for testing. Replace the version number as needed. ```sh curl -LO https://dl.influxdata.com/influxdb/releases/influxdb3-core-3.5.0-0.rc.1_linux_amd64.tar.gz ``` -------------------------------- ### AWS S3 Specific Configuration Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/serve.txt Configuration options for connecting to AWS S3, including access keys, region, and credentials file. ```bash --aws-access-key-id S3 access key ID [env: AWS_ACCESS_KEY_ID=] ``` ```bash --aws-secret-access-key S3 secret access key [env: AWS_SECRET_ACCESS_KEY=] ``` ```bash --aws-default-region S3 region [default: us-east-1] [env: AWS_DEFAULT_REGION=] ``` ```bash --aws-credentials-file S3 credentials file. Overrides '--aws-access-key-id' and '--aws-secret-access-key'. [env: AWS_CREDENTIALS_FILE] ``` -------------------------------- ### Create and Push New Minor Release Branch Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Use this command to create a new branch for a minor release version from the main branch. ```sh git checkout main # new minor release branch should be off of main git pull # make sure `main` is up-to-date git checkout -b 3.5 # create the new branch git push # push the new branch up to the remote ``` -------------------------------- ### Link Python Runtime to Executable Directory (Linux/macOS) Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Creates a symbolic link from the executable's target directory to the Python runtime directory. This step is necessary for the executable to locate the Python interpreter and its libraries at runtime. ```bash # linux and osx (if can't find libpython or the runtime, check previous steps) $ test -e ./target//python || ln -s /tmp/python ./target//python ``` -------------------------------- ### Register a new Catalog Record Source: https://github.com/influxdata/influxdb/blob/main/influxdb3_catalog/README.md Register the new record with the inventory system so that the registry and feature level can pick it up. ```rust inventory::submit! { RegisteredRecord::new::() } ``` -------------------------------- ### Run existing fuzz test Source: https://github.com/influxdata/influxdb/blob/main/core/mutable_batch_lp/fuzz/README.md Executes a specific fuzz test target. Replace with the name of the fuzz target file. ```bash $ cargo +nightly fuzz run ``` -------------------------------- ### Update Library Paths for Python Runtime on macOS Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md On macOS, use `install_name_tool` to change references to the Python dynamic library. This is often necessary when the library is not in a standard system location. Re-signing the binary with `rcodesign` is required if using `osxcross`. ```sh # osx $ install_name_tool -change '/install/lib/libpython3.NN.dylib' \ '@executable_path/python/lib/libpythonNN.dylib' target/.../influxdb3 $ rcodesign sign target/.../influxdb3 # only with osxcross' install_name_tool ``` -------------------------------- ### List Main Branch Commits for Cherry-Picking Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md List recent commits on the main branch to identify which ones to cherry-pick for the point release. ```bash git log --oneline --graph main ``` -------------------------------- ### Run InfluxDB with Plugins (Windows) Source: https://github.com/influxdata/influxdb/blob/main/README_processing_engine.md Runs the InfluxDB executable on Windows after moving it into the python-build-standalone unpack directory. This is required for the executable to find its Python runtime dependencies. ```bash # windows requires moving the binary into the python-build-standalone unpack directory $ cp ./target//influxdb3 \path\to\python-standalone\python # run influxdb with $ \path\to\python-standalone\python\influxdb3.exe ... --plugin-dir \path\to\plugin\dir ``` -------------------------------- ### Enable logging in tests Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Configures logging output for `cargo nextest` runs by setting environment variables. `TEST_LOG` captures logs from the test server, `RUST_LOG` controls the verbosity of Rust logs, and `RUST_LOG_SPAN_EVENTS` provides span event information. The `--nocapture` flag ensures logs are displayed. ```shell TEST_LOG= RUST_LOG=info RUST_LOG_SPAN_EVENTS=full cargo nextest run --workspace --nocapture ``` -------------------------------- ### Perform a Dry Run of Cargo Publish Source: https://github.com/influxdata/influxdb/blob/main/core/influxdb_line_protocol/RELEASE.md Before publishing to crates.io, perform a dry run using `cargo publish --dry-run` to verify the package contents and metadata without actually uploading. ```shell cargo publish --dry-run ``` -------------------------------- ### Download Official Release Artifact Source: https://github.com/influxdata/influxdb/blob/main/RELEASE.md Use curl to download the official release artifact. Replace the version number as needed. ```sh curl -LO https://dl.influxdata.com/influxdb/releases/influxdb3-core-3.5.0_linux_amd64.tar.gz ``` -------------------------------- ### Build with a Specific Cargo Profile Source: https://github.com/influxdata/influxdb/blob/main/CONTRIBUTING.md Use this command to build InfluxDB with a specific Cargo profile. Choose profiles like 'release' for optimized builds or 'quick-release' for faster iteration during development. ```bash cargo build --profile ``` -------------------------------- ### Build influxdb3 binary Source: https://github.com/influxdata/influxdb/blob/main/PROFILING.md Build the influxdb3 binary using cargo with a specified profile. The compiled binary will be located in the target folder. ```bash cargo build -p influxdb3 --profile ``` -------------------------------- ### Verify codesigning Source: https://github.com/influxdata/influxdb/blob/main/PROFILING.md Verify that the influxdb3 binary has been correctly codesigned with the 'get-task-allow' entitlement. This confirms the binary is prepared for profiling with Instruments. ```sh codesign --display --entitlements - target/release/influxdb3 ``` -------------------------------- ### InfluxDB 3 CLI Global Options Source: https://github.com/influxdata/influxdb/blob/main/influxdb3/src/help/influxdb3.txt Global options available for the InfluxDB 3 CLI. These include help and version flags. ```bash -h, --help Print help information ``` ```bash -V, --version Print version information ```