Thursday, May 3, 2018

monitoredDeployableApps: Install application with customized properties

https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/trun_app_install_dragdrop_prop.html#trun_app_install_dragdrop_prop__enh

Trouble shooting wsadmin: http://www-01.ibm.com/support/docview.wss?uid=swg21140940

Step 1
Extract application properties to a file that uses the old application output format.

wsadmin> AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Deployment=MyApplication -options [[SimpleOutputFormat true]]]')


Step 2

Use the Global deployment settings page of an administrative console to set monitored directory values.
  1. Click Applications > Global deployment settings.
  2. To enable monitored directory deployment, select Monitor directory to automatically deploy applications.
    To disable monitored directory deployment, clear Monitor directory to automatically deploy applications.
  3. To change the monitored directory path, specify a new value for Monitored directory.
    Ensure that the directory that you specified for Monitored directory exists. The product does not create the directory for you.
  4. To change the polling interval, specify the number of seconds for Polling interval.
  5. Click Apply.
  6. If you are using an administrative console for a base (stand-alone) application server to change monitored directory values, restart the application server.
    If you are using an administrative console for a deployment manager to change monitored directory values, restart the deployment manager.

Step 3
Customize Property file as below

# Header MapModulesToServers#ResourceType=ApplicationImplementingResourceType=ApplicationResourceId=Deployment=!{applicationName}##Properties# Below can be copied from properties file genereated in step 1taskName=MapModulesToServersrow1={ module=WeekendDataEJB.jar  #readonly       uri=WeekendDataEJB.jar,META-INF/ejb-jar.xml  #readonly       server=WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} }row0={ module=CommDataEJB.jar  #readonly       uri=CommDataEJB.jar,META-INF/ejb-jar.xml  #readonly       server=WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} }
# Properties## Header CtxRootForWebMod#ResourceType=ApplicationImplementingResourceType=ApplicationResourceId=Cell=!{cellName}:Deployment=!{applicationName}## Below can be copied from properties file genereated in step 1
taskName=CtxRootForWebModrow1={ webModule=myWebW  #readonly       uri=myWebW.war,WEB-INF/web.xml  #readonly       web.contextroot=weekend }row0={ webModule=myWebGrant  #readonly       uri=myWebG.war,WEB-INF/web.xml  #readonly       web.contextroot=weekend/grant }
EnvironmentVariablesSection## Environment Variables#applicationName=myAppcellName=TestCell01nodeName=TestNode01serverName=server1
Step 4
Copy the property file into monitoredDeployableApps folder accordingly. If managed node, copy it into deployment manager domain; if it is standard application server, copy it to application server domain.

Verify the SystemOut.log if the process is initiated and finished. 

No comments:

Post a Comment