ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » deploying bar files

Post new topic  Reply to topic Goto page 1, 2  Next
 deploying bar files « View previous topic :: View next topic » 
Author Message
mqwbiwf
PostPosted: Wed Mar 03, 2010 9:27 am    Post subject: deploying bar files Reply with quote

Centurion

Joined: 21 Jul 2006
Posts: 126

Hi all,

We have our message broker v6.1.0.5 deployed on a AIX server. Our developers check in the code to a repository different windows server. We are planning to automate the process of 'deploying' bar files.

From my research so far, I see that this is possible by running the mqsideploy command from the cvs server and schedule it as necessary? But I didn't understand how to automatically insert the

"-e --executionGroupName--+- -a --BARFileName" strings to automate this process of deployment. Because these vary for each bar file.

Could someone guide me how to achieve this?

Thanks!
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Mar 03, 2010 9:31 am    Post subject: Re: deploying bar files Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqwbiwf wrote:
Could someone guide me how to achieve this?


Well the bar file name doesn't have to change, and if it does it changes to whatever the create process calls it. If you're automating the deploy why not automate the build and enforce a name?

As to the EG name, it's a limited list of possible targets and not especially dynamic. There are a number of ways you could source them.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqwbiwf
PostPosted: Wed Mar 03, 2010 9:59 am    Post subject: Reply with quote

Centurion

Joined: 21 Jul 2006
Posts: 126

Thanks Vitor, but in our case we would like to automate just the "deploy" process alone. And we have a standard to create one BAR file per message flow (for the sake of rollback if necessary).

So, we have more than 100 bar files saved in the repository distributed across 10 execution groups. Assuming we create one script to deploy per execution group, we will have 10 different scripts that we can schedule as required. The question now will be how to pull the BAR file names and insert automatically into the string. Is there a way to do that without actually building the bar files?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Mar 03, 2010 10:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqwbiwf wrote:
Thanks Vitor, but in our case we would like to automate just the "deploy" process alone. And we have a standard to create one BAR file per message flow (for the sake of rollback if necessary).


But if you're rolling back you're either removing the errant flow from the execution group (which is done by flow name) or by redeploying the old version of the bar file (which if I've understood you correctly would have the same name as the new bar file)

mqwbiwf wrote:
So, we have more than 100 bar files saved in the repository distributed across 10 execution groups. Assuming we create one script to deploy per execution group, we will have 10 different scripts that we can schedule as required. The question now will be how to pull the BAR file names and insert automatically into the string. Is there a way to do that without actually building the bar files?


If the bar file objects are in the repository, then a simple list of names is all you need. Remember the deploy command is just that, an OS command, so some simple script will lift the name and add it as a parameter.

Answering the question I think you might be asking, there's no WMB facility where you can specify -e #include<EG Name> -b #include<BAR file name> and the deploy command replaces the place holder.

CVS might have some facilities to help with that if the scripts are in CVS as well. Likewise you should be able to use ANT to automate some of the script building even if you're not using ANT to actually build the bar files.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Mar 03, 2010 10:10 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have ALL the deploy commands in a text file(which can be under source control) and as this is running on Unix, just a nifty bit of shell scripting would give you the result you want.

it is not complicated shell scripting but is in my experience not the sort of thing most broker developers get involved with.
If fact, some dev's I have worked with groan and contact admin their teeth when I constantly drop to do things on the commnd line. Hey, it get things done.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
jlaisbett
PostPosted: Wed Mar 03, 2010 12:04 pm    Post subject: Reply with quote

Apprentice

Joined: 27 Nov 2009
Posts: 39

What we have done in the past which may give you ideas was done using ant scripts and ant-contrib. I don't know if you are actually using ant or not though.

It would loop through all the files in a directory using ant-contrib tasks and then call a common task with the file as the input, i.e. the BAR file. It doesn't know the names of the files ahead of time but can call a common task such as mqsideploy to actually deploy each bar file and insert the bar name as a parameter into the command.

In addition we had a property file that lists what execution groups each bar should be deployed to by name, it checks the property to use based on BAR name.

Now the second part really only works if you have a list of BARs and what execution groups they should go to but in our case it means adding support for new BARs is simply a process of adding a new entry to the property file.

We aren't using these quite like this anymore as we've moved onto different processes that are somewhat more complicated but it might give you ideas.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 03, 2010 12:35 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

For automated deployment we have a script.
You drop the bar files to be deployed in a directory. The directory path is being specified as a parameter to the script. All bar files in said directory will be deployed.

The script uses a function to attribute an eg to the bar file. It then deploys the file. Output can be redirected and grep'd so that you can alert if there was a problem...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rcp_mq
PostPosted: Wed Jan 04, 2012 8:40 am    Post subject: Reply with quote

Centurion

Joined: 13 Dec 2011
Posts: 133

Please don't consider this necroposting as i've come to this after a lot of research. @jlaisbett would you mind sharing your new solution(s) for automating bar file deployment.
Back to top
View user's profile Send private message
kash3338
PostPosted: Wed Jan 04, 2012 9:17 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Cant you try using the Java CMP API for automating the deployment? Its far more better and makes the work easier in your case than using the mqsi commands.

Using Java you can achieve all that you wish and also you can use a properties file and read from that in your code.
Back to top
View user's profile Send private message Send e-mail
lancelotlinc
PostPosted: Wed Jan 04, 2012 9:32 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

rcp_mq wrote:
Please don't consider this necroposting as i've come to this after a lot of research. @jlaisbett would you mind sharing your new solution(s) for automating bar file deployment.


The Ant code is specific to your company, so I'm not sure people want to post their company-specific Ant code.

If you are not familiar with Ant, find an Ant developer to help you.

Did you read the developerWorks article ? Its still fairly current (could use some updating).

Essentially, create an Ant xml file that is driven by an Ant properties file. Took me 1 hour. Cut & paste for second bar. Cut & paste for third bar. Easy to do...
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
lancelotlinc
PostPosted: Wed Jan 04, 2012 9:33 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

kash3338 wrote:
Cant you try using the Java CMP API for automating the deployment? Its far more better and makes the work easier in your case than using the mqsi commands.

Using Java you can achieve all that you wish and also you can use a properties file and read from that in your code.


I would have to say that Ant is much better suited to this task than Java/CMP API. Besides, you want the Build Engineer / Sys Admins to take over the deploy process.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Jan 04, 2012 10:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lancelotlinc wrote:
Essentially, create an Ant xml file that is driven by an Ant properties file. Took me 1 hour. Cut & paste for second bar. Cut & paste for third bar. Easy to do...


Why would you possibly create a specific build file for a specific bar file? Much easier to write a single ant file that takes the necessary bar specific information in properties files. Or is it the properties file that you're cut and pasting? not clear from your wording.

There's a devWorks article that provides a sample set of Ant Tasks that will do nice things like run mqsicreatebar, mqsiapplybaroverride and mqsideploy.

http://www.ibm.com/developerworks/websphere/library/techarticles/0706_spriet/0706_spriet.html

it's nominally a bit out of date, but the ant tasks are still relevant.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Jan 04, 2012 10:39 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

For my Ant script, I have ten Bar files that are each a target within the one Ant script. The Ant script's logic is driven by values from a properties file for each Bar file target.

This saves having to regression test the Ant script's logic when you just want to make cosmetic changes to files names, etc.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Jan 04, 2012 10:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lancelotlinc wrote:
For my Ant script, I have ten Bar files that are each a target within the one Ant script. The Ant script's logic is driven by values from a properties file for each Bar file target.

This saves having to regression test the Ant script's logic when you just want to make cosmetic changes to files names, etc.


"cosmetic changes to file names, etc" is PROPERTIES CHANGES not SCRIPT CHANGES.

You should not have to alter any part of the actual Ant xml file, if you have written it correctly, to build any of your bar files.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Jan 04, 2012 10:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Yes, you are korek.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » deploying bar files
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.