GitHub for Newbies - Boston VMware User Group

55
GitHub - Getting Started Jonathan Frappier – Senior DevOps Engineer at RoundTower & vBrownBag Crew Your career depends on re-inventing yourself, GitHub MUST be in your skillset

Transcript of GitHub for Newbies - Boston VMware User Group

Page 1: GitHub for Newbies - Boston VMware User Group

GitHub - Getting StartedJonathan Frappier – Senior DevOps Engineer at RoundTower & vBrownBag CrewYour career depends on re-inventing yourself, GitHub MUST be in your skillset

Page 2: GitHub for Newbies - Boston VMware User Group

Disclaimer*

Always assume:

• When I say how awesome something is what I really mean “In most cases” that thing is awesome

• Here is one way you could do it, there are many others

• I can’t draw 7 red lines all perpendicular with red, green, or transparent ink

Page 3: GitHub for Newbies - Boston VMware User Group

Why do I need to learn Git?

Simon Sinek http://bit.ly/2eLYSPN

Page 4: GitHub for Newbies - Boston VMware User Group

Why do I need to learn Git?

“In short, software is eating the world.”

Marc Andreessen 2011 http://on.wsj.com/1Hkyems

Page 5: GitHub for Newbies - Boston VMware User Group

What does that even mean?

http://www.visualcapitalist.com/

Largest Companies by Market Cap

2001

2016

Page 6: GitHub for Newbies - Boston VMware User Group

What does that even mean?

Uber, the worlds large taxi company owns no vehicles. Facebook, the worlds most popular media owner

creates no content. Alibaba, the most valuable retailer has no inventory, & AirBnB, the worlds largest accommodation provider owns no real estate.

angel.co 2015

Page 7: GitHub for Newbies - Boston VMware User Group

But I don’t need Git to be an IT Admin…

Page 8: GitHub for Newbies - Boston VMware User Group

But I don’t need Git to be an IT engineer…

Page 9: GitHub for Newbies - Boston VMware User Group

Times they are a changing…

Page 10: GitHub for Newbies - Boston VMware User Group

Times they are a changing…

Page 11: GitHub for Newbies - Boston VMware User Group

Why do I need to learn Git?

“Your career depends on re-inventing

yourself”

Page 12: GitHub for Newbies - Boston VMware User Group

Why do I need to learn Git?

Why: Your career depends on re-inventing yourselfHow: By embracing, learning, and accepting thenew skills required to say relevantWhat: DevOps, Ansible, Puppet, Terraform, AWS,And GitHub via this awesome talk

Page 13: GitHub for Newbies - Boston VMware User Group

What is Git

http://xkcd.com/1597/

Page 14: GitHub for Newbies - Boston VMware User Group

What is Git

Git is a free and open source distributed version control system 

Page 15: GitHub for Newbies - Boston VMware User Group

But for today this is Git…

http://xkcd.com/1597/

Page 16: GitHub for Newbies - Boston VMware User Group

What is Version Control

Page 17: GitHub for Newbies - Boston VMware User Group

Working with Git/GitHub

Page 18: GitHub for Newbies - Boston VMware User Group

If I Git, do I DevOps?

GitHub != DevOps

Page 19: GitHub for Newbies - Boston VMware User Group

“DevOps is a cultural and operational model that foster collaboration to

enable high performance IT to achieve business goals”

Brian Gracely, Wikibon

Page 20: GitHub for Newbies - Boston VMware User Group

Easy

Easy to setup

Easy to use

Easy-ish to collaborate

Page 21: GitHub for Newbies - Boston VMware User Group

Easy

Easy to setup

choco install git

Download, double click, next next next next next….

yum install gitapt-get install git

xcode-select --install

Page 22: GitHub for Newbies - Boston VMware User Group

Post Install Setup

Easy to use

git config --global user.name <username>

git config --global user.email <email address>

ssh-keygen –o –a 100 –t ed25519 –C <email address> (provide passphrase)

Page 23: GitHub for Newbies - Boston VMware User Group

Post Install Setup

Easy to use

git config --global user.name <username>

git config --global user.email <email address>

ssh-keygen –o –a 100 –t ed25519 –C <email address> (provide passphrase)

Page 24: GitHub for Newbies - Boston VMware User Group

Post Install Setup

Page 25: GitHub for Newbies - Boston VMware User Group

Easy

Easy to use

git add <filename>

git commit

git push

Page 26: GitHub for Newbies - Boston VMware User Group

Easy

Easy-ish to collaborate

branchfork merge

Page 27: GitHub for Newbies - Boston VMware User Group

Git Basics – Overview

Page 28: GitHub for Newbies - Boston VMware User Group

Git Basics – Create a Repository

https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

Page 29: GitHub for Newbies - Boston VMware User Group

Git Basics – Clone a Repository

Page 30: GitHub for Newbies - Boston VMware User Group

Git Basics – Clone a Repository

$ git clone <git repo address – either via SSH or HTTPS>

Page 31: GitHub for Newbies - Boston VMware User Group

Git Basics – Check Status

$ git status

Page 32: GitHub for Newbies - Boston VMware User Group

Git Basics – Add Files

Page 33: GitHub for Newbies - Boston VMware User Group

Git Basics – Add Files

Page 34: GitHub for Newbies - Boston VMware User Group

Git Basics – Commit Changes

$ git commit

Page 35: GitHub for Newbies - Boston VMware User Group

Git Basics – Push Commits

$ git push

Page 36: GitHub for Newbies - Boston VMware User Group

Git Basics – Viewing on GitHub

Page 37: GitHub for Newbies - Boston VMware User Group

Git - Getting Beyond Basics…DON’T LET THIS NEXT SECTION SCARE YOU! YOU DON’T NEED

THIS TOMORROW!!!

Page 38: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Branches

Page 39: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Branches

Page 40: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Pushing Branch Commits

Page 41: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Merge

Page 42: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Merge

Page 43: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Merge$ git checkout master$ git merge devel$ git push

Page 44: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Branching Theory

Page 45: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Fork

Page 46: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Fork

Page 47: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Fork

Page 48: GitHub for Newbies - Boston VMware User Group

Git Intermediate – Pull Requests

Page 49: GitHub for Newbies - Boston VMware User Group

WARNING!!!!!

GitHub is PUBLIC!!!!!

• Clean your code

• Don’t hard code usernames, passwords

• Don’t put sensitive files in local repos

Page 50: GitHub for Newbies - Boston VMware User Group

Tips

• If its sink or swim..

• Don’t jump into the deep end

• Invest in good technique

• Use the buddy system

• It takes time to go bananas

• Practice, practice, practice

Page 51: GitHub for Newbies - Boston VMware User Group

Next Steps

• Check out Commitmas http://bit.ly/Commitmas2

• Practice on https://try.github.io

• Install git on your computer, sign up for an account, and create a repo

• Find a project you can contribute to, or start your own

• Dig in https://git-scm.com/book/en/v2/

Page 52: GitHub for Newbies - Boston VMware User Group

Next Steps for PowerShell CodersVester:Vester is a community project that aims to provide an extremely light-weight approach to vSphere configuration management using Pester and PowerCLI. The end-state configuration for each vSphere component, such as clusters and hosts, are abstracted into a simple config file. The configuration is tested and optionally remediated when drift is identified. The entire project is written in PowerShell.

https://github.com/WahlNetwork/Vester

Page 53: GitHub for Newbies - Boston VMware User Group

Next Steps for Python CodersAnsible:Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems. http://ansible.com/

https://github.com/ansible/ansible

https://github.com/ansible/ansible-modules-extras/tree/devel/cloud/vmware

Page 54: GitHub for Newbies - Boston VMware User Group

Next Steps for oh sh!t I can’t code Coders

• Find a project you’re interested in and contribute documentation

https://github.com/ansible/ansible/tree/devel/docsite/rst

• Get started with PowerCLI and PowerShell, go ask Kyle Ruddy a bunch of questions (he is here today), put it in GitHub

• Learn to code

https://www.freecodecamp.com

Page 55: GitHub for Newbies - Boston VMware User Group

Jonathan FrappierSenior DevOps EngineerRoundTower Technologies

@jfrappier | @commitmas | @vbrownbag

/in/jonathanfrappier

github.com/jfrappiergithub.com/commitmas

jfrap.comvbrownbag.com