The Monitored Directory Deployment feature in WebSphere Application Server 8.5 is very convenient to use for deploying or updating applications in the cloud. Once set up, applications can be updated simply by copying to the monitored directory by secure copy (SCP). The advantages over using the WebSphere Integrated Solutions Console (ISC) are that you do not need open ports in addition to port 22 and the update can be easily scripted with generic file manipulation commands. To enable Monitored Directory Deployment in ISC go to Global Deployment Settings | Monitored Directory Deployment, as shown below.
Configuring Monitored Directory Deploy in the WebSphere ISC
Save and restart the application server. A directory will be created at <install_root>/Profiles/AppSrv01/monitoredDeployableApps. Copy the ear to be deployed from the source marchine to the WebSphere server by SCP. The format of the SCP command is
> scp -i <key_file> <local_source_file> idcuser@<vm_host_name>:<target_file>
The command format is the same for both OpenSSH and WinSCP.
The file will be owned by idcuser after copying with SCP but the WebSphere user will be different. By default the WebSphere user is virtuser. On the WebSphere server machine change file owner and copy the file to the
monitored directory with the commands below (for Linux, use similar commands on Windows)
$ sudo chown virtuser:users migrationEAR.ear
$ sudo mv migrationEAR.ear Profiles/AppSrv01/monitoredDeployableApps/servers/server1/.
Shortly afterwards the application will be deployed and you will see it as a WebSphere enterprise application, as shown below.
Newly deployed application in the ISC
My application is called migrationEAR.
Other ways of updating a WebSphere application including using the administrative console (ISC), writing JACL or Jython scripts or using a Rational tool. Of these different approaches I think that the monitored directory approach is the
simplest and most appropriate for the cloud.
The views in this blog are my own.