Technical Blog Post
Abstract
Know the flow when deploying your enterprise application on WebSphere Application Server
Body
When deploying your enterprise application, do you ever wonder where the EAR file is uploaded, or what directory it is extracted to? Maybe you are even unclear of when in the process the deployment metadata is read and where it is written to?. This blog post will take you through the flow of application deployment, and give you a high level overview of what happens during the deployment of your enterprise application.
Note: Before deploying your application, it is always recommended that you backup your master configuration. To back up your configuration, run the backupConfig command from the deployment manager (dmgr) profile_root/bin directory.
- Specifying the location of your enterprise application
Whether you are installing your application from the administrative console, or using the wsadmin tool, you will first need to specify the location of your application (EAR) file.
- Verifying if your application already exists
Before the install process begins, a check is run to see if the application already exists. If it does, you will not be able to proceed, and you will be prompted with the following message:
Application already exists in the configuration repository.
- Uploading your application
The install process begins by first uploading your application file (EAR) to a temp directory. If you are using the administrative console to install your application, wstemp is used as the temporary working directory. For example:
profile_root/wstemp/0/upload/app_name.ear
- Processing installation options
After your application file has been uploaded, the installation options are read in, processed, and written to your installedApps directory:
profile_root/installedApps
- Saving deployment metadata
At this point, the install process stores the EAR file in the following directory:
profile_root/config/cells/cell_name/applications/app_name.ear/
The install process also creates a deployment.xml file within this directory, which contains the deployment metadata, such as which application server each application module (for example, JAR or WAR) will be deployed to:
profile_root/config/cells/cell_name/applications/app_name.ear/deployments/app_name/deployment.xml
- Updating serverindex.xml
The serverindex.xml file is updated to reflect which application server the application will be deployed to:
profile_root/config/cells/cell_name/nodes/node_name/serverindex.xml
In the following excerpt from a serverindex.xml file, you can see the list of applications deployed to server1:
<serverEntries xmi:id="ServerEntry_1183122129640" serverName="server1" serverType="APPLICATION_SERVER">
<deployedApplications>isclite.ear/deployments/isclite</deployedApplications>
<deployedApplications>DefaultApplication.ear/deployments/DefaultApplication</deployedApplications>
<deployedApplications>ivtApp.ear/deployments/ivtApp</deployedApplications>
<deployedApplications>query.ear/deployments/query</deployedApplications>
<deployedApplications>SamplesGallery.ear/deployments/SamplesGallery</deployedApplications>
<deployedApplications>PlantsByWebSphere.ear/deployments/PlantsByWebSphere</deployedApplications>
<deployedApplications>ibmasyncrsp.ear/deployments/ibmasyncrsp</deployedApplications>
<deployedApplications>WebSphereWSDM.ear/deployments/WebSphereWSDM</deployedApplications>
- Updating the configuration with the application binding files
The application binding files are placed under the following directory:
profile_root/config/cells/cell_name/applications/app_name.ear/
- Expanding the full application
The expansion of the EAR file is when the application binaries are finally extracted to the following directory:
profile_root/installedApps
- Synchronizing across multiple nodes
Once you have saved the configuration, you begin synchronizing with the appropriate nodes in your cell. By synchronizing, the application is stored on each node, replicating the same changes made to the deployment manager. Your application is stored in 3 places on each node:- The application (EAR) and deployment metadata:
profile_root/config/cells/cell_name/applications/app_name.ear
- The serverindex.xml file is updated to reflect your newly installed application:
profile_root/config/cells/cell_name/nodes/node_name/serverindex.xml
- Application binaries get expanded, as well as all the attribute information:
profile_root/installedApps
- The application (EAR) and deployment metadata:
UID
ibm11081077