Today’s Datanauts episode is all about Git, the version control system; and GitHub, a hosted Git service with both free and premium options. While developers are likely familiar with Git and GitHub, these tools can and should be embraced by operations folks too; you can do useful things like store and share configuration files, document processes, and collaborate.
Chris Wahl is joined by Drew Conry-Murray and Greg Ferro (Ethan was on vacation) to talk about version control systems, drill into what makes Git and GitHub stand out, and explore how they work. They also discuss how operations folks can take advantage of them, and share tips for getting started.
This episode of Datanauts is brought to you by ITProTV. Enhance your technology aptitude. ITProTVis the resource to keep your I.T. skills up to date, with engaging and informative video tutorials. For a free 7-day trial and 30% off the life of your account, go to itpro.tv/datanauts and use the code DATANAUTS30.
Show Notes & Links:
Part 1 – What Are Git And GitHub?
- What is Git?
- Git = an unpleasant or contemptible person (Wait, wrong definition!)
- It’s a version control system (VCS)
- Others include Team Foundation Server (TFS), Subversion (SVN), Visual SourceSafe (VSS)
- A way to store information to track changes and (hopefully) enhance collaboration across a team or teams
- Git is popular and powerful because it’s a Distributed VCS, as opposed to being client-server
- Anyone can create a repository on their workstation and sync directly to other repositories without needing a master server
- Client-server model has a single point of truth, so you always need access to the master
- There is a master branch – it’s the “golden” information that should be stable and production ready
- All other changes go into feature branches that eventually merge back into master
- How does this relate to GitHub?
- Hosted Git service with a large helping of other features
- Has a GUI, the ability to create a web page for your project (including a wiki), and is available online without having to instantiate anything yourself
- It’s also free (cloud model) or paid (on-prem model)
Part 2 – How Is Something Like This Used For Ops Folks?
- Operations has traditionally worked in silos and has not used version control beyond something clunky like SharePoint
- There is a strong need to use a version control system to make changes manageable, visible, and collaborative
- As more of our infrastructure becomes declarative in nature, VCS is even more valuable
- This also works well for scripting, configuration management, testing, and holistic creation of artifacts (things) such as Terraform and Jinja2 templates
- Imagine defining what a server configuration should look like for Puppet, DSC, or Ansible, but then never creating a history of changes for the configuration file!
- Collaboration is a key element!
- Propose changes using a DVCS and then discuss those changes with other engineers or senior personnel
- Using Developer Methodologies to Build Collaborative Operations
- A living history of change – not just how, but also why
- Work on multiple changes at the same time without bumping into one another
- By making changes using pull requests and merges, you can see an entire timeline of what’s going on. This squashes tribal knowledge, too.
Part 3 – Learning Resources
- Start simple! Learn Git on your workstation
- Create a repository for something simple, like a single script or configuration file
- Create a branch (other than master) and edit the file to make changes
- Use Git (start with the GUI) to add in those changes and commit them
- Create a pull request with a comment in the “if I pull in this change, it will <comment>” format
- Approve the pull request and merge the changes
- Push those changes somewhere else
- One resource that’s quite handy is the Git Real course by Code School
- Further courses cost money, but it’s incredibly cheap
- Nerd Starters
- Create an account on GitHub. Today. Now!
- Enable 2FA
- Add a profile, headshot, etc.
- Got a pile of old scripts that you can share (don’t share if they have passwords and whatnot)?
- Pop them up to GitHub
- Don’t worry if they aren’t “amazing” – you can pull in changes to fix them
- Atlassian has a great tutorial
- So does GitHub