Setting Up a Dual DrawMGT System

Introduction

A dual DrawMGT system contains an internal (secure, primary) and and external (shared, secondary) systems. The systems are basically independent from each other, but synchronized. See Dual System DrawMGT Design and Implementation Notes

Setting Up a Dual System

Note, that internal and external systems can be on the same computer on a development system.

All of the examples below assumes that the primary and secondary instances are centos1.tibi1959.hu-dev1 and centos1.tibi1959.hu-dev2, and the primary and secondary main directories and databases are linthal114dev1 respectively linthal114dev2'.

Instance Setting of the Systems

Create the instance settings for the two systems first, e.g. centos1.tibi1959.hu-dev1 and centos1.tibi1959.hu-dev2. See this instance settings in CVS branch V11_4_PROD-BRANCH.

The new settings for the internal system (centos1.tibi1959.hu-dev1):

The new settings for the shared system (centos1.tibi1959.hu-dev2):

Checking Out The Development System

Checkout to primary system first as usual (assumed CVS user: ntibor, main development directory: /var/www/html/dev, apache user: apache, site: linthal, instance: centos1.tibi1959.hu-dev1):

Checkout the secondary system similarly:

Note, that it is recommended to use one system, e.g. the primary as master. That means, that every files in app, lib and cfg/.../site are edited in the primary system and the changes are copied to the shared system, to avoid that we are getting confused what should be checked in CVS and where. There is a small shell script, which can make the copy with rsync very quickly:

Migrating Database and Generating System Components

There is a chicken and egg problem, so at the first time run setup.sh on both systems as described in the next paragraph. It is not necessary at subsequent run.

Create the versioning, mirroring schema and trigger files, by calling app/etc/genMeta.pl -b.

The same for the secondary system:

After these steps you will have two databases (linthal114dev1stg, linthal114dev2stg) as staging area with one table (MirrorRecords). The table MirrorRecords contains all records to be mirrored. The field processStatus shows the state of the mirroring:

Note, that from version 11.5 the loadSystem.sh is using the old primary database on the secondary system. So, if the two systems are not on the same computer, the old primary database should be temporarily copied to the secondary computer manually.

Setup Directories and Permissions

Run setup.sh for both systems as root as usual:

Setup Event Records

Not necessary anymore. The records are created automatically.

The new event records (Resceduling Mirroring (in), Resceduling Mirroring (out)) must be inserted manually into the database of the internal system:

Start Event Dispatcher

The event dispatcher should be run every minutes from crontab or it can be started manually in test phase. All database mirroring jobs will be done by the event dispatcher on the internal system. You can set the re-scheduling time smaller then 60sec, e.g. 5sec on the development system to allow to process records nearly immediately if you start the event dispatcher from the command line:

Copying var/.../data

It is necessary to synchronize the directory var/.../data of the external system to the internal system, to achieve, that the document files are copied to the internal system. If you want to do so, enter the following line into root's crontab on the internal system if the two systems are on the same machine (development system):

or the next line if the two systems are on different systems (in this case root should use rsync without password):

SetupDualDrawMGTSystem (last edited 2011-05-10 11:44:30 by 195)

Copyright 2008-2014, SoftXS GmbH, Switzerland