Access Keys:
Skip to content (Access Key - 0)
Cancel    
Cancel   
 

Deploying Applications

Aug 31, 2009 18:03

Karan Malhi

Mar 18, 2013 18:05

Mulesoft Tcat Server Documentation

Deploying Applications

Mulesoft Documentation Page

Contents

Deploying Applications

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.

Creating a Deployment

A Deployment is a grouping of applications you can deploy to servers or groups.

To create the deployment:

  1. On the Deployments tab, click New Deployment and enter a unique name for this entity
  2. Just beneath the Web Applications list, clic Add from Repository or Upload New Version
  3. Browse to the .war file and click Open
  4. For a new web application, you can edit the URL context path by clicking Advanced Options and entering it in the Name field
  5. Edit version information (optional)
  6. Click Add
  7. To the right of the Web Applications list, select the target server or group for this deployment
  8. 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.

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.

To upload an application manually:

  1. When creating or editing a deployment on the Deployments tab, click Upload New Application.
  2. Click Browse and navigate to the location of the application's WAR file and click Open to select it.
  3. 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.
  4. Click Add to add the application to the repository and include it in the deployment.

For information on managing an application, such as moving it from one location to another in the repository, see Managing the Repository.

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:

  1. On the Deployments tab, click the name of the deployment you want to modify.
  2. 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.

To upload a new web application

  1. On the Deployments tab, click the name of the deployment you want to modify.
  2. Click on the green up arrow to the right of the web application you want to replace
  3. Browse to a the new .war file, click Open
  4. Click Add to upload the new .war file
  5. Click Save
  6. The deployment is now updated, but will appear with a yellow icon (for unreconciled) until it is deployed

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.

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

 

Parallel Deployments [v 7.0.1]

Starting Tcat 7.0.1, you can now perform truly parallel deployments i.e. you can select multiple deployments and perform 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. Lets say we have 2 deployments; we shall call them 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 i.e. you need to enable it before you start the Tcat console. Below are the steps to enable it:

  1. Open the webapps/console/WEB-INF/classes/galaxy.properties file
  2. Determine the number of deployments you would want to run in parallel and then update the following properties with that value e.g. in the above scenario we want two deployments in parallel so we would set the properties as follows:

    galaxy.properties
  3. The above set the size of the "ThreadPool" which will contain threads, each of which will be responsible for one deployment.

Similarly, within a Deployment you could have multiple Webapps which need to be deployed to multiple Servers. In order 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 would need to restart the console for the new values to be picked up

<< Previous: Working with ServersNext: Monitoring a Server >>