380 likes | 696 Views
Perforce @ SAP. Vladimir Velinov Build Engineering Team SAP Labs Bulgaria. Perforce SCM. Perforce@SAP. Demo. Q&A. Perforce SCM. Perforce@SAP. Demo. Q&A. Glossary of terms. Perforce (P4) calls it… Other SCMs…. add check in, extract part . branch codeline, project, stream.
E N D
Perforce @ SAP Vladimir Velinov Build Engineering Team SAP Labs Bulgaria
Perforce SCM Perforce@SAP Demo Q&A
Perforce SCM Perforce@SAP Demo Q&A
Glossary of terms Perforce (P4) calls it… Other SCMs… add check in, extract part branch codeline, project, stream changelist changeset client workspaceproject, view, sandbox, family + release + component + work area depot repository, archive edit check out (for edit) head revision tip revision, head integrate merge, branch resolve merge revertuncheckout, undo checkout, unlock revision or part submit checkin, put synccheck out tip, refresh, extract part, get version
How Perforce works Master file repository
Changeslists • Integration history • Labels • Client workspaces • … Perforce server
P4 users and clients • P4 users • Unique name (case sensitive) • Can be organized in groups • Security is managed by protection tables (admins only) • P4 Clients (client workspace) • Mapping P4 server depot -> local FS • Have a local root • Client view of depot • Stored in Server DB and keeps the file versions on developers FS • Write permission is enabled when you edit file and disabled when you submit changes • Line ending (CR/LF) is determined automatically
P4 File management • File structure - herarchical • Example: //depot/project/release/… • File operations • Add - add new file to depot • Edit - modifies existing file • Delete – marks file as deleted • Obliterate – physically delete file (admins only) • Branch/Integrate – merge changes from another branch • File types • Base types – text, binary, symlink, unicode, apple • File type modifiers • Storage method
P4 Changelists • What are changelists? • Logical units to organize your changes • Atomic change transactions • Ensure consistency of your work – related changes in files are checked in together • Unique numbers • Creating changelists • Default changelist • Lock/unlock files or shared locks • Submiting changelists • Enter some description • Resolving conflicts • Manual – merge tool • Auto resolve • Properties • Number (unique) • Description – text info • List of affected files • user@client • Timestamp
P4 Jobs • Basic defect tracking mechanism • Description • Status • Link to a changelist(s)
P4 Labels • Snapshot of current state of set of files • Use names instead of numbers • Can be used when creating releases • Can be used to restore older releases
Branching • Branching • Managing changes between two or more sets of related files • Inter-File branching • Uses codelines (file sets) • Source -> Target codeline • Low overhead - Lazy copy
Integration • Integration • Propagate changes between two or more codelines • Keep track of fixes • Integration history Next: Revision graph
Revision graph New feature codeline Dev codeline Released codeline
Revision graph – Real life example Dev codelines Milestone codelines New feature codelines Delivery codelines Special customer codelines
P4 Installation & Toolset • Installation • Download from www.perforce.com • Trial version supports 2 users/clients • Support for most major platforms - Win/UNIX/MacOS • Toolset • P4D – Perforce server • P4S – Perforce server service (Windows only) • P4 – command line client • P4Win – GUI for Windows • P4V – cross platform GUI • P4Web – Web GUI for remote access • P4Proxy – Caching for distributed development • P4Merge – Perforce merge tool • P4Diff – Perforce diff tool
Perforce SCM Perforce@SAP Demo Q&A
80+ Perforce server instances 2006.1 Upgrade of all instances 4,600+ Registered Perforce users History of Perforce within SAP Evaluation of SCM systems First Perforce server at SAP 1998 1999 Productive move from ClearCase, SCCS into Perforce ’00-’04 Tool infrastructure development & maintenance Major Hardware investments & performance improvements P4MS – PerforceManagementSystem running on SAP NetWeaver + 2005
SAP's Global R&D Organization Hungary Budapest 45.79% Germany Walldorf and satellites 3.69% China Shanghai Canada Montréal Bulgaria Sofia 13.52% 4.57% North America Palo Alto and satellites Israel Ra’anana 17.74% 6.55% India Bangalore Monthly transfered volume via P4 protocol
Key figures – User/License growth USERS SERVERS LEVELS FILES/REV CURRENT Perforce users & licenses +11.6% users last year
Key figures – Server growth USERS SERVERS LEVELS FILES/REV CURRENT Perforce servers +11,6% users last year ~8 new servers per year
Key figures – Project & codeline growth USERS SERVERS LEVELS FILES/REV CURRENT Perforce projects (2nd) & codelines (3rd) +11,6% users last year ~8 new servers per year ~2,000 new projects last year
Key figures – File & revision growth USERS SERVERS LEVELS FILES/REV CURRENT Perforce files & revisions +11,6% users last year ~8 new servers per year ~2.000 new projects last year >10 Mio files added last year
Key figures – Current overview USERS SERVERS LEVELS FILES/REV CURRENT Current overview +11,6% users last year ~8 new servers per year ~2.000 new projects last year >10 Mio files added last year ~27 p4 calls per second
Hardware setup • Cluster node 1 & 2: • FSC PrimePower 450N • CPU: 4 x 1320 MHz • Memory: 32GB • OS: SunOS 9 • Cluster node 3 & 4: • FSC PrimePower 650 • CPU: 8 x 675 MHz • Memory: 32GB • OS: SunOS 9 • Shared Storage (SAN): • 2 x EMC Clariion CX500 (mirrored) • Size: 3TB each HA ensured by PRIMECLUSTER
HA Setup Location I Location II Cluster Node 1 Cluster Node 2 Cluster Node 3 Cluster Node 4 2 Fibre Channel SAN switches 2 Fibre Channel SAN switches EMC I EMC II Mirroring filesystem per service Redundant 2 Gbit/s Fibre Channel connections Redundant Gbit/s Ethernet connections
Production process (development phase) • Dev • Submit changes to ‚dev‘ after local test • nightly build, central deployment to test system and test • Release change for transport to ‚export‘ • Export • Collect changes of ‚dev‘ (gate to patch) • Transport (copy) content to ‚patch‘ in regular intervals (e.g. weekly cycle) using a timestamp • Patch • Small group of developers is allowed to apply fixes for stabilization • approval by Quality Manager(s) • Transport (copy) content to ‚cons‘ • Cons (consolidated code line) • ready to be used by dependent components/products cons delivery Maturity patch last call export collect, synchronize dev develop t
Java projects dependencies – real life example 79 projects
Depot/Directory Structure depot project codeline
Source transports between the code lines • Integration • Manual transport (p4 integrate) • Tools provided by Perforce (p4.exe, P4Win and P4V) • Ignores dependencies between changes • Used to create identical codelines = full copy e.g. initial creation of (remote) maintenance codelines out of development codelines (P4MS) • Consolidation • Controlled integration • Tools developed within SAP based on „p4 integrate“ • Takes dependencies between changes into account • Allows bundling of changes • bundle = set of changes that have to be transported together (e.g. c1 and c2) • Shows status, user and timestamp of a transport • N (new), P (consolidation in process), E (error), W (waiting for dependent change), C (consolidated) • No multi-server so far Perforce@SAP
Perforce SCM Perforce@SAP Demo Q&A
Perforce SCM Perforce@SAP Demo Q&A
Questions? Q&A