SVN Pilot: CVS Replacement
Total Page:16
File Type:pdf, Size:1020Kb
SVN Pilot: CVS Replacement Manuel Guijarro Jonatan Hugo Hugosson Artur Wiecek David Horat Jonathan Brugge Michel Manent September 2008 CERN - IT Department CH-1211 Genève 23 Switzerland www.cern.ch/it Outline • Introduction • Motivation • Subversion • Objectives • Performance Tests • Security • IlImplemen ttitation • Questions CERN - IT Department CH-1211 Genève 23 Switzerland 2 www.cern.ch/it Version Control Systems • Maintain current and historical versions of files and data (source code) • There are many commercial and Open SVCSSource VC Systems: – (Centralised) CVS/SVN – (Distributed) GIT, Bazaar, Darcs, GNU arch, Mercurial, Monotone, etc – But subversion seems to be the most popular one (used by GCC, Phyton, PuTTY, Apache, GNOME, KDE , etc) • Physics User Community: (IN2P3, ROOT, CERN - IT Department Totem.. ) CH-1211 Genève 23 Switzerland 3 www.cern.ch/it CERN Central CVS Service • Hosts over 330 Software Projects – 29 for Atl as – 46 for CMS – 8 for LHCb,….. • Over 3000 developers registered • Over 90 GBytes of source code • Creates 250 Remedy tickets per year • Over 100000 commits per month CERN - IT Department CH-1211 Genève 23 Switzerland 4 www.cern.ch/it CERN Central CVS Service CERN - IT Department CH-1211 Genève 23 Switzerland www.cern.ch/it Central CVS service features • High Availability and Load Balancing • Web interface to repositories • Usage Statistics • Repository Remote Replication + Mirroring • Daily archive of Repositories and DR • Developers Mailing list • P/PtCPre/Post Commit itAti Actions (suc h us e-mail notification, etc) • Various access method (ssh/kerberos) • Role spp(lit (CVS Admin/Librarian/Develo p)per) CERN - IT Department CH-1211 Genève 23 Switzerland 6 www.cern.ch/it Motivation for SVN Pilot • Originally designed to host less than 100 projects • Requests to provide a central SVN service: – From CMS – From ATLAS (case study in 2006) – And from many others • CVS is over 20 years old while SVN is this millennium technology • Requests for Read Access control CERN - IT Department CH-1211 Genève 23 Switzerland www.cern.ch/it SVN vs. CVS Feature SVN CVS Speed Faster Slower Permission Full Limited File types All Limited Off line operations Yes No Repository format Database File system Locks No Yes Atomic commits Yes No CERN - IT Department CH-1211 Genève 23 Switzerland 8 www.cern.ch/it New Features (SVN 1.5) • Automatic update of working copy • Merge tracking – Subversion keeps track of what changes have bdhbeen merged where • Sparse checkouts • Interactive conflict resolution CERN - IT Department CH-1211 Genève 23 Switzerland 9 www.cern.ch/it Pilot Objectives • Provide current CVS service features • Add new features (available with SVN) – Control Read access per path (module) – Authenticated Web access – Binary files handling • Ease CVS to SVN migration • Improved usage statistics (SVN Stats) • Handlinggppp of first line support via the Help Desk • Delegate administrative tasks to Software Librarians of each project • Prevent uncontrolled setup of SVN servers • Manpppjower: 1.2 FTE project CERN - IT Department CH-1211 Genève 23 Switzerland www.cern.ch/it Timetable Feb • Preliminary study 2008 May • CVS librarians feedback 2008 July • SVN Pilot 2008 • SVN service in production Dec • CVS to SVN migration 2008 Dec • CVS service close down 2009 CERN - IT Department CH-1211 Genève 23 Switzerland 11 www.cern.ch/it SVN Pilot study • Access methods – https – ssh • Shared storage – NFS 3/4 – AFS • Securing service – Restricted Shell – Chrooted hooks ((p)commit scripts) • Infrastructure: – Librarian tools, Statistics, Web Interface,… CERN - IT Department CH-1211 Genève 23 Switzerland 12 www.cern.ch/it Performance Tests • SVN check out of a 110 Mb project • Parameters – AFS/NFS3/NFS4 – HTTPS/SSH CERN - IT Department CH-1211 Genève 23 Switzerland 13 www.cern.ch/it AFS vs NFS3 (1 server) CERN - IT Department CH-1211 Genève 23 Switzerland 14 www.cern.ch/it AFS vs NFS4 (1 server) CERN - IT Department CH-1211 Genève 23 Switzerland 15 www.cern.ch/it AFS vs NFS4 (3 servers) CERN - IT Department CH-1211 Genève 23 Switzerland 16 www.cern.ch/it Preliminary Conclusions • AFS much faster than NFS • SSH much faster than https • SSH scales very well with high load • … • New tests ongoing (with mixture of read and write operations) CERN - IT Department CH-1211 Genève 23 Switzerland 17 www.cern.ch/it Security • Project Isolation • Windows/Linux clients • Worldwide access • Shared file system independent • Hooks executed on servers • Librarians may put any script into the hooks • Librarians might need file system level access to repository – being studied Security risk!! CERN - IT Department CH-1211 Genève 23 Switzerland 18 www.cern.ch/it Hooks (scripts) Client Server Svn commit Pre-commit hook is executed Post commit hook is executed SVN: Commit OK Email notification recieved CERN - IT Department CH-1211 Genève 23 Switzerland 19 www.cern.ch/it Hook scripts chrooted: Server svnserer Librarian hooks: jailed hooks/post-commit hook Usr-hooks/post- commit hook Repository (1) Repositories System files CERN - IT Department CH-1211 Genève 23 Switzerland 20 www.cern.ch/it Architecture • svn.cern.ch (rw) – SdbiSecured subversion server (only ssh) – Read and write access to repository • svnwebcernch(ro)svnweb.cern.ch (ro) – User documentation – PjProjec t reques t – SVN web interface – Usage s ta tis tics CERN - IT Department CH-1211 Genève 23 Switzerland 21 www.cern.ch/it Pilot Implementation Summary • SSH access for SVN clients – Res tr ic te d s he ll for a ll SVN c lien ts – Hooks chrooted • SVN web (ro) – Web interfaces: websvn, trac – SSO Authenticated access • Administration delegated to librarian – Access rights – Hooks – Admin tools CERN - IT Department CH-1211 Genève 23 Switzerland 22 www.cern.ch/it Conclusions • Secure service • This will replace CSCVS by end o f 2009 • The service is supported (pre-production) • Pilot setup may differ from final setup – Access method, Web interface, shared file system, etc. – Changgpes will be transparent to the users CERN - IT Department CH-1211 Genève 23 Switzerland 23 www.cern.ch/it Support http://cern.ch/svn –Try the pilot –Documentation Svn. [email protected] CERN - IT Department CH-1211 Genève 23 Switzerland 24 www.cern.ch/it Questions? Thank s F or Li s ten ing…. M. Guijarro, A. Wiecek, David Horat, Jonathan Bugge, M. Manent, H. Hugosson CERN - IT Department CH-1211 Genève 23 Switzerland 25 www.cern.ch/it.