rapid7-cookbooks / nexpose

This cookbook installs Nexpose
12 stars 10 forks source link

Add attribute to define default service action #11

Closed rhass-r7 closed 10 years ago

rhass-r7 commented 10 years ago

Internally we need to be able to install nexpose without it starting right away. Externally, customers using this cookbook expect for the service to start immediately after the installation occurs. This patch also fixes a bug in which the nexpose service would not start on Linux after installation.

rhass-r7 commented 10 years ago

Internal issue NEX-39393 created for addressing init script bug in status command.

rhass-r7 commented 10 years ago

@drag00n This PR should fix the startup issues you reported. Sorry it took so long to get this pushed.

cmluciano commented 10 years ago

Excellent, I've looked over it briefly. Is the nexpose service actually called "nexpose" then?

erran commented 10 years ago

The script is called nexposeconsole.rc. You can create a "nexpose" service and give the command as the script name. I'd give the example code, but it's been a while since I chef'd it up.

cmluciano commented 10 years ago

Awesome! Thank you.

rhass-r7 commented 10 years ago

Right now the service is based on what is installed, for example if you install an engine the service name is 'nexposeengine.rc'. The variable 'nexpose_init' is set based on the value of the node attribute ['nexpose']['component_type']

I am going to clean this PR before I merge it. There was some files I accidentally committed, namely around some TK config I setup as Vagrant got borked when I installed Chef-DK (part of the reason for the delay.)

rhass-r7 commented 10 years ago

@drag00n I also would like to add -- You have full veto rights to this changeset/approach should this method of setting the service name makes things difficult to use for a wrapper cookbook or any other reason for that matter.

cmluciano commented 10 years ago

I don't have a ton of experience with chef wrapper cookbooks, but I'll let you know if I see any red flags.