The console setup option can be used to quickly create the prefs xml configuration file used by WANdisco CVS Replicator. This is accomplished by running the bundled program, cvs-replicator/bin/setup. The text based UI will guide you through basic configuration options.
At the end of the consolesetup program, you would have created a prefs-{hostname}.xml file for each replicator in the replication group. Simply copy the prefs-{hostname}.xml to the cvs-replicator/config/prefs.xml file on the corresponding replicator host.
We will now walk you step by step, through the various setup screens.
$ cvs-replicator/bin/consolesetup
=====================================================
Welcome to the WANdisco Replicator's Express Setup
You can use it to setup configuration files used by
WANdisco CVS Replicator.
You will just need to enter the minimum information
required to setup each replicator instance. At the end
of the setup run, you will have a "perfs.xml" for
each replicator. Just copy it to the remote replicator's
config/ directory and start the cvsreplicator.
=====================================================
How many replicas do you want? [2] :
Setting up replicator instance .... #1
______________________________________
Now you will specify the Ethernet MAC address of the host on which
Replicator would be running. It is required that you specify a unique
MAC address for each host on which Replicator 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 :
Setting up replicator instance .... #1
______________________________________
Now you will specify the host:port used by CVS clients to
connect with the Replicator. Setting the port to 2401,
would be the most transparent option from the CVS client
perspective. Note you can NOT specify 0.0.0.0 or localhost
as the the host on which Replicator would be running. The
hostname needs to be the DNS hostname or the valid IP address to
which remote CVS clients can connect.
Enter the hostname or IP address of the Replicator#1 : cvshost.com
You specified cvshost.com, is this correct?[Y|N] [Y] :
Enter the TCP port for the Replicator#1 [2401] :
Setting up replicator instance .... #1
______________________________________
Now you will specify the DConeNet port used by the Replicator to
communicate with other Replicators. This is not visible to CVS
clients but used for actual data transfer between the Replicators.
Enter the TCP port for DConeNet [6444] :
Setting up replicator instance .... #1
______________________________________
Now you will specify the cvspserver host:port used by CVS server.
This is typically specified in the /etc/services or inetd file on UNIX.
For CVSNT on Windows, consult the CVSNT documentation. It is recommended
you change the default cvspserver port to something other than 2401 to avoid
operational errors. If the cvspserver is allowed to ONLY run on localhost, do
NOT specify a remote hostname or IP address then just specify localhost. The
default is 0.0.0.0 which means the Replicator and cvs pserver are running on
the same host. If that is not the case, please change it.
Enter the cvspserver hostname [0.0.0.0] :
You specified 0.0.0.0, is this correct?[Y|N] [Y] :
Enter the cvspserver port [2402] :
You specified 2402, is this correct?[Y|N] [Y] :
Generating a GUID for Replicator#1...b1e7b22c-b9ae-11d9-902a-0002a5c17a2f [Done]
Hit Enter to continue ....
Quorum Selection
-----------------
Singleton Quorum optimizes performance at the Distinguished node (which
can be rotated using a cron job or Replicator's scheduler).
Majority Quorum optimizes availability by ensuring a majority of sites
vote on a write transaction first.
Unanimous Quorum requires all sites to be up and running to commit a
transaction. See the DCone Administration Guide for further information.
You can select from the quorum list below:
1. Singleton
2. Majority
3. Unanimous
Choose a quorum [1] :
Which of the following Replicators will be the initial Distinguished Node?
1. cvshost-usa.com
2. cvshost-uk.com
Select the distinguished node [1] :
CVS Server Type Selection
-------------------------
Backend CVS repository can use either standard CVS distribution
or CVSNT distribution. You can use the "cvs version" command to
determine the server version and type.
You can select the CVS server type from the list below:
1. CVS
2. CVSNT
Choose a server type [1] : 2
Now you will specify the destination directory where prefs xml file for
each replicator will be generated. Remember to copy the generated
prefs-{replicator name}.xml file to the cvs-replicator/config directory
on each Replicator's host machine. After copying, make sure you
*rename* the file to "prefs.xml". If you forget to rename the
configuration will not take effect!
Enter the directory where prefs xml files will be saved [../config] :
++ Setup CVS related ports ++ Modify the listenerHost:listenerPort in the cvs-replicator/config/prefs.xml file to the host:port on which the WANdisco CVS Replicator will listen for incoming CVS client traffic. If you do not want the CVS client to modify it's CVSROOT, just ensure that the listenerHost:listenerPort stays the same as the current CVS server settings.
Next, point the serverHost:serverPort to point to the host:port on which CVS pserver is going to listen to. If using xinetd.d for launching CVS pserver, you may have to modify a file with a name like cvspserver to change the default port (2401) on which CVS pserver will listen on. This is required to avoid port conflicts when replicator and CVS pserver are running on the same box.
Here is a sample from cvs-replicator/config/prefs.xml that you can use as an example:
<CVSProxy>
<listenerHost>cvs-host</listenerHost>
<listenerPort>2401</listenerPort>
<serverHost>cvs-pserver</serverHost>
<serverPort>2401</serverPort>
<isCVSNT>true</isCVSNT>
</CVSProxy>
In the above, the same port (2401) was kept for both the
WANdisco CVS Replicator and CVS pserver as they are running on different hosts.
If that wasn't the case you will have to modify the CVS pserver
port if you want the CVS clients to retain their CVSROOT setting.
If changing the xinetd.d file, you would typically change
the port as following:
service cvspserver
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
log_type = FILE /var/log/cvspserver
protocol = tcp
log_on_failure += USERID
# port = 2401
# change port to avoid conflict with WANdisco CVS Replicator's listening port : 2401
port = 2402
server = /usr/bin/cvs
server_args = -f --allow-root=/tmp/cvsroot pserver
}
Sometimes, administrators specify the CVS pserver port in /etc/services:
cvspserver 2401/tcp # CVS client/server operationsIn that case, it may be simpler to just change the definition of the cvspserver port.
#cvspserver 2401/tcp # CVS client/server operations cvspserver 2402/tcp # CVS client/server operations
If you made any changes to /etc/services or the xinetd/inetd configuration files like cvspserver, be sure to restart inetd/xinetd itself. Otherwise the changes will not take effect and you will have trouble connecting with the CVS server.
++ Setup Replicator Group ++ You will install and setup a WANdisco CVS Replicator for each replica in your configuration. Each WANdisco CVS Replicator needs to be configured to connect with other replicators. We are essentially establishing initial group membership.
Let us say you need to create two replicas - one in San Francisco and one in Bangalore. You will install WANdisco CVS Replicator at each location. Then you will point them at each other as followings:
$ guidgen 2 GUID 0. = c9bcec19-4301-11d9-b12d-080020b0d8b8 GUID 1. = 3bfbf219-2918-11d7-80c5-00065be02953
<ProviderDescriptor>
<DefaultProviderId>3bfbf219-2918-11d7-80c5-00065be02953</DefaultProviderId>
</ProviderDescriptor>
<MemberList>
<Member name="3bfbf219-2918-11d7-80c5-00065be02953">
<Profiles>
<TransportPolicy>AlwaysDConeNet</TransportPolicy>
<Transport>
<DConeNet>
<ListenerIP>sanfranciso-replicator</ListenerIP>
<ListenerPort>6020</ListenerPort>
</DConeNet>
</Transport>
</Profiles>
</Member>
<Member name="c9bcec19-4301-11d9-b12d-080020b0d8b8">
<Profiles>
<TransportPolicy>AlwaysDConeNet</TransportPolicy>
<Transport>
<DConeNet>
<ListenerIP>bangalore-replicator</ListenerIP>
<ListenerPort>6020</ListenerPort>
</DConeNet>
</Transport>
</Profiles>
</Member>
</MemberList>
The first configuration parameter is a DefaultProviderId. This associates a
GUID with the specific data center at which we are setting up the replicator.
In the above cvs-replicator/config/prefs.xml file, we are associating the GUID 3bfbf219-2918-11d7-80c5-00065be02953 with the San Francisco data center. For Bangalore data center we
will associate the GUID c9bcec19-4301-11d9-b12d-080020b0d8b8 by
specifying it in the DefaultProviderId setting.
Next, we specify the Distributed Agreement Engine host:port for each data center. You can choose any static port. The ListenerIP field could specify a host name or an IP address. Now, when San Francisco data center starts up it knows how to communicate with the Bangalore data center and vice versa.
| Copyright © 2005 WANdisco | Sitemap | Privacy Policy | User Agreement | Contact Us |