1. OpenStack Contribution
How to Contribute
안승규 (Stephen Ahn)
28-March-2014
skanddh@gmail.com
http://www.ahnseungkyu.com
2. launchpad 사용자 등록
1. launchpad.net
- https://launchpad.net/openstack
2. Blueprints & Bugs
- https://blueprints.launchpad.net/cinder/<Project>/<버전>
- https://bugs.launchpad.net/<Project>
3. Gerrit 정보 등록
1. review 사이트 접속
- https://review.openstack.org/
2. Settings 정보 등록
- SSH Public Keys 등록
- Contact Information 등록
- Agreements 등록
4. 소스 다운로드 및 설정
1. 소스 다운로드
- git clone http://git.openstack.org/openstack/nova.git
2. 브라우저에서 review port 확인
- https://review.openstack.org/ssh_info
3. Settings username
- git config --global --add gitreview.username “StephenAhn”
- git config --global --add user.name “Stephen Ahn”
- git config --global --add user.email “skanddh@gmail.com”
4. Testing Gerrit Connections
- ssh -p 29418 StephenAhn@review.openstack.org
5. 소스 다운로드 및 설정
5. 단축 경로 저장
- vi ~/.ssh/config
Host review
Hostname reivew.openstack.org
Port 29418
User StephenAhn
6. gerrit remote 확인 및 change-id 자동 세팅
- git review -s
7. remote url 확인 및 commit-msg 파일 존재 확인
- git remote -v
- ls .git/hooks/commit-msg
6. 소스 다운로드 및 설정
8. gerrit review -s 확인 시 에러 나면 remote 추가
- git remote add gerrit
ssh://StephenAhn@review.openstack.org:29418/openstack/nova.git
9. 수정 중에 최신 소스로 다운받기
- git remote update
- git checkout master
- git pull --ff-only origin master
10. Blueprint 등록 및 Branch 생성
- launchpad 에 Blueprint 등록
- git checkout -b bp/local-storage-volume-scheduling
11. commit message 입력
- git commit --amend
첫번째 줄은 50자 이내로 간단히 요약하여 쓴다.
n
설명은 한 줄에 72자 까지 쓴다.
…
DocImpact
Related to nova-network-objects 다른 bp (여기서는 nova-network-objects)와 연관이 있을 때
Implements: blueprint local-storage-volume-scheduling Blueprint 일 때
Closed-Bug: #1276088 Bug 일 때
7. 소스 다운로드 및 설정
12. Commit message에 신경써서 넣어야 할 String
- DocImpact : 도큐먼트에 영향을 미칠 때 넣음
- SecurityImpact : 보안 문제가 있을 때
- UpgradeImpact : 업그레이드에 영향을 미칠 때
(release notes 의 ‘Upgrade Notes’ section 수정 고려)
13. unit test 및 pep8 테스트
- ./run_tests.sh
- ./run_tests.sh -p
14. review 등록
- git review
9. Continuous Integration 시나리오
1. 신규 Issue 등록
– bugs.launchpad.net 신규 Issue 등록 (Issue 번호 생성)
2. Branch 생성
– 신규 Issue 에 대한 Branch 생성
– unit test code 작성 및 로직 수정
3. Source code Push
– git review 로 로컬 source code 를 소스저장소에 올림
4. 1차 unit test
– review 로 올라온 코드에 대해 Jenkins 가 자동으로 unit
test 수행
5. Review 완료 및 소스 Merge
– Gerrit 을 활용한 소스 Review 및 Merge
10. How to Contribute
• Making an account at launchpad.net
• Join the OpenStack developers mailing list &
#openstack-dev IRC Channel
• Confirming to code review system information
• Agreeing to the CLA (Contributors License Agreement)
• Writing Blueprints
• Getting the OpenStack code
• Setting up gerrit environment
• Making a git new branch
• pushing the your code