microsoft / vsts-ibm-websphere-extension

VSTS Extension to integrate with IBM WebSphere Application Server
Other
8 stars 16 forks source link

Prerequisites can have more information - use of wsadmin scripting-library #24

Open david-low opened 2 years ago

david-low commented 2 years ago

This extension makes use of wsadmin-scripting-library. Such as "AdminNodeManagement.syncActiveNodes()"

I originally built a wsadmin thin client

That is enough to pass the recommended precheck: wsadmin.sh -conntype SOAP -host <your_websphere_hostname> -port <your_websphere_SOAP_port> -username <your_username> -password <your_password> -c AdminControl.getNode\(\)

However when I attempted to deploy to a cluster. The commands generated make use of the wsadmin-scripting-library wsadmin.bat -username *** -password *** -host HOST-SERVER -port 8881 -conntype SOAP -c "AdminApp.install('D:/agent_work/app.ear', '[-appname APP-NAME -cluster APP_Cluster -MapWebModToVH [[""app.war"" ""app.war,WEB-INF/web.xml"" ""default_host""]] -contextroot appRoot ]'); AdminConfig.save(); AdminNodeManagement.syncActiveNodes(); AdminApplication.startApplicationOnCluster('APP-NAME', 'APP_Cluster');""

This would actually give me an error WASX7015E: Exception running command: "AdminApp.install('D:/agent_work/app.ear', '[-appname APP-NAME -cluster APP_Cluster -MapWebModToVH [[""app.war"" ""app.war,WEB-INF/web.xml"" ""default_host""]] -contextroot appRoot ]'); AdminConfig.save(); AdminNodeManagement.syncActiveNodes(); AdminApplication.startApplicationOnCluster('APP-NAME', 'APP_Cluster');"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback (most recent call last): File "<input>", line 1, in <module> NameError: name 'AdminNodeManagement' is not defined

I resolved this by copying the app_server_root/scriptLibraries into my wsadmin thin client

Improve the Prerequisites information by highlighting the use of wsadmin-scripting-library and/or adding another precheck wsadmin.sh -conntype SOAP -host <your_websphere_hostname> -port <your_websphere_SOAP_port> -username <your_username> -password <your_password> -c AdminNodeManagement.listNodes()