RHQ & Powershell

Stefan Negrea snegrea at redhat.com
Wed Mar 27 14:45:12 UTC 2013


Hello Mike, 

I was expecting answers more along the lines of technical merits of PowerShell and the current state of the Batch scripts in RHQ. I did not want to provide more background because I wanted to get unbiased opinions on the merits of the technology itself.

While my email might looks random, it is very specific to the work that is currently in progress for the metrics storage system. Looking ahead, we plan to have a single control script to start/stop/manage all RHQ components. For *nix systems that is fairly easy to accomplish in bash. However, it would be impossible to do it in Batch because it's just not equipped to handle the kinda of logic needed; batch is very primitive. 

There are two options to accomplish this control script. First, drop/limit bash from *nix systems, drop/limit batch from Windows, and move everything to a Java program. This is not going to be your typical Java code but more of a system calls, file parsing, config updating, process monitoring program. Not optimal because we will have OS specific code in the program and there will be a single program across all platforms.

The second option (and this is what prompted my email) is to keep bash on *nix and migrate to Powershell on Windows. Powershell is the only option to get some feature parity for scripting on Windows. Of course this migration could be done strategically, and not everything at once. We could write new scripts in Powershell and migrate the old scripts over time. 


Any thoughts? Any thoughts about PowerShell in general (my original email)?


Stefan Negrea


----- Original Message -----
> From: "Michael Foley" <mfoley at redhat.com>
> To: rhq-devel at lists.fedorahosted.org
> Sent: Tuesday, March 26, 2013 4:13:59 PM
> Subject: Re: RHQ & Powershell
> 
> 
> 
> I guess the saying "If it ain't broke, why fix it?" comes to mind.
> Or, put another way ... the risk/reward ratio seems like division by
> 0. All risk, and no reward.
> 
> 
> Another way of looking at this is cost/benefit ratio. The costs here
> are both development time refactoring, as well as QE time retesting.
> And ... at risk of sounding pessimistic ... the GSS time in dealing
> with new customer issues in this area.
> 
> 
> Sounds like a cool idea ... but it doesn't make sense to me. I don't
> know what problem you are trying to solve, or what additional
> customer-facing value you are trying to deliver.
> 
> 
> I am -1 on this idea unless a stronger case can be made.
> 
> 
> Michael Foley
> QE Lead, JBoss Operations Network
> 
> 
> 
> 
> 
> From: "Stefan Negrea" <snegrea at redhat.com>
> To: "rhq-devel" <rhq-devel at lists.fedorahosted.org>
> Sent: Tuesday, March 26, 2013 5:02:21 PM
> Subject: RHQ & Powershell
> 
> Hello Everybody,
> 
> 
> The current RHQ Windows scripts use Batch. While this works out of
> box on all Windows versions, the scripts are quite complicated and
> very brittle. For the past few years Microsoft built Powershell to
> replace Batch. With Windows 7 PowerShell got integrated in Windows;
> and for older versions (eg. XP, Vista, Server 2003) Powershell can
> be easily installed. As far as I know, it's just a program that runs
> on .Net framework.
> 
> Here is the official Microsoft tutorial for Powershell:
> http://technet.microsoft.com/en-us/library/cc196356.aspx
> 
> 
> Should we consider migrating current Windows Batch scripts to
> PowerShell?
> 
> 
> Thank you,
> Stefan Negrea
> 
> Software Engineer
> 
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> 
> 
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> 


More information about the rhq-devel mailing list