SlideShare a Scribd company logo
1 of 36
Download to read offline
Assign, Commit, and Review


           A developer’s guide to
           OpenStack contribution
           Luo, Zhongyue
           OpenStack APAC Conference, Shanghai
           August 11, 2012


1
TODO

    Why contribute?

    Terminologies

    Overview

    Prerequisites

    Assign

    Commit

    Review

    Summary




2
Why contribute?

    Tons of new requirements everyday when operating an IaaS
     • New customers, competitors, regulations, and technology

    Always short of skill, budget, and time
     • Need help from community

    Obvious requirements are to be contributed
     • Someone is always smarter than you in someway



     Contribute and gain respect
     • Have others pay attention to what you say



3
Terminologies

    Git
     • github.com: Code repository
     • git-review: The tool to submit code patches
     • git commit message: Description of code change

    Launchpad (https://launchpad.net)
     • Bug tracker for OpenStack projects
     • Blueprint/Bug report: Description of a requirement/problem

    Gerrit (https://review.openstack.org)
     • Standalone patch review server for git projects

    Jenkins (https://jenkins.openstack.org)
     • Continuous integration system

4
Overview




                                                 git clone




                                                             Your
                                                             code
                                                             patch


    e.g)
    git://github.com/openstack/nova
    git://github.com/openstack/quantum                       Your development
    git://github.com/openstack/cinder                          environment
    git://github.com/openstack/${project_name}




5
Overview                              gets aggregated

                                                                2
                                                    openstack-ci

                                                    ZUUL
                                                             4
                                    1                       reports
                                                                      runs tests

                       git review




    Your
                                                                             3
                                        updates
    code
    patch
                                        5
                         (link)
    Your development
      environment




6
Prerequisites
http://wiki.openstack.org/HowToContribute#If_you.27re_a_developer.2C_start_here:
Create Launchpad account

    https://launchpad.net/+login

    Also enables access to mailing list, wiki, gerrit, and jenkins




8
Sign your CLA

    Mandatory
     • Individual Contributor License Agreement

    Optional – done by your company
     • Corporate Contributor License Agreement
     • Update the list of authorized employees

    For more details
     • http://wiki.openstack.org/CLA




9
Add your name to contributors wiki

     http://wiki.openstack.org/Contributors




     2
                               (Individual CLA)
                               EchoSign transaction number
     1




10
Add your name to contributors wiki




                                              3




                                   2
                                                                                                                           1
     || ${your_name} || ${launchpad_id} || [[https://rackspace.echosign.com/verifier?tx=${EchoSign_transaction_number} |
     ${EchoSign_transaction_number}]] || ${company_name} ||




11
Join the openstack-cla team

     https://launchpad.net/~openstack-cla/+join




12
Add SSH public key to Gerrit

     https://review.openstack.org

                                    1




13
Add SSH public key to Gerrit

     GitHub's guide to SSH keys




     2


          3




14
Install git-review

     $ sudo pip install git-review




15
Assign
Key takeaway

     Ways to assign yourself work
      1. Attend IRC meetings
      2. Find bug reports on Launchpad
      3. Hack the source code

     How to write a blueprint
      • What is the current status?
      • How will your blueprint improve this situation?
      • What is the follow up?

     How to write a bug description
      • Write about WHAT the problem is



17
Find out what others are having problems with

     Start with low-hanging-fruit, Triaged



     http://bugs.launchpad.net/${project_name}




18
How to assign yourself a bug report

     Find a unassigned one




                             1




19
How to assign yourself a bug report

     Not so simple with blueprints…




                       2




20
Get involved in the community

     Attend weekly IRC meetings
      • Fastest way to find work
      • Most effective way to have presence
      • #openstack-meeting on irc.freenode.net
      • http://wiki.openstack.org/Meetings

     Subscribe to the mailing lists
      • Find out the current issues in OpenStack
      • http://wiki.openstack.org/MailingLists




21
Write blueprint/bug reports of your own

     Report new features/requirements you need



     http://blueprints.launchpad.net/${project_name}




22
Commit
http://wiki.openstack.org/GerritWorkflow
Key takeaway

     One code patch should
      • be on one git branch
      • be about one blueprint/bug report
      • have a decent git commit message

     Git commit message should
      • consist of title, [blueprint/bug link], description
      • align with the blueprint/bug description
      • align with fixes done on your code patch

     How to write a git commit message
      • Write about HOW and WHY you fixed the source code

     Code patches must be submitted by git-review

24
Git commit message example
                                                        Less than 50 char


     Remove DB access from             Fixes console/vmrc_manager.py
     compute                           import error



     Implements bp no-db-compute Fixes bug #1028748



     The description of a blue print   The description of a bugfix
     should be placed here             should be placed here




25
Send your code patch for review

     Update the master branch and rebase your branch to master
      • git checkout master
      • git fetch origin
      • git pull origin master
      • git checkout ${your_branch}
      • git rebase –i master

     You absolutely must run unittests before submission!
      • Run “./run_tests.py”

     Use git-review to submit code patch
      • git checkout ${your_branch}
      • git review

26
Some tips for using Git

     Git commands
      • Everyday GIT With 20 Commands Or So

     git-review options and functionalities
      • git review –-help

     More details about git
      • man git




27
Some tips for writing Python code

     Best Python tutorials – read every page
      • http://docs.python.org/tutorial/index.html
      • http://docs.python.org/library/index.html

     PEP8
      • Read it once everyday till you memorize all examples

     HACKING.rst
      • Coding conventions for OpenStack projects
      • Placed in base directory of every project
      • Built upon PEP8




28
Review
Key takeaway

     Take responsibility for your submits
      • Respond professionally to your comments
      • Not everyone lives on the same timezone

     When your not sure
      • you understand a comment, ask anyone via IRC
      • about your code, find help for review via IRC

     How to download a patch to your local machine
         $ git review –d 10774




30
Replying to a comment




     1

31
Replying to a comment




                   4




                       2


                       3


32
Replying to a comment




     5



33
Replying to a comment




     6




     7


34
Summary

     Contribute code to have others contribute to you

     Do the prerequisites

     Get involved in the community and assign work to yourself

     Write formal git commit message with your patch

     Respond professionally to your review comments




35
Assign, commit, and review - A developer’s guide to OpenStack contribution-2012osac-lzy

More Related Content

What's hot

Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects InfrastructureGunnar Hillert
 
Docs or it didn’t happen
Docs or it didn’t happenDocs or it didn’t happen
Docs or it didn’t happenAll Things Open
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productiveKarsten Dambekalns
 
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHubUsing Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHubAboutHydrology Slides
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitE Carter
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...Edureka!
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egitmatz_twt
 
EclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenEclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenmsohn
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHuberr
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction TutorialThomas Rausch
 
Hacking Git and GitHub
Hacking Git and GitHubHacking Git and GitHub
Hacking Git and GitHubEdureka!
 
GIT presentation
GIT presentationGIT presentation
GIT presentationNaim Latifi
 
Git and github fundamental
Git and github fundamentalGit and github fundamental
Git and github fundamentalRajesh Kumar
 

What's hot (20)

Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Docs or it didn’t happen
Docs or it didn’t happenDocs or it didn’t happen
Docs or it didn’t happen
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHubUsing Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
 
Git
GitGit
Git
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egit
 
Github basics
Github basicsGithub basics
Github basics
 
EclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenEclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heaven
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
git and github
git and githubgit and github
git and github
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Hacking Git and GitHub
Hacking Git and GitHubHacking Git and GitHub
Hacking Git and GitHub
 
GIT presentation
GIT presentationGIT presentation
GIT presentation
 
Git and github fundamental
Git and github fundamentalGit and github fundamental
Git and github fundamental
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git within RStudio
Git within RStudioGit within RStudio
Git within RStudio
 

Viewers also liked

Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2
Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2
Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2OpenCity Community
 
CSS Technieken Toegelicht
CSS Technieken ToegelichtCSS Technieken Toegelicht
CSS Technieken ToegelichtTweepixels
 
Hp cloud performance_benchmark
Hp cloud performance_benchmarkHp cloud performance_benchmark
Hp cloud performance_benchmarkOpenCity Community
 
Practical eCommerce with WooCommerce
Practical eCommerce with WooCommercePractical eCommerce with WooCommerce
Practical eCommerce with WooCommerceBrian Krogsgard
 
Government 1-1 and 1-3
Government  1-1 and 1-3 Government  1-1 and 1-3
Government 1-1 and 1-3 cyndalea
 
Nalacity Catalog 01 | September 2011
Nalacity Catalog 01 | September 2011Nalacity Catalog 01 | September 2011
Nalacity Catalog 01 | September 2011Nalacity Shop
 
Identifying Volume
Identifying VolumeIdentifying Volume
Identifying Volumejmori1
 
Social challenges exposition
Social challenges expositionSocial challenges exposition
Social challenges expositionDilsy Sandoval
 
Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...
Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...
Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...Kouluterveyskysely
 
Программа развития жилищного строительства на 2012–2016 годы
Программа развития жилищного строительства на 2012–2016 годыПрограмма развития жилищного строительства на 2012–2016 годы
Программа развития жилищного строительства на 2012–2016 годыАО "Самрук-Казына"
 
On bueno iniziativa 996
On bueno iniziativa   996On bueno iniziativa   996
On bueno iniziativa 996Miguel Rosario
 
Секреция в ЖКТ и её регуляция
Секреция в ЖКТ и её регуляцияСекреция в ЖКТ и её регуляция
Секреция в ЖКТ и её регуляцияcrasgmu
 

Viewers also liked (20)

Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2
Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2
Pm 02 track1-- 魏刚--osac-trusted-computing-pools-in-folsom-v2
 
Final Script Draft 3
Final Script Draft 3Final Script Draft 3
Final Script Draft 3
 
Cosbench apac
Cosbench apacCosbench apac
Cosbench apac
 
CSS Technieken Toegelicht
CSS Technieken ToegelichtCSS Technieken Toegelicht
CSS Technieken Toegelicht
 
Hp cloud performance_benchmark
Hp cloud performance_benchmarkHp cloud performance_benchmark
Hp cloud performance_benchmark
 
Practical eCommerce with WooCommerce
Practical eCommerce with WooCommercePractical eCommerce with WooCommerce
Practical eCommerce with WooCommerce
 
Oap
OapOap
Oap
 
Government 1-1 and 1-3
Government  1-1 and 1-3 Government  1-1 and 1-3
Government 1-1 and 1-3
 
Security protocols
Security protocolsSecurity protocols
Security protocols
 
Pay it forward
Pay it forwardPay it forward
Pay it forward
 
กิจกรรมการเรียนรู้ที่ 5
กิจกรรมการเรียนรู้ที่ 5กิจกรรมการเรียนรู้ที่ 5
กิจกรรมการเรียนรู้ที่ 5
 
Nalacity Catalog 01 | September 2011
Nalacity Catalog 01 | September 2011Nalacity Catalog 01 | September 2011
Nalacity Catalog 01 | September 2011
 
Identifying Volume
Identifying VolumeIdentifying Volume
Identifying Volume
 
Ch06
Ch06Ch06
Ch06
 
Social challenges exposition
Social challenges expositionSocial challenges exposition
Social challenges exposition
 
Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...
Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...
Kauppi: Mielikuvituksen ja fantasioiden merkitys nuorten mielenterveydessä ja...
 
Sangue
SangueSangue
Sangue
 
Программа развития жилищного строительства на 2012–2016 годы
Программа развития жилищного строительства на 2012–2016 годыПрограмма развития жилищного строительства на 2012–2016 годы
Программа развития жилищного строительства на 2012–2016 годы
 
On bueno iniziativa 996
On bueno iniziativa   996On bueno iniziativa   996
On bueno iniziativa 996
 
Секреция в ЖКТ и её регуляция
Секреция в ЖКТ и её регуляцияСекреция в ЖКТ и её регуляция
Секреция в ЖКТ и её регуляция
 

Similar to Assign, commit, and review - A developer’s guide to OpenStack contribution-2012osac-lzy

OpenStack Contribution Workflow
OpenStack Contribution WorkflowOpenStack Contribution Workflow
OpenStack Contribution WorkflowSean McGinnis
 
The OpenStack Contribution Workflow
The OpenStack Contribution WorkflowThe OpenStack Contribution Workflow
The OpenStack Contribution Workflowopenstackindia
 
Git, github and the hacktober fest
Git, github and the hacktober festGit, github and the hacktober fest
Git, github and the hacktober festUtkarshRaj83
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshopCisco DevNet
 
Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution processSyed Armani
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Processopenstackindia
 
Amending and Testing changes lab guide
Amending and Testing changes lab guideAmending and Testing changes lab guide
Amending and Testing changes lab guideopenstackcisco
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects InfrastructureRoy Clarkson
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfuzair
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubKim Moir
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticlePRIYATHAMDARISI
 
FooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxFooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxGrace Jansen
 
Jfokus_Bringing the cloud back down to earth.pptx
Jfokus_Bringing the cloud back down to earth.pptxJfokus_Bringing the cloud back down to earth.pptx
Jfokus_Bringing the cloud back down to earth.pptxGrace Jansen
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeLuca Milanesio
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 

Similar to Assign, commit, and review - A developer’s guide to OpenStack contribution-2012osac-lzy (20)

OpenStack Contribution Workflow
OpenStack Contribution WorkflowOpenStack Contribution Workflow
OpenStack Contribution Workflow
 
The OpenStack Contribution Workflow
The OpenStack Contribution WorkflowThe OpenStack Contribution Workflow
The OpenStack Contribution Workflow
 
Git, github and the hacktober fest
Git, github and the hacktober festGit, github and the hacktober fest
Git, github and the hacktober fest
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshop
 
Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Process
 
Amending and Testing changes lab guide
Amending and Testing changes lab guideAmending and Testing changes lab guide
Amending and Testing changes lab guide
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 
Osrs
OsrsOsrs
Osrs
 
Giddy Up on GitHub
Giddy Up on GitHubGiddy Up on GitHub
Giddy Up on GitHub
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdfGit Tutorial A Comprehensive Guide for Beginners.pdf
Git Tutorial A Comprehensive Guide for Beginners.pdf
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
FooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptxFooConf23_Bringing the cloud back down to earth.pptx
FooConf23_Bringing the cloud back down to earth.pptx
 
Jfokus_Bringing the cloud back down to earth.pptx
Jfokus_Bringing the cloud back down to earth.pptxJfokus_Bringing the cloud back down to earth.pptx
Jfokus_Bringing the cloud back down to earth.pptx
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source code
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
GitHub Event.pptx
GitHub Event.pptxGitHub Event.pptx
GitHub Event.pptx
 

More from OpenCity Community

More from OpenCity Community (20)

开源讲义.pdf
开源讲义.pdf开源讲义.pdf
开源讲义.pdf
 
物联网操作系统漫谈-GIAC大会.pdf
物联网操作系统漫谈-GIAC大会.pdf物联网操作系统漫谈-GIAC大会.pdf
物联网操作系统漫谈-GIAC大会.pdf
 
2017开源年会-企业开源那些事儿-更新.pdf
2017开源年会-企业开源那些事儿-更新.pdf2017开源年会-企业开源那些事儿-更新.pdf
2017开源年会-企业开源那些事儿-更新.pdf
 
社会化研发
社会化研发社会化研发
社会化研发
 
Containers & CaaS
Containers & CaaSContainers & CaaS
Containers & CaaS
 
OaaS:Open as a Strategy
OaaS:Open as a StrategyOaaS:Open as a Strategy
OaaS:Open as a Strategy
 
Hello openstack 2014
Hello openstack 2014Hello openstack 2014
Hello openstack 2014
 
Docker openstack-2014
Docker openstack-2014Docker openstack-2014
Docker openstack-2014
 
Learn OpenStack from trystack.cn
Learn OpenStack from trystack.cnLearn OpenStack from trystack.cn
Learn OpenStack from trystack.cn
 
OpenStack系列公开课2 -20130508
OpenStack系列公开课2 -20130508OpenStack系列公开课2 -20130508
OpenStack系列公开课2 -20130508
 
OpenStack ecosystem
OpenStack ecosystemOpenStack ecosystem
OpenStack ecosystem
 
How to master OpenStack in 2 hours
How to master OpenStack in 2 hoursHow to master OpenStack in 2 hours
How to master OpenStack in 2 hours
 
Learn OpenStack from trystack.cn ——Folsom in practice
Learn OpenStack from trystack.cn  ——Folsom in practiceLearn OpenStack from trystack.cn  ——Folsom in practice
Learn OpenStack from trystack.cn ——Folsom in practice
 
Quantum Networks
Quantum NetworksQuantum Networks
Quantum Networks
 
云计算思考
云计算思考云计算思考
云计算思考
 
Openstorage Openstack
Openstorage OpenstackOpenstorage Openstack
Openstorage Openstack
 
Openstack的研究与实践
Openstack的研究与实践Openstack的研究与实践
Openstack的研究与实践
 
Open Stack Cheng Du Swift Alex Yang
Open Stack Cheng Du Swift Alex YangOpen Stack Cheng Du Swift Alex Yang
Open Stack Cheng Du Swift Alex Yang
 
Nova与虚拟机管理
Nova与虚拟机管理Nova与虚拟机管理
Nova与虚拟机管理
 
Look Into Libvirt Osier Yang
Look Into Libvirt Osier YangLook Into Libvirt Osier Yang
Look Into Libvirt Osier Yang
 

Recently uploaded

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Assign, commit, and review - A developer’s guide to OpenStack contribution-2012osac-lzy

  • 1. Assign, Commit, and Review A developer’s guide to OpenStack contribution Luo, Zhongyue OpenStack APAC Conference, Shanghai August 11, 2012 1
  • 2. TODO Why contribute? Terminologies Overview Prerequisites Assign Commit Review Summary 2
  • 3. Why contribute? Tons of new requirements everyday when operating an IaaS • New customers, competitors, regulations, and technology Always short of skill, budget, and time • Need help from community Obvious requirements are to be contributed • Someone is always smarter than you in someway  Contribute and gain respect • Have others pay attention to what you say 3
  • 4. Terminologies Git • github.com: Code repository • git-review: The tool to submit code patches • git commit message: Description of code change Launchpad (https://launchpad.net) • Bug tracker for OpenStack projects • Blueprint/Bug report: Description of a requirement/problem Gerrit (https://review.openstack.org) • Standalone patch review server for git projects Jenkins (https://jenkins.openstack.org) • Continuous integration system 4
  • 5. Overview git clone Your code patch e.g) git://github.com/openstack/nova git://github.com/openstack/quantum Your development git://github.com/openstack/cinder environment git://github.com/openstack/${project_name} 5
  • 6. Overview gets aggregated 2 openstack-ci ZUUL 4 1 reports runs tests git review Your 3 updates code patch 5 (link) Your development environment 6
  • 8. Create Launchpad account https://launchpad.net/+login Also enables access to mailing list, wiki, gerrit, and jenkins 8
  • 9. Sign your CLA Mandatory • Individual Contributor License Agreement Optional – done by your company • Corporate Contributor License Agreement • Update the list of authorized employees For more details • http://wiki.openstack.org/CLA 9
  • 10. Add your name to contributors wiki http://wiki.openstack.org/Contributors 2 (Individual CLA) EchoSign transaction number 1 10
  • 11. Add your name to contributors wiki 3 2 1 || ${your_name} || ${launchpad_id} || [[https://rackspace.echosign.com/verifier?tx=${EchoSign_transaction_number} | ${EchoSign_transaction_number}]] || ${company_name} || 11
  • 12. Join the openstack-cla team https://launchpad.net/~openstack-cla/+join 12
  • 13. Add SSH public key to Gerrit https://review.openstack.org 1 13
  • 14. Add SSH public key to Gerrit GitHub's guide to SSH keys 2 3 14
  • 15. Install git-review $ sudo pip install git-review 15
  • 17. Key takeaway Ways to assign yourself work 1. Attend IRC meetings 2. Find bug reports on Launchpad 3. Hack the source code How to write a blueprint • What is the current status? • How will your blueprint improve this situation? • What is the follow up? How to write a bug description • Write about WHAT the problem is 17
  • 18. Find out what others are having problems with Start with low-hanging-fruit, Triaged http://bugs.launchpad.net/${project_name} 18
  • 19. How to assign yourself a bug report Find a unassigned one 1 19
  • 20. How to assign yourself a bug report Not so simple with blueprints… 2 20
  • 21. Get involved in the community Attend weekly IRC meetings • Fastest way to find work • Most effective way to have presence • #openstack-meeting on irc.freenode.net • http://wiki.openstack.org/Meetings Subscribe to the mailing lists • Find out the current issues in OpenStack • http://wiki.openstack.org/MailingLists 21
  • 22. Write blueprint/bug reports of your own Report new features/requirements you need http://blueprints.launchpad.net/${project_name} 22
  • 24. Key takeaway One code patch should • be on one git branch • be about one blueprint/bug report • have a decent git commit message Git commit message should • consist of title, [blueprint/bug link], description • align with the blueprint/bug description • align with fixes done on your code patch How to write a git commit message • Write about HOW and WHY you fixed the source code Code patches must be submitted by git-review 24
  • 25. Git commit message example Less than 50 char Remove DB access from Fixes console/vmrc_manager.py compute import error Implements bp no-db-compute Fixes bug #1028748 The description of a blue print The description of a bugfix should be placed here should be placed here 25
  • 26. Send your code patch for review Update the master branch and rebase your branch to master • git checkout master • git fetch origin • git pull origin master • git checkout ${your_branch} • git rebase –i master You absolutely must run unittests before submission! • Run “./run_tests.py” Use git-review to submit code patch • git checkout ${your_branch} • git review 26
  • 27. Some tips for using Git Git commands • Everyday GIT With 20 Commands Or So git-review options and functionalities • git review –-help More details about git • man git 27
  • 28. Some tips for writing Python code Best Python tutorials – read every page • http://docs.python.org/tutorial/index.html • http://docs.python.org/library/index.html PEP8 • Read it once everyday till you memorize all examples HACKING.rst • Coding conventions for OpenStack projects • Placed in base directory of every project • Built upon PEP8 28
  • 30. Key takeaway Take responsibility for your submits • Respond professionally to your comments • Not everyone lives on the same timezone When your not sure • you understand a comment, ask anyone via IRC • about your code, find help for review via IRC How to download a patch to your local machine $ git review –d 10774 30
  • 31. Replying to a comment 1 31
  • 32. Replying to a comment 4 2 3 32
  • 33. Replying to a comment 5 33
  • 34. Replying to a comment 6 7 34
  • 35. Summary Contribute code to have others contribute to you Do the prerequisites Get involved in the community and assign work to yourself Write formal git commit message with your patch Respond professionally to your review comments 35