Perforce @ SAP Vladimir Velinov Build Engineering Team SAP Labs Bulgaria.
-
Upload
krimhilde-rappe -
Category
Documents
-
view
121 -
download
8
Transcript of Perforce @ SAP Vladimir Velinov Build Engineering Team SAP Labs Bulgaria.
Perforce @ SAP
Vladimir Velinov Build Engineering Team
SAP Labs Bulgaria
Demo
Q&A
Perforce@SAP
Perforce SCM
Demo
Q&A
Perforce SCM
Perforce@SAP
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 4
Glossary of terms
Perforce (P4) calls it… Other SCMs…
add check in, extract part
branch codeline, project, stream
changelist changeset
client workspace project, 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
revert uncheckout, undo checkout, unlock revision or part
submit checkin, put
sync check out tip, refresh, extract part, get version
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 5
How Perforce works
Master file repository
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 6
Perforce server
Changeslists
Integration history
Labels
Client workspaces
…
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 7
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
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 8
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
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 9
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
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 10
P4 Jobs
Basic defect tracking mechanism Description
Status
Link to a changelist(s)
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 11
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
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 12
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
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 13
Integration
Integration Propagate changes between two or more codelines
Keep track of fixes
Integration history
Next: Revision graph
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 14
Revision graph
Dev codeline
Released codeline
New feature codeline
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 15
Revision graph – Real life example
Dev codelines
Milestone codelines
New feature codelinesDelivery codelines
Special customer codelines
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 17
Perforce vs. CVS
Attribute CVS Perforce
Branching and merging CVS offers branching, but requires manual tracking of merge history.
Perforce branching automatically tracks the history of all branching operations.
Distributed development No performance solutions for remote development are available.
The Perforce Proxy offers caching for remote users.
Atomic transactions Doesn’t have an atomic change mechanism and cannot group changes to related files.
Changelists - enabling users to track file versions associated with a feature addition or issue resolution.
Scalability and performance
Metadata is appended and maintained in the content of each file.
Centralized metadata records all user and file activity.
Defect tracking Not part of CVS; need to use a separate defect tracking solution.
Perforce provides a basic defect tracking - jobs, and integrates with several 3rd party defect tracking systems.
Integration with related tools
Integrations are available via the open source community.
Many third-party tools are designed specifically to work with Perforce.
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 18
Perforce vs. Subversion
Attribute Subversion Perforce
Branching and merging Subversion offers branching, but requires manual tracking of merge history.
Perforce branching automatically tracks the history of all branching operations.
Distributed development No performance solutions for remote development are available.
The Perforce Proxy offers caching for remote users.
Platform dependencies Compatibility issues exist with line ending of files in Unix and Windows environments.
Line ending issues are solved automatically.
Scalability and performance
Limited due to file binary diff versioning process.
Architected for speed, which scales linearly.
Defect tracking Not part of Subversion; need to use a separate defect tracking solution.
Perforce provides a basic defect tracking - jobs, and integrates with several 3rd party defect tracking systems.
Integration with related tools
Integrations are available via the open source community.
Perforce integrates with most leading IDEs, build tools, Microsoft Office, Adobe Photoshop, and many others.
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 19
Perforce vs. Microsoft VSS
Attribute VSS Perforce
Platform dependencies Works over network shares - slowing response times. Limited to Microsoft platforms only.
Client/server architecture. Response times are much faster for most operations.
Scalability and performance
MS recommends that VSS DB doesn’t exceed 3 to 5 GB, for perf. and stability reasons.
The Perforce repository can scale to the multiterabyte range easily.
Atomic transactions Doesn’t have an atomic change mechanism, and cannot group changes to related files.
Changelists - enabling users to track file versions with a new feature or issue resolution.
Branching and merging Limited support. Branching relationships aren’t maintained.
Perforce branching automatically tracks the history of all branching operations.
Distributed development Doesn’t offer a scalable distributed development solution.
The Perforce Proxy offers caching for remote users.
Integration with related tools
Only available for IDEs that support the SCC interface.
Many available tools are designed specifically to work with Perforce, including defect tracking tools.
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 20
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
Demo
Q&A
Perforce SCM
Perforce@SAP
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 22
History of Perforce within SAP
Evaluation of SCM systems
First Perforce server at SAP
Major Hardware investments & performance improvements
P4MS – PerforceManagementSystem running on SAP NetWeaver
++2005
2006.1
Upgrade of all instances
4,600+
Registered Perforce users
80+
Perforce server instances
Productive move from ClearCase, SCCS into Perforce 1999
1998
Tool infrastructure development & maintenance ’00-’04
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 23
Monthly transfered volume via P4 protocol
North AmericaPalo Alto and satellites
IndiaBangalore
BulgariaSofia
CanadaMontréal
ChinaShanghai
IsraelRa’anana
GermanyWalldorf and satellites
SAP's Global R&D Organization
HungaryBudapest
45.79%45.79%
17.74%17.74%
13.52%13.52%
6.55%6.55%
3.69%3.69%
4.57%4.57%
LocationLocation OutbounOutboundd
InbounInboundd
Bulgaria 31.45 GB 0.68 GB
India 11.70 GB 0.18 GB
Israel 954.55 GB 13.72 GB
Overall 9.31 TB 2.74 TB
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 24
Key figures – User/License growth
Perforce users & licenses
USERS SERVERS FILES/REV CURRENT
+11.6% users last year
LEVELS
700
1,200
1,700
2,200
2,700
3,200
3,700
4,200
4,700
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 25
Key figures – Server growth
Perforce servers
USERS SERVERS FILES/REV CURRENT
+11,6% users last year
LEVELS
~8 new serversper year
0
10
20
30
40
50
60
70
80
90
100
by 31.12.2000 by 31.12.2001 by 31.12.2002 by 31.12.2003 by 31.12.2004 by 31.12.2005* by 12.06.2006
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 26
Key figures – Project & codeline growth
Perforce projects (2nd) & codelines (3rd)
USERS SERVERS FILES/REV CURRENTLEVELS
0
1.000
2.000
3.000
4.000
5.000
6.000
7.000
by 31.12.2000 by 31.12.2001 by 31.12.2002 by 31.12.2003 by 31.12.2004 by 17.11.05 by 12.06.2006
Projects
Codelines
~2,000 new projectslast year
+11,6% users last year
~8 new serversper year
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 27
Key figures – File & revision growth
Perforce files & revisions
USERS SERVERS FILES/REV CURRENTLEVELS
0
20.000.000
40.000.000
60.000.000
80.000.000
100.000.000
120.000.000
140.000.000
by 31.12.2000 by 31.12.2001 by 31.12.2002 by 31.12.2003 by 31.12.2004 by 17.11.05 by 12.06.2006
Files
Revisions/Activity
~2.000 new projectslast year
+11,6% users last year
~8 new serversper year
>10 Mio files addedlast year
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 28
Key figures – Current overview
Current overview
USERS SERVERS FILES/REV CURRENTLEVELS
~2.000 new projectslast year
+11,6% users last year
~8 new serversper year
>10 Mio files addedlast year
Active Users / Licenses
Server instances
Depots (1st level)
Projects (2nd level)
Codelines unique
Codelines overall (3rd level)
Files
Revisions
Filesystem consumption
Average number of p4 calls per day
4,399
80
333
6,143
6,498
55,787
46,972,123
116,482,290
1.80 TB
2,303,174
~27 p4 callsper second
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 29
Hardware setup
HA ensured byPRIMECLUSTER
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
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 30
HA Setup
Location ILocation I
Cluster Node 1
Cluster Node 3
EMC I
2 Fibre Channel SAN switches
Redundant 2 Gbit/s Fibre Channel connections
Location IILocation II
Cluster Node 2
Cluster Node 4
EMC II
2 Fibre Channel SAN switches
Mirroring filesystem per service
Redundant Gbit/s Ethernet connections
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 31
Maturity
dev
t
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
export
patch
develop
collect, synchronize
last call
delivery
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 32
Dependencies – single project
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 33
Java projects dependencies – real life example
79 projects
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 34
Depot/Directory Structure
depot
project
codeline
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 35
Real life example for a change list dependency graph
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 36
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
Demo
Q&A
Perforce SCM
Perforce@SAP
Demo
Q&A
Perforce SCM
Perforce@SAP
SAP Labs Bulgaria 2006, Perforce@SAP / Vladimir Velinov / 39
Q&A
Questions?