How Github uses Github to develop and deploy GitHub

Preview:

Citation preview

the best way to build and ship software

How GitHub uses GitHub to develop and deploy GitHub

Johannes Nicolai a @jonico - ! jonico@github.com

@

"http://www.wired.com/2012/02/github-2/ Photo : Ariel Zambelich/Wired

"

How software is built

GitHub Facts

4

"

FOUNDED

2008

USERS

18M+

PROJECTS

37M

MONTHLY

VISITORS

40M

CORPORATE CUSTOMERS

67k+

UNIVERSITIES

1000+

GLOBAL RANK

51

FORTUNE100

53%

OFFICES

San Francisco Tokyo, Amsterdam, Boulder

How software is built 5

#GitHub Enterprise - Run your own GitHub behind your FW

"

What’s the secret?

How software is built 7

#

OPEN SOURCE

LEADERS

SOFTWARE

SPECIALISTS

FORWARD THINKING

ENTERPRISES

How the world builds software

the best way to build and ship software8

"

CONTINUOUS DELIVERY

The (very shorten) recipe

$

ASYNCHRONOUS COMMUNICATION%

COMMON PHILOSOPHY&

CHATOPS'

the best way to build and ship software

The Zen of GitHub

9

"

• Responsive is better than fast • It’s not fully shipped until it’s fast • Anything added dilutes everything else • Practicality beats purity • Approachable is better than simple • Mind your words, they are important • Speak like a human • Half measures are as bad as nothing at all • Encourage flow • Non-blocking is better than blocking • Favor focus over features • Avoid administrative distraction • Design for failure • Keep it logically awesome

the best way to build and ship software10

"

CONTINUOUS DELIVERY

The (very shorten) recipe

$

ASYNCHRONOUS COMMUNICATION%

COMMON PHILOSOPHY&

CHATOPS'

the best way to build and ship software

"GitHub Flow

Create a Feature Branch

Add commits

Open a Pull Request

Discuss and Review Code

the best way to build and ship software

Get CI status back in Pull Request

17

"

the best way to build and ship software

Peer code reviews in Pull Request

18

"

Ship

Merge with master

Ship

the best way to build and ship software

Deployment API

22

"

the best way to build and ship software23

"

CONTINUOUS DELIVERY

The (very shorten) recipe

$

ASYNCHRONOUS COMMUNICATION%

COMMON PHILOSOPHY&

CHATOPS'

""hubot

the best way to build and ship software

Hubot

25

"

the best way to build and ship software

Hubot

26

"

the best way to build and ship software

What do you mean, “devops”?

27

"

the best way to build and ship software

What do you mean, “devops”?

28

"

HTTP://WWW.EWEEK.COM/ENTERPRISE-APPS/SLIDESHOWS/DEVOPS-5-SIGNS-ENTERPRISES-NEED-TO-UNITE-THE-DEV-AND-OPS-CAMPS.HTML

the way people build software 29

'CHATOPS AS THE CULTURAL GLUE

{) { *

'+ DevOps

APPLICATION AUTOMATION INFRASTRUCTURE AUTOMATION

the best way to build and ship software

the best way to build and ship software31

"

CONTINUOUS DELIVERY

The (very shorten) recipe

$

ASYNCHRONOUS COMMUNICATION%

COMMON PHILOSOPHY&

CHATOPS'

the best way to build and ship software

Deployments to production

32

"

the best way to build and ship software

Where Can I Deploy?

33

"

the best way to build and ship software

Deploy to test

34

"

the best way to build and ship software

Get deployment status back in PR

35

"

the best way to build and ship software

Deploy to production

36

"

the best way to build and ship software

Deploy to production - canary

37

"

the best way to build and ship software

Deploy to production - canary

38

"

the best way to build and ship software

Deploy to production - everywhere

39

"

the best way to build and ship software

Deployment confidence

40

"

the best way to build and ship software

Haystack

41

"

the best way to build and ship software

Hubot has your back

42

"

the best way to build and ship software

Hubot has your back

43

"

Merge with master

the best way to build and ship software

Wrap it up

45

"

the best way to build and ship software46

"

CONTINUOUS DELIVERY

The (very shorten) recipe

$

ASYNCHRONOUS COMMUNICATION%

COMMON PHILOSOPHY&

CHATOPS'

"Bonus

the best way to build and ship software

Isn’t that still too risky???

48

"

the best way to build and ship software

Feature Toggles

49

"

the best way to build and ship software

Feature Toggles

50

"

the best way to build and ship software

Feature Toggles

51

"

the best way to build and ship software

Science

52

"

the best way to build and ship software

Science

53

"

the best way to build and ship software

Science

54

"

the best way to build and ship software

Science

55

"

the best way to build and ship software

'Hubot deployed on Heroku

56

the best way to build and ship software

'Hubot deployed on Heroku

57

the best way to build and ship software 58

"

the best way to build and ship software 59

"

the best way to build and ship software 60

"

the best way to build and ship software

References used within the presentation

61

"

• https://github.com/blog/2093-how-the-services-team-uses-github • https://github.com/blog/1124-how-we-use-pull-requests-to-build-github • https://github.com/blog/1939-how-github-uses-github-to-document-github • https://www.youtube.com/watch?v=YIpNpptGX6Q • https://guides.github.com/introduction/flow/ • https://developer.github.com/v3/repos/deployments/ • http://githubengineering.com/deploying-branches-to-github-com/ • https://www.youtube.com/watch?v=NST3u-GjjFw • http://githubengineering.com/scientist/ • http://johnnunemaker.com/flipper/ • https://enterprise.github.com • https://paypal.github.io/InnerSourceCommons/ • https://github.com/blog/2079-managing-large-files-with-git-lfs

"Questions?

the best way to build and ship software

Repo activity in the chat room

63

"

the best way to build and ship software

the best way to build and ship software

Hubot

65

"

the best way to build and ship software

Hubot

66

"

the best way to build and ship software

Resources

67

"

the best way to build and ship software

Git

69

"

• Started by Linus Torvalds 2005 (search “torvalds git” on youtube)

• Easy branching and merging - content oriented, remembers origin

• Small and fast - local operations, smaller repos

• Distributed - VCS on my laptop, full copy incl. history

• Data assurance - sha1, gpg

• Staging area - crafted, meaningful commits

• Free and open source - did you read the first line of this slide?

the best way to build and ship software

An ideal patch flow

70

"

(0) YOU COME UP WITH AN ITCH. YOU CODE IT UP.

(1) SEND IT TO THE LIST AND CC PEOPLE WHO MAY NEED TO KNOW ABOUT THE CHANGE.

(2) YOU GET COMMENTS AND SUGGESTIONS FOR IMPROVEMENTS. YOU MAY EVEN GET THEM IN A "ON

TOP OF YOUR CHANGE" PATCH FORM.

(3) POLISH, REFINE, AND RE-SEND TO THE LIST AND THE PEOPLE WHO SPEND THEIR TIME TO IMPROVE

YOUR PATCH. GO BACK TO STEP (2).

(4) THE LIST FORMS CONSENSUS THAT THE LAST ROUND OF YOUR PATCH IS GOOD. SEND IT TO THE

MAINTAINER AND CC THE LIST.

(5) A TOPIC BRANCH IS CREATED WITH THE PATCH AND IS MERGED TO ‘NEXT', AND COOKED FURTHER

AND EVENTUALLY GRADUATES TO ‘MASTER'.

- HTTPS://GITHUB.COM/GIT/GIT/BLOB/MASTER/DOCUMENTATION/SUBMITTINGPATCHES

the best way to build and ship software

Hubot has your back

71

"

the best way to build and ship software

Hubot has your back

72

"

the best way to build and ship software

Continuous Integration

73

"

the best way to build and ship software

Wrap it up

74

"