CLI scripts on the server

Alan Santos alan.santos at redhat.com
Thu Jan 6 16:23:44 UTC 2011



On 1/6/11 9:08 AM, John Mazzitelli wrote:
> The one big thing we have to answer is - where do we store the script?

Are you speaking about storing the script, or a pointer to the script?  
if the former,
my opinion is that scripts should be stored where scripts are generally 
stored - on the file system.

Storing a complex / non-atomic data structure in an rdbms column abuses 
the relational paradigm,  dramatically limits the system transparency  
and adds more overall complexity to management and tooling than 
necessary.  Perhaps there are specific implementation constraints given 
the existing codebase that I'm not aware of, but my vote would be to 
store less in a database, not more.  If you need specific functionality 
- e.g. queryable content - then I believe something like modeshape can 
do that for you on top of a file system.


-alan

> Because right now, you can't use a simple configuration property to
> store it - our<simple-property>  values can only store,at most, 4K
> characters. Too limiting to expect all CLI scripts to fit.
>
> We'd have to write a special agent plugin (just like our Users and Roles
> server-side agent plugins), and have that plugin store the script in
> some other special table that has a CLOB column in which to store the
> script.
>
> On 01/06/2011 07:38 AM, Lukas Krejci wrote:
>> Hi all,
>>
>> I'm writing this to turn your attention to a new feature that is (hopefully)
>> going to appear in RHQ 4 and that I think can have a large potential for
>> further improvements in the future (or maybe even in scope of RHQ 4).
>>
>> The feature is described in the BZ
>> https://bugzilla.redhat.com/show_bug.cgi?id=667290  and is about adding the
>> ability to execute a CLI script on the server side as a reaction on an alert
>> (i.e. this is going to become a new alert plugin).
>>
>> But thinking about this some more, I think that this could become a way of
>> providing custom functionality to the RHQ server UI by the users themselves.
>> Actually, this is something me and Filip talked about at the time the CLI
>> concept was being developed but we never got round to even formulate the ideas
>> and bring them forward to the team. I'm sure most of us have had similar ideas
>> but the backlog of the tasks was just too big for them to bubble up to the
>> attention :)
>>
>> Obviously, we'd need to flesh out the security implications but at the same
>> time I don't think there's much more to decide security wise than what user
>> will the script run as and whether the CLI will have only access to remote
>> interfaces even if running on the server or if we are going to let it use the
>> full local interface.
>>
>> Anyways, having the ability to run custom CLI directly on the server would
>> enable us to do things like:
>>
>> 1) execute CLI script as an alert notification (huh? ;) ) - what user would
>> this script run as?
>> 2) Have CLI UI - a commandline interface in the browser for people that don't
>> click
>> 3) Let the user create their own custom scripts and expose them somewhere in
>> the UI as single click actions. These could be global or maybe even per
>> resource/group, where the resource/group object could be injected in the scope
>> of the script automatically.
>> 4) ...
>>
>> Wrt. 3), to an extent we kind of did something like that already with the GWT
>> user interface I guess. But I don't know GWT enough to guess whether there is
>> even a remote chance of writing a "user-friendly" API that would interface
>> with our GWT services and if there is a possibility to later execute such
>> scripts client-side using something like eval("The user wrote this script;");
>>
>> What are your thoughts? What aspects of the server should be scriptable?
>>
>> Cheers,
>>
>> Lukas
>> _______________________________________________
>> rhq-devel mailing list
>> rhq-devel at lists.fedorahosted.org
>> https://fedorahosted.org/mailman/listinfo/rhq-devel
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
>
> -- 
> Alan Santos
> Sr. Product Manager
> Red Hat, JBoss Middleware BU
> 617.818.7735
> alan.santos at redhat.com




More information about the rhq-devel mailing list