Cisco Confidential 1© 2013 Cisco and/or its affiliates. All rights reserved.
NCS Replication and Recovery
ETG team - DeliveryRally US 137332
Rajesh Tripurneni
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Replication Analysis Questions
• How will teams at remote sites handle the following operations in a streamlined and efficient way?:- Pulling down the entire code base (cloning)- Pulling down the latest changes (pulling)- Pushing changes into the “master” origin
• How can we use replication to help us with disaster recovery or other outages?
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
Option 1 – Single Pull/Push Site
• Remote sites pull from and push to the master origin (RCDN).
• Advantages- Only one source to get the code from
• Disadvantages- Takes a long time to pull down the code- Requires a lot of bandwidth to pull down the code
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
Option 2 – Remote Tracking Branch (RTB)
• Create a RTB in RCDN to help control commits
• Advantages
• Disadvantages- Not recommended or supported by the SCMCI team (http://
wikicentral.cisco.com/display/PROJECT/High+availability+with+Git+using+Remote+Branch+Tracking)
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
Option 3 – Cloned Repos at Remote Sites
• Remote sites pull from a remote origin at their site and push to the master origin (RCDN).
• Advantages- Pulling down the code is faster, since the clone is local- Having only one Gerrit location to push to reduces or
eliminates synchronization errors in the master repos
• Disadvantages- More setup involved
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
Option 4 – Separate Repo Setup at Remote Sites
• Remote sites pull and push from a remote origin at their site. Periodic pushes occur between the remote origin and the master origin.
• Advantages- Pulling down and pushing back code is faster, since the
origin is local
• Disadvantages- Synchronization problems- Increased merge conflicts
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
Recommended Solution (Option 3)
Developer workspace (US)
Developer workspace (BGL)
NCS Gerrit Server (RCDN)
gpull
gpullt
rig
ge
r
gpush
gpush
merge
NCS repos(master copy)(RCDN)
git
pull
NCS repos(clone)(BGL)
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
Recommended Solution for Recovery
NCS repos(master copy)(RCDN)
NCS repos(clone)(BGL)
NCS repos(clone)(RTP)
NCS repos(clone)(SJC)
git pull
git pull
git pull
© 2013 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
Option 3 – Implementation Considerations
• Replication for Code Development- Update the gpull and gpush wrapper scripts so that they
automatically pull and push from the correct origins, based off of the user’s location
- Set up a Gerrit trigger on the NCS Gerrit server which notifies remote clones to initiate a git pull, so that they can be updated
• Replication for Recovery- Reach out to the SCMCI team to help get IT supported Git
clones set up (http://wikicentral.cisco.com/display/PROJECT/SCMCI+-+Centrally+Supported+Git)
- Set up a polling or transaction based method of updating the Git clones
Thank you.