Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Vladimir Velinov Build Engineering Team SAP Labs Bulgaria

Ähnliche Präsentationen


Präsentation zum Thema: "Vladimir Velinov Build Engineering Team SAP Labs Bulgaria"—  Präsentation transkript:

1 Vladimir Velinov Build Engineering Team SAP Labs Bulgaria
SAP Vladimir Velinov Build Engineering Team SAP Labs Bulgaria

2 Perforce SCM Demo Q&A

3 Perforce SCM Demo Q&A

4 Perforce (P4) calls it… Other SCMs…
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

5 How Perforce works Master file repository
Какво представлява Perforce? Система за управление промените при разработката на софтуерни продукти, както вече представените преди това. Последните няколко години Perforce се наложи като едно от-най добрите решения на пазара в този сектор. Над 3000 фирми за разработка на софтуер я използват (Google е една от тях), като SAP е най-големия им клиент, което от време на време помага, особено когато имаме нужда от фикс за наште сървъри. Сега малко технически детайли. Perforce е стандартно клиент-сървър приложение. Комуникацията между клиентската и сървърската част се осъществява посредством по TCP/IP връзка използвайки протокол разработен от Perforce Inc. Сървъра пази както самите файлове така и мета информацията свързана с тях. Файловете се съхраняват в т.нар. Депа (repository). На сервера може да има повече от едно депо, в зависимост от нуждите на разработващите девелопери. Например, ако разработвате няколко отделни продукта, може да поместите сорсовете на всеки продукт в отделно депо. Клиента, бил той GUI или command line се използва от девелоперите да могат да достъпват данните на сървъра. Подържат се широк набор от платформи – UNIX/Win/MacOS, както за клиента, така и за сървъра.

6 Perforce server Changeslists Integration history Labels
Client workspaces Сега малко по-подробен поглед на сървърската част. Физически това е само един изпълним файл. Инсталацията на сървъра де факто е копиране в дадена директория. От функционална гледна точка сървърската част може да я разделим на 2 части - база данни с мета информацията, където се пазят описанията с промените, changelists, integration history, Label, client workspaces, etc. Малко по-късно ще се спрем по-подробно на тези понятия. За база се използва Berkely DB, която е интегрирана в самия сървър т.е. не се налага инсталацията на отделна база. - Депата (repository), където се пазят същинските файловете или тъй наречените Version файлове. Наричат се така, защото съхраняват всичките промени направени на файла за даден bracnh. Като медод на съхранеие за текстовите файлове се използва т.нар. reverse RCS или това означа, че се пази последната модификация на файла цяла, а предходните се описват като промени. Например, ако искате да изтеглите някоя по-стара версия на файла сървъра взима последната и на база описание на междинните версии сглобява тази която ви трябва. За не-текстови файлове се използва gzip за всяка версия на файла. Използва се файловата система на операционната система.

7 P4 Clients (client workspace)
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

8 File structure - herarchical File operations
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

9 P4 Changelists What are changelists? Creating 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 Timestamp

10 Basic defect tracking mechanism
P4 Jobs Basic defect tracking mechanism Description Status Link to a changelist(s)

11 Snapshot of current state of set of files
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

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

13 Integration Integration
Propagate changes between two or more codelines Keep track of fixes Integration history Next: Revision graph

14 Revision graph New feature codeline Dev codeline Released codeline

15 Revision graph – Real life example
Dev codelines Milestone codelines Delivery codelines New feature codelines Special customer codelines

16 Resolving conflicts – 3way merge

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.

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.

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.

20 P4 Installation & Toolset
Download from 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

21 Perforce SCM Demo Q&A

22 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 + 80+ Perforce server instances 2006.1 Upgrade of all instances 4,600+ Registered Perforce users

23 Walldorf and satellites Palo Alto and satellites
SAP's Global R&D Organization 45.79% Hungary Budapest Germany Walldorf and satellites 3.69% Canada Montréal China Shanghai Bulgaria Sofia 13.52% 4.57% North America Palo Alto and satellites Israel Ra’anana 17.74% India Bangalore 6.55% Location Outbound Inbound Bulgaria 31.45 GB 0.68 GB India 11.70 GB 0.18 GB Israel GB 13.72 GB Overall 9.31 TB 2.74 TB KM: Central IS, located in WDF Globally Distributed development Nearly 50% of P4 calls are triggered from WDF, followed by 30% from BG and IL CA,IN,US cover the other 15% 10 TB out 3 TB in per month overall IL (due to mass binary operations) 1 TB out, 14 GB in Monthly transfered volume via P4 protocol

24 Key figures – User/License growth
USERS SERVERS LEVELS FILES/REV CURRENT +11.6% users last year Perforce users & licenses KM: ~400 users + last year

25 Key figures – Server growth
USERS SERVERS LEVELS FILES/REV CURRENT +11,6% users last year Perforce servers ~8 new servers per year KM: Constant growth of nr of servers, mainly driven by performance issues Also as perforce is a single-server application

26 Key figures – Project & codeline growth
USERS SERVERS LEVELS FILES/REV CURRENT +11,6% users last year Perforce projects (2nd) & codelines (3rd) ~8 new servers per year ~2,000 new projects last year KM: Naming: 2nd/3rd level of directory structure enormous growth of projects, last year

27 Key figures – File & revision growth
USERS SERVERS LEVELS FILES/REV CURRENT +11,6% users last year Perforce files & revisions ~8 new servers per year ~2.000 new projects last year >10 Mio files added last year

28 Key figures – Current overview
USERS SERVERS LEVELS FILES/REV CURRENT +11,6% users last year Current overview 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 ~8 new servers per year ~2.000 new projects last year >10 Mio files added last year ~27 p4 calls per second ~ 2TB of fs consumption 2 Mio. Calls per Day => 27 calls per second in average... HANDOVER: Which piece of hardware has enough power to handle all this load?

29 Hardware setup Cluster node 1 & 2: Cluster node 3 & 4:
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 Shared Storage (SAN): 2 x EMC Clariion CX500 (mirrored) Size: 3TB each HA ensured by PRIMECLUSTER Twin Configuaration: 4 nodes with 5Ghz CPU power and 32GB each Connected to mirrored Storage Array Network via fibre channel High Availability of components handled by Primecluster Software

30 Mirroring filesystem per service
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 2 dedicated datacenters, 11km distance to prevent any interruptions strange things (power outages) can happen due to building activities Consist of identical hardware components. 3 nodes can still run with 100% performance Due to mirroring data is available at any time in each location 2Gbit/s fibre connections ensure high performance HANDOVER: This configuration was choosen to prevent any outages from hardware side. But due to Murphy everything can happen... Redundant Gbit/s Ethernet connections

31 Production process (development phase)
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 Maturity delivery patch last call export collect, synchronize dev develop t

32 Dependencies – single project

33 Java projects dependencies – real life example

34 Depot/Directory Structure
project codeline Fixed file hierachy: //<depot>/<project>/<codeline> depot named by a (sub) product or development area, e.g. „busmb“ for developments for SAP Business One project development project or part of a (sub) product, e.g. „SBO_ADD_ElectronicPayment“ codeline differs the sources into several releases and maturity, e.g. „dev“, „68_REL“ Project and codeline determine the transport track

35 Real life example for a change list dependency graph

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

37 Perforce SCM Demo Q&A

38 Perforce SCM Demo Q&A

39 Questions? Q&A

40 Closed gap: Dependencies between changes
dev export ... Call method A ... Call method A c1 Method A {...} ... Method A {...} ... c2 ... Call method A Some fixes ... Call method A Some fixes c3 Bundle c1 c2 c3 Example Changes c1: call new method in file1 c2: Add new method to file2 c3: Change some other coding in file1 Transport sequence c3 only => implicit transport of c1 causes syntax error due to missing method c1 only => syntax error due to missing method c1+c2 then c3 => fine Dependencies c1 is a predecessor of c3 c1 and c2 could be defined and transported together in a bundle; then they‘d be called „bundle siblings“

41 Copyright 2006 SAP AG. All Rights Reserved
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence. The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.

42 Copyright 2006 SAP AG. Alle Rechte vorbehalten
Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden. Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte können Softwarekomponenten auch anderer Softwarehersteller enthalten. Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® und SQL Server® sind eingetragene Marken der Microsoft Corporation. IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®, Informix und Informix® Dynamic ServerTM sind Marken der IBM Corporation. ORACLE® ist eine eingetragene Marke der ORACLE Corporation. UNIX®, X/Open®, OSF/1® und Motif® sind eingetragene Marken der Open Group. Citrix®, das Citrix-Logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® und andere hier erwähnte Namen von Citrix-Produkten sind Marken von Citrix Systems, Inc. HTML, DHTML, XML, XHTML sind Marken oder eingetragene Marken des W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA® ist eine eingetragene Marke der Sun Microsystems, Inc. JAVASCRIPT® ist eine eingetragene Marke der Sun Microsystems, Inc., verwendet unter der Lizenz der von Netscape entwickelten und implementierten Technologie. MaxDB ist eine Marke von MySQL AB, Schweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, und weitere im Text erwähnte SAP-Produkte und -Dienstleistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und anderen Ländern weltweit. Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. Produkte können länderspezifische Unterschiede aufweisen. Die in dieser Publikation enthaltene Information ist Eigentum der SAP. Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, nur mit ausdrücklicher schriftlicher Genehmigung durch SAP AG gestattet. Bei dieser Publikation handelt es sich um eine vorläufige Version, die nicht Ihrem gültigen Lizenzvertrag oder anderen Vereinbarungen mit SAP unterliegt. Diese Publikation enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts. SAP entsteht aus dieser Publikation keine Verpflichtung zu einer bestimmten Geschäfts- oder Produktstrategie und/oder bestimmten Entwicklungen. Diese Publikation kann von SAP jederzeit ohne vorherige Ankündigung geändert werden. SAP übernimmt keine Haftung für Fehler oder Auslassungen in dieser Publikation. Des Weiteren übernimmt SAP keine Garantie für die Exaktheit oder Vollständigkeit der Informationen, Texte, Grafiken, Links und sonstigen in dieser Publikation enthaltenen Elementen. Diese Publikation wird ohne jegliche Gewähr, weder ausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zweck sowie für die Gewährleistung der Nichtverletzung geltenden Rechts. SAP haftet nicht für entstandene Schäden. Dies gilt u. a. und uneingeschränkt für konkrete, besondere und mittelbare Schäden oder Folgeschäden, die aus der Nutzung dieser Materialien entstehen können. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit. Die gesetzliche Haftung bei Personenschäden oder Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinks zugreifen, unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen über Internetseiten Dritter ab.


Herunterladen ppt "Vladimir Velinov Build Engineering Team SAP Labs Bulgaria"

Ähnliche Präsentationen


Google-Anzeigen