0

I want to deploy to all four processes on a Websphere cluster with two nodes. Is there a way of doing this with one Jython command or do I have to call 'AdminControl.invoke' on each one?

2 Answers 2

3

Easiest way to install an application using wsadmin is with AdminApp and not AdminControl.

I suggest you download wsadminlib.py (Got the link from here)

it has a lot of functions, one of them is installApplication which works also with cluster.

Edit:

Lately I found out about AdminApplication which is a script library included in WAS 7 (/opt/IBM/WebSphere/AppServer/scriptLibraries/application/V70)

The docuemntation is not great in the info center but its a .py file you can look inside to see what it does.

It is imported automatically to wsadmin and you can use it without any imports or other configuration.

Worth a check.

1
  • As Aviram Segal mentioned AdminApp should be object that is used for Application manipulation (install, uninstall, update etc). Also there isn't a big difference between installing things on a cluster vs a single server.
    – Manglu
    Jun 14, 2012 at 2:33
1

@aviram-segal is right, wsadminlib is really helpful for this. I use the following syntax:

    arg = ["-reloadEnabled", "-reloadInterval '0'", "-cell "+self.cellName, "-node "+self.nodeName, "-server '"+ self.serverName+"'", "-appname "+ name, '-MapWebModToVH',[['.*', '.*', self.virtualHost]]]
    AdminApp.install(path, arg)

Where path is the location of your EAR/WAR file. You can find documentation here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.