-
Notifications
You must be signed in to change notification settings - Fork 246
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
Add LiteFS Cloud commands #2786
Conversation
@michaeldwan This is my first big PR against |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how long can the import/export commands take? if more than a couple seconds is possible, how about displaying a message on stderr about them potentially taking a while?
The fly lfsc clusters list
command help was confusing to me. I ran:
% fly lfsc clusters list
Error: no org was provided, and none is available from the environment or fly.toml
then tried appending the org name:
fly lfsc clusters list tvd-testorg
Usage:
flyctl usage clusters list <clustername> [flags]
Flags:
-h, --help help for list
-j, --json JSON output
-o, --org string The target Fly organization
Global Flags:
-t, --access-token string Fly API Access Token
--debug Print additional logs and traces
--verbose Verbose output
Error: unknown command "fly" for "flyctl usage clusters list"
I then figured out i was supposed to use --org
. I think my intuition is to allow the org name to be passed in as an optional position argument. What if we provide a separate fly lfsc clusters show
command for showing info on a single cluster (or fix the usage for the list subcommand)?
I noticed the --json
output includes pagination info. What if we show 20 by default and allow devs to pass in a flag that enables showing more (e.g., a --max-cluster
or --limit
flag or something like that)?
% fly lfsc clusters list -o tvd-testorg --json
{
"offset": 0,
"limit": 20,
"total": 0,
"clusters": []
}```
"lfsc" is a bit cryptic for the non-initiated. Can we call the subcommand |
5c3a95c
to
02df2b0
Compare
I'm finally getting back to this PR after having focus my attention elsewhere. I fixed up the PR and added cluster creation & deletion.
The
I added
I opted for |
* Add LiteFS Cloud commands * Add lfsc clusters destroy * Add cluster create and regions commands * Fix lfsc aliases * Add pagination to 'lfsc clusters list' * go mod tidy
Change Summary
What and Why: This pull request adds CLI commands for managing LiteFS Cloud clusters. These commands include listing clusters, listing databases, import/exporting databases, & restoring databases.
How: Added a subcommand called
litefs-cloud
which is also aliased tolfsc
for brevity.Related to: Users have requested CLI access to LiteFS Cloud (superfly/litefs#392).
Documentation