Deploying applications using WLST

This recipe will show you how to deploy/undeploy applications using WLST online mode.

As an example, we will deploy the sampleApp application located at c:\home\sample and create a default deployment plan for it:

progress= deploy(appName='sampleApp',path='c:/home/sample',createplan='true')

The above command will return a WLSTProgress object. You can then use the progress variable to print the status of the deploy command. For example:

wls:/mydomain/serverConfig/Servers> progress.printStatus()

    Current Status of your Deployment:

    Deployment command type: deploy

    Deployment State       : completed

    Deployment Message     : null

The next command, removes the sampleApp application from all target servers. WLST waits 60,000 ms for the process to complete:

wls:/mydomain/serverConfig> undeploy('sampleApp', timeout=60000)


Francesco Google+