Monit scripts [WAS] Re: Is anyone using upstart to launch stones via tODE?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Monit scripts [WAS] Re: Is anyone using upstart to launch stones via tODE?

GLASS mailing list
I attach an example of a monit script I use. Some notes:

1) Not everybody likes to automatically restart stone if it crashed (I do it). Some prefer a simply allow monit to throw a notification (email?) and then take human action (recover from tranlogs?  analyze logs?  recover from backup?  run object audit? etc etc). 

2) I use my own scripts for starting/stopping a seaside gem at a given port.

3) You must change the timeout of the FastCGI parts of the monit file to match the one in your webserver  configuration timeout for FastCGI. 

4) Again, I try to keep monit file in the directory of the stone and do a symlink to the monit directory in /etc.

5) I autogenerate these monit files as part of my "site building scripts"

6) You can change the start/stop program of the stone to use gsDevKit `startStone` and `stopStone` and also the pid file to point to $GS_HOME/server/stones/stoneXXX/
mmmmmmm  `startStone` does not create a pid file??? else I cannot find it...

7) There could be times where you want to put gems down (maybe for a scheduled cleanup/maintenance) or even the stone (upgradeStone for example). For this cases, killing monit may not be the best path. So for all those cases, what I use is code like this:

monit unmonitor -g ${GEMSTONE_NAME} >> $GEMSTONE_LOGDIR/${GEMSTONE_NAME}_backup.log 2>&1

The key there is "monit unmonitor -g ${GEMSTONE_NAME}"  (-g is for group). So with the groups you can unmonitor and monitor again after you finished doing what you wanted to do. 


Cheers,

On Tue, Nov 24, 2015 at 6:23 PM, Jupiter Jones <[hidden email]> wrote:
Hi Mariano,

That would be great, thanks. I have sysV and monit scripts from years ago, however they re pre-tODE and very application specific. Having followed your discussions with Dale, I’m sure your scripts will be far better thought out than mine :)

Would you mind having them become part of the GsDevKit repo?

Cheers,

Jupiter

On 25 Nov 2015, at 12:01 AM, Mariano Martinez Peck <[hidden email]> wrote:

Hi Jupiter,

I have init System V (not upstart) and monit scripts. If you think this can help you let me know and I share them with you. 

Best, 


On Tue, Nov 24, 2015 at 2:18 AM, Jupiter Jones via Glass <[hidden email]> wrote:
Hi All,

I’ve been asked to setup an AWS image with GemStone and Seaside and I’m planning on using tODE.

Everything is setup, however, I’m wondering if anyone has gone through the process of configuring upstart to start and stone stones?

I’m thinking something like:

initictl start gemstone STONE=myStoneName

…to run the script:

/opt/git/GsDevKit_home/startServer -b $STONE

If anyone has had a go at this, I’d appreciate any advice, help, scripts, whatever. Perhaps an addition to GsDevKit_home for those working with upstart would be the place to keep these. I’ll set one up if no one has done this already.

Thanks in advance.

Cheers,

Jupiter
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



--




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass

monitDebrisTesting.txt (4K) Download Attachment