mikelangelo-project / capstan

Capstan, a tool for packaging and running your application on OSv.
http://osv.io/capstan/
Other
19 stars 7 forks source link

Create volumes with Capstan #74

Closed miha-plesko closed 6 years ago

miha-plesko commented 6 years ago

With this commit we implement a simple wrapper around qemu-img to simplify volume creation for user by using Capstan:

$ capstan volume create vol1 --size 1GB --format qcow2

The above command needs to be executed inside package (presence of meta/package.yaml is tested) and will create volumes directory with two files:

<package_root>
  |-volumes
    |-vol1.qcow2      # volume itself
    |-vol1.qcow2.yaml # metadata for Capstan

The metadata file is currently not used by Capstan yet, but will be soon since Capstan will automatically detect all the volumes inside ./volumes directory. Also capstan volume delete is implemented in this commit and ./volumes directory is implicitly added to the .capstanignore.

miha-plesko commented 6 years ago

Don't complain, you've asked for a complete integration of volumes yourself 😋 There will be on more followup PR that connects volume metadata into Capstan so that user won't need to specify everything all the time, just the volume name.

miha-plesko commented 6 years ago

@mancabizjak may I ask for your eye here? From what I know you're pretty experienced in Go by now so I'd value your comments.

mancabizjak commented 6 years ago

@miha-plesko I reviewed the latest changes and I have no further comments. To me it looks good :+1: And thanks for including me in the discussion, my first experience of Capstan was delightful :slightly_smiling_face:

miha-plesko commented 6 years ago

Thanks for cooperation @mancabizjak, considering that also all the comments from @gberginc have been addressed, I'm merging now.