WSADMIN - MappingModulesToServers

RishiBang
RishiBang used Ask the Experts™
on
Hi,

I am need to develop a wsadmin script that will take a earfile as a parameter and deploys on a WAS6.1 base server. (Installing app + Mapping to all the modules to available servers)

I have used the sample script given along with the Wsadmin Using Jython book. I am executing the script using WebSphere Application Server Toolkit v6.1

The example has the code to install the app but it doesn't map any modules to servers.

So I am trying to change the code to map the modules to servers.

But I am getting an error that I couldn't manage.

I have attached both the script I have used and the wsadmintraceout that contains the error.

I request WebSphere experts to help me in this.


Thanks,
Rishi     InstallEntAppPY.txt wsadmintraceout.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
HonorGodSoftware Engineer

Commented:
What command line parameters were specified?
HonorGodSoftware Engineer
Commented:
Rereading the question makes me wonder if you have done any work at all on the script.

It sounds like you are talking about creating a script from scratch.  Is that right?

If so, you might want to take a look at this developerWorks article:

Scripting from scratch: Creating a Jython administrative script for IBM WebSphere Application Server
http://www.ibm.com/developerworks/websphere/library/techarticles/1004_gibson/1004_gibson.html

Have you done any testing of using wsadmin to work with applications?

Author

Commented:
Hi HonorGod,

I have already mentioned that I have not developed the script from scratch.

I have taken the example from "WebSphere Admin Using Jython" book.

But when I ran that script(Against WAS61 runtime) it is only installing the application and its mapping the app modules to server1 by default

My requirement is to map the app to all the modules (including another servers and web server definitions)

So I have modified the script where AddminApp.install(ear) called to the following syntax

AdminApp.install(ear,['-MapModulesToServers',[['.*','.*.war,.*', '.*.jar,.*','WebSphere:cell=cellName,node=nodeName,server=MyAppSrvServer1'],['.*','.*.war,.*', 'WebSphere:cell=cellName,node=nodeName,server=webserver1']]])

The above syntax I got from the Info center. But its not working for me

Yes I am not an expert on wsadmin as I have just started learning it.

Thanks,
Rishi
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

HonorGodSoftware Engineer

Commented:
Sorry, I missed that information. :-(

I hope that you like the book.

Was there a specific script from the book with which you were working?

Author

Commented:
Yes HonorGod,

There is an installApp.py Srcipt in the book examples which is developed by the author to install the application.

The script will take a single or multiple ear files and installs to the running server.

Thanks,
Rishi
Software Engineer
Commented:
Great.  I presume that you were able to get the WAuJ.py profile script working with it so that the WAuJ_utilities are available...

Have you made any changes to the script, or is that what you are trying to do?
(i.e., figure out how to change it to suit your needs)?

The important options for installing / deploying an application are described in this Information Center page:
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rxml_taskoptions.html

Author

Commented:
Thanks to HonorGod for his inputs
HonorGodSoftware Engineer

Commented:
Is there any particular reason for the grade of B?

Good luck & have a great day.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial