OpenStack Developer’s Guide

 

Đặng Văn Đại, Internship VCCloud

Agenda

- Overview

- What does we need?

- How does OpenStack review your code?

- What should we do?

- Tips

Steps:

1. Clone project code from github

2. Write new code

3. Write new test case

4. May be, we need create release note with reno utility and change doc

5. Push code to review.openstack.org and use --amend option to change code on new patchset

Some interesting websites:

1. Launchpad.net :  bugs, blueprints

2. Openstack.org: required for contributors

3. Review.openstack.org: review code, gerrit web

4. https://wiki.openstack.org/wiki/IRC: many many chanel for discuss arround openstack

 

What does we need?

Sign up some accounts

- Launchpad.net : to login review.openstack.org, report bug and blueprints,...

- Openstack.org : Foundation Member with same email which signed up on lauchpad.net

Install git-review

- command-line tool for Git / Gerrit.

- http://docs.openstack.org/infra/git-review/

What does we need?

After that, sign in review.openstack.org:

- Sign the appropriate Individual Contributor License Agreement

- upload an SSH key to Gerrit at review.openstack.org

- setup Contact information

- also config somethings for git:

     git config --global user.name "Firstname Lastname"
     git config --global user.email "email@youremail.com"

What does we need?

Try on sanbox tutorial:

- strongly suggest you follow this tutorial for first time contributing.

- docs.openstack.org/infra/manual/sandbox.html#sandbox

 

 

How does OpenStack review your code?

 - Using Gerrit (code review and repository management):

+ Review commit

+ Discuss code

+ Intergrate launchpad to manage topic, related change

NOTE: need to know : git commit, rebase, cherry-pick to manage your own codes

 

 - Using Jekins to automate testing (intergrate with third party systems)

How does OpenStack review your code?

 - Review policy:

+ Peer reviewers: anyone have lauchpad account can review with +1/0/-1

+ Core reviewers: +2/0/-2

+ Need at least two +2 and one +1 workflow from core reviewers, code will be merged

What should we do?

- Find a bug or blueprint for new change

 

 

 

- Write/change some testcase follow changing code

What should we do?

- Join some IRC chanel: openstack-dev, main chanel for special project

 

- Read more somethings like: how to fix tempest error openstack, how to debugging gate helps...

Tips

- How to "recheck" on reiveew.openstack.org : comment "recheck"

- Run test: run special test with special path like "./run_tests.sh share.drivers.glusterfs.test_layout_directory.GlusterfsDirectoryMappedLayoutTestCase"

 

NOTE:  

"tox -e py27" ~ "./run_test.sh"

 

Tips

 

- Using Mock lib. to write testcase (available py2 & 3)

 

- Using six.text_type() instead of str(py3) and unicode(py2)

 

- Have to follow log standard: read more at ttps://wiki.openstack.org/wiki/LoggingStandards

 

 

 

Tips

 

- Don't use option --amend in case we want to separate our contribution to more than one commit. It's useful for review some changes on many many lines.

 

 

 

How to contribute OpenStack

By daikk115

How to contribute OpenStack

  • 998