Re: headless operation
"Guijarro, Julio" <[email protected]> Mon, 9 Jul 2007 14:45:33 +0100
| Newsgroups | gmane.comp.java.smartfrog.devel |
|---|---|
| Message-ID | <[email protected]> |
> > > It > > would be nice if there was a command line option (and SmartFrog > > component) which would deploy all *.sf files in some directory (eg. > > /etc/smartfrog/init.d). I am thinking of writing such component myself, > > but I don't know when I will get to it. Until then I would go with > > init.sf which creates root compound and default.sf which deploys in it > > by default. > > > > That's an idea I had last month and filed away as a possible future todo > item: > http://jira.smartfrog.org/jira/browse/SFOS-149 > > Have the unix startup scripts or a component deploy every .sf file in a > well known directory. > > There's some security complications there: do you want to keep > everything secured in a JAR, or can you get away with everything in > plain text .sf files. Personally, I like the plain text option, and > would certainly like to see something like this too; something that > would poll the dir for changes and undeploy when the file(s) go away, > deploy when they arrive. It would let you do deploy-by-copy deployment > of smartfrog systems. > > -steve > The main problem with such a component are the security implications but it could be very helpful for quick testing. As an alternative, if you want to deploy several description when the daemon starts, you can use the -f option to load a file with a list of descriptions (described using ConfigurationDescriptor format for the command line, check smartfrog -? or the manuals) that need to be deployed. Also, but only if you want you default description to be loaded in every daemon and in every subprocess, there is no limit in the number of "default" descriptions that can be loaded. Our daemon scripts only load one because that is what we need but you could add as many as you want. -Dorg.smartfrog.sfcore.processcompound.sfDefault.sfDefault="%SFHOME%\bin \default.sf" If you want your own description to be loaded using "myName" as name you only need to add: -Dorg.smartfrog.sfcore.processcompound.sfDefault.myName=myDesc.sf To add this with the normal scripts you can add to your normal command line: sfDaemon -J "-Dorg.smartfrog.sfcore.processcompound.sfDefault.myName=myDesc.sf" Aleksander thanks for input. Julio > -----Original Message----- > From: smartfrog-developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:smartfrog- > developer-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Steve Loughran > Sent: 09 July 2007 12:04 > Cc: smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > Subject: Re: [Smartfrog-developer] headless operation > > Aleksander Bandelj wrote: > > I like 4). SmartFrog would then start with /etc/smartfrog/init.sf. > > For the latest release we've just gone to -headless (which > init.d/smartfrogd sets), so that you can > (a) test without trying to unset things > (b) not break on a mac which is Unix-without-X11. > > We've also fixed the management console to fail gracefully if it it > cannot start up, so you still deploy a GUI without causing the server to > fail and roll back the root deployment. > > > It > > would be nice if there was a command line option (and SmartFrog > > component) which would deploy all *.sf files in some directory (eg. > > /etc/smartfrog/init.d). I am thinking of writing such component myself, > > but I don't know when I will get to it. Until then I would go with > > init.sf which creates root compound and default.sf which deploys in it > > by default. > > > > That's an idea I had last month and filed away as a possible future todo > item: > http://jira.smartfrog.org/jira/browse/SFOS-149 > > Have the unix startup scripts or a component deploy every .sf file in a > well known directory. > > There's some security complications there: do you want to keep > everything secured in a JAR, or can you get away with everything in > plain text .sf files. Personally, I like the plain text option, and > would certainly like to see something like this too; something that > would poll the dir for changes and undeploy when the file(s) go away, > deploy when they arrive. It would let you do deploy-by-copy deployment > of smartfrog systems. > > -steve > > > -a > > > > Steve Loughran wrote: > >> I've been having some fun with the rpms and headless operation. > >> > >> 1. setting the DISPLAY to localhost:8 doesnt work. it may work on some > >> boxes, but not all. > >> > >> 2. what we ought to do is have the daemon start up from init.d without > >> any display at all, somehow. > >> > >> 3. we could maybe have it start up a specific default.sf > >> > >> 4. or we make the startup scripts clever, use the absence of $DISPLAY > to > >> set java.awt.headless=true and then dynamically decide whether to > deploy > >> the display or not based on the LAZY PROPERTY java.awt.headless. > >> > >> Thoughts? > > > > > > ------------------------------------------------------------------------ > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Smartfrog-developer mailing list > > Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > > https://lists.sourceforge.net/lists/listinfo/smartfrog-developer > > > -- > ----------------------- > Hewlett-Packard Limited > Registered Office: Cain Road, Bracknell, Berks RG12 1HN > Registered No: 690597 England > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Smartfrog-developer mailing list > Smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/smartfrog-developer ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/