Using the Tomcat Agent Feature
Learn how to install and configure a Tomcat Agent in Policy Manager.Using Admin Console Managing Containers
Supported Platforms: 7.x ONLY
Table of Contents
- Step 1: Prerequisites
- Step 2: Configure Tomcat Container (GUI / Silent)
- Step 3: Install Tomcat Agent Feature
- Step 4: Configure Tomcat Agent Feature
- Step 5: Register Tomcat Agent Container
The Tomcat Agent feature is the policy enforcement point for the Apache Tomcat application server and provides WS-Policy enforcement for web services deployed to Tomcat. It can only be deployed in a Container deployed in a Tomcat instance and only supports the Apache Axis 1.4 SOAP framework.
Step 1: Prerequisites
- Installation of one of the supported platform versions.
- Apache Tomcat Server must be installed on your machine.
Step 2: Configure Tomcat Container (GUI / Silent)
- Launch the Configure Container Instance Wizard. Navigate to the Platform release directory c:\<release directory>\bin and enter:
- startup.bat configurator (Windows)
- startup.sh configurator (UNIX)
- Define the Tomcat container (TomcatAgent) and Default Admin User.
- On the Instance Configuration Options screen, select the Tomcat deployment option.
- On the Tomcat Settings screen, deploy the instance to an existing Tomcat installation. Specify the Tomcat Host, Tomcat Port, Context Path, and Browse the Root Directory of your Tomcat Installation (C:\apache-tomcat-6.0.18). If you select the Root Directory, the corresponding Application Base will be selected by default. Click Next to continue.
Note: The Tomcat Server must be in a stopped state before proceeding with the installation. If the Tomcat Server is running, an error message will be raised.
If the selected Root Directory is invalid, the following warning message displays. Select a valid Root Directory and click Next to continue. The Instance Configuration Summary screen displays.
If the Tomcat Server is running the following warning message displays. Stop the Tomcat Server and click Next to continue. The Instance Configuration Summary screen displays.
- Select an Instance Startup Option, and indicate whether you would like the Administration Console to auto-start at the end of the configuration.
- On the Instance Configuration Summary screen, review the summary information and click Finish. If you chose to auto-launch the Administration Console, the script that displays on the bottom of the screen will say "starting <instance name>."
- To continue configuring the Tomcat deployment, start the Tomcat Server. When the Tomcat Container has successfully started, the message "STARTED  bundle(s)" displays.
After the Tomcat Container has successfully started, launch the Administration Console using the following URL format http://[computer name]:[port]/ContextPath/admin/After the Administration Console launches, navigate to the Available Features tab and install and configure the Tomcat Agent. Refer to Step 3: Install Tomcat Agent Feature.
The Configure Container Instance Wizard can be set up to run in an automated mode (i.e., silent). This is done by defining a properties file and pre-defining a set of property values to be used by the Configure Container Instance Wizard to automatically configure a Container instance.
- Define a properties file (e.g., myprops.properties).
- Add the following default content:
credential.username = administrator
credential.password = password
tomcat.root.dir= C\:/tomcat 6.0
tomcat.application.base= C\:/tomcat 6.0\webapps
The following properties are used for Standalone and Embedded Deployments:
- container.instance.name - Name of the Container.
- credential.username - Username for logging into the Administration Console.
- credential.password - Password for logging into the Administration Console.
- default.host - Host for the Container Instance.
- default.port - Port for the Container Instance.
The following properties are used for Tomcat Deployments only and combined with Base Properties.
- tomcat.root.dir - Specify the Tomcat "Root Directory."
- tomcat.context.path - Specify the Tomcat "Context Path"
- tomcat.application.base - Specify the Tomcat "Application Base"
Run the silent configuration. The Configure Container Instance Wizard (Silent Configuration) properties file accepts three system properties which together are used to perform a silent configuration:
- silent (If True, silent configuration will be performed)
- deploymentName ("Standalone"or "Tomcat")
- properties (location on filesystem of property file to be used for configuration)
Windows and UNIX script examples:
Windows:\<release directory>\bin>startup.sh configurator -Dsilent=true -DdeploymentName=Tomcat -Dproperties=/export/home/username/<property file directory location>\myprops.properties
\<release directory>\bin>startup.bat configurator "-Dsilent=true" "-DdeploymentName=Tomcat" "-Dproperties=C:/<property file directory location>/myprops.properties"
Step 3: Install Tomcat Agent Feature
- Launch the Administration Console (http://<hostname:<port>/admin/).
- On the Installed Features screen, select Feature from the Filter menu.
- Select the Tomcat Agent feature and click Install Feature.
- Note: If you are configuring a delegate on Tomcat, also install the Delegate feature as part of this sequence.
- After the installation is complete, click Configure and continue to Step 5.
Step 4: Configure Tomcat Agent Feature
On the WS-MetaDataExchange Options screen, enter the following "Metadata Exchange Service" URL:
- After completing your entry, click Finish, review the summary information, then Go To Next Task.
- On the Select Key Management Options screen, select a Key Management Option and click Next to continue. The Generate PKI Keys & X.509 Certificate option is the most commonly used default option. Refer to Managing Keys for information about available options.
- After completing the key configuration, click Finish, then Close.
- Log out of the Administration Console and restart the Tomcat Agent Container:
Step 5: Register Tomcat Agent Container
- Log into the Policy Manager Management Console (http://<hostname:<port>/ms/index.do/), and navigate to Organization > Containers.
- On the Containers Summary screen click Add Container.
- Specify the container type (SOA Container), container metadata, add metadata certificate to trusted CA (if applicable), and container details.
- Complete your entries and click Finish, then Close. The Container Details page for the Tomcat Agent displays.
- Next you will enable service discovery. In the Service Discovery Configuration portlet, click Modify Service Discovery Options.
The screen is organized as follows:
- Discovery Agent is deployed - A checkbox toggle feature that allows you to deploy a "Discovery Agent." In the enabled state (i.e., checked), specify a URL the represents the location of the "Discovery Agent" in the "Agent URL" text box.
- Agent URL - A field display that allows you to specify the Agent URL used to contact the Container "Discovery Agent." The source of the URL is based on your initial Container configuration and supported application server.
- Discover and automatically manage services - Enables the "Discovery Agent." With this option, when a new service is added to the Application Server, the Discovery Agent registers the service in the Policy Manager, applies the appropriate policies, and immediately begins to monitor service activity.
- Discover services only - Enables the "Discovery Agent." When you select this option, the "Discovery Agent" registers the service in the Policy Manager data repository and posts the service to the Discovered Services Portlet. With this option, policy enforcement and monitoring only begins after you select the Manage Service action in the console.
- Do not discover services - Disables the Service Discovery functionality.
- Configure a service discovery option and click Apply. Your configuration changes are updated on the Containers Summary screen.