Task #601

Setup another Mercurial at Dev server

Added by Tan Lee Yong almost 14 years ago. Updated over 10 years ago.

Status:Dropped-End of life cycleStart date:October 28, 2010
Priority:NormalDue date:October 29, 2010
Assignee:Avatar?id=1733&size=14Ahmad Hazri % Done:

90%

Category:-Spent time:7.00 hours
Target version:-

Description

The main purpose of this exercise is the setup another Mercurial server and have both hg data being sync.
1) user login to both hg using same user name and password
2) once user updated data, data shall be sync to another server

To setup another Mercurial at site office dev server.
Try to setup with installation
1) backup the hg folder
2) restore the hg folder to the dev server
3) bring up the mercurial in dev server to see does it work

If the above not working
1) install a new Mercurial at the dev server
2) copy the source and user profile from hg folder
3) restore the hg at dev server
4) bring up the mercurial in dev server

Once the Mercurial is successfully in setup, need to test on mercurial file synchronization using UNISON.
1) make a copy of the hg folder at the HG server for testing
2) install unison to both HG and Dev servers
3) setup up the unison to syn both the hg source and user profile folders, use the HG server copy version for testing
4) test to see does it works
5) if works, then set the unison to syn with the working copy of the hg

unison-2.27.57-manual.html Magnifier (227 KB) Ahmad Hazri , November 08, 2010 11:03

History

#1 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

  • Status changed from New - Begin Life Cycle to Development / Work In Progress

Production server

Hostname: hub.penril.net
IP : 219.95.244.229
OS : Ubuntu Linux 9.10

Repo dir: /hg

+TARGET SERVER: DEV Server @site +

Hostname : dev-app
IP : 192.168.1.126
OS : Oracle Linux 4.5

+TESTING SERVER: demo4 (@Office) +

Hostname: demo4
IP: 192.168.1.105
OS : Oracle Linux 4.5

#2 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

  • % Done changed from 0 to 30

Issue:

Trying and simulating to install in similar dev-app server (1st requirement) environment but failed.
Thus, we setup another machine similar to mercurial server environment.

OS : Ubuntu Linux 9.10

#3 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

  • % Done changed from 30 to 40

UPdate:
Manage to install and configure the Mercurial + Apache Http Server

Testing directory
/hg_test

Next
Configure Unison.

Version: 2.27.57 (both server)

Note:
No SSL (HTTPS)connection for this testing

#4 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

Unison for current version (2.27.57 ) manual

1) Set new Profile - default.prf(auto created) under /home/hg/.unison
2) This profile specifies permanent settings for roots, paths, ignore patterns, and other preferences, so that they do not need to be typed at the command line every time Unison is run
3) For the 1st time propagation, execute unison
4) once everything is synchronized successfully to both machine , next time unison can be execute with -silent parameter which will accept default value and print error if any.

unison -silent

Note:
Since we required ssh connection between both servers, this will prompt out password everytime unison is activated, thus we generated a key pair for both machine (same user). The user that we use is hgadm

#5 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

  • % Done changed from 40 to 90

Update:

Unison command execution will take place on new mercurial server (dev-app2).

dev-app2 ---> hub.penril.net

#6 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

  • Status changed from Development / Work In Progress to Internal Testing

#7 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

Update:
Upgrade Unison to latest version - 2.32.52
resolved for issue:

"Fatal error: Trying to transfer too much data in one go.
If this happens during update detection, try to
synchronize smaller pieces of the replica first
using the "path" directive." 

ToDo:
Read the Unison 2.32.52 manual for features/preferences changed from prior version.

#8 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

Update:

Unison working as expected.

Next
Testing on cronjob

#9 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

Update:

1)Unison + Cronjob is working now
2) SSL configured (HTTPS)

#10 Avatar?id=1733&size=24 Updated by Ahmad Hazri almost 14 years ago

Update:

1)Server moved to Site Office.
2)Internal test from site office - ok

Plan to do full sync on Saturday Nov 25, 2010

#11 Updated by Abu Bakar Mohamed Sahabanali almost 14 years ago

Synchronization Action Plan

Back up at Hub (219.95.244.229)

1. Copy /hg folder to thumb drive at 5.30pm on Friday(3/12/2010).
2. Make the back up with change /hg dir to /hg_backup_20101204
3. Create new /hg dir and make sure the owner and permission is correct.
chown --> hgadm:hgadm
chmod --> 775

Restoration at Dev2 (dev_app.no_ip.net/192.168.1.127)

1. Delete all folder or data that exist in the existing /hg dir.
2. Restore the /hg dir content that copied earlier from the thumb drive into the existing /hg dir at Dev2.
3. Make sure the /hg folder owner and permission is correct and same as Hub server.
chown --> hgadm:hgadm
chmod --> 775

Running Unison

Test Connection

1. Edit Unison profile file to enable the testing dir.
2. Open /home/hg/.unison/default.prf
3. Comment out (to enable the test dir)
root = /home/hg/a.tmp
root = ssh://219.95.244.229/hg/a.tmp
4. Save and execute unison –testserver
5. Make sure no errors prompt out during the execution.

Run the task

1. Edit again /home/hg/.unison/default.prf
2. Disable back the two lines that enabled for test connection before.
3. Then enable this two lines in the default.prf
root = /hg
root = ssh://219.95.244.229/hg
4. Execute unison.

#12 Updated by Abu Bakar Mohamed Sahabanali almost 14 years ago

An error occur during the synchronizatin.

*h1. write failed : broken pipe
*h1. fatal error: connection lost

Try to fix the error with add 'ClientAliveInterval 30' in /etc/ssh/ssh_config file

#13 Avatar?id=1733&size=24 Updated by Ahmad Hazri over 10 years ago

  • Status changed from Internal Testing to Dropped-End of life cycle

Drop till new Public IP added.

Also available in: Atom PDF