influxdata / influxdata/influxdb
Un-deprecate `influxd print-config` or suggest more suitable replacement
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Proposal:__
Clarify how to produce a default configuration file for new setup. Some possible avenues:
1. Un-deprecate `influxd print-config`
2. Rename `print-config` subcommand to avoid confusion (assuming that was the reason for deprecation)
3. If a suitable alternative already exists, suggest it along with or instead of `influx server-config`
4. If best practice has changed entirely, at least update the documentation for the docker image (and elsewhere, if appropriate) accordingly
__Current behavior:__
The [docker image documentation](https://hub.docker.com/_/influxdb)'s configuration section recommends `influxd print-config` to obtain the default configuration. When you actually do this, however, InfluxDB 2.4.0 warns:
> Command "print-config" is deprecated, use the influx-cli command server-config to display the configuration values from the running server
Okay, very well, but if you do what that recommends (and I'm not sure if this is intentional, but `influx-cli` is misleading, as the CLI is called simply `influx`):
> Error: failed to retrieve config: Get "http://localhost:8086/api/v2/config": dial tcp 127.0.0.1:8086: connect: connection refused
And looking at the `--help` output it seems that `influx server-config` can only retrieve actual config from a running server.
__Desired behavior:__
A quickstart config file is useful for, well, getting started quickly. The docs for the deprecated `influxd print-config` option also make it sound quite useful for understanding the effect of various administrative changes (emphasis mine):
> Print config (in YAML) that the influxd server ***would*** use if run with the current flags/env vars/config file.
Whereas the recommended replacement `influx server-config` seems only to be able to produce the configuration that a server is actually using. The use cases don't overlap in my opinion.
__Alternatives considered:__
Besides the recommended replacement, I also tried to find alternatives through the online documentation but a couple of searches I tried were not fruitful.
__Use case:__
1. Quick start with sane defaults
5. Understanding the impact and inter-relationship of environment variables, flags, and file-based config options
Contributor guide
Research direction
Start by reviewing the Docker image configuration documentation and the behavior of the `influxd print-config` and `influx server-config` entry points described in the issue. Determine which command should provide a configuration for a new setup, then update the command behavior or documentation so the recommended path works without a running server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100