GSoC/GCI Archive
Google Code-in 2010 Oregon State University Open Source Lab

Ganeti Web Manager: JSON feed view for user ssh keys

completed by: Piotr Banaszkiewicz

mentors: Peter Krenesky, Lance Albertson

 

Please make sure to submit your patch for this task and to take required notes for it in the OSUOSL issue tracker at http://code.osuosl.org/issues/1059. Required notes would include letting the community know you are working on the issue with a note in the tracker, any notes on progress or difficulties implementing, etc.

For help with this task, contact kreneskyp or ramereth in #osuosl on Freenode.

 

Description

We need to be able to run post-hooks in ganeti during VM creation in order to add ssh keys. The idea we have currently is to create a regular user in the webapp and grant it access to this view. Basic flow works as such:

  1. User creates VM
  2. Ganeti runs post-hook scripts during creation phase
  3. Custom post-hook (to be written) will query a JSON feed and add ssh keys for the root user for Users that are allowed access.

The current plan is to write the post-hook in python to make it easier to deal with. Eventually it'll be nice to have a better API for this for other things but this will work for now. I'm not sure how you want to setup the permissions model for this but it shouldn't be accessible to anyone other than admins.

NOTE: I picked JSON since we're already querying it from ganeti itself. If you'd rather use RSS or something else feel free. I just want something simple to write and use.