I've recently started playing around with Evergreen. Upon installing it on a test machine, and having a power blip the next evening, it dawned on me that there are no canned, ready-to-use, init scripts for starting the OpenSRF services (the usual suspects of osrf_ctl.sh... start_all). By contrast, memcached, postgresql, and ejabberd are all taken care of by the distribution packages, but none of the walk-throughs in the wiki mention an init script, and there's not one readily available in subversion. I had a brief discussion w/ miker and dbs this evening on IRC with regards to why that was, and there was some concerns about restarting a large production environment automatically, and we all agreed that either something custom, or perhaps even nothing at all, was the best way to proceed in a large setting. In the smaller case (testing and development machines, home installs, etc) it seems practical to have something that will work almost all of the time, and keep things in the expected state.
This raised a host of questions. What should the init script be called? OpenSRF, as it's starting OpenSRF services (Router, Perl, C), or should it's name be 'evergreen', following a system-oriented naming style instead, as the goal of the script after all is to start up a workable Evergreen system? Personally, I'd lean towards the former, as Evergreen is really more than just the OpenSRF services, but it may be counter-intuitive to some users. As miker alluded to, perhaps a wrapper script with analagous 'start|stop|restart' functionality would be useful. It could check to ensure the appropriate base services are running (postgresql, a jabber server, memcached), perhaps by inspecting the configs to determine everything is correct, and starting services as necessary? Stop / restart would be a bit more tricky, as you wouldn't necessarily want to stop postgresql on the server on a whim (especially on smaller installations, it might be in use by another service). Should there be just one relatively simple universal SysV-style init script? Should there also be multiple init scripts in the style of the various distributions, which leverage additional management features provided by those distributions? Where's the point of diminishing return, there? I'll stop babbling now. I'm exceedingly new to Evergreen, and readily acknowledge that I don't know what's best here. I'd love to hear the insights from others on this list, and if a consensus approach can be found I'll gladly code up something along those lines. To kick off the discussion, how does a simplistic init script for OpenSRF services, which accepts (start|stop|restart), and will likely work on all SysV platforms sound as a starting point? What other features would be interesting for your use cases? Respectfully, Aaron S. Joyner
