Provide mechanism for custom trove code delivery

Registered by Denis M. on 2013-10-14

Suppose we have custom code for guestagent. And we need to deliver it to the VM. I'd like to describe few ways to do that:
1. tar via cloud-init. (tar need be always updated)
2. Github repo with placed configs. (it is possible that VM didn't got an access to internet)
3. Local trove dirrectory/git repo. (Need to have ssh access to VM)

Workflow for pos. #3
0. Via cloud-init we creating empty git repo via git init command
1. Security group should allow tcp access on port 22 for ssh
2. After nova creates server and it would become active trove taskmanager initiates ssh connection git push to VM
3. We need to start trove-guestagent there.

There is no chanse to update/modify code on existing VM.
This workflow could be performed only with new/clean VM.

Some thought about keymanagement:
1. For development perposes trove could have configurable value that describes where to store or read SSH Public Key.
2. SSH keys should be passed to cloud-init when it gets transformed to userdata.

Some thought about guestagent git server:
1. Server should be created and be available.
2. Creation script should be passed to userdata before instance creation call.

[Python SSH keygen]: http://stackoverflow.com/questions/2466401/how-to-generate-ssh-key-pairs-with-python

Key creation strategy:
  - generate on taskmanager start or first execution of create
  - read on each create execution

[Setting up git server for guestagent]: https://gist.github.com/crazymac/6975175

[Git client]: http://pythonhosted.org/GitPython/0.3.1/tutorial.html

[Guestagent virtual.env creation and starting] https://gist.github.com/crazymac/6975141

All of this is applicable for development needs, nothing else

Blueprint information

Status:
Complete
Approver:
Michael Basnight
Priority:
Undefined
Drafter:
None
Direction:
Approved
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
milestone icon next
Completed by
Nikhil Manchanda on 2014-04-16

Related branches

Sprints

Whiteboard

[hub_cap] Why would we not pull in the code from the agent.
[dmakogon] What the reason of such mechanism ?
[hub_cap] denis is working on this so its approved now

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.