-
Notifications
You must be signed in to change notification settings - Fork 14
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
Simplify 'image add' mechanism #599
Comments
https://docs.oxide.computer/cli/disk/import Lines 492 to 545 in 8fc14f8
However, you are 100% right to raise this issue because the docs are worse than useless for figuring that out, and the flags API is also not very intuitive. We can do a lot better. |
The cli does support this, but it isn't entirely intuitive:
there could definitely be a wrapper around this to make it simpler. |
That is the wrapper @citrus-it. I think we just have to improve the flags and the docs. We should also make clearer on stuff like Though maybe you're right that we should have a version of this under Another note, something I've never noticed before: Other parent commands will usually just list their children and nothing else. Maybe we should stick to that pattern and possibly even enforce it programmatically. |
I would also call out that the |
Would it be possible for this workflow to be integrated into the API instead? It'd be pretty sweet to have this in the API so each client doesn't have to implement it's version of the workflow. |
The bulk write loop can't really be integrated that way, but I bet we could figure out how to get the before and after steps into a single API call each, which would still simplify things quite a bit on the client side. |
That sounds like a really good idea! Thanks @david-crespo Just for my own understanding, why can't the bulk write loop be integrated? |
You have to send the file to the server somehow. You could do one big upload of the entire file and let it feed the chunks to crucible in some kind of async process, but
So, the way I'm picturing it, at least, the alternative is not really simpler. Though we may end up doing something more integrated we want to put URL-based uploads back in. I do think bigger rethinks are on the table. |
Target component
Overview
A CLI user should be able to upload an image file "directly" as an image, the same way a Console user can.
Today the console does the work behind the scenes to do the creation of a temp disk, bulk writes of the image to that temp tdisk, taking the disk out of import mode, creating a temp snapshot of the disk, creating an image from the snapshot, then deleting the temp disk and temp snapshot... all of which makes the image upload process effectively transparent to the user.
It would seem the CLI doesn't have this user-friendly abstraction. What is available doesn't quite give the same nice experience:
oxide image create
: expects a json body and has no docs for what should be in itoxide disk import
: convoluted (must first be run w/ arguments but w/o a command, then must be run with commands later?) and results in a disk that still needs to be snapshotted and have an image created from it, then cleaned upImplementation details
No response
Anything else you would like to add?
No response
The text was updated successfully, but these errors were encountered: