Upgrade and Migration Guide
Several upgrade procedures are supported for this release of VMware tc Server.
Upgrade an Instance to a Newer tc Runtime Binary
This section has instructions for upgrading tc Server instances to a new version of the tc Runtime.
Note: If you want to upgrade to the latest tc Server package, see one of these two sections:
- Upgrade an Instance in a New tc Server Directory
- Upgrade an Instance in the Existing tc Server Directory
For example, suppose that your tc Server release came bundled with 9.0.6.B.RELEASE
. Later, you could decide to upgrade to the 9.0.7.B.RELEASE
(or another version) when it is released. The instructions in this section enable you to stay current with new tc Runtime releases without fully installing the full tc Server installation. This lets you take advantage of getting the latest features, security vulnerability fixes, and bug fixes.
Before You Start
Be sure to stop a tc Server instance before you upgrade the tc runtime version. For instructions, see Starting and Stopping tc Runtime Instances.
Procedure
Change directory to the tc Server installation directory. For example:
cd /opt/pivotal/tcserver/standard-4.1.0.RELEASE
Use the
--list
option to view a list of available runtimes to install. The command generally requires a few seconds to return the list. For example:tcserver list-runtimes Checking available tc Runtimes Available tc Runtimes for tc Server 4: 7.0.84.B.RELEASE 8.5.27.B.RELEASE - INSTALLED 9.0.6.B.RELEASE - INSTALLED 9.0.7.A.RELEASE
Runtimes are specified by version, such as 8.5.27.B.RELEASE
. If ’- INSTALLED’ trails the version number, that indicates the runtime version is currently installed for this version of tcserver
.
Use the
get-runtime
command to download and install a specific runtime version. For example:$ tcserver get-runtime 9.0.7.A.RELEASE Checking available tc Runtimes Retrieving tc Runtime version 9.0.7.A.RELEASE Extracting tc Runtime version 9.0.7.A.RELEASE to /opt/pivotal/tcserver/runtimes
If the specified version is already installed, then the command returns a message similar to the following:
prompt$ ./tcserver get-runtime 9.0.6.B.RELEASE Runtime version 9.0.6.B.RELEASE has been detected as already being installed.
Upgrade an Instance in a New tc Server Directory
Note: tc Runtime instances can only be upgraded to the same major version number. For example: If current instance tc Runtime version is 7.0.84.B.RELEASE, you can not upgrade it to 8.5.x, or 9.0.x. You are required to create a new instance with the desired tc Runtime version and manually copy configuration over.
This section has instructions for upgrading tc Server instances to a new version of tc Server.
Run the tcserver upgrade
command to upgrade an existing tc Server instance to a new version of tc Server. The upgrade
command migrates configuration information and applications from an existing instance to the new one. The command takes this form:
tcserver upgrade -v
<tcRuntimeVersion> -i PathToNewInstanceDirectory PathToOldInstance
where:
tcRuntimeVersion is the Tomcat binary that you want the new instance to use, for example, 9.0.6.B.RELEASE
.
Note:
- The tc Runtime version must exist in the new tc Server installation directory. If you want to use a tc Runtime that exists in your previous tc Server installation, but not the new one, you must copy it into the new tc Server installation directory.
- If you do not use the
-v
option to specify a binary version, the upgrade assumes you do not want to upgrade the binary and tries to create the new instance with the same binary. If the older instance uses a version of Tomcat that does not exist in the new version of tc Server, you must copy it from the older tc Server installation to the new one, or the upgrade will fail.
PathToNewInstanceDirectory specifies the directory in which you want the upgraded instance to be created.
Note:
- If you do not use the
-i
option to specify a directory, the instance will be created in the current working directory. - If you specify the directory where the old instance exists, that instance will be upgraded in place.
PathToOldInstance points to the instance that you wish to upgrade.
Before You Start
- Be sure to stop a tc Server instance before you upgrade. For instructions, see Starting and Stopping tc Runtime Instances.
Procedure
The example commands in the instructions below assume you are upgrading a tc Server 3.2.9 instance to 4.0.0.RELEASE.
- Install the new version of tc Server in a new installation directory, as described in Installing VMware tc Server. For example, install tc Server 4.0.0 in
/opt/pivotal/tcserver/standard-4.0.0.RELEASE
. - If the directory where you want the upgraded server instance to be installed does not exist, create it.
Change directory to new TCS installation directory. For example:
cd /opt/pivotal/tcserver/standard-4.1.0.RELEASE
Run the upgrade command. For example:
tcserver upgrade -i ../tcs-4.0.0-instances -v 9.0.6.B.RELEASE ../tcs-3.2.9-instances/myserver1
The command above creates an upgraded version of the “myserver1” instance in the
../tcs-4.0.0-instances
directory.
Upgrading Java Version
It is recommended to create a duplicate instance prior to upgrading Java. The duplicate instance can be used for testing purposes.
To upgrade the java version, the JAVA_HOME
variable in bin/setenv.sh
(Unix) and the set.JAVA_HOME
property in conf/wrapper.conf
(Windows) needs to be updated to point to the new Java Home.
When upgrade from a Java version prior to 8 any PermGen settings should be removed. These are usually found in the JAVA_OPT
variable in bin/setenv.sh
An example of a Java 6 setenv.sh
# Edit this file to set custom options
# Tomcat accepts two parameters JAVA_OPTS and CATALINA_OPTS
# JAVA_OPTS are used during START/STOP/RUN
# CATALINA_OPTS are used during START/RUN
JAVA_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
AGENT_PATHS=""
JAVA_AGENTS=""
JAVA_LIBRARY_PATH=""
JVM_OPTS="-Xmx512M -Xss256K -XX:MaxPermSize-512M"
JAVA_OPTS="$JVM_OPTS $AGENT_PATHS $JAVA_AGENTS $JAVA_LIBRARY_PATH"
An example of a Java 8 setenv.sh
# Edit this file to set custom options
# Tomcat accepts two parameters JAVA_OPTS and CATALINA_OPTS
# JAVA_OPTS are used during START/STOP/RUN
# CATALINA_OPTS are used during START/RUN
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home"
AGENT_PATHS=""
JAVA_AGENTS=""
JAVA_LIBRARY_PATH=""
JVM_OPTS="-Xmx512M -Xss256K"
JAVA_OPTS="$JVM_OPTS $AGENT_PATHS $JAVA_AGENTS $JAVA_LIBRARY_PATH"
It may be necessary to set the -XX:MaxMetaspaceSize
which by default is only limited by the amount of memory available to the java process. Not setting this value could result in a server crash. Do not set Metaspace to be the same as a previous PermGem size as they have different meanings and purposes.