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:
- Processing installation options
After your application file has been uploaded, the installation options are read in, processed, and written to your installedApps directory:
- Saving deployment metadata
At this point, the install process stores the EAR file in the following directory:
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:
- Updating serverindex.xml
The serverindex.xml file is updated to reflect which application server the application will be deployed to:
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">
- Updating the configuration with the application binding files
The application binding files are placed under the following directory:
- Expanding the full application
The expansion of the EAR file is when the application binaries are finally extracted to the following directory:
- 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:
- The serverindex.xml file is updated to reflect your newly installed application:
- Application binaries get expanded, as well as all the attribute information: