Features, discussions, tips, tricks, questions, problems and feedback

Procedure of making changes to redundant/clustered system

When integrating changes into existing online redundant system, there is a specific set of steps recommended to take to make the transfer as smooth as possible and seamless for Operator.

  1. Turn off Adroit/MAPS related services on standby server. This way if any Operators are currently connected to standby server, they will switch to primary.
  2. Upload changes to standby server. You can use restore functionality, but in such case, make sure afterwards to check Agent Server cluster settings (cluster name, project name, agent server name) and SmartUI/MAPS Server name as it might reset afterwards. Otherwise manually upload new files to project.
  3. Start services on standby server. Check with local Operator if all the changes were applied respectively (test new solutions). You might need to check if caching is not locking down Operator from using new version of project.
  4. If everything is ok on standby, now it is time to turn off Adroit/MAPS related services on primary server. Operators will automatically switch to standby and start displaying new project.
  5. Upload changes to primary server. Use the same caution as in point 2.
  6. Start services on primary server. Once again check if everything is alright locally. If there is a need for Operators to switch back to primary again, stop SmartUI/MAPS server on standby briefly to force them to reconnect with initial server.
1 Like

It is possible to automate part of this procedure with commandline script. In below a sample code where we copy between CSP-SERVER1 and CSP-SERVER2 wgp file, datasources settings and graphic forms in Test project. To see the changes done in wgp file (agent server), it would be required to restart agentserver, same comes to changes to datasources while graphic forms changes should be visible immediately (eventually after refresh of graphic form - check this article: Graphic form caching and why sometimes operator keeps using older graphic forms?)

@echo off

set strSource=CSP-SERVER1
set strDestin=CSP-SERVER2

set strDirSourceData=Adroit Technologies\Adroit\Configurations\CSP-SERVER1\Data
set strDirDestinData=Adroit Technologies\Adroit\Configurations\CSP-SERVER2\Data
set strDirSourceMAPSData=Adroit Technologies\MAPS\Configurations\CSP-SERVER1\Data
set strDirDestinMAPSData=Adroit Technologies\MAPS\Configurations\CSP-SERVER2\Data
set strDirSourceProj=Adroit Technologies\MAPS\Configurations\CSP-SERVER1\Projects\Test
set strDirDestinProj=Adroit Technologies\MAPS\Configurations\CSP-SERVER2\Projects\Test

echo Source.....: %strSource%
echo Destination: %strDestin%

pause

echo Sync Adroit Data started
xcopy "\\%strSource%\%strDirSourceData%\"CSP-SERVER1.wgp "\\%strDestin%\%strDirDestinData%" /R
del "\\%strDestin%\%strDirDestinData%\"CSP-SERVER2.wgp
pushd "\\%strDestin%\%strDirDestinData%\"
rename CSP-SERVER1.wgp CSP-SERVER2.wgp
echo Sync Adroit Data finished

pause

echo Sync MAPS Files started
xcopy "\\%strSource%\%strDirSourceMAPSData%\"*.* "\\%strDestin%\%strDirDestinMAPSData%\"*.* /R
echo Sync MAPS Files finished

pause

echo Sync MAPS Projects started
xcopy "\\%strSource%\%strDirSourceProj%\"*.* "\\%strDestin%\%strDirDestinProj%\"*.* /R /s
echo Sync MAPS Projects finished

pause

The above-mentioned batch script should be placed in a (.BAT) or (.CMD) file. This file can be run directly or form part of a scheduled task (using Task Scheduler) to automate the synchronization process.

NOTE: In order not to accidentally overwrite any newer files, the /d command line switch can be added to the XCOPY command, for example:

xcopy “\%strSource%%strDirSourceMAPSData%”. “\%strDestin%%strDirDestinMAPSData%”. /R /d

1 Like