cnu123
asked on
Jython script to automate websphere deployment
I am trying to develop a jython script to automate the websphere deployment. I am trying to deploy to a cluster with two nodes. I was able to stop, uninstall and start cluster. but my 'install' step is not working. I have another script to stop the cluster.so this is performed after stopping the cluster. Here is my install step I am using in my script:
print AdminApp.install[apppath, '[-appname '+appfile+' -cell '+cell+' -cluster '+cluster+' -MapModulesToServers '+map_modules_cluster+' -MapWebModToVH '+map_modules_vh+']']
map_modules_cluster='[ sample.war Sample.war,WEB-INF/web.xml WebSphere:cell=HostnameCel l01,cluste r=AdminClu ster+WebSp here:cell= HostnameCe ll01,node= HostnameNo de01,serve r=webserve r1]'
map_modules_vh=default_hos t
WASX7209I: Connected to process "dmgr" on node PWCellManager01 using SOAP connector; The type of process is: Deploy
mentManager
Getting Cell Name ..
Cell name is --> PWCell01
########################## ########## ########## ########## ########## #####
-------------------------- ---------- ---------- ----
Application--->DefaultAppl ication.ea ris installed on cluster-->AccessMgmtCluste r
-------------------------- ---------- ---------- -----
uninstalling application -->DefaultApplication.ear
ADMA5017I: Uninstallation of DefaultApplication.ear started.
ADMA5104I: The server index entry for WebSphere:cell=PWCell01,no de=PWNode0 1+WebSpher e:cell=PWC ell0
1,node=PWNode01 is updated successfully.
ADMA5102I: The configuration data for DefaultApplication.ear from the configuration repository is deleted successfully.
ADMA5011I: The cleanup of the temp directory for application DefaultApplication.ear is complete.
ADMA5106I: Application DefaultApplication.ear uninstalled successfully.
-------------------------- ---------- ---------- -----
application uninstalled --
-------------------------- ---------- ---------- ------
Installing App on cluster -->AccessMgmtCluster
WASX7017E: Exception received while running file "clusterinstall.py"; exception information: com.ibm.bsf.BSFException: except
ion from Jython:
Traceback (innermost last):
File "<string>", line 35, in ?
AttributeError: __getitem__
Thank you
print AdminApp.install[apppath, '[-appname '+appfile+' -cell '+cell+' -cluster '+cluster+' -MapModulesToServers '+map_modules_cluster+' -MapWebModToVH '+map_modules_vh+']']
map_modules_cluster='[ sample.war Sample.war,WEB-INF/web.xml
map_modules_vh=default_hos
WASX7209I: Connected to process "dmgr" on node PWCellManager01 using SOAP connector; The type of process is: Deploy
mentManager
Getting Cell Name ..
Cell name is --> PWCell01
##########################
--------------------------
Application--->DefaultAppl
--------------------------
uninstalling application -->DefaultApplication.ear
ADMA5017I: Uninstallation of DefaultApplication.ear started.
ADMA5104I: The server index entry for WebSphere:cell=PWCell01,no
1,node=PWNode01 is updated successfully.
ADMA5102I: The configuration data for DefaultApplication.ear from the configuration repository is deleted successfully.
ADMA5011I: The cleanup of the temp directory for application DefaultApplication.ear is complete.
ADMA5106I: Application DefaultApplication.ear uninstalled successfully.
--------------------------
application uninstalled --
--------------------------
Installing App on cluster -->AccessMgmtCluster
WASX7017E: Exception received while running file "clusterinstall.py"; exception information: com.ibm.bsf.BSFException: except
ion from Jython:
Traceback (innermost last):
File "<string>", line 35, in ?
AttributeError: __getitem__
Thank you
Are you still looking for an answer to this question? Can you attach the script to the question? The code you posted and the output it generated don't match up. It would be helpful to see the whole script.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
script is working