[Glass] Ways to auto start Seaside gems upon stone startup

Johan Brichau johan at yesplan.be
Tue Jan 28 11:30:17 PST 2014


My solution is a combination:
- stones are started at startup using SYS V scripts
- gems are started using monit, which is also started automatically

I have bad experiences trying to start all things using monit. Although it allows to declare dependencies, it just does not try to start the stone first before starting the gems. In the end, if monit has execution failures starting gems, it will give up and you have to login manually anyway.

Johan

On 28 Jan 2014, at 19:47, Mariano Martinez Peck <marianopeck at gmail.com> wrote:

> Hi guys,
> 
> I am using the tools from Norbert Halt to create stones. He makes an easy V script that you can put in /etc/init.d and then make it autostart/stop during OS start/stop. But that script simply start/stops the stone. I want my seaside gems to also be started.
> 
> I wonder what you do to auto start seaside gems after stone has started. 
> 
> 1) I saw SystemLoginNotification but I need to register a class. I would like to simply add a piece of code (that start seaside gems) and not a class.
> 
> 2) I saw UserProfile>>loginHook:. But I don't understand how this or the previous one could help. Why? Because at OS startup I would only start the stone.. no user would be logged in. And if I would need to manually log in ...then I am in the same situation.  
> 
> 3) Modify the V script and also run the code to start my gems. I don't like this because I may want to only start the stone at some point.
> 
> 4) Add ANOTHER V script that starts seaside gems... and make sure this one is executed AFTER the script to start stone
> 
> 5) Write monit scripts which I wanted anyway and reuse the fact that monit would start upon system startup and would start gems because they are down ;)
> 
> I guess my best option is the last one right? or am I missing other alternatives?
> 
> Thanks, 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list