Your SlideShare is downloading. ×
0
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Version Control and Continuous Integration
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Version Control and Continuous Integration

2,681

Published on

This is Greg Montaño's slides on "Version Control and Continuous Integration", which was presented at the Cebu StackOverflow Meetup on 26 May 2012.

This is Greg Montaño's slides on "Version Control and Continuous Integration", which was presented at the Cebu StackOverflow Meetup on 26 May 2012.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,681
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
38
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Jenkins will center on Java
  • What? Background and HistoryWhy? Reasons for usageTell how it is done before (e.g. one to two users only doing the development)http://www.smashingmagazine.com/2008/09/18/the-top-7-open-source-version-control-systems/
  • >all developers must use the same computer system.>developers use a shared single repository.>each developer works directly with his or her own local repository, and changes are shared between repositories as a separate stephttp://en.wikipedia.org/wiki/List_of_revision_control_software
  • Green – client-server modelBrown – distributed modelGet a show of hand of who is using what and take note http://en.wikipedia.org/wiki/List_of_revision_control_softwareTell the story about the BitKeeper being used by Linux Kernel before they created Git.
  • Green – client-server modelBrown – distributed modelGet a show of hand of who is using what and take note
  • An “upgrade” to CVS before.ASF – Apache Software FoundationSelf-hosting used on August 31, 2001
  • http://svnbook.red-bean.com/en/1.7/svn.intro.whatis.html#svn.intro.architecture.dia-1For our example, assumption is Linux OSFSFS database; andusing DAV over Apache
  • http://svnbook.red-bean.com/en/1.7/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout
  • Built-in repository browsing is available via web browser using the http against using svn.For details on what access to use http://svnbook.red-bean.com/en/1.7/svn.serverconfig.choosing.htmlFor subversion clients, see http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients
  • Determine the OS and note of the requirements (disk space, memory) but with most HW specs these days it is not anymore of concern.
  • Note that /var/www/svn/myrepo directory will be created after svnadmin is executed.
  • Where svn-users.passwd contains the users and passwords for subversion access via HTTP.Usehtpasswd to create the password file and add usersTo enable fine grain access then seeAuthzSVNAccessFile apache attributeModifying this would require HTTP service to be restarted;Check out http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html for details.
  • Svnredbook:
  • Make sure to verify the copied repo using command below:svnadmin verify /someplace/repo-backupFor incremental, backup is done from revision 143 to the latest one (HEAD)
  • From http://svn.apache.org/repos/asf/subversion/trunk/doc/user/svn-best-practices.htmlChangesets – bugfixes, new features or enhancements
  • What?Why?http://en.wikipedia.org/wiki/Continuous_integration
  • Continuous integration avoids or detects compatibility problems early. Integration is a "pay me now or pay me more later" kind of activity. Integration is similar to credit card: either you pay now or pay more later.http://www.extremeprogramming.org/rules/integrateoften.html
  • http://www.martinfowler.com/articles/continuousIntegration.html by Martin Fowler
  • Get a show of hand and take note
  • Get a show of hand and take noteTell briefstory about Hudson (Oracle) and Jenkins.
  • You would need java and maven installed. Memory is a factor when determining the HW specs.Biased on use of Subversion
  • Set-up Maven and JDK needed before proceeding with the set-up.Enable security is recommended pick the Security Realm and Authorization
  • Once you click on Subversion under Source Code Management, the path to the repository needs to be supplied.
  • Email the status of the latest buildsReduces the Time to Find Integration IssuesUnit tests are included during buildsAutomation compiling and packages allow the developers to concentrate more on the coding and fixing broken builds quickly and fix them ASAPA Practical Guide to Distributed Scrum by  Elizabeth Woodward, SteffanSurdek and Matthew Ganis
  • http://en.wikipedia.org/wiki/Comparison_of_revision_control_softwarehttp://en.wikipedia.org/wiki/Comparison_of_Continuous_Integration_Softwarehttp://www.extremeprogramming.org/rules/integrateoften.html
  • Transcript

    • 1. Introduction• University Faculty • Employee - IT Company• Batch, Pascal, PERL, • Shell Scripts Javascript, C++, JAVA• DUNE2 • Modern Conflict• I love to visit all the nearby islands of Cebu.
    • 2. • Introduce version control and CI• Focus only on Subversion and Jenkins• Discuss about installation and getting started with these tools.• Sharing of personal experiences pertaining to the tools mentioned is also encouraged during the Q&A.
    • 3. Version Control• Also known as revision control.• According to http://www.smashingmagazine.com/ the most obvious benefit of revision control is – ability to have an unlimited number of people working on the same code base, without having to constantly send files back and forth.
    • 4. Models of Version Control Software• Local data Model• Client-Server Model• Distributed Model
    • 5. Version Control in the Market• Proprietary – BitKeeper – PVCS – Synergy – Perforce – ClearCase – Visual SourceSafe – Rational Team Concert
    • 6. Version Control in the Market• Open Source – Concurrent Versions System (CVS) – Subversion (SVN) – Distributed Concurrent Versions System (DCVS) – Bazaar – Mercurial – Git
    • 7. • Triggered development by CollabNet, Inc in early 2000• Took 14 months to develop• Became part of ASFs family of top-level projects on early 2010.• Book titled Version Control with Subversion can be found and/or downloaded at http://svnbook.red-bean.com/• Subversion current version is 1.7
    • 8. Subversion repository
    • 9. Repository access URLsSchema Access methodfile:/// Direct repository access (on local disk)http:// Access via WebDAV protocol to Subversion-aware Apache serverhttps:// Same as http://, but with SSL encryptionsvn:// Access via custom protocol to an svnserve serversvn+ssh:// Same as svn://, but through an SSH tunnel
    • 10. 5 steps to getting started (Version Control)1. Download and install2. Create the repository3. Set-up authentication4. Customize (e.g. pre-commit hooks)5. Perform maintenance like backups
    • 11. Create the repository• Create the directory mkdir –p /var/www/svn• Create the repo cd /var/www/svn svnadmin create myrepo• Access the repo via http http://143.143.143.143/svn/myrepo
    • 12. Content of subversion.confLoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so<Location /svn> DAV svn SVNParentPath /var/www/svn AuthType Basic AuthName "Subversion repositories" AuthUserFile /etc/httpd/svn-users.passwd Require valid-user</Location>
    • 13. Structure of SVN Repository• trunk - directory to hold the “main line” of development;• branches - directory to contain branch copies;• tags - directory to contain tag copies;
    • 14. Customize• Use of hooks like pre-commit• The pre-commit hook is run just before a commit transaction is promoted to a new revision.• Useful for freezing a release and/or requiring for log messages before revisions are committed to the repository.• /var/www/svn/myrepo/hooks/pre-commit
    • 15. Backups• Full backup svnadmin hotcopy /var/www/svn/myrepo ~/repo-backup tar cjvhpf repo-backup.bz2 ~/repo-backup• Incremental svnadmin dump /var/www/svn/myrepo –r 143:HEAD -- incremental > `date +%s`.dump
    • 16. Subversion Best Practices1. Use a sane repository layout2. Commit logical changesets3. Use the issue-tracker wisely4. Provide meaningful log message5. Know when to branch
    • 17. Continuous Integration (CI)• implements processes of applying control — pieces of , applied .• a set of software development practices, behaviors, and principles for automating and improving how to integrate and certify software continuously.• Started around 1999
    • 18. • to deliver stable, high-quality code consistently and quickly;• detect and fix problems early;• deliver quality software;• reduce time to market of the finish product;
    • 19. Principles• Maintain a Single Source Repository• Automate the Build• Make Your Build Self-Testing• Everyone Commits To the Mainline Every Day• Every Commit Should Build the Mainline on an Integration Machine• Keep the Build Fast• Test in a Clone of the Production Environment• Make it Easy for Anyone to Get the Latest Executable• Everyone can see whats happening• Automate Deployment
    • 20. CI in the Market• Proprietary – Build Forge – AnthillPro – BuildMaster – TeamCity
    • 21. CI in the Market• OpenSource – CruiseControl – Jenkins/Hudson
    • 22. 4 steps to getting started (Jenkins)1. Download and install2. Create and configure the project/job3. Run your first build4. Customize
    • 23. http://jenkins-ci.org/
    • 24. Configure Jenkins
    • 25. New job/project
    • 26. Plug-ins• Over 400 plug-ins• Source code management (e.g. Git, Mercurial)• Artifact uploaders (e.g. Tomcat, JBOSS, Websphere)• Build Reports (e.g. Cobertura, Sonar, Ruby)• Authentication and user management• UI Plugins
    • 27. Reasons for CI• Reports Any Build Failures to the Team• Reduces the Risk of Integrating Code Private builds –> integration builds –> release builds• Establishes Greater Confidence in the Product – Incorporated automated unit test in the build• Improves the Efficiency of the Team
    • 28. Reference:• Internet

    ×