Scaling Git for the Enterprise
Transcript of Scaling Git for the Enterprise
AW2 Agile Development Concurrent Session 11/12/2014 11:30 AM
"Scaling Git for the Enterprise"
Presented by:
Bob Aiello CM Best Practices Consulting
Brought to you by:
340 Corporate Way, Suite 300, Orange Park, FL 32073 888-268-8770 ∙ 904-278-0524 ∙ [email protected] ∙ www.sqe.com
Editor-in-chief of CM Crossroads and author of Configuration Management Best Practices: Practical Methods that Work in the Real World, Bob Aiello is a consultant and software engineer specializing in software process improvement, including software configuration and release management. He has more than twenty-five years of experience as a technical manager at top New York City financial services firms, where he held company-wide responsibility for configuration management. Bob served as vice chair of the IEEE 828 Standards Working Group on CM Planning and a member of the IEEE Software and Systems Engineering Standards Committee Management Board. Contact Bob at [email protected], via LinkedIn, or visit cmbestpractices.com.
Scaling Git for the Enterprise
1
Bob Aiello, Principal Consultant and Author of Configuration Management Best Practices : Practical Methods that Work in the Real World
http://www.linkedin.com/in/BobAiello http://cmbestpractices.com
CM Best Practices Consulting © 2014
Who am I? • CM Lead & Consultant for over 25 years • Technical Editor CM Crossroads 15 years • Aapril uthor of CM Best Practices • IEEE Standards Management Board • Tools and process agnostic • The guy who supports large scale version control systems! 2 Nov 12, 2014 http://cmbestpractices.com © 2014
Goals of this Presentation • Develop secure and reliable VCS • Create scalable strategy for support • Plan for costs and resource requirements • Understand the VCS ecosystem • Support advanced functionality • Establish SCM processes • Support the ALM! 3 Nov 12, 2014 http://cmbestpractices.com © 2014
Goals of Code Management
4
• Never lose code • Know exactly what is running in Prod • Make a two line fix without any chance of the code regressing (due to the wrong version) About SCM…
http://cmbestpractices.com © 2014 Nov 12, 2014
Source Code Management
5
• Control of every configuration item (e.g. source code, config, binaries, compile and runtime dependencies). • Much more than just checkin and checkout (version control) • Provides sanity to the development process (reduces cognitive complexity)
http://cmbestpractices.com © 2014 Nov 12, 2014
Why Git?
6
• Simple & Reliable • Distributed (actually decentralized) • Cloning vs checkout • Branching and merging • Storage is very efficient • Deployment What about the dark side? http://cmbestpractices.com © 2014 Nov 12, 2014
Dysfunctional Git
7
• Often setup on R&D servers • No built in support for LDAP • Rewrite history • Editing logs creates audit issues • Cottage industry to address Git shortcomings
Start with the Infrastructure… http://cmbestpractices.com © 2014 Nov 12, 2014
Git in the Cloud
8
• Scalable infrastructure • Experienced administration • Focus on your real job • Advertising your project • Distributing and deployment
Many choices… http://cmbestpractices.com © 2014 Nov 12, 2014
Cloud Based Providers
9
• Github – millions of users • Bitbucket – over a million users • Enterprise Git • Many other cloud based providers • Changing landscape
Trusted repositories… http://cmbestpractices.com © 2014 Nov 12, 2014
Infrastructure
10
• Familiar servers • Scalable (plan for growth) • Installation procedures • Using Puppet to install Stash • Manage licenses • Entitlements Hybrid approach…
http://cmbestpractices.com © 2014 Nov 12, 2014
Hybrid Cloud
11
• Start with Cloud based providers • Setup your own infrastructure • From QA onwards
Git Stash is a popular choice…
http://cmbestpractices.com © 2014 Nov 12, 2014
Git Stash
12
• Host on your servers • Your favorite cloud • Supports LDAP • Backend in database • Scalable infrastructure • Establish IT controls
Git for Dev and Ops… http://cmbestpractices.com © 2014 Nov 12, 2014
When Dev sets up Stash
13
• Lack of controls • When I asked for a checklist… • Milestone releases go to secure repo • Establish the definitive media library
http://cmbestpractices.com © 2014 Nov 12, 2014
Planning
14
• Resource estimates • Charge back for projects • Licenses • Disk, servers, OS • Chargeback for server administration
Establish the Use Case http://cmbestpractices.com © 2014 Nov 12, 2014
Establish the Use Case
15
• Clear and consistent way to use Git • Developers tend to do whatever worked well on the last project • Result is that everyone is doing something different
http://cmbestpractices.com © 2014 Nov 12, 2014
Defining the Usage Model
16
• You need to create a clear and compelling usage model • Otherwise everyone will do whatever worked well on the last project • Helps even when you have to live with an inferior tool
http://cmbestpractices.com © 2014 Nov 12, 2014
Variant Management
17
• What’s on master, staging? • How will you release your code? • Branching can get messy • Feature branching and cherry picking • Consider using Gitflow http://cmbestpractices.com © 2014 Nov 12, 2014
Variants in the code
18
• Supporting multiple operating systems
http://cmbestpractices.com © 2014 Nov 12, 2014
Training
19
• Training establishes consistent practices • Essential for variant management • Key for release and deployment
http://cmbestpractices.com © 2014 Nov 12, 2014
Training
20
• Training is the “hill to die on” • Best when given by your CM support team • Includes the process you want them to use • Much more than just vendor training • Test first and then teach
http://cmbestpractices.com © 2014 Nov 12, 2014
Defect & Task Tracking
21
• Track changesets to workitem • Traceability to who made the change • Makes release notes a breeze to create • Ties back to requirements and test cases • Allows for ALM and workflow automation http://cmbestpractices.com © 2014 Nov 12, 2014
Task Based Development
22
• Integration with task and defect tracking • Planning should be upfront • Traceability and support for the ALM
http://cmbestpractices.com © 2014 Nov 12, 2014
Ensuring the Trusted Base
23
• Know what you built • Deploy the right code • Verify that it got there • Detect any unauthorized changes CM is a full lifecycle endeavor
http://cmbestpractices.com © 2014 Nov 12, 2014
Getting Started
24
• Always best when to start small • Remember agile and lean principles • Iterative approach to establish process • Make decisions at last responsible moment http://cmbestpractices.com © 2014 Nov 12, 2014
Feedback loops
25
• What is working and what needs to be improved • Assess your team’s practices • Plan for change
Learn to coexist… http://cmbestpractices.com © 2014 Nov 12, 2014
Commercial Tools
26
• Vendors have learned to coexist with open source • Commercial tools often have more features • Driven by customer feedback
http://cmbestpractices.com © 2014 Nov 12, 2014
Continuous Integration
27
• Drive your CI builds from Git/Stash • Use Git to provision and configure your servers • Git integrates with most CI servers
http://cmbestpractices.com © 2014 Nov 12, 2014
Continous Delivery
28
• Automate your application build • Package automation • Deployment automation • Delivery versus deployment
http://cmbestpractices.com © 2014 Nov 12, 2014
Process Improvemet
29
• Survey your customers • Take input and plan for improvement • Remember to be have a promotion system for your VCS
Start with an assessment… http://cmbestpractices.com © 2014 Nov 12, 2014
Assessment
30
• Ask what works well • Assess existing best practices • Create roadmap and plan for improvement
Get started! http://cmbestpractices.com © 2014 Nov 12, 2014
Goals of this Presentation • Develop secure and reliable VCS • Create scalable strategy for support • Plan for costs and resource requirements • Understand the VCS ecosystem • Support advanced functionality • Establish SCM processes • Support the ALM! 31 Nov 12, 2014 http://cmbestpractices.com © 2014
Scaling Git for the Enterprise
32
Bob Aiello, Principal Consultant and Author of Configuration Management Best Practices : Practical Methods that Work in the Real World
http://www.linkedin.com/in/BobAiello http://cmbestpractices.com
CM Best Practices Consulting © 2014