Tomcat Expert Series. Large Scale Deployments

Similar documents
tc Server Webinar Series Deployments

Apache Tomcat Tips and Tricks from the Pros

24x7 Scheduler Multi-platform Edition 5.2

Simba XMLA Provider for Oracle OLAP 2.0. Linux Administration Guide. Simba Technologies Inc. April 23, 2013

SOLR INSTALLATION & CONFIGURATION GUIDE FOR USE IN THE NTER SYSTEM

Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat

Tcat Server User s Guide. Version 6 R2 December 2009

Product Documentation. Pivotal tc Server. Version 3.x. Getting Started with Pivotal tc Server. Rev: Pivotal Software, Inc.

BIRT Application and BIRT Report Deployment Functional Specification

CORISECIO. Quick Installation Guide Open XML Gateway

Install guide for Websphere 7.0

ZeroTurnaround License Server User Manual 1.4.0

ConcourseSuite 7.0. Installation, Setup, Maintenance, and Upgrade

Pacific Application Server for OpenEdge: Getting Started. Progress OpenEdge 11.5 Workshop

Using the Adobe Access Server for Protected Streaming

How To Link Tomcat 5 with IIS 6 on Windows 2003 Server using the JK2 ajp13 connector

Configuration and fine tuning Guide

LICENSE4J AUTO LICENSE GENERATION AND ACTIVATION SERVER USER GUIDE

PEtALS Quick Start. PEtALS Team Roland NAUDIN - February

Written by Wirabumi Software Sunday, 30 December :27 - Last Updated Thursday, 03 January :52

NGASI Shared-Runtime Manager Administration and User Guide WebAppShowcase DBA NGASI

UNICORE REGISTRY MANUAL

VERSION 9.02 INSTALLATION GUIDE.

Installation Guide for contineo

TCH Forecaster Installation Instructions

Tool-Assisted Knowledge to HL7 v3 Message Translation (TAMMP) Installation Guide December 23, 2009

SAS Marketing Optimization. Windows Installation Instructions for Hot Fix 51mo14

Spectrum Spatial Analyst Version 4.0. Installation Guide for Linux. Contents:

WEBAPP PATTERN FOR APACHE TOMCAT - USER GUIDE

STREAMEZZO RICH MEDIA SERVER

Exam Name: IBM InfoSphere MDM Server v9.0

Operations and Monitoring with Spring

Upgrading Your Web Server from ClientBase Browser Version 2.0 or Above to Version 2.1.1

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

DeployStudio Server Quick Install

Apache Tomcat ISAPI Redirector and Canto Cumulus WPP

Intelligent Test Framework 3.1 Directory Structure Reference for Server and Client Applications

Oracle Endeca Information Discovery Integrator

Informatica Corporation Proactive Monitoring for PowerCenter Operations Version 3.0 Release Notes May 2014

IBM WebSphere Application Server V8.5 lab Basic Liberty profile administration using the job manager

1 How to install CQ5 with an Application Server

Project Management (PM) Cell

Canto Integration Platform (CIP)

Apache Tomcat Tuning for Production

Best Practice - Pentaho and Tomcat Security

KonaKart Portlet Installation for Liferay. 6 th February DS Data Systems (UK) Ltd., 9 Little Meadow Loughton, Milton Keynes Bucks MK5 8EH UK

IBM InfoSphere MDM Server v9.0. Version: Demo. Page <<1/11>>

Kaseya 2. User Guide. Version 1.1

JBS-102: Jboss Application Server Administration. Course Length: 4 days

OpenL Tablets 5.14 OpenL Tablets BRMS

Setting up Ensembl Solr Search on an Ubuntu external server 22nd November 2013

Oracle Fusion Middleware. 1 Oracle Team Productivity Center Server System Requirements. 2 Installing the Oracle Team Productivity Center Server

Installing and Running Tomcat 5.5

JobScheduler Installation by Copying

CloverETL Server Reference Manual

Eclipse installation, configuration and operation

Vector HelpDesk - Administrator s Guide

Understanding Java Virtual Machine Selection in InstallAnywhere

EMC Documentum Content Management Interoperability Services

Integrating Apache Web Server with Tomcat Application Server

Deploying Intellicus Portal on IBM WebSphere

Qsync Install Qsync utility Login the NAS The address is :8080 bfsteelinc.info:8080

WebSphere v5 Administration, Network Deployment Edition

The Compatible One Application and Platform Service 1 (COAPS) API User Guide

Dream Report Version 4.5

Installation, Configuration, and Usage

TechComplete Test Productivity Pack (TPP) Backup Process and Data Restoration

Configuring multiple Tomcat instances with a single Apache Load Balancer

Integrating your Maven Build and Tomcat Deployment

How to Prepare for the Upgrade to Microsoft Dynamics CRM 2013 (On-premises)

NetWrix Password Manager. Quick Start Guide

Installation Guide. Release Management for Visual Studio 2013

EMC Documentum Content Services for SAP Repository Manager

Quick Start Guide. Version

Location Intelligence Component

Process Integrator Deployment on IBM Webspher Application Server Cluster

inforouter V8.0 Server Migration Guide.

Tool for Automated Provisioning System (TAPS) Version 1.2 (1027)

SAS Marketing Automation 4.4. Unix Install Instructions for Hot Fix 44MA10

SAP BusinessObjects Business Intelligence platform Document Version: 4.1 Support Package Web Application Deployment Guide

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

Quick Start Guide Using OneDisk with the Tappin Service

Enterprise Service Bus

TECHNICAL DOCUMENTATION SPECOPS DEPLOY / APP 4.7 DOCUMENTATION

DEPLOYING EMC DOCUMENTUM BUSINESS ACTIVITY MONITOR SERVER ON IBM WEBSPHERE APPLICATION SERVER CLUSTER

Clustering a Grails Application for Scalability and Availability

Magento Search Extension TECHNICAL DOCUMENTATION

Crystal Reports XI. Overview. Contents. Understanding the CRConfig.xml File

Jenkins and Chef Infrastructure CI and Application Deployment

Apache Tomcat 7. Aleksa Vukotic James Goodwill.

Crystal Reports for Eclipse

Oracle WebLogic Server

Luminis Platform Banner Document Management Suite Portal Guide. Release November 2011

Kaseya 2. User Guide. Version R8. English

WebSite Tonight. Getting Started Guide. Getting Your Personal Website Online in One Night. WebSite Tonight // A Wedding Website

KonyOne Server Installer - Linux Release Notes

The Server.xml File. Containers APPENDIX A. The Server Container

Deploying Oracle Business Intelligence Publisher in J2EE Application Servers Release

Transcription:

Tomcat Expert Series Large Scale Deployments Filip Hanik SpringSource 2009 Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Agenda Basic Installation Prelude Flexible Directory Layout Configuration Templates Environment variables Application management Example installation and upgrade 2

Tomcat Folder Structure Folder structure overview apache-tomcat-6.0.x/ - bin - conf - lib - logs - temp - webapps - work 3

Tomcat Folder Structure Folder structure overview apache-tomcat-6.0.x/ - bin - used during startup - conf - CATALINA_BASE - lib - CATALINA_HOME - logs - logging.properties - temp - CATALINA_TMPDIR - webapps server.xml (<Host>) - work - server.xml (<Host>) 4

How Tomcat reads directories bin directory Only storage space for scripts and bootstrap libraries Never used during runtime All other directories are 'configurable' There are some slight exceptions We can take advantage of this Tomcat upgrades/downgrades JVM upgrades/downgrades 5

Starting up Tomcat bin/ startup.(sh bat) shutdown.(sh bat) <start> <stop> catalina.(sh bat) Startup Scripts 6

Starting up Tomcat catalina.(sh bat) <invokes> <invokes> setclasspath.(sh bat) setenv.(sh bat) JVM Launch Startup Scripts 7

Setting custom options setenv.sh - Any custom options here JAVA_HOME JAVA_OPTS CATALINA_OPTS CATALINA_HOME CATALINA_BASE CATALINA_TMPDIR CATALIA_PID All these are read by catalina.sh If no value exists, defaults are assigned 8

Setting Custom Options setenv.sh doesn't ship with Tomcat Upgrading Tomcat Simply copy setenv.sh No need to modify Tomcat scripts, or keep track of changes inside Tomcat scripts 9

Up/Down-grading JVM /development/tomcatx/example/ - apache-tomcat-6.0.16/ - apache-tomcat-6.0.18/ - jdk1.5.0_17/ - jdk1.6.0_11/ - myapplications setenv.sh JAVA_HOME points to 1.5 or 1.6 Easy to switch back and forth No need to modify any Tomcat scripts 10

Tomcat Folder Structure /development/tomcatx/example/ - apache-tomcat-6.0.16/ - apache-tomcat-6.0.18/ - jdk1.5.0_16/ - jdk1.6.0_10/ - tomcat-instance-01/ - bin - conf - logs - webapps - work - temp Instance data can be separated out 11

So far setenv.sh CATALINA_HOME=/usr/local/apache-tomcat-6.0.18 CATALINA_BASE=/usr/local/tomcat-instance-01 JAVA_HOME=/usr/local/jdk1.6.0_10 CATALINA_PID=$CATALINA_BASE/logs/tomcat.pid Modify JAVA_HOME to change JVM Modify CATALINA_HOME to change Tomcat 12

Tomcat upgrades Most important thing during a production upgrade: How to downgrade/roll back if something goes wrong With Tomcat, that's easy, keep multiple installations With JVM, that's easy, keep multiple installations 13

Going further So far Understanding setenv.sh Understanding file/directory structure Lets take it to the next step Lets create a setup that will make all this seem so much more intuitive 14

Creating the layout apache-tomcat-6.0.x/ * A regular Tomcat install run.sh * Control script shared/ * Shared instance data instance_1/ * An instance of a Tomcat server instance_2/ instance_n/ 15

Creating the layout shared/ - conf/ logging.properties server.xml tomcat-users.xml - logs/ * Instances can share configuration files! 16

Creating the layout instance_1/ - bin/ setenv.sh * Instance specific JVM options - conf/ * Instances configuration catalina.properties - logs/ * catalina.out goes here - webapps/ * Instance applications - work/ * Instance work directory - temp/ * Instance temp directory 17

Configuration shared/conf/server.xml <Server port="${shutdown.port}" shutdown="shutdown"> <Connector port="${http.port}" protocol="http/1.1" connectiontimeout="20000" /> run.sh * uses -config to denote configuration file 18

Configuration instance_1/conf/catalina.properties shutdown.port=8005 http.port=8080 * Anything in here gets read into System.getProperties(...) * Useful for application options -Dxxx=yyy 19

Configuration shared/conf/logging.properties 1catalina.org.apache.juli.FileHandler.level = FINE 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/../shared/logs 1catalina.org.apache.juli.FileHandler.prefix = ${catalina.instance}.catalina. * Single configuration file Unique log files per instance 20

Configuration instane_1/bin/setenv.sh CATALINA_OPTS= -Xmx512m -Xss192k * Unique JVM options per instance 21

The Script run.sh The script that does it all Takes advantage of configuration options in Tomcat Creates a simple, flexible and yet powerful layout structure Provides ability to switch JVM and Tomcat versions without changing any configuration 22

Demo 10 minutes Walk through run.sh Create a new instance Configure the new instance Start the new instance Change the JVM for all instances Change the Tomcat version for all instances 23

Summary Easy to create a directory layout No changes were done to Tomcat's files!! No migration needed when upgrading Easy to create more instances Clean and simple configurations JVM options can be shared or instance specific If you were to change something catalina.out log rotation 24

Application Management Working with contexts Understanding deployment models Selecting a strategy 25

What is a Context? In Tomcat A context is a deployed web application A web application is deployed to match a URL path This is called the context path Often referred to as the first part of the URL /myapp/index.jsp However, contexts can be multi-level /multi/level/context/index.jsp 26

Defining contexts Deployed in this order server.xml Point to WAR or directory Inside or outside host's appbase context.xml style files Point to WAR or directory Inside or outside host's appbase WAR Inside host's appbase Directory Inside host's appbase 27

Defining contexts Remote deployments are also possible But one must expose a web application per host to deploy to resources and security Context paths must be unique within a Host Context paths can overlap /myapp /myapp/images Requests are mapped using longest matching context path 28

Deployment strategies No method is better than the other Select a method based on organizational needs Mixing deployment methods is not recommended Often leads to confusion due to how Tomcat manages the persistence of a deployment Select one method Stick to it 29

Deployment strategies Redeployment strategies Redeploy during runtime can cause OutOfMemoryErrors: PermGen Space Useful feature if tested properly and applications don't leak references Otherwise Separate applications under separate Tomcat instances Prevents 'bad apple problem' Tomcat startup time is neglible, 1 second 30

Deployment strategies webapps directory with auto deploy Is scanned in regular intervals Don't remote copy to this directory Might cause incomplete upload to be deployed incorrectly Work around Copy to a local directory Move to webapps 31

Application Management Summary Runtime redeploy is discourages Application management is an organization choice Many different alternatives Need to manually automate the system Do not mix deployment strategies 32

Summary Large scale deployments are possible Can be very large Our customers have thousands of managed instances Tomcat doesn't provide the infrastructure Provides flexibility no other container does Automate your own environment 33

Questions... and answers! 34