Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(influx): improve usage for influx pkg commands #18334

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

jsteenb2
Copy link
Contributor

@jsteenb2 jsteenb2 commented Jun 2, 2020

Closes #18324


Example:
# Export by a stack
influx pkg export stack $STACK_ID
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2 docs haven't been added yet. Should be available come next release. Will backfill that when it is available. Perhaps we can do it in tandem @sanderson?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsteenb2 This should be pretty easy to add. I'll do it this afternoon. The task-based stack management docs are a different PR and will get finalized once I wrap up my InfluxDays presentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, sounds great 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsteenb2 jsteenb2 force-pushed the 18324/pkger_improve_cli_usage branch from 95717d1 to 63415ad Compare June 2, 2020 18:48
# template associated with it.
influx pkg --stack-id $STACK_ID

# Apply a template associated with a stack. Stacks make tempalte application idempotent.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template

# Apply a template from STDIN
cat $TEMPLATE.json | influx pkg --encoding json

# Applying a directory of templates, takes everything from provided dir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would expand dir to directory here and below.

@jsteenb2 jsteenb2 force-pushed the 18324/pkger_improve_cli_usage branch from 63415ad to b802dfa Compare June 2, 2020 19:12
@jsteenb2
Copy link
Contributor Author

jsteenb2 commented Jun 2, 2020

@pierwill thank you! pushed up changes per your feedback 👍

@jsteenb2 jsteenb2 requested a review from pierwill June 2, 2020 19:22
Copy link
Contributor

@sanderson sanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor changes.

CHANGELOG.md Outdated
@@ -4,6 +4,7 @@

1. [18279](https://github.com/influxdata/influxdb/pull/18279): Make all pkg applications stateful via stacks
1. [18322](https://github.com/influxdata/influxdb/pull/18322): Add ability to export a stack's existing (as they are in the platform) resource state as a pkg
1. [18334](https://github.com/influxdata/influxdb/pull/18334): Update influx pkg commands with improved usage and examples within long form.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update influx pkg commands with improved usage and examples within in long form.

Comment on lines 101 to 105
The pkg command applies InfluxDB template(s). You can use the command to create
new resources via a declarative template. The pkg command can consume templates
via file(s), url(s), stdin, or any combination of the 3. Each run of the pkg
command ensures that all templates applied are applied in unison as a transaction.
If any unexpected errors are discovered then all side effects are rolled back.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can Use the command ...

@jsteenb2 jsteenb2 force-pushed the 18324/pkger_improve_cli_usage branch 2 times, most recently from deb7e49 to c01190f Compare June 2, 2020 20:00
@jsteenb2 jsteenb2 requested a review from sanderson June 2, 2020 20:02
@jsteenb2 jsteenb2 force-pushed the 18324/pkger_improve_cli_usage branch from c01190f to 95bbc6a Compare June 2, 2020 20:27
@jsteenb2 jsteenb2 dismissed pierwill’s stale review June 2, 2020 20:31

feedback addressed 👍

@jsteenb2 jsteenb2 merged commit 6112c78 into master Jun 2, 2020
@jsteenb2 jsteenb2 deleted the 18324/pkger_improve_cli_usage branch June 2, 2020 20:49
Copy link
Contributor

@samhld samhld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend influx CLI pkg commands with better usage
4 participants