[Glass] Ways to auto start Seaside gems upon stone startup
Paul DeBruicker
pdebruic at gmail.com
Tue Jan 28 13:14:18 PST 2014
There is the waitstone command that ships with GemStone which you can use in
your daemontools/monit scripts that will wait on the stone to be present
before starting the gem. E.g.
#!/bin/bash
source /opt/gemstone/product/seaside/defSeaside
$GEMSTONE/bin/waitstone $GEMSTONE_NAME 2
exec setuidgid deploy $GEMSTONE/seaside/bin/startServiceVM31
Johan Brichau-3 wrote
> 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@
> > 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 .gemtalksystems
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
> _______________________________________________
> Glass mailing list
> Glass at .gemtalksystems
> http://lists.gemtalksystems.com/mailman/listinfo/glass
--
View this message in context: http://forum.world.st/Glass-Ways-to-auto-start-Seaside-gems-upon-stone-startup-tp4739933p4739966.html
Sent from the GLASS mailing list archive at Nabble.com.
More information about the Glass
mailing list