Árvore de páginas

Initial considerations

  • There has to be only one indexation service (Solr) to be shared by all instances, so it must be isolated in another environment;
  • All instances should have access to the same shared folder, where the file system repository is;
  • The database must be the same one for all instances;
  • You need to maintain session affinity, that is, since the user logged in by accessing in an instance, they will always be directed to the same instance.

Preparing the environment

Before starting the installation, you need to prepare the environment. Do the following:

  1. Install the database and create an instance;
  2. Install the distribution standard memcached and if necessary set it up;
  3. Choose a folder and a server and make it accessible to all the machines that will be part of the Load Balancer.

Installing the first node

For simplification purposes, this tutorial will assume that: The Solr and Realtime servers to be used will be those installed on that node; the installation will be made in the standard folder ("c:\fluig").

  1.  Install the application by the normal procedure and just be careful to:
    1. Enter the correct database URL;
    2. Enter the correct URL for the memcached server.

  2. Make a copy of the folder "apps" (located at \fluig\jboss) to the one called "appslb";
        xcopy apps appslb /s/e

  3. Make a copy of the folder "standalone" to the one called "standalone-node1".
       cp -Rp standalone standalone-node1

  4. Edit the file standalone-node1/configuration/standalone.xml:
    1. In the subsystem "com.totvs.technology.wcm" add the "dir" attribute pointing to the folder "nodelb". It will look like this:

      <subsystem xmlns="urn:com.totvs.technology.wcm:1.0" refresh="15" dir="/fluig/jboss/appslb"/>

        

    2. Change the value of the binding property "wcm/globalDataDir" to point to the folder shared between the instances:

      <simple name="java:global/wcm/globalDataDir" value="{pasta global}"/>


    3. The property "wcm/applicationUploadDir" should point to the same "nodelb" folder:

      <simple name="java:global/wcm/applicationUploadDir" value="/fluig/jboss/appslb"/>


    4. In the sysbsystem "jboss:domain:web"  add the attribute instance-id="${jboss.node.name:node0}"

       

  5. In the folder “c:\fluig\jboss\bin”, create the script "node1.bat". In “ip-do-servidor” ("server IP") enter the IP address of the server where Fluig is running.

    call standalone.bat -c standalone.xml -b {ip-do-servidor} -Djboss.server.base.dir=..\standalone-node1 -Djboss.node.name=node1 -Djboss.socket.binding.port-offset=100
  6. Start the first node with the script "node1.sh":

    node1.bat

       

  7. After you start and are able to log in as the user "wcmadmin", drop Fluig;


  8. Connect to the database and set the value of the field server_url from the table wcm_configuration. The saved URL contains the 8080 port, change the value to not contain the port (or change it to the apache port if it is not on 80 port);


  9. Start Fluig again with the script "node1.bat";

Creating a second node in the same installation

 

  1. Make a copy of the folder "standalone-node1" to the one called "standalone-node2".

    xcopy standalone-node1 standalone-node2 /s/e

     

  2. From the folder "apps", delete the file "foundation-addon-indexer-web.war", which is from the Solr server;


  3. In the folder “c:\fluig\jboss\bin”, create the script "node2.bat". In “ip-do-servidor” ("server IP") enter the IP address of the server where Fluig is running.

    call standalone.sh -c standalone.xml -b {ip-do-servidor} -Djboss.server.base.dir=..\standalone-node2 -Djboss.node.name=node2 -Djboss.socket.binding.port-offset=200

Creating a third node on another machine

  1. Install the application by the normal procedure and just be careful to:
    1. Enter the correct database URL;
    2. Enter the correct URL for the memcached server.

  2. Edit the file standalone\configuration\standalone.xml:
    1. Still in "<system-properties>", change the property "totvs/solrURL" by entering the Solr URL of the first instance. Just change the IP for the server IP of the first instance.


    2. Change the value of the binding property "wcm/globalDataDir" to point to the folder shared between the instances:

      <simple name="java:global/wcm/globalDataDir" value="{pasta global}"/>


    3. Change the value of the binding property "wcm/cacheServerAddress" to point to the memcached:

      <simple name="java:global/wcm/cacheServerAddress" value="{ip servidor 1}:11211"/>


    4. Change the binding properties "node.chat.url" and "node.realtime.url" to point to the IP of the first instance.


    5. In the sysbsystem “jboss:domain:web” add the attribute instance-id="${jboss.node. name:node0}"

       

  3. In the folder “c:\fluig\jboss\bin”, create the script "node3.bat". In “ip-do-servidor” ("server IP") enter the IP address of the server where Fluig is running.

    call standalone.bat -c standalone.xml -b {ip-do-servidor} -Djboss.server.base.dir=..\standalone-node3 -Djboss.node.name=node3


  4. From the folder "apps", delete the file "foundation-addon-indexer-web.war", which is from the Solr server;


  5. Start the first node with the script "node3.sh":

    node3.bat

Configuring Microsoft NLB

There are 3 ports to be configured:

 

7777 and 8888 for Fluig Realtime:

HTTP port for the Fluig Server

  • This is usually either 8080 or just 80.
  • This door must be in the "Multiple mode" and "Single affinity".