WANdisco
Download Call me Whitepaper
 
 
Subsections

5 Setup

If the installation requirements as specified in the previous section have been met, the express setup should take 20 minutes or less to get a basic WANdisco HADR environment configured.

The express setup option can be used to quickly create the prefs*.xml configuration files used by WANdisco HADR. This is accomplished by running the bundled program, [replicator]/bin/setup. The text console based UI will guide you through basic configuration options.

At the end of the setup program:

Simply copy the [replicator]/config/prefs-(hostname).xml to the [replicator]/config/prefs.xml file on the corresponding replicator host. The prefs-failoveragent.xml file needs to be copied to the [replicator]/config/prefs.xml file on the corresponding HADR/WANdisco Failover Agent host.

It is recommended that you install the WANdisco Failover Agent on a separate machine from the WANdisco Replicators. This will ensure WANdisco Failover Agent is available even when a WANdisco Replicator machine fails.

We will now walk you step by step, through the setup screens for WANdisco Failover Agent. For rest of the installation, please follow the WANdisco Replicator administration guide.

The setup screen below presume a Subversion deployment but they are applicable (with different default ports) to CVS or Subversion-HTTP deployments as well.

  1. Startup the setup program:
    $ [replicator]/bin/setup
    
    Please go through the initial WANdisco Replicator setup screens as documented in the WANdisco Replicator administration guide

  2. Select how many replicas (including the primary) do you need

    We recommend 3 replicas (1 primary plus 2 backups) as that ensures maximum availability under rolling failure scenarios (multiple node or communication link/network failures).

    You need a minimum of 2 replicas with the WANdisco HADR.

    Now you will specify the number of replicators/replicas that
    are being setup. Each replicator will act as a proxy for the
    local repository replica. After specifying the number of replicas,
    you will be prompted for the network settings for each replica.
    
    How many replicas do you want? [2] : 2
    

  3. Select the option to install the WANdisco Failover Agent.
    If you have a license for HADR product, you can choose to configure
    the failoveragent. The failoveragent will then act as a proxy for the
    SCM clients. If the failoveragent detects the primary replicator
    node is down, it can automatically failover svn clients to one
    of the configured backups. In this interview you will define the priority
    for each replicator. A replicator node with priority 1 will act as
    the primary. When failing over to a backup, an alive node with the
    smallest priority number will be chosen. So for example a replicator
    node with priority 2 will be chosen over a node with priority 3 if
    both are alive.
    
    
    Is Failover Agent needed? Y/N [N] :
    
  4. Specify the Ethernet MAC address of the machine where WANdisco HADR would run.
            Setting up Failover Agent ....
            _________________________________
    
    Now you will specify the Ethernet MAC address of the host on which
    Failover-Agent would be running. It is required that you specify a unique
    MAC address for each host on which Failover-Agent would be running.
    The MAC address on UNIX can be obtained via "ifconfig" command
    and on Windows via "ipconfig /all" command. The MAC Address looks like
    this - 00-02-A5-C1-7A-2F (Windows) or 00:02:A5:C1:7A:2F (UNIX). If you
    don't have all the MAC addresses handy, now would be a good time to
    get them before proceeding further.
    
    Enter the MAC Address : 00:12:E5:C1:7A:2A
    
  5. Specify the WANdisco Failover Agent host and port. This is the host and port that would be accessed by the SCM (for instance CVS or Subversion) clients.
            Setting up Failover Agent ....
            _________________________________
    
    Now you will specify the host:port used by Subversion clients to
    connect with the Failover-Agent. Setting the port to 3690,
    would be the most transparent option from the Subversion client
    perspective. Note you can NOT specify 0.0.0.0 or localhost
    as the host on which Failover-Agent would be running. The
    hostname needs to be the DNS hostname or the valid IP address to
    which remote Subversion clients as well as remote Subversion Failover-Agents can connect.
    
    For example, let us say on a subnet  192.168.1 in Tokyo, the LAN address of
    Failover-Agent machine  is 192.168.1.29 and the external WAN address is
    203.23.12.129 (DNS hostname is tokyo.svnrus.org). The Failover-Agent address
    should be specified as 203.23.12.129 or tokyo.svnrus.org and NOT 192.168.1.29.
    
    Enter the hostname or IP address of the Failover-Agent : tao
    
    Enter the TCP port for the Failover-Agent [3690] :
    
  6. Specify the port used by the WANdisco HADR to communicate with other Replicators, as well as the Web Administration port. You can also specify a nice name for the WANdisco Failover Agent node. This will be used in the Web console to denote the WANdisco Failover Agent node instead of the default host:port name.

            Setting up Failover Agent ....
            _________________________________
    
    
    Now you will specify the DConeNet port used by the Failover-Agent to
    communicate with other Replicators. This is not visible to Subversion
    clients but used for actual data transfer between the Replicators
    and/or Failover-Agents.
    
    Enter the TCP port for DConeNet [6444] : 6444
    Enter a nice name for the node, for e.g. "Tokyo Site" [tao:6444] :
    
  7. For each replicator you install, choose an appropriate failover priority. The failover priority of 1 is used for the primary WANdisco Replicator. When the primary WANdisco Replicator node fails, an alive node with smallest priority number is selected as the current primary. Please choose the priority based on the preferred failover order for WANdisco Replicator nodes.
            Setting up replicator instance .... #1
            ______________________________________
    
    Since you have elected to configure a Failover Agent, you will need to
    specify the priority for each replicator. The priority order determines
    which replicator instance is picked when failing over. Choose priority
    of 1 for the Primary replicator. Smaller numbers indicate higher priority.
    
    
    Enter a failover priority [1-2] [1] :
    

  8. Please complete the rest of the WANdisco Replicator installation. You will want to follow the WANdisco Replicator administration guide here

  9. Please copy the generated files to WANdisco HADR and WANdisco Replicator's config directory on each host and rename them to prefs.xml. Now you are ready to run the WANdisco HADR.

5.1 Post-install

5.1.1 Tune the heartbeat frequency

The WANdisco Failover Agent by default uses a heartbeat frequency of 1 heartbeat every second. This is appropriate for a LAN deployment. If you are deploying the WANdisco HADR over a WAN, then you may want to change the heartbeat frequency based on WAN latencies. The heartbeat interval should be 2-3 times the expected WAN latency between WANdisco Failover Agent and the replicator site. This will ensure missing heartbeats can be distinguished from a slow network link.

You can also tune the number of missing heartbeats that dictates when the WANdisco Failover Agent marks a replicator node as dead and triggers failover. Default is 4.

These values can be dynamically tuned from the WANdisco Failover Agent web console:

Image heartbeat

5.1.2 Setup startup commands

The WANdisco Failover Agent is capable of starting the WANdisco Replicator nodes from the web-console directly, provided you enter the startup commands via the web-console. The WANdisco Failover Agent can use ssh to launch WANdisco Replicators on remote machines also as depicted in the following screen-shot:

Image start_command

5.1.3 Setup an email for alerts

The WANdisco Failover Agent is capable of generating email alerts provided an email address is specified via the web console. The email alerts are generated whenever the WANdisco Failover Agent detects an event related to failover :

These values can be dynamically set from the WANdisco Failover Agent web console:

Image notifications

5.2 Silent install option

Express setup tool supports a -silent and -record option to allow an admin to perform a silent install without being prompted for input on the console.

An admin could start the setup program in the record mode and then latter use the recorded answers file to replay the answers and perform a silent install. The admin could modify the recorded answers in a text editor and then use -silent to create new configuration files. For example

$ ./svn-replicator/bin/setup  -record my-answers
$ vi my-answers
$ ./svn-replicator/bin/setup  -silent my-answers
$ ./svn-replicator/bin/setup  -silent old-ans -record new-ans

The answers are recorded continuously, so if you restart setup you can also use the recorded file to pick up from where you left off, without having to re-enter the answers.

For more information look at the usage of the setup command:

$ ./replicator/bin/setup -h

setup [-silent recorded-setup-file]  [-record file-to-record-to]

-silent recorded-setup-file :
                Silent install will use the supplied "recorded-setup-file" to
                automatically answer the setup interview questions. If all the
                answers are not supplied, it will prompt on the console.

-record file-to-record-to
                Will record all the valid interview answers to  the
                "file-to-record-to". Can latter be used for silent install.

                Both options can also be used at the same time. For
                example to continue an install from where you last
                left off you could do:

                setup -silent prev-silent-file -record new-silent-file