mdsol / mesos_cookbook

Chef cookbook for installing Apache Mesos
Other
78 stars 71 forks source link

Proposal: generate mesos startup command directly #58

Closed rveznaver closed 9 years ago

rveznaver commented 9 years ago

Hello, I was thinking of possibly bypassing the mesos-init-wrapper completely and generating the init services with mesos options directly. IMO this could vastly simplify the cookbook, get rid of all the Mixin::ShellOuts in the library, and there would be no need for the whole directory structure forced upon by the script. What say you?

rayrod2030 commented 9 years ago

Hey @rveznaver I'm glad you submitted this because I was trying to find the PR where you had mentioned this originally. Anyway it's much easier to discuss this as an issue. I have always felt a bit uneasy with all the magic that happens inside the Mesos wrapper script so I'd say I'm on board with this change for the most part. If you look at PR https://github.com/mdsol/mesos_cookbook/pull/50 my main goal with that change was to add much more validation to the options passed to Mesos because an invalid option would kill your Mesos process and I feel the cookbook should help a bit with avoiding that outcome. If this change will let us continue down that path of safe Mesos configuration changes via this cookbook then I am all for it.

Is it safe to assume the new init script will look a bit like the current wrapper script but simpler?

rveznaver commented 9 years ago

Uhm... not exactly, I basically want to move all logic from the init wrapper script into ruby. I would get all mesos arguments from chef attributes and put them directly into mesos-slave and mesos-master init scripts (the ones we already generate from mesos-init.erb). There would be no need for any directories and all that mumbo jumbo, only two simple scripts running the slave or master command. IMO, this could also simplify administration of the nodes as one would not have to go chasing around key value pairs in directories, but rather have everything immediately visible in one place.

rayrod2030 commented 9 years ago

I agree getting rid of those shellout's would be good as well as showing all configuration in one place. Let's give it a shot.

rveznaver commented 9 years ago

OK, will try to find some time next week and do a pull request.

rveznaver commented 9 years ago

Hi @rayrod2030, sorry it took me a while, I was busy with other things, but here is the proposal for the new mesos wrapper. I could not move everything into the upstart script because I still need to start up the logger process for syslog logging. However, the main idea behind the proposal is still very much evident.