terracotta

    1. Shut down the Terracotta cluster.

    2. Create a Terracotta configuration file called tc-config.xml with contents similar to the following:

      1. <?xml version="1.0" encoding="UTF-8"?>

      2. <!-- All content copyright Terracotta, Inc., unless otherwise indicated.

      3. All rights reserved. -->

      4. <tc:tc-config xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-8.xsd"

      5. xmlns:tc="http://www.terracotta.org/config"

      6. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      7. <servers>

      8. <!-- Sets where the Terracotta server can be found.

      9. Replace the value of host with the server's IP address. -->

      10. <server host="server.1.ip.address" name="Server1">

      11. <data>%(user.home)/terracotta/server-data</data>

      12. <logs>%(user.home)/terracotta/server-logs</logs>

      13. </server>

      14. <!-- If using a standby Terracotta server, also referred to as

      15. an ACTIVE-PASSIVE configuration, add the second server here. -->

      16. <server host="server.2.ip.address" name="Server2">

      17. <data>%(user.home)/terracotta/server-data</data>

      18. <logs>%(user.home)/terracotta/server-logs</logs>

      19. </server>

      20. </servers>

      21. <!-- Sets where the generated client logs are saved on clients. -->

      22. <clients>

      23. <logs>%(user.home)/terracotta/client-logs</logs>

      24. </clients>

      25. </tc:tc-config>

    3. Install Terracotta on a separate machine for each server you configure in tc-config.xml.

    4. Copy the tc-config.xml to a location accessible to the Terracotta servers.

    5. Perform Step 2: Install the Terracotta Sessions JAR on each application node you want to run in the cluster. Be sure to install your application and any application servers on each node.

    6. Edit web.xml on each application server to list both Terracotta servers:

      1. <param-value>server.1.ip.address:9510,server.2.ip.address:9510</param-value>

    1. Start the Terracotta server in the following way, replacing "Server1" with the name you gave your server in tc-config.xml:

      1. UNIX/Linux

      2. [PROMPT] ${TERRACOTTA_HOME}/server/bin/start-tc-server.sh -f <path/to/tc-config.xml> \ -n Server1

      3. Microsoft Windows

      4. [PROMPT] ${TERRACOTTA_HOME}\server\bin\start-tc-server.bat -f <path\to\tc-config.xml> ^ -n Server1

      5. If you configured a second server, start that server in the same way on its machine, entering its name after the -nflag. The second server to start up becomes the hot standby, or PASSIVE. Any other servers you configured will also start up as standby servers.