You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/05/11 22:00:18 UTC

cvs commit: jakarta-tomcat-catalina/webapps/docs deployer-howto.xml

remm        2003/05/11 13:00:18

  Modified:    webapps/docs deployer-howto.xml
  Log:
  - Start writing some deployer dociumentation
    (based on the proposed behavior).
  
  Revision  Changes    Path
  1.2       +59 -71    jakarta-tomcat-catalina/webapps/docs/deployer-howto.xml
  
  Index: deployer-howto.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/deployer-howto.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- deployer-howto.xml	17 Apr 2003 12:02:48 -0000	1.1
  +++ deployer-howto.xml	11 May 2003 20:00:17 -0000	1.2
  @@ -17,8 +17,10 @@
   
   <p>
   <a href="#Introduction">Introduction</a><br />
  -<a href="#Configuring Manager Application Access">
  -Configuring Manager Application Access</a><br />
  +<a href="#Context descriptors">Context XML descriptors</a><br />
  +<a href="#Deploying on Tomcat startup">Deploying on Tomcat startup</a><br />
  +<a href="#Deploying on a running Tomcat server">Deploying on running Tomcat server</a><br />
  +<a href="#Deploying using the Client Deployer Package">Deploying using the Client Deployer Package</a><br />
   <blockquote>
   </blockquote>
   </p>
  @@ -27,83 +29,69 @@
   
   <section name="Introduction">
   
  +<p>The deployer, which as its name imply, allows deploying and undeploying web
  +applications to the Tomcat server, either statically (the application is 
  +setup before the server is started), or dynamically (in conjunction with the
  +Tomcat Manager web application or manipulating already deployed applications).
  +</p>
  +
   </section>
   
  -<section name="Configuring Manager Application Access">
  +<section name="Context descriptors">
  +
  +<p>A Context XML descriptor is a fragment of XML data which contains a valid
  +Context element which would normally be found in the main server configuration
  +file (conf/server.xml), and allows easy and automated manipulation 
  +of web applications by the various management tools available in Tomcat. 
  +For a given host, the Context descriptors are located in 
  +<code>$CATALINA_HOME/conf/[enginename]/[hostname]/foo.xml</code>. Note that 
  +while the name of the file is not tied to the webapp name, Tomcat will create
  +Context descriptors which match the webapp name whenever it will generate a
  +Context descriptor.
  +</p>
  +
  +<p>Context descriptors allow defining all aspects and configuration parameters
  +of a Context, such as namign resources and session manager configuration.
  +It should be noted that the docBase specified in the Context element can 
  +refer to either the .WAR or the directory which will be created when the
  +.WAR is expanded or the .WAR itself.</p>
   
  -    <blockquote><em>
  -    <p>The description below uses the variable name $CATALINA_HOME
  -    to refer to the directory into which you have installed Tomcat 4,
  -    and is the base directory against which most relative paths are
  -    resolved.  However, if you have configured Tomcat 4 for multiple
  -    instances by setting a CATALINA_BASE directory, you should use
  -    $CATALINA_BASE instead of $CATALINA_HOME for each of these
  -    references.</p>
  -    </em></blockquote>
  -
  -<p>It would be quite unsafe to ship Tomcat with default settings that allowed
  -anyone on the Internet to execute the Manager application on your server.
  -Therefore, the Manager application is shipped with the requirement that anyone
  -who attempts to use it must authenticate themselves, using a username and
  -password that have the role <strong>manager</strong> associated with them.
  -Further, there is no username in the default users file
  -(<conf>$CATALINA_HOME/conf/tomcat-users.xml</conf>) that is assigned this
  -role.  Therefore, access to the Manager application is completely disabled
  -by default.</p>
  -
  -<p>To enable access to the Manager web application, you must either create
  -a new username/password combination and associate the role name
  -<strong>manager</strong> with it, or add the <strong>manager</strong> role
  -to some existing username/password combination.  Exactly where this is done
  -depends on which <code>Realm</code> implementation you are using:</p>
  +</section>
  +
  +<section name="Deploying on Tomcat startup">
  +
  +<p>The webapps which are present in the host appBase will be deployed if the
  +host "deployOnStartup" property is true. The deployment process is 
  +the following:
   <ul>
  -<li><em>MemoryRealm</em> - If you have not customized your
  -    <code>$CATALINA_HOME/conf/server.xml</code> to select a different one,
  -    Tomcat 4 defaults to an XML-format file stored at
  -    <code>$CATALINA_HOME/conf/tomcat-users.xml</code>, which can be
  -    edited with any text editor.  This file contains an XML
  -    <code>&lt;user&gt;</code> for each individual user, which might
  -    look something like this:
  -<source>
  -&lt;user name="craigmcc" password="secret" roles="standard,manager" /&gt;
  -</source>
  -    which defines the username and password used by this individual to
  -    log on, and the role names he or she is associated with.  You can
  -    add the <strong>manager</strong> role to the comma-delimited
  -    <code>roles</code> attribute for one or more existing users, and/or
  -    create new users with that assigned role.</li>
  -<li><em>JDBCRealm</em> - Your user and role information is stored in
  -    a database accessed via JDBC.  Add the <strong>manager</strong> role
  -    to one or more existing users, and/or create one or more new users
  -    with this role assigned, following the standard procedures for your
  -    environment.</li>
  -<li><em>JNDIRealm</em> - Your user and role information is stored in
  -    a directory server accessed via LDAP.  Add the <strong>manager</strong>
  -    role to one or more existing users, and/or create one or more new users
  -    with this role assigned, following the standard procedures for your
  -    environment.</li>
  +    <li>The Context XML declarations will be deployed first</li>
  +    <li>Expanded web applications not referenced by Context XML declarations
  +        will then be deployed; if they have an associated .WAR file and it is
  +        newer than the expanded web application, the expanded directory will
  +        be removed and the webapp will be redeployed from the .WAR</li>
  +    <li>.WAR files will be deployed</li>
   </ul>
  -
  -<p>The first time you attempt to issue one of the Manager commands
  -described in the next section, you will be challenged to log on using
  -BASIC authentication.  The username and password you enter do not matter,
  -as long as they identify a valid user in the users database who possesses
  -the role <strong>manager</strong>.</p>
  -
  -<p>In addition to the password restrictions the manager web application
  -could be restricted by the remote IP address or host by adding a
  -<code>RemoteAddrValve</code> or <code>RemoteHostValve</code>.  Here is
  -an example of restricting access to the localhost by IP address:
  -<pre>
  -&lt;Context path="/manager" debug="0" privileged="true"
  -         docBase="/usr/local/kinetic/tomcat4/server/webapps/manager"&gt;
  -         &lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
  -                allow="127.0.0.1"/&gt;
  -&lt;/Context&gt;
  -</pre>
  +For each deployed web application, a matching Context XML descriptor will be
  +created unless one exists already.
   </p>
  +
  +</section>
  +
  +<section name="Deploying on a running Tomcat server">
  +
  +<p>If the host "autoDeploy" property is true, the host will attempt to deploy 
  +and update web applications dynamically, as needed.</p>
  +
   </section>
   
  +<section name="Deploying using the Client Deployer Package">
  +
  +<p>The client deployer is a package which can be used to validate, compile,
  +and deploy a web application to a production or development server. It should 
  +be noted that this feature uses the Tomcat manager for automatic deployment.
  +</p>
  +
  +</section>
   
   </body>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org