The OpenStack
Contribution
Workflow
Sean McGinnis
2 of 21
The Basics
Account Setup and Agreements
Launchpad Account Creation
https://launchpad.net/+login
Join the OpenStack Foundation
“Foundation” membership level, not “community”
https://www.openstack.org/join/
Register Nick IRC
https://freenode.net/
/nick [desired_nick]
/msg NickServ REGISTER password youremail@example.com
3 of 21
Code Contibution Setup
Account Setup and Agreements
Gerrit Login
https://review.openstack.org/
Sign Contributor License Agreement
https://review.openstack.org/#/settings/agreements
https://wiki.openstack.org/wiki/GovernmentCLA (US Government)
4 of 21
Hang out on IRC
• So much of OpenStack development happens on IRC
• Best way to ask questions and discuss issues
• Some general channels and project specific channels
#openstack-dev
#openstack-meeting
#openstack-[project]
Many IRC clients available for various operating systems as well as Freenode web chat:
Clients: HexChat, LimeChat, irssi
Web: http://webchat.freenode.net/
5 of 21
Join the Mailing List
Lots of posts for announcements, development issues, etc.
General: openstack
Development: openstack-dev
Announcements: openstack-announce
Operators: openstack-operators
More details and links to full list of mailing lists here:
https://wiki.openstack.org/wiki/Mailing_Lists
6 of 21
Project Watch List
Add interested projects to your watch list to get notifications.
Go to https://review.openstack.org/#/settings/projects:
7 of 21
Add SSH Keys
SSH public key must be registered to identify you when you push up code.
Typically uses your default in ~/.ssh/id_rsa.pub but different key can also be used.
Go to https://review.openstack.org/#/settings/ssh-keys:
8 of 21
Code Reviews
Reviewing code with Gerrit
One of the best places to start!
Learn from others changes.
See what kinds of issues are pointed out by other reviewers.
Share your expertise or just help catch basic coding issues.
9 of 21
Code Reviews
Gerrit Review Layout
Lot’s of information!
10 of 21
Code Reviews
Gerrit Review Layout
11 of 21
Code Reviews
Gerrit Review Diff
12 of 21
Code Reviews
Gerrit Review Navigation and Settings
13 of 21
Bug Tracking
Launchpad Bug Management
Bugs tracked on the Launchpad.net site.
Overall list of all bugs in OpenStack projects:
https://bugs.launchpad.net/openstack
Project specific view of bugs:
https://bugs.launchpad.net/cinder
Search for bugs matching an issue you’ve found.
Look for bugs you would like to work on.
14 of 21
Bug Tracking
Working with bugs
15 of 21
Bug Tracking
Bug Tags
Look for specific categories of bugs by tag.
Helpful tags like “low-hanging-fruit” or
“documentation” can help you get started.
16 of 21
Submitting Code
Workflow Overview
$ git clone https://github.com/openstack/nova
$ cd nova
$ git checkout –b bug/12345
$ vi nova/my_amazing_bug_fix.py
$ vi nova/tests/unit/test_myfix.py
$ tox # < Don’t forget this!!
$ git add . && git commit
$ git review
Wait for patch feedback
$ vi nova/my_amazing_bug_fix.py
$ tox –e pep8
$ git add . && git commit --amend
$ git review
17 of 21
Submitting Code
Viewing check queue status
http://status.openstack.org/zuul/
18 of 21
Submitting Code
Rebasing
$ git checkout –b bug/12345
$ vi nova/my_amazing_bug_fix.py
$ git add . && git commit
$ git review
Merge Conflict!
$ git checkout master
$ git pull
$ git checkout bug/12345
$ git rebase master
$ vi nova/merge_conflict_file.py
$ git add nova/merge_conflict_file.py
$ git rebase --continue
$ git commit --amend
$ git review
19 of 21
Submitting Code
Bug Fixes, New Features, and Small Changes
Bug Fix
git checkout –b bug/12345
In commit message:
Closes-bug: #12345
New Feature
File blueprint on Launchpad
Submit spec and get approved if needed
git checkout –b feature_name
In commit message:
Implements: blueprint blueprint_name
Small cleanup or refactoring
git checkout –b descriptive_name
Make change and commit
20 of 21
References
OpenStack Documentation
• http://docs.openstack.org/
How to Contribute Wiki
• https://wiki.openstack.org/wiki/How_To_Contribute
Developer Manual
• http://docs.openstack.org/infra/manual/developers.html
OpenStack Contribution Workflow

OpenStack Contribution Workflow

  • 1.
  • 2.
    2 of 21 TheBasics Account Setup and Agreements Launchpad Account Creation https://launchpad.net/+login Join the OpenStack Foundation “Foundation” membership level, not “community” https://www.openstack.org/join/ Register Nick IRC https://freenode.net/ /nick [desired_nick] /msg NickServ REGISTER password youremail@example.com
  • 3.
    3 of 21 CodeContibution Setup Account Setup and Agreements Gerrit Login https://review.openstack.org/ Sign Contributor License Agreement https://review.openstack.org/#/settings/agreements https://wiki.openstack.org/wiki/GovernmentCLA (US Government)
  • 4.
    4 of 21 Hangout on IRC • So much of OpenStack development happens on IRC • Best way to ask questions and discuss issues • Some general channels and project specific channels #openstack-dev #openstack-meeting #openstack-[project] Many IRC clients available for various operating systems as well as Freenode web chat: Clients: HexChat, LimeChat, irssi Web: http://webchat.freenode.net/
  • 5.
    5 of 21 Jointhe Mailing List Lots of posts for announcements, development issues, etc. General: openstack Development: openstack-dev Announcements: openstack-announce Operators: openstack-operators More details and links to full list of mailing lists here: https://wiki.openstack.org/wiki/Mailing_Lists
  • 6.
    6 of 21 ProjectWatch List Add interested projects to your watch list to get notifications. Go to https://review.openstack.org/#/settings/projects:
  • 7.
    7 of 21 AddSSH Keys SSH public key must be registered to identify you when you push up code. Typically uses your default in ~/.ssh/id_rsa.pub but different key can also be used. Go to https://review.openstack.org/#/settings/ssh-keys:
  • 8.
    8 of 21 CodeReviews Reviewing code with Gerrit One of the best places to start! Learn from others changes. See what kinds of issues are pointed out by other reviewers. Share your expertise or just help catch basic coding issues.
  • 9.
    9 of 21 CodeReviews Gerrit Review Layout Lot’s of information!
  • 10.
    10 of 21 CodeReviews Gerrit Review Layout
  • 11.
    11 of 21 CodeReviews Gerrit Review Diff
  • 12.
    12 of 21 CodeReviews Gerrit Review Navigation and Settings
  • 13.
    13 of 21 BugTracking Launchpad Bug Management Bugs tracked on the Launchpad.net site. Overall list of all bugs in OpenStack projects: https://bugs.launchpad.net/openstack Project specific view of bugs: https://bugs.launchpad.net/cinder Search for bugs matching an issue you’ve found. Look for bugs you would like to work on.
  • 14.
    14 of 21 BugTracking Working with bugs
  • 15.
    15 of 21 BugTracking Bug Tags Look for specific categories of bugs by tag. Helpful tags like “low-hanging-fruit” or “documentation” can help you get started.
  • 16.
    16 of 21 SubmittingCode Workflow Overview $ git clone https://github.com/openstack/nova $ cd nova $ git checkout –b bug/12345 $ vi nova/my_amazing_bug_fix.py $ vi nova/tests/unit/test_myfix.py $ tox # < Don’t forget this!! $ git add . && git commit $ git review Wait for patch feedback $ vi nova/my_amazing_bug_fix.py $ tox –e pep8 $ git add . && git commit --amend $ git review
  • 17.
    17 of 21 SubmittingCode Viewing check queue status http://status.openstack.org/zuul/
  • 18.
    18 of 21 SubmittingCode Rebasing $ git checkout –b bug/12345 $ vi nova/my_amazing_bug_fix.py $ git add . && git commit $ git review Merge Conflict! $ git checkout master $ git pull $ git checkout bug/12345 $ git rebase master $ vi nova/merge_conflict_file.py $ git add nova/merge_conflict_file.py $ git rebase --continue $ git commit --amend $ git review
  • 19.
    19 of 21 SubmittingCode Bug Fixes, New Features, and Small Changes Bug Fix git checkout –b bug/12345 In commit message: Closes-bug: #12345 New Feature File blueprint on Launchpad Submit spec and get approved if needed git checkout –b feature_name In commit message: Implements: blueprint blueprint_name Small cleanup or refactoring git checkout –b descriptive_name Make change and commit
  • 20.
    20 of 21 References OpenStackDocumentation • http://docs.openstack.org/ How to Contribute Wiki • https://wiki.openstack.org/wiki/How_To_Contribute Developer Manual • http://docs.openstack.org/infra/manual/developers.html