Commit Graph

88 Commits (e970aae77824c7be6358f0e5544b2a71e88559e4)

Author SHA1 Message Date
Daniel Moran 68f4df204f
fix(cmd/influx): improve CLI error returned on org-not-found (#20387) 2020-12-21 08:44:50 -08:00
Daniel Moran 5fa60878d9
feat(cmd/influx): add hints to ID-related errors in DBRP CLI commands (#20204) 2020-12-01 10:52:54 -05:00
George MacRorie 16d916a952 refactor(kv): delete deprecated kv service code
This includes removal of a lot of kv.Service responsibilities. However,
it does not finish the re-wiring. It removes documents, telegrafs,
notification rules + endpoints, checks, orgs, users, buckets, passwords,
urms, labels and authorizations. There are some oustanding pieces that
are needed to get kv service compiling (dashboard service urm
dependency). Then all the call sites for kv service need updating and
the new implementations of telegraf and notification rules + endpoints
needed installing (along with any necessary migrations).
2020-11-16 12:41:26 +00:00
Stuart Carnie 42aabb28fc chore: Do not use global viper APIs, which breaks testing 2020-11-13 08:47:52 +11:00
Ben Johnson 23679c2375 feat: Implement backup/restore CLI subcommands. 2020-11-05 10:05:01 -07:00
Stuart Carnie 4f85ce82a8 feat(cli): Extend CLI with v1 authorization commands
This commit add a series of new subcommands to the `influx` CLI tool.

* `influx v1` to host any InfluxDB v1 specific commands
* `influx v1 auth` for v1 authorization token management.

The commands provide access to the private authorization APIs
used to manage authorization tokens for v1 compatibility APIs,
including:

* `/write`
* `/query`

Closes #19765
2020-10-29 08:21:38 -07:00
Greg fcb70c26d5
fix: add ability to define bucket to write to with a BucketFilter (#19658) 2020-10-05 15:05:49 -06:00
vlastahajek 999660ae2e feat(upgrade): upgrade command basic skeleton 2020-10-01 08:06:42 -07:00
Johnny Steenbergen c0b593ec7d feat(influx): add active-config flag to override config on single command call
closes: #19318
2020-08-14 13:33:14 -07:00
Johnny Steenbergen efd82a2483 feat(influx): add support for dashboards 2020-08-05 09:14:01 -07:00
Johnny Steenbergen fd42c092d0 fix(influx): enforce flag validation
closes: #18629
2020-07-23 14:36:00 -07:00
Johnny Steenbergen aee64f1901 chore(influx): drop REPL command
closes: #18676
2020-07-23 11:17:46 -07:00
Johnny Steenbergen 76c2134767 feat(influx): enable dynamic configs destination
introduces the new flag --configs-path to the influx CLI. This new
flag has a corresponding env var INFLUX_CONFIGS_PATH. It is useful
to export this env var in a shell dotfile for consumption throughout the
box.

closes: #17979
2020-07-23 08:36:49 -07:00
Johnny Steenbergen 8b058597d6 chore(fs): refactor global file consts into internal/fs 2020-07-21 14:27:52 -07:00
Johnny Steenbergen 86894d4337 feat(influx): add telegraf resource support to influx CLI
closes: #17654
2020-07-20 15:37:43 -07:00
greg linton e4d33f1066 fix: don't overwrite build date set via ldflags 2020-07-07 16:15:00 -06:00
Johnny Steenbergen f804afc6ac fix(pkger): enforce flag parsing on export all and apply CLI commands
closes: #18850
2020-07-06 13:11:59 -07:00
Johnny Steenbergen 52cd625687 fix(influx): drop global flags and replace with locals
many spots in the CLI that global flags show up cause confusion or just
add overhead with no value. This cleans that up. Other commands may
have token removed if it does not pertain.

commands that do not have global flags:
  * influx
  * influx completion
  * influx config (all sub commands as well)
  * influx template
  * influx template validate
  * influx transpile
  * influx version
  * all root commands that have no actions, aka influx organization
2020-06-24 15:33:06 -07:00
Johnny Steenbergen d671185bdc fix(pkger): fixup updates for variables where updates from selected were skipped 2020-06-23 08:05:27 -07:00
Johnny Steenbergen 38d44c7980 chore(influx): add support for week duration 2020-06-22 21:02:51 -07:00
Johnny Steenbergen 3c14db1c77 fix(influx): support days as duration type
closes: #18639
2020-06-22 20:07:53 -07:00
Johnny Steenbergen 5bef654062 fix(influx): remove references to local
all CLI interactions are now to go through the front door (API).

closes: #18616
2020-06-18 17:29:16 -07:00
Johnny Steenbergen 1d75e3e8e9 feat(influx): provide means to provide trace debug ids to httpc client 2020-06-09 18:18:43 -07:00
Johnny Steenbergen 34b3dc77fb feat(influx): move nested commands to root for stacks, export, and rename pkg to apply
this is the beginning of consolidating packages under the moniker templates
2020-06-08 10:10:25 -07:00
Johnny Steenbergen fd289883fe feat(influx): add User-Agent header to the CLI http calls
closes: #18336
2020-06-02 16:09:11 -07:00
Johnny Steenbergen 81a0982b00 feat(influx): add version to influx CLI
closes: #14821
2020-06-02 16:09:11 -07:00
Johnny Steenbergen 07e351b204 chore(influx): disable failing when providing an unexpected error to influx CLI
closes: #18290
2020-06-02 12:25:21 -07:00
Johnny Steenbergen 43b7d65d02 feat(influx): extend CLI org type to support config orgs in global config 2020-04-21 10:25:05 -07:00
Johnny Steenbergen 5cd57d4f1e fix(influx): make CLI respect root token and host env vars in additionn to config
one thing to note here is we are deleting the default value on the host
flag when it is registered. The config is the fallback and has the default
value set. If the host flag has a default, the determination if the user
set it or not is ambiguous. We can't have that.

closes: #17812
2020-04-21 10:25:05 -07:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Kelvin Wang abe3a96674 feat(cmd/influx): add config switch back 2020-04-01 12:44:21 -04:00
Johnny Steenbergen 62a64e9abd feat(influx): add jsonout and hide headers support to user cmd 2020-03-27 11:49:09 -07:00
Johnny Steenbergen f0c0b82a7a feat(influx): add json output flag for pkg commands that print tables 2020-03-27 08:32:58 -07:00
Johnny Steenbergen 37646464b3 feat(pkger): add stack init cmd to influx cli
closes: #17235
2020-03-27 08:32:58 -07:00
Johnny Steenbergen 36d99bfbf8 chore(influx): make runE middleware application explicit from caller 2020-03-25 12:41:11 -07:00
Johnny Steenbergen 7d8bd1e055 chore(pkger): refactor influx pkg cmd to not validate in CLI and have server validate
the pkger.ValidSkipParseError option allows our server to be the one to validate the
the pkg is accurate. If a user has an older version of the UI and our cloud gets updated
with new validation rules,they'll get immediate access to that change without having to
rol their CLI build.

also fixes issue where we swallow initial errors when check setup middleware
fails.
2020-03-25 11:50:14 -07:00
Johnny Steenbergen 7b1efe5428 feat(influx): add completion command for users to generate the completions for the influx cli 2020-03-16 09:42:10 -07:00
Johnny Steenbergen 5211e559de chore(influx): add test coverage for root influx cmd
this verifies things like token/host and all the root lvl flags are being
set appropriately.
2020-03-13 15:00:12 -07:00
Kelvin Wang c511f06fa5 feat(cmd/influx): add profile management 2020-03-12 11:09:54 -04:00
Jade McGough fec0a021fd
fix(cmd): use list instead of find in cli (#16805) 2020-03-04 15:39:04 -08:00
Johnny Steenbergen 80751314bc chore(influx): refactor influx cmd to use builder
refators test to use full call paths where possible
2020-02-20 11:27:44 -08:00
Johnny Steenbergen a632025eb6 fix(influx): fix token env var and default assignment 2020-02-13 13:25:50 -08:00
Johnny Steenbergen 505ce2372c fix(influx): fix issue with locla state overriding env vars for token
closes: #16874
2020-02-13 11:55:41 -08:00
Kelvin Wang 670d2b7113 feat(cmd/influx): add secret cli 2020-02-10 11:40:06 -05:00
Johnny Steenbergen af6fac9fdf chore(pkg): remove ambiguity in wrong cmd calls within influx pkg cmd
there was an issue where you could call, `influx pkg summarize`
and the influx cli would actually prescribe that to `influx pkg` cmd
and pass summarize as an arg. This removes that ambiguity
2020-02-06 18:06:17 -08:00
Jacob Marble b836ab9c17
feat(storage): implement backup and restore (#16504)
* feat(backup): `influx backup` creates data backup

* feat(backup): initial restore work

* feat(restore): initial restore impl

Adds a restore tool which does offline restore of data and metadata.

* fix(restore): pr cleanup

* fix(restore): fix data dir creation

* fix(restore): pr cleanup

* chore: amend CHANGELOG

* fix: restore to empty dir fails differently

* feat(backup): backup and restore credentials

Saves the credentials file to backups and restores it from backups.

Additionally adds some logging for errors when fetching backup files.

* fix(restore): add missed commit

* fix(restore): pr cleanup

* fix(restore): fix default credentials restore path

* fix(backup): actually copy the credentials file for the backup

* fix: dirs get 0777, files get 0666

* fix: small review feedback

Co-authored-by: tmgordeeva <tanya@influxdata.com>
2020-01-21 14:22:45 -08:00
Johnny Steenbergen 22c0f787db fix(influx): fix description for reuable org/ord id type
closes: #16579
2020-01-17 09:15:10 -08:00
Johnny Steenbergen 19d2e5580a feat(influx): trim space on credentials file 2020-01-16 07:22:56 -08:00
Kelvin Wang cf5daee66b chore(cmd/influx): refactor user.go
feat(cmd/influx): add user tests
fix(cmd/influx): make golint happier
2020-01-15 13:45:26 -05:00
Johnny Steenbergen 3b62340b31 chore(influx): refactor org cmd with buidler pattern 2020-01-13 07:49:16 -08:00