RFC : Have a kernel/initrd/file repository
|Target version:||Release 4.0|
It would be nice to manage kernels and initrd files within OpenNebula
Use case : I have PV Xen machines. I would like to manage several kernels, and maybe even have them listed in Sunstone.
I think the most generic way to do so would have to have a file repository. This should be distinct from the image repository, and used only for (rather) small files (kernels, certificates, configuration files, etc).
The way I see it, a file would have :
- an id
- a user-friendly name
- an owner/group/whatever is required for ownership
- meta-data key-value pairs
- one meta-data pair would be called "type", and could have values such as "context", "kernel", or "initrd"
- users could specify arbitrary pairs.
Tags would allow to mark a file as 'kernel' or 'initrd' or whatever the user wants.
Files would be uploaded through the XMLRPC API (so, small files only), and passed to an arbitrary driver with the following operations :
The usage scenario would go like this :
- I compile a new kernel and initrd
- I upload those to the File Store as vmlinuz-3.0-shiny and initrd-3.0-shiny
- I create a VM template looking like :
- The template builder realizes these are not paths (not starting with /)
- The files are copied (or linked) to /srv/cloud/X/files/
- The files are used in the deployment file
- When the VM is shut down, /srv/cloud/X/files/ is removed
Files uploaded that way could also serve in contextualization, without the security issue we discussed earlier. A file marked as "context" could be copied to the contextualization iso.
This could be extended even further. For instance, we could have a key-value pair called "host". Then, in the context part, have :
CONTEXT [ FILES = "$FILES[host=$HOSTNAME]" ]