We have several custom tests we use from our BB server to check applications. In BB it was possible to add these into the /ext directory and then call them from /etc/bb-bbexttab. Is there a provision for this type of thing in Hobbit?
Note: The information contained in this email and in any attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. The recipient should check this email and any attachments for the presence of viruses. Sender accepts no liability for any damages caused by any virus transmitted by this email. If you have received this email in error, please notify us immediately by replying to the message and delete the email from your computer. This e-mail is and any response to it will be unencrypted and, therefore, potentially unsecure. Thank you. NOVA Information Systems, Inc.
On Mon, Feb 14, 2005 at 04:15:00PM -0500, Kevin.Hanrahan at novainfo.com wrote:
We have several custom tests we use from our BB server to check applications. In BB it was possible to add these into the /ext directory and then call them from /etc/bb-bbexttab. Is there a provision for this type of thing in Hobbit?
Set them up as tasks in hobbitlaunch.cfg .
NB: The environment variables provided by Hobbit to a script is not quite the same as that which BB provides. Some BB extensions use environment variables for some commands, e.g $GREP instead of grep. Hobbit does not set this up by default, so you should check what your scripts expect, and if necessary add the extra environment variables to hobbitserver.cfg (or change the script).
Henrik
On Mon, 2005-02-14 at 22:59 +0100, Henrik Stoerner wrote:
On Mon, Feb 14, 2005 at 04:15:00PM -0500, Kevin.Hanrahan at novainfo.com wrote:
We have several custom tests we use from our BB server to check applications. In BB it was possible to add these into the /ext directory and then call them from /etc/bb-bbexttab. Is there a provision for this type of thing in Hobbit?
Set them up as tasks in hobbitlaunch.cfg .
NB: The environment variables provided by Hobbit to a script is not quite the same as that which BB provides. Some BB extensions use environment variables for some commands, e.g $GREP instead of grep. Hobbit does not set this up by default, so you should check what your scripts expect, and if necessary add the extra environment variables to hobbitserver.cfg (or change the script).
Just wondering if there is a reason for this?
Personally, whenever writing ext scripts, I always made an effort to call all the various utilities like sed/grep/etc as ${SED}/${GREP}/etc. This, I figured saved everyone from editing the ext script for each platform they needed to run it on (assuming it is either being shared on deadcat, or else being used across multiple OS's.... Even different releases of linux use different paths.
It would seem a shame to need to make all these scripts *more* specific...
PS, I haven't yet had a chance to install hobbit, so perhaps I am missing something really obvious... It sounds great, and once it is released, I'm sure I will install and use it.
Regards, Adam
--
Adam Goryachev Website Managers Ph: +61 2 8304 0000 adam at websitemanagers.com.au Fax: +61 2 9345 4396 www.websitemanagers.com.au
On Tue, Feb 15, 2005 at 09:32:02AM, Adam Goryachev wrote:
On Mon, 2005-02-14 at 22:59 +0100, Henrik Stoerner wrote:
On Mon, Feb 14, 2005 at 04:15:00PM -0500, Kevin.Hanrahan at novainfo.com wrote:
We have several custom tests we use from our BB server to check applications. In BB it was possible to add these into the /ext directory and then call them from /etc/bb-bbexttab. Is there a provision for this type of thing in Hobbit?
Set them up as tasks in hobbitlaunch.cfg .
NB: The environment variables provided by Hobbit to a script is not quite the same as that which BB provides. Some BB extensions use environment variables for some commands, e.g $GREP instead of grep. Hobbit does not set this up by default, so you should check what your scripts expect, and if necessary add the extra environment variables to hobbitserver.cfg (or change the script).
Just wondering if there is a reason for this?
Personally, whenever writing ext scripts, I always made an effort to call all the various utilities like sed/grep/etc as ${SED}/${GREP}/etc. This, I figured saved everyone from editing the ext script for each
I would assume it would be owner's responsibility to make their script, be it shell/perl or something else, as portable as possible. Assuming, you rather depend on the environment for your script to work, switching from BB environment to HOBBIT environment you get a lot more performance and flexibility gain compare to the lose of enviroment variables.
Such a small loss for such a huge gain, you do the math. Now if you still want your scripts to work just follow what Henrik said and add those variables to hobbitserver.cfg file.
Thanks
platform they needed to run it on (assuming it is either being shared on deadcat, or else being used across multiple OS's.... Even different releases of linux use different paths.
It would seem a shame to need to make all these scripts *more* specific...
PS, I haven't yet had a chance to install hobbit, so perhaps I am missing something really obvious... It sounds great, and once it is released, I'm sure I will install and use it.
Regards, Adam
--
Adam Goryachev Website Managers Ph: +61 2 8304 0000 adam at websitemanagers.com.au Fax: +61 2 9345 4396 www.websitemanagers.com.au
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu "...it said: Install Windows XP or better...so I installed Solaris..."
On Tue, Feb 15, 2005 at 09:32:02AM +1100, Adam Goryachev wrote:
On Mon, 2005-02-14 at 22:59 +0100, Henrik Stoerner wrote:
NB: The environment variables provided by Hobbit to a script is not quite the same as that which BB provides. Some BB extensions use environment variables for some commands, e.g $GREP instead of grep. Hobbit does not set this up by default, so you should check what your scripts expect, and if necessary add the extra environment variables to hobbitserver.cfg (or change the script).
Just wondering if there is a reason for this?
Sure is.
Finding the commands to go with those environment variables is tricky, since some implementations hide the useful ones in odd places. E.g. have you ever tried getting the wrong "id" command on Solaris ? The useful one is /usr/xpg4/bin/id, not /bin/id (which doesn't know about all those options I take for granted because I'm spoilt by GNU software).
Just an example ... don't get me started on /usr/ccs/bin or /usr/ucb/bin or the horrors in /opt :-(
Since Hobbit doesn't use those commands *at all* - the only shell scripts in Hobbit are the wrappers to set up environments for the CGI scripts - it would be a lot of effort with no benefit to Hobbit.
And really, most of the BB extensions really are client-side scripts. They'll run just fine as extensions to the BB client. Hobbit is a server-side replacement (yes, I know there are thoughts and plans and even some code for a Hobbit client, but that's some time into the future), so the number of scripts that are bitten by this is fairly small, I think.
It would seem a shame to need to make all these scripts *more* specific...
Just add the needed ones to hobbitserver.cfg - it might be as simple as
SED=sed GREP=grep AWK=awk CAT=cat TR=tr
to make them work and just use whatever is in the PATH.
Regards, Henrik
On Tue, 2005-02-15 at 00:09 +0100, Henrik Stoerner wrote:
On Tue, Feb 15, 2005 at 09:32:02AM +1100, Adam Goryachev wrote:
On Mon, 2005-02-14 at 22:59 +0100, Henrik Stoerner wrote:
NB: The environment variables provided by Hobbit to a script is not quite the same as that which BB provides. Some BB extensions use environment variables for some commands, e.g $GREP instead of grep. Hobbit does not set this up by default, so you should check what your scripts expect, and if necessary add the extra environment variables to hobbitserver.cfg (or change the script).
Just wondering if there is a reason for this?
Sure is.
Finding the commands to go with those environment variables is tricky, since some implementations hide the useful ones in odd places. E.g. have you ever tried getting the wrong "id" command on Solaris ? The useful one is /usr/xpg4/bin/id, not /bin/id (which doesn't know about all those options I take for granted because I'm spoilt by GNU software).
Yes, going from Linux to solaris was..... fun <?> same for linux -> *BSD, though maybe not so bad. I very much missed by GNU software :)
Just an example ... don't get me started on /usr/ccs/bin or /usr/ucb/bin or the horrors in /opt :-(
Yep....
Since Hobbit doesn't use those commands *at all* - the only shell scripts in Hobbit are the wrappers to set up environments for the CGI scripts - it would be a lot of effort with no benefit to Hobbit.
Yep, I begin to see...
And really, most of the BB extensions really are client-side scripts. They'll run just fine as extensions to the BB client. Hobbit is a server-side replacement (yes, I know there are thoughts and plans and even some code for a Hobbit client, but that's some time into the future), so the number of scripts that are bitten by this is fairly small, I think.
This I suppose is the real reason.... ie, it doesn't matter *most* of the time....
It would seem a shame to need to make all these scripts *more* specific...
Just add the needed ones to hobbitserver.cfg - it might be as simple as
SED=sed GREP=grep AWK=awk CAT=cat TR=tr
to make them work and just use whatever is in the PATH.
Are these defined once for all ext scripts, or once for each ext script? Can they be sourced (. /foo.bar)? It would be interesting if we could take these file location definitions from BB, but maybe even that small amount of data is copyright/license infringing/something...
Perhaps all those ext scripts I wrote should start with something like: if [ ! -x ${GREP} ] then if [ ! -x grep ] then COLOR=red LINE="grep binary not found and env variable GREP not executable (${GREP})" else GREP=grep fi fi
or something similar....
Mostly, as you said, this will affect the clients more.... so, for now, I will just keep quiet.
Regards, Adam
--
Adam Goryachev Website Managers Ph: +61 2 8304 0000 adam at websitemanagers.com.au Fax: +61 2 9345 4396 www.websitemanagers.com.au
On Tue, Feb 15, 2005 at 10:44:37AM +1100, Adam Goryachev wrote:
On Tue, 2005-02-15 at 00:09 +0100, Henrik Stoerner wrote:
Just add the needed ones to hobbitserver.cfg - it might be as simple as
SED=sed GREP=grep AWK=awk CAT=cat TR=tr
to make them work and just use whatever is in the PATH.
Are these defined once for all ext scripts, or once for each ext script? Can they be sourced (. /foo.bar)?
Hobbit has a "master program" called "hobbitlaunch" which takes care of running the various tasks at scheduled intervals. It also sets up all of the environment variables defined in the configuration file hobbitserver.cfg - bbgen (which is part of Hobbit) still uses quite a few. So if we decide to add these command variables to the setup, then the scripts can generally assume that they are defined.
I did actually try running the standard BB client from hobbitlaunch, i.e. without any of the setup that is normally done by bbdef.sh and friends. There were about 75 variables that had to be defined.
Mostly, as you said, this will affect the clients more.... so, for now, I will just keep quiet.
Please don't, I do appreciate your input. I have my own ideas about how to use Hobbit, but there's an immense body of experience in the BB community that Hobbit can benefit from. If this project is going to succeed, then I need all of the bright ideas I can get - so the feedback here is essential.
Regards, Henrik
participants (4)
-
adam@websitemanagers.com.au
-
henrik@hswn.dk
-
iqbala-hobbit@qwestip.net
-
Kevin.Hanrahan@novainfo.com