Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This document explains how to configure Cargo remote deployment support on a Jetty container.

Overview

By default, Jetty does not come with possibilities for remote deployment. In order to add such a support to Jetty, Cargo uses a "Jetty remote deployer" Web application.

This application is a simple servlet-based application which exposes methods such as deploy or undeploy on standard HTTP POST URLs. When thse HTTP methods are called, the servlet implementing these methods connects to the Jetty Server implementation and does deployment related actions on the server; this Web application can therefore be seen as a kind of remote administration proxy.

Being a standard Web application, the Cargo Jetty remote deployer application can be secured using Jetty users and roles.

Downloading the remote deployer

Two versions of the Jetty remote deployer WAR are available on the Cargo downloads page (scroll down to the Tools section):

  • cargo-jetty-7-and-onwards-deployer: The Deployer Web application for the Jetty remote containers, which must have been deployed to Jetty before using the CARGO remote deployer. Designed to work with Jetty 7.x and later (Jetty from Eclipse.org)
  • cargo-jetty-6-and-earlier-deployer: The Deployer Web application for the Jetty remote containers, which must have been deployed to Jetty before using the CARGO remote deployer. Designed to work with Jetty 6.x and earlier (Jetty from Mortbay.org)

Please make sure to download and install the correct flavour for your Jetty version.

Security

By default, the Cargo Jetty remote deployer comes with no security.

In order to activate security, follow these steps:

  1. Open the WEB-INF/web.xml file of the Cargo Jetty remote deployer WAR
  2. Uncomment the part that says Uncomment in order to activate security. By default, that configuration is as follows:
    • Authentication is done using standard HTTP headers: login-config set to BASIC.
    • Authorization is done using Jetty role: security-constraint has a auth-constraint with role-name.
  3. Create a user with the Jetty role manager:
    1. Open the Jetty realm.properties file
    2. Add, for example, the following definition
Icon

Note: Jetty's website has documentation on hashing the password.

Examples

Here is an example Maven2 plugin configuration that:

  • Deploys on a remote Jetty 6.x server
  • The server is on production17
  • The Jetty remote deployer WAR is secured using the Jetty role manager
  • A user called someusername with password somepassword is defined as manager

To run the given Maven2 plugin configuration on a simple Maven2 WAR project, simply execute:

  • No labels