Automating replication

The initial creation and transport of a replica is done manually, probably in off hours. The subsequent synchronization process is automated to run as a fairly continuous background process. It is typical to replicate every 15-30 minutes between sites.

The MultiSite administration commands are done from a command line interface. To set up automated replication, create or use existing scripts that run from a scheduler. ClearCase includes a scheduler but any scheduling mechanism is fine. For example, the UNIX cron scheduler is still commonly used.

Replication tasks

In this section we describe the processes that you have to automate.

The ClearCase scheduler includes Perl scripts for many of these operations in the task library config/scheduler/tasks. They are preconfigured but disabled in the scheduler. ClearQuest does not yet bundle automation scripts, but some samples can be found on developerWorks.

Tip

You can find documentation on the MultiSite automation scripts by using the help option. For example, from Windows:

cd C:Program FilesRationalClearCaseRationalconfigscheduler	asks
sync_export_list -help


Packet creation

This is the syncreplica -export command, which creates a packet with the changes from the last export and a shipping order describing where to send the packet. If there are no changes, an empty packet is created and thrown away. The ClearCase task library (config/scheduler/tasks) includes a Perl script called sync_export_list to be used for this purpose.

Packet transport

If you are using the shipping server, transport is managed through the -fship option (ship me now). If you are using some other transport mechanism, you have to automate the push process.

Also include a polling script to push any packets that got left behind; either the server was not reachable or a packet came in that has to be pushed to another site. Shipping server polling is done through the command shipping_server -poll. Polling is included as an option in the sync_export_list command.

Packet import

This is the syncreplica -import command. The task library includes a Perl script called sync_receive to handle ClearCase imports. If you using the shipping server, enable the receipt handler to run this script. The receipt handler is run when any packet is received by the shipping server.

Auditing shipping bays

If a server or network goes down, or a packet is lost on the network, packets can accumulate in the shipping bays. This is one of the most important maintenance activities for MultiSite. Accumulating packets means that the sites are falling out of sync.

When you are first starting with MultiSite, you will manually inspect the shipping bays on a daily basis. Automate this inspection to run every few hours and send mail if there are more than the expected packets in the shipping bays.

Scrubbing ClearCase MultiSite logs

MultiSite creates the synchronization packets by managing an operation log and keeping sync_export records of shipping history. The default is to keep this information forever. The logs are used for recovery of remote sites, so scrub these logs very conservatively. See the MultiSite Administrator’s Guide for details on setting up the proper scrubbing of the operation logs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.4.181