A Deployment is the mechanism that enables you to deploy one or more applications to multiple Tomcat instances or groups, and to undeploy them just as easily. This page describes the various tasks related to deployment.
2. Introduction
â—¦ A Deployment is the mechanism that enables you to deploy one or more
applications to multiple Tomcat instances or groups, and to undeploy
them just as easily. This page describes the various tasks related to
deployment.
â—¦ A Deployment is a grouping of applications you can deploy to servers or
groups.
3. Creating a Deployment
â—¦ To create the deployment:
â—¦ On the Deployments tab, click New Deployment and enter a unique name for this entity.
â—¦ Just beneath the Web Applications list, click
Add from Repository or
Upload New Version.
â—¦ Browse to the .war
file and click Open.
â—¦ For a new web
application, you can
edit the URL context
path by clicking
Advanced Options and
entering it in the Name
field.
â—¦ Edit version information
(optional).
â—¦ Click Add.
4. â—¦ To the right of the Web Applications list, select the target server or group for this
deployment.
â—¦ To the bottom right, click Save.
â—¦ The package now appears on the Deployments tab. If you saved the package without
deploying it, you can deploy it later by selecting its check box and clicking Deploy.
5. Uploading Applications
â—¦ There are three ways to upload applications (WAR files) into the
repository:
â—¦ Add an application manually when you are creating a deployment
(described below).
â—¦ Add applications directly into the repository using the Repository tab
(administrator permissions are required).
â—¦ When developing an application, upload it to the repository as part of the
build process using the Maven Publishing Plug-in.
6. Manual Application Upload
â—¦ To upload an application manually:
â—¦ When creating or editing a deployment on the Deployments tab, click Upload
New Application.
◦ Click Browse and navigate to the location of the application’s WAR file and
click Open to select it.
â—¦ Optionally, click the Advanced down arrow to specify a location, unique name,
and version for the application as you want it to appear in the repository.
â—¦ Click Add to add the application to the repository and include it in the
deployment.
7. Modifying a Deployment
â—¦ After you have created a deployment, you might want to modify some
of its details, including its applications, configuration files, or target
servers.
â—¦ To modify a deployment:
â—¦ On the Deployments tab, click the name of the deployment you want to
modify.
â—¦ Make the changes you want to the deployment, and then click Save to save
the changes without deploying the updated version yet (you can
click Deploy later), or click Deploy to save and deploy in one step.
8. Uploading a new web app
â—¦ To upload a new web application:
â—¦ On the Deployments tab, click the name of the deployment you want to
modify.
â—¦ Click on the green up arrow to the right of the web application you want to
replace.
â—¦ Browse to a the new .war file, click Open.
â—¦ Click Add to upload the new .war file.
â—¦ Click Save.
9. â—¦ The deployment is now updated, but appears with a yellow icon (for
unreconciled) until it is deployed.
10. Viewing History on a Deployment
â—¦ Each time you modify, deploy, or undeploy, a new version of the deployment is
created. To see what has changed over time, select the deployment and click on the
History tab.
â—¦ Note: Deployments can be restored from history using the Restore button.
11. ** Important
â—¦ Two or more deployments can contain the same web application, as long as
the context path of each web application is different. If the context path of
the web applications is the same, the deploy action would fail.
12. Parallel Deployments [v 7.0.1]
â—¦ Starting with Tcat 7.0.1, you can perform truly parallel deployments such as selecting
multiple deployments and performing a group action on them (deploy, undeploy,
redeploy), and have them work in parallel. Earlier versions allowed you to perform
group actions, but the actions were queued and prior actions had to be finished for
subsequent actions to be executed. Lets explain this in greater detail.
◦ Let’s say we have 2 deployments; D1 and D2. You could select these deployments and
then click the "Deploy" button. In earlier versions of Tcat, deployment D1 would start
executing and deploying its webapps to the servers one at a time, while deployment
D2 would be queued; waiting for D1 to finish. In Tcat 7.0.1, both D1 and D2 can now
simultaneous run in parallel. However, by default this feature is not enabled. You need
to enable it before you start the Tcat console.
13. Enabling parallel deployment
â—¦ To enable parallel deployment:
â—¦ Open the webapps/console/WEB-INF/classes/galaxy.properties file
â—¦ Determine the number of deployments you would want to run in parallel and then
update the following properties with that value for example, in the above scenario we
want two deployments in parallel so we would set the properties as follows:
galaxy.properties
The above set the size of the "ThreadPool" which contains threads, each of which is
responsible for one deployment.
deployments.corePoolSize=2
deployments.maxPoolSize=2
14. â—¦ Similarly, within a Deployment you could have multiple Webapps which need to
be deployed to multiple Servers. To perform that in parallel (enabled by default),
you could change the following:
galaxy.properties
If you change these properties while the console is running, then you need to
restart the console for the new values to be picked up.
deploymentExecutor.corePoolSize=5 deploymentExecutor.maxPoolSize=20