After you install vFabric tc Server components on all relevant computers, you perform some or all of the following post-installation tasks, depending on the edition of tc Server. (As a performance-monitoring alternative to Hyperic, you can install and configure Spring Insight. See the Spring Insight Operations documentation.)
Create a New tc Runtime Instance
Start and Stop tc Runtime Instances
Windows: Install the Hyperic Server and Agents
Start and Stop the Hyperic Server and Agents
Get Started with the Hyperic User Interface
Deploy Applications to tc Runtime Instances
The following sections describe how to create new instances of tc Runtime and provide related information:
The procedural topics cover both Unix and Windows commands. The documentation uses Unix-like forward slashes (/) for directories; if you are on a Windows platform, change these to back slashes (\).
This section describes the simplest way to use the
tcruntime-instance command script to create a new tc
Runtime instance. For an explanation of the type of instance that the
example creates, see the description following the procedure.
On the computer on which you installed tc Server, log in as
the user who will run tc Runtime instances, such as
tcserver. On Unix, if you have disabled interactive
login, log in as the root user and use su -
tcserver to become the user.
Be sure you have installed a JDK or JRE and have set your JAVA_HOME and PATH environment variables correctly. See Software Requirement: Install JDK or JRE.
Open a terminal window (Unix) or Command Prompt (Windows).
Change to the
INSTALL_DIR/vfabric-tc-server-edition-
directory, where release
refers to the main tc Server installation directory, such as
INSTALL_DIR/opt/vmware,
refers to the
edition of tc Server you are using (editiondeveloper or
standard.), and
is the release
specifier For example:release
prompt$ cd /opt/vmware/vfabric-tc-server-standard-2.7.0.RELEASE
Run the tcruntime-instance.sh (Unix) or
tcruntime-instance.bat (Windows) script, passing it the
create option.
Replace serverName with the
name of your new tc Runtime instance. See Best Practice:
Naming tc Runtime Instances for tips on naming an
instance.serverName
VMware recommends that you use the -i option to
specify the full pathname of a directory in which the new instance
will be created, and that this directory be different from the
installation directory. Be sure the appropriate user (such as
tcserver) can write to this directory and that the
directory already exists.
For example, on Unix:
prompt$ ./tcruntime-instance.sh create -i /var/opt/vmware/vfabric-tc-server-standard myserver
On Windows:
prompt> tcruntime-instance.bat create -i \var\opt\vmware\vfabric-tc-server-standard myserver
When the preceding sample command completes, the new tc Runtime
instance is located in the
/var/opt/vmware/vfabric-tc-server-standard/myserver
directory This directory is also the value of the
CATALINA_BASE variable for this tc Runtime instance.
By default, the tc Runtime instance uses either the Java binaries pointed to by your JAVA_HOME environment variable or the java binary that it found in the PATH environment variable when it started. You can hard-code Java bianries that the tc Runtime instance uses by using the --java-home option.
The ports of the tc Runtime instance are the default values:
HTTP listen port: 8080
JMX port: 6969
AJP port: 8009
Shutdown port: -1
The preceding tcruntime-instance sample did not specify the --version option, so the instance is pinned to the highest tc Runtime version located in the installation directory, for example 7.0.8.A.RELEASE. You can use the modify-version verb to change the version to which the instance is pinned. See Pinning tc Runtime Instances to a Specific Version for more information.
When you use the tcruntime-instance.sh|bat command
script to create an instance, you can specify additional optional
parameters, as described in tcruntime-instance.sh
Reference. For example, you can use the --property
option to specify the Unix runtime user for the tc Runtime
instance.
The tcruntime-instance command script has five
possible command verbs, used to create, modify, or upgrade a tc Runtime
instance, list the existing instances, or display help for the command
script. Each command has its own set of options, as described in the
tables in this section. Depending on the command, you must specify the
name of a tc Runtime instance. The general syntax for each of the
commands follows; click on the link to see the options for that
particular command:
tcruntime-instance create [options] instance-name tcruntime-instance modify-version [options] instance-name tcruntime-instance upgrade [options] instance-name tcruntime-instance list [options] tcruntime-instance help [command-name]
Use the create command to create a new tc Runtime
instance.
The command requires that you specify a name for the new tc
Runtime instance directly after the create verb.
When you create a new instance, and you do not specify the
--template option to apply one or more specific
templates, the tcruntime-instance script creates a basic
tc Runtime instance that uses the default template (called
bio); this template adds the Blocking IO (BIO) HTTP
Connector to the server.xml of the instance.
To configure different or additional features using the templates,
such as the NIO Connector, clustering, or SSL, use the
--template option to specify the appropriate template; you
must use the option for each template you want to apply.
VMware recommends that you use the -i option to
specify the full pathname of a directory in which the new instance
will be created, and that this directory be different from the
installation directory. Be sure the appropriate user (such as
tcserver) can write to this directory and that the
directory already exists.
Examples of creating new tc Runtime instances are shown after the options reference table.
The following table lists options for the create
command of tcruntime-instance.sh|bat. When specifying the
most common options, you can use either the short form (such as
-i) or the long form (such as
--instance-directory); less common options support only
the long form.
Table 8. Options of the create Command
| Option (Long Form) | Option (Short Form, if available) | Description |
|---|---|---|
--force | N/A | Forces the script to create a new tc
Runtime instance, even if one already exists. By default the
script does not force the
creation. If you specify this parameter and a tc Runtime
instance with the name already exists, the script replaces
only the existing To
update the tc Runtime version used by an instance, use the
|
--help | -h | Outputs usage information about the
create command usage. |
--interactive | N/A | Tells the script to interactively ask
for configuration properties. For example, use this parameter
if you want to change the default port numbers, as listed in
Creating tc
Runtime Instances: Typical Steps. Also use this
parameter to change the default SSL configuration values when
using the -t option to specify an SSL template,
such -t bio-ssl. Warning: Be sure that all tc Runtime instances on the same computer have unique port numbers. |
--instance-directory
| -i
| Replace
with the full
or relative pathname of the directory in which you want the
new tc Runtime instance to be created. If you specify a
relative directory pathname, the directory is relative to the
directory from which you are running the
tcruntime-instance.sh|bat script. The default value of this option is the current working directory. |
--java-home | N/A | Hard-codes the directory specified by into various files of the instance, such as the bin/setenv.sh|bat file. Replace with the full pathname of the JRE or JDK.
If you do not specify this option, then the instance hard-codes the value of the |
--layout
| N/A | Specifies the type of layout you want
your new tc Runtime instance to use: separate or
combined. The default value is
separate. In the separate layout,
Warning: VMware recommends that you always use the separate layout, which is why it is the default value if you do not specify this option. For additional information, see Differences Between the Separate and Combined Layouts. |
--properties-file
| -f
| Specifies the name of a properties file
that contains configuration properties that you want to apply
to the new tc Runtime instance. When you create the
properties file, it should contain one property per line, in
the form
Then point to this configuration property file using this option: |
--property
| -p
| Specifies a single configuration property that
you want to apply to the new tc Runtime instance. When
you create a tc Runtime instance, the
For example, to specify that the HTTP port for a new tc Runtime instance that uses the default template is 9090, specify the property as follows: |
--template
| -t
| Applies a template to a newly-created tc
Runtime instance. You can specify this option multiple times
to apply multiple templates to the instance. In this
context, a tc Runtime template refers to
a set of customized tc Runtime files that the
The template
files are organized in the standard Tomcat hierarchy; for
example, configuration files are in the If you use this option to
specify one or more templates that do not add a
Replace the For additional details and examples about using this feature, see Creating a tc Runtime Instance with a Template. |
--version
| -v
| Pins the instance to the specified version of tc Runtime, such as 6.0.32.A.RELEASE. Valid values depend on the versions of tc Runtime that you have installed. The If you do not specify this option, the instance is pinned to the highest version of tc Runtime it can find. For example, if |
The following example shows how to be prompted interactively for
configuration properties (such as port numbers) and that you want the
new tc Runtime instance to be located in the
/var/opt/vmware/vfabric-tc-server-standard
directory:
prompt$ ./tcruntime-instance.sh create -i /var/opt/vmware/vfabric-tc-server-standard --interactive myserver
The following example shows how to pin a new instance to version 6.0.32.A.RELEASE of tc Runtime and to specify a hard-coded value for JAVA_HOME:
prompt$ ./tcruntime-instance.sh create -i /var/opt/vmware/vfabric-tc-server-standard \ --version 6.0.32.A.RELEASE --java-home /var/opt/java/jdk1.6.0_20 myserver
The following example shows how to pass the value
9090 to the http.port configuration property
of the default template (called bio), rather than use the
default value of 8080:
prompt$ ./tcruntime-instance.sh create --property bio.http.port=9090 \ -i /var/opt/vmware/vfabric-tc-server-standard myserver
Use the modify-version command to modify the
version of tc Runtime used by an existing instance that is pinned to a
particular version of tc Runtime.
You cannot use this command to modify an instance so it uses a different major release of tc Runtime, or in other words, from tc Runtime version 6.0.X to 7.0.X. You can use it only to modify the version within a certain major release, such as 6.0.30.A to 6.0.35.B.
Use the --version option to specify the new version
of the instance. If you do not specify --version, the
resulting instance is pinned to the latest
available version of tc Runtime. See Pinning tc Runtime Instances to
a Version.
Note: It is assumed that you have already installed the tc Runtime version for which you want to modify the existing instance.
Examples of modifying existing tc Runtime instances are shown after the options reference table.
The following table list options for the
modify-version command of
tcruntime-instance.sh|bat. When specifying the options,
you can use either the short form (such as -i) or the
long form (such as --instance-directory).
Table 9. Options of the modify-version Command
| Option (Long Form) | Option (Short Form) | Description |
|---|---|---|
--version
| -v
| Pins the instance to the specified version of tc Runtime, such as 6.0.32.A.RELEASE. Valid values depend on the versions of tc Runtime that you have installed. The If you do not specify this option, the instance is pinned to the highest version of tc Runtime it can find. For example, if |
--instance-directory
| -i
| Replace
with the
full or relative pathname of the directory that contains the
tc Runtime instance you want to modify. If you specify a
relative directory pathname, the directory is relative to the
directory from which you are running the
tcruntime-instance.sh|bat script. The default value of this option is the current working directory. |
--help | -h | Outputs usage information about the
modify-version command usage. |
The following example shows how to modify an existing tc Runtime
instance called myotherserver to use version
6.0.32.A.RELEASE of tc Runtime; the resulting instance
will be pinned to this version:
prompt$ ./tcruntime-instance.sh modify-version --version 6.0.32.A.RELEASE \ -i /var/opt/vmware/vfabric-tc-server-instances myotherserver
In the preceding example, the myotherserver is
located in the
/var/opt/vmware/vfabric-tc-server-instances
directory.
Use the upgrade command to upgrade an instance to a
new version of tc Server. The upgrade command copies the
existing instance to a new instance directory and updates the files
and descriptors in the instance.
The difference between the upgrade command and the
modify-version command is that the upgrade
command upgrades the tc Server scripts and other tc Server files to a
newer version, and the modify-version command changes the
tc Runtime version to a tc Runtime based on a different Apache Tomcat
release.
The upgrade command can upgrade an instance using
tc Runtime 6 to a newer version of tc Runtime 6, but not to tc
Runtime 7. To move from tc Runtime 6 to tc Runtime 7, create a new
instance using tc Runtime 7 and redeploy your Web
applications.
The usual procedure for using the upgrade command
is to:
Install the new tc Server release in a directory alongside the existing tc Server installation.
Execute the upgrade command from the new tc
Server installation directory, specifying the instance to be
upgraded in the old tc Server instance directory.
This results in a new tc Runtime instance in the new tc Server installation directory. When all instances have been upgraded, restarted, and verified, the old tc Server instance directory can be removed.
Before you use the upgrade command:
If the instance to be upgraded is running, stop it. For example, execute the following command in the tc Server Installation directory:
prompt$ tcruntime-ctl.bat myInstance stop
If the instance to be upgraded is installed as a Windows service, uninstall it. For example:
prompt$ tcruntime-ctl.bat myInstance uninstall
After running the upgrade command, install the new instance as a Windows service (if on Windows) and then start the new instance.
If you have linked the CATALINA_HOME/bin/init.d.sh
script to /etc/init.d on a UNIX system, unlink the script
before upgrading and then re-link the script in the new instance
directory after the upgrade is complete.
Table 10. Options of the upgrade Command
| Option (Long Form) | Option (Short Form) | Description |
|---|---|---|
--instance-directory
| -i
| Replace
with the
full or relative pathname of the directory where the
upgraded instance is to be created. If you specify a
relative pathname, the directory is relative to the
directory where you run the
tcruntime-instance.sh|bat script. The default value of this option is the current working directory. |
--version
| -v
| Specifies the tc Runtime version to use for the
upgraded instance. This option is required when upgrading an
unpinned instance or to prevent the instance from being
upgraded to the most recent release. If omitted, the most
recent available version of the existing major release is
used; if the instance is currently using tc Runtime 6, it is
upgraded to use the highest tc Runtime 6 version in the tc
Server installation directory. Valid values for
|
--help | -h | Displays usage information for the
upgrade command. |
The following example upgrades the instance at
/opt/vmware/vfabric-tc-server-standard/myInstance to a
new instance at
/opt/vmware/vfabric-tc-server-standard-new/myInstance.
The upgraded instance will use tc Runtime release
7.0.6.A.RELEASE. The command is executed in the
/opt/vmware/vfabric-tc-server-standard-new
directory:
prompt$ cd /opt/vmware/vfabric-tc-server-standard-new prompt$ ./tcruntime-instance.sh upgrade -v 7.0.6.A.RELEASE ../vfabric-tc-server-standard/myInstance
Use the list command to list the known tc Runtime
instances. For each instance, the command outputs the runtime version,
its base directory, and its status.
The following table lists options for the list
command of tcruntime-instance.sh|bat. When specifying the
options, you can use either the short form (such as -i)
or the long form (such as --instance-directory)
Table 11. Options of the list Command
| Option (Long Form) | Option (Short Form) | Description |
|---|---|---|
--instance-directory
| -i
| Replace
with the
full or relative pathname of the directory that contains the
tc Runtime instances for which you want a listing. If you
specify a relative directory pathname, the directory is
relative to the directory from which you are running the
tcruntime-instance.sh|bat script. The default value of this option is the current working directory. |
--help | -h | Outputs usage information about the
list command usage. |
The following example shows how to list known instances in the
tc Server installation directory. There is one instance,
myInstance, in this example.
prompt$ ./tcruntime-instance.sh list -i /var/opt/vmware/vfabric-tc-server-standard
Listing instances in '/var/opt/vmware/vfabric-tc-server-standard'
myInstance Info:
Instance name: myInstance
Runtime version: 7.0.26.A.RELEASE
tc Runtime Base: /var/opt/vmware/vfabric-tc-server-standard/myInstance
Status: NOT RUNNINGTo view a summary of all available commands of the
tcruntime-instance script, use the help
command:
prompt$ ./tcruntime-instance.sh help
To view the usage information about a particular command,
specify the name of the command after the help
command:
prompt$ ./tcruntime-instance.sh help create
The output includes brief information about the available
options. You can also use the --help option of the
commands to view the same information:
prompt$ ./tcruntime-instance.sh create -h prompt$ ./tcruntime-instance.sh create --help
Use the quickstart/createInstance.sh|bat interactive
script to quickly create a simple SSL-enabled tc Runtime instance. The
script prompts you for all the information it needs.
Note: The createInstance script is meant for users who want to quickly create a simple tc Runtime instance for evaluation purposes. You should use the tcruntime-instance script to create instances for production use.
The createInstance.sh|bat script uses the following
two tc Server templates when it creates the instance:
If you want to create an instance using different templates, use
the tcruntime-instance.sh|bat script, as described in Creating tc Runtime
Instances with the tcruntime-instance Command Script.
The createInstance script automatically discovers a Java installation. If, however, you want to use a specific version of Java, then you must set the JAVA_HOME variable in your environment appropriately and update your PATH to include JAVA_HOME/bin.
On the computer on which you installed tc Server , log in as
the user who will run tc Runtime instances, such as
tcserver. On Unix, if you have disabled interactive
login, login as the root user and use su -
tcserver to become the user.
Open a terminal window (Unix) or Command Prompt (Windows).
Change to the
directory, where INSTALL_DIR/quickstart
refers to the main tc Server installation directory, and execute the
INSTALL_DIRcreateInstance.sh script
(createInstance.bat on Window.) For example, on
Unix:
prompt$ cd /opt/vmware/vfabric-tc-server-standard-2.7.0.RELEASE/quickstart prompt$ ./createInstance.sh
The script prompts you for information such as the home
directory and name of the tc Runtime instance; whether to
immediately start it; and the HTTP, HTTPS, and JMX ports to which
the tc Runtime instance will listen. VMware recommends that you
specify an instance directory different from
the tc Server installation directory, such as
/var/opt/vmware/vfabric-tc-server-standard.
The script also asks whether you want to generate a new keystore or whether you want to use an existing one. If you specify the former, the script prompts your for additional information about the key and keystore, such as the size of the SSL private key, the passwords of the private key and keystore itself, the location of the keystore, and identification data for the SSL certificate.
After the script finishes prompting for information, it starts the instance (if you answered Yes to the prompt to immediately start it) and then exits.
If you answered Yes to the prompt to start the tc
Runtime instance, confirm that the instance is running by
invoking its Welcome page in a browser. Use the URL
http://,
where host:port is the name or IP
address of the computer on which the tc Runtime instance is running
(hostlocalhost if local) and
is the HTTP port you
specified (default port8080). For example:
http://localhost:8080
If you answered No to the prompt to start the
instance, execute the tcruntime-ctl.sh|bat
command, specifying the name and location of the instance. For
example, if you named the instance myserver and specified its instance directory /var/opt/vmware/vfabric-tc-server-standard:
prompt$ ./tcruntime-ctl.sh myserver start -n /var/opt/vmware/vfabric-tc-server-standard
You can use the --version parameter of tcruntime-instance.sh|bat to specify the version of tc Runtime to which the new instance is pinned. Specifically:
If you explicitly specify the --version
parameter, the tc Runtime instance is pinned to that version. This
means that when you use the tcruntime-ctl.sh|bat script
to start the instance, the instance always uses this tc Runtime
version, even if you have installed a more recent version of the tc
Runtime.
If you do not specify the --version parameter when you create the instance, it is automatically pinned to the highest version available.
To determine the list of available versions, search for
INSTALL_DIR/tomcat-
directories, where XXX follows
a pattern such as XXX 6.0.32.A.RELEASE.
For example, if you create a new instance using the following command:
prompt$ ./tcruntime-instance.sh create --version 6.0.32.A.RELEASE \
-i /var/opt/vmware/vfabric-tc-server-standard myserverthe myserver instance will always use version
6.0.32.A.RELEASE of the tc Runtime, even if a more recent
version is installed. If, however, you do not specify the
--version parameter, for example:
prompt$ ./tcruntime-instance.sh create -i /var/opt/vmware/vfabric-tc-server-standard myserver
the myserver instance is automatically pinned to the highest version available. Not having to explicitly specify a version when you create the instance is useful if you know that you simply want to use the highest available.
To determine the tc Runtime version to which existing instance is pinned, check the file INSTANCE-DIR/conf/tomcat.version which lists the version, such as 6.0.35.A.RELEASE.
When the instance starts, if it cannot find the tc Runtime version specified in its tomcat.version file, the instance outputs a warning and instead uses the highest version of tc Runtime in the same major runtime release (i.e. tc Runtime 6 or 7). For example, if the tomcat.version file specifies 6.0.32.A.RELEASE, but the instance finds only the 6.0.32.B.RELEASE, 6.0.35.A.RELEASE, and 7.0.27.A.RELEASE versions, then the instance uses the 6.0.35.A.RELEASE tc Runtime version. Note that it does not use the 7.0.27.A.RELEASE version because this is a different major release.
To change the version of a pinned instance, use the
modify-version command together with --version
to specify the new version. For example:
prompt$ ./tcruntime-instance.sh modify-version --version 6.0.26.A.RELEASE \
-i /var/opt/vmware/vfabric-tc-server-standard myserverThe name of a tc Runtime instance is the name of its
CATALINA_BASE directory, minus the leading directory paths.
As a reminder, CATALINA_BASE is the base directory of the
instance; this directory contains the instance-specific startup scripts
in the bin sub-directory, the configuration files in the
conf sub-directory, and so on. For example, if you create a
tc Runtime instance in the
/var/opt/vmware/vfabric-tc-server-standard/myserver
directory, then its name is myserver.
The Hyperic user interface also uses this naming convention when
first identifying a tc Runtime instance. In particular, the Hyperic user
interface displays an instance with the name
, where
platform-resource tc Runtime
catalina-base-dir refers to the
computer on which the tc Runtime instance is running and
platform-resource refers to the
catalina-base-dirCATALINA_BASE directory of the tc Runtime instance without
the leading directory pathnames. The Hyperic user interface uses the
full pathname of CATALINA_BASE as the default description
of the instance.
This means, however, that if you create two instances whose full pathnames differ, but their main installation directory names are the same, the instances will show up in the Hyperic user interface with the same names. This makes it difficult to differentiate multiple tc Runtime instances from each other, although you can always look at the description for the full pathname.
For this reason, it is best practice to use unique names for the main installation directory for each tc Runtime instance on the same computer.
Templates make it easier to automatically configure certain tc Runtime features at the time you create a tc Runtime instance. These features include SSL, clustering, and so on.
You use the --template option to specify a template
to the tcruntime-instance script when you create a new tc
Runtime instance. You can specify the --template option
multiple times if you want to apply multiple templates, such as
clustering and SSL.
When you create a tc Runtime instance using
tcruntime-instance, the script performs the following
high-level steps:
Creates the instance directory and applies the
base template to it. This template provides
configuration common to all tc Runtime instances, such as ensuring
that the instance can be monitored with Hyperic.
If you specified one or more templates with the
--template option, the script applies each template in
order. The templates might update the instance's
server.xml or context.xml file as well as
copy over other files, such as JAR files.
Applies any needed configuration properties. The script gets
the value of these properties either interactively from you, from
the --property or --properties-file
options you might have specified at the command-line, or from the
default property values if no value is provided.
If there are no <Connector> elements in the
server.xml file after the templates have been applied,
the tcruntime-instance script adds a Blocking IO (BIO)
HTTP Connector to the instance.
A template is simply a directory under the
INSTALL-DIR/templates directory that contains additional or
customized tc Runtime instance files. For example, the directory might
contain a conf/server-fragment.xml file, which the
tcruntime-instance script uses to update the base
server.xml file with the relevant feature. The directory
might also contain additional JAR files.
An example of creating an instance using the nio-ssl
template is as follows:
prompt$ ./tcruntime-instance.sh create --template nio-ssl \
-i /var/opt/vmware/vfabric-tc-server-standard myserverIn the example, the instance is created in the
/var/opt/vmware/vfabric-tc-server-standard
directory.
To use this feature, the specified template must already exist. You can use one of the out-of-the-box templates.
The files that make up a template reside in a single directory;
the name of the template directory is the name of the template. The
template files are organized in the standard Tomcat subdirectory
hierarchy. For example, configuration files live in the
conf subdirectory and JAR files live in the
lib subdirectory. The configuration files in the
conf template directory are actually just fragments of XML,
called server-fragment.xml or
context-fragment.xml, that contain just the additions,
deletions, or changes that the script applies to the base instance. When
the tcruntime-instance script applies the template after it
has created a new base tc Runtime instance, it merges the XML fragment
files with the corresponding base conf/server.xml or
conf/context.xml file, and copies over any other files,
such as JAR files. Depending on the contents of the template directory,
the new tc Runtime instance might be quite different from the standard
one. For example, the template might modify the standard
server.xml file with additional server configuration, or
copy one or more applications to the webapps directory so
that they are automatically deployed on startup.
The argument to the --template option must be the tc
Runtime template directory. The tcruntime-instance script
looks for the template directory in the
INSTALL_DIR/vfabric-tc-server-
directory, where edition-version/templates
refers to the edition of tc Server you are using (edition-versindeveloper
or standard) and the version of tc Server.
You can specify the --template option multiple times;
the tcruntime-instance script applies each template in the
order given. First the script copies over any non-configuration files to
the appropriate instance directory, and then the script merges the
configuration file fragments with the instance configuration files. You
will receive a warning if the creation of the instance copies over files
with the same name and directory location from two or more different
templates.
The following example shows how to create a new tc Runtime
instance called myserver using the nio
out-of-the-box template which adds a NIO Connector to the
server.xml file:
prompt$ ./tcruntime-instance.sh create --template nio -i /var/opt/vmware/vfabric-tc-server-standard myserver
In the preceding example, because it does not specify the
--version or --java-home options, the instance
is uses the latest installed version of tc Runtime,
and the instance uses the value of JAVA_HOME in the
environment.
The following example shows how to create an instance that uses two templates:
prompt$ ./tcruntime-instance.sh create --template insight --template jmx-ssl \
-i /var/opt/vmware/vfabric-tc-server-standard myserverNote that the insight template is available only in
the Developer Edition of tc Server.
tc Runtime provides several out-of-the-box templates. Most are
server configuration related; for example, one template sets up a basic
cluster node configuration and another sets up SSL. Some templates are
provided only in certain editions of tc Server, such as the
insight template in the Developer Edition.
You can download a tc Server template for setting up HTTP session replication with vFabric GemFire, the in-memory distributed data management platform, from the VMware vFabric GemFire section of the VMware Download Center. To use the template, see "Setting Up GemFire HTTP Session Management for tc Server" under "Tools and Modules" in the vFabric GemFire User's Guide.
The following example shows how to use the nio
out-of-the-box template to create a tc Runtime instance that is
automatically configured with the NIO Connector in its
server.xml file:
prompt$ ./tcruntime-instance.sh create --template nio -i /var/opt/vmware/vfabric-tc-server-standard myserver-nio
Because the nio template is in the
templates directory, you simply specify its name at the
--template option.
The following table lists the templates that are provided by tc
Runtime out-of-the-box and how each template differs from the generic tc
Runtime instance (created without a specific template.) All templates
are located in the
INSTALL_DIR/vfabric-tc-server-,
where edition refers to the edition of tc Server
you installed (edition/templatesdeveloper or standard).
Table 12. Out-of-the-Box Templates Provided by tc Runtime
| Template Name | Comparison with Default tc Runtime Instance |
|---|---|
| base | Base from which all new tc Runtime instances are created.
It provides the configuration that is common to all tc Runtime
instances, such as ensuring that the instance can be monitored
with Hyperic. When this template is applied, either the
base-tomcat-6 or base-tomcat-7 is
applied as well, depending on the tc Runtime version to be used
by the instance. |
| base-tomcat-6 | Directory that is part of the base template;
contains files specific to tc Runtime 6. |
| base-tomcat-7 | Directory that is part of the base template;
contains files specific to tc Runtime 7. |
| ajp | Adds an Apache JServer Protocol (AJP) connector, which enables Apache web server to communicate with the tc Runtime instance. For details about the connector, see The AJP Connector in the Apache Tomcat Configuration Reference. |
| apr |
NOTE: You must install the APR/native library in order to use the APR connector. For more information, see Apache Portable Runtime (APR) based Native library for Tomcat on the Apache Tomcat Web site. |
| apr-ssl |
NOTE: You must install the APR/native library in order to use the APR connector. For more information, see Additional Information About Using the SSL Templates. For general information about APR and SSL, see Apache Portable Runtime (APR) based Native library for Tomcat and SSL Configuration HOW-TO on the Apache Tomcat Web site. |
| async-logger | Configures asynchronous logging for the instance,
which means that two separate tc Runtime threads handle incoming
requests and write to the log file; by default, the same tc
Runtime thread performs both actions. When you specify this
template, the After you specify asynchronous logging for an
instance, you can configure its behavior by setting certain
system properties in the
|
| bio | Adds a Blocking IO (BIO) HTTP Connector to the new
instance's |
| bio-ssl |
For more information, see Additional Information About Using the SSL Templates. For general information, see The HTTP Connector and SSL Configuration HOW-TO on the Apache Tomcat Web site. |
| cluster-node |
Because this template does not
specifically add a Connector to the instance's
For more information, see Clustering/Session Replication HOW-TO on the Apache Tomcat Web site. |
| diagnostics |
Because this template does not
specifically add a Connector to the instance's
|
| elastic-memory | Standard Edition Only. Used to create tc Runtime instances running in a vSphere ESX or ESXi VM. This template introduces memory management technology into the JVM that allows ESX to use physical memory resources more efficiently by reclaiming unused memory from the Java heap. See "Using Elastic Memory for Java" in vFabric tc Server Administration. |
| insight | Developer Edition Only. Adds the Spring Insight Developer Web application to your instance. Spring Insight Developer gives you real-time visibility into the behavior and performance of your applications during the development and testing phase. See Spring Insight Developer. Because this template does not
specifically add a Connector to the instance's
Templates for Spring Insight Operations can be downloaded separately. Spring Insight Operations does for in-production applications what Spring Insight Developer does for application development. It gives you real-time visibility into behavior of deployed applications on one or more production tc Runtime instances. See Spring Insight Operations. |
| jmx-ssl |
Because this template does not
specifically add a Connector to the instance's
For general information, see SSL Configuration HOW-TO on the Apache Tomcat Web site. |
| nio | Adds a Non-Blocking IO (NIO) connector for HTTP.
For more information, see The HTTP Connector on the Apache Tomcat Web site. |
| nio-ssl |
For general information, see The HTTP Connector and SSL Configuration HOW-TO on the Apache Tomcat Web site. |
If you specify one of the SSL templates (bio-ssl,
nio-ssl, apr-ssl, or jmx-ssl)
when you create a tc Runtime instance, the
tcruntime-instance script automatically configures SSL or
OpenSSL for the instance; generates a new keystore; and provides default
values for various properties if you do not specify them
interactively.
For example, assume that you used the following command to create an instance:
prompt$ ./tcruntime-instance.sh create myserver-secure -t bio-ssl -i /var/opt/vmware/vfabric-tc-server-standard
The myserver-secure instance has the following
default SSL properties and configuration:
A generated keystore, located in the conf
directory, with the name tc-server-bio-ssl.keystore.
This keystore contains a self-signed certificate with default values
(such as Unknown) for the organization
information.
Key alias named tc-server-bio-ssl.
Key password consisting of a random string of characters.
Keystore password that is the same as the key password (required by tc Runtime 6.0).
HTTPS port of 8443.
This default configuration is adequate for testing. Typically,
when you move to a production environment, you want to generate
keystores with real information about your organization and customize
the passwords. In this case, use the --interactive option
of tcruntime-instance.sh|bat so that the script prompts you
for the information about your particular environment.
The --interactive option still generates a
self-signed certificate. If you require an authentic, verified
certificate, purchase one from a well-known Certificate Authority such
as VeriSign, and use the keytool JDK tool to import the
certificate into your keystore. See the Creating a Simple
Keystore File For Both SSL and OpenSSL section in the
vFabric tc Server Administration Guide in this
Documentation Center for more information.
You can create two flavors of tc Runtime instances, depending on the layout of their files:
Separate layout: In this
layout, the instance's CATALINA_HOME and
CATALINA_BASE point to two different directories.
Typically, CATALINA_HOME points to a
tomcat-6.0.X.X.RELEASE directory, which in turn
contains the set of tc Runtime binaries that are shared by other
instances that use the separate layout.
VMware highly recommends you use this layout, which is the default.
Combined layout: This layout
closely resembles the standard Apache Tomcat layout where the
instance's CATALINA_HOME and CATALINA_BASE
point to the same directory. This means that each instance that uses
the combined layout has its own copy of the tc Runtime binaries. For
this reason, it is very difficult to upgrade to a new version of tc
Runtime.
VMware does not recommend you use this layout, because it is so difficult to upgrade instances. The main reason for using it is if you are familiar with the Apache Tomcat layout and want to continue to use it in your environment.