I've been working for a little while on automating deployments in our environment. Up to this point we've had to manually deploy applications. What i'm struggling with right now is the mapModulesToServers option for AdminApp.install, but first a little topology. Our environment has the following:
Websphere Application Server ND 8.0.0.6
1 Dmgr
2 Application server nodes
2 Webserver nodes (IHS on remote server)
Right now I make heavy use of the built in scripting libraries, they've been very very useful so far. This is what i'm able to do now given and ear file and a user ID (all our jvm's run as different users) is this:
-confirm the application doesn't exist.
-create a cluster for the application
-create a cluster member on each application server node
-deploy the application to the cluster using this method AdminApplication.installAppWithClusterOption(args)
This successfully deploys the application to a newly created cluster. However what it does not do is update the plugin on our webservers with the mappings it needs to forward request through to the application servers.
So in light of that i've made a copy of the AdminApplication library and am trying to edit the installAppWithClusterOption method to fit my needs. I'm going for something like this:
webServer1="WebSphere:cell=,node=,server="
webServer2="WebSphere:cell=,node=,server="
mapCluster=[appName+"App",appName+".war,WEB-INF/web.xml WebSphere:cell=,cluster="+clusterName+"+"+ webServer1+"+"+webServer2]
mapServerOpt=["-MapModulesToServers "+ mapCluster]
opts=mapServerOpt
opts+=["-appname",appName]
AdminApp.install(earFile,opts)
Naturally this isn't working like i'd hoped. If anyone is able to point out the obvious problem with this please do so. Thanks in advance.