ppouliot / puppet-openstack_hyper_v

A starting point for building Windows/Hyper-V OpenStack Compute nodes
Other
6 stars 4 forks source link

Creates nova-compute windows service and defines the depencencies #20

Closed luisfdez closed 11 years ago

luisfdez commented 11 years ago

Hi, I finally managed to finish this one! This patch adds a new defined resource to handle windows services based on Python ( _openstack_hyper_v::python::windowsservice ). It makes use of registry module to create the service and additional entries required for creating a service running a python script. Now, it requires a reboot after creating the service, I'm working on fixing that.

The nova-compute service is created using this defined resource, it also configures the folders and dependencies. It uses the PythonService.exe mechanism with a custom script based on nova-compute to handle the services calls.

Apart from that, I removed some pp files that don't look useful by now and changed a bit the folder definitions.

Once you merge this, I'll start creating the nova.conf content and passing the necessary parameters to the init file. Also, we can start thinking the splitting of the module.

luisfdez commented 11 years ago

I found it useful at the beginning, to reuse code, etc... But we can replace the registry::service resource by an exec calling sc.exe, and keep the _registrykey and _registryvalue resources needed by PythonService.exe. This will provide the same functionality without the reboot.

ppouliot commented 11 years ago

My Point exactly. By using the sc.exe it removes our need of a reboot. From my perspective the only reboot would be at the time of joining the domain.

p

luisfdez commented 11 years ago

Hi, I've updated the PR with the new commit containing this change. It's not tested yet because I'm still dealing with some problems in our puppet infrastructure.

Take a look if you have time.