72
Công cụ và qui trình đóng góp vào OpenStack 2015 / 12 / 26 Fujitsu Vietnam Limited PODC (Platform Offshore Development Center) Cao Xuân Hoàng ([email protected]) Copyright 2015 Fujitsu Vietnam Limited

[OSS Upstream Training] 8 workflow of an open stack contribution and tools

Embed Size (px)

Citation preview

Page 1: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Công cụ và qui trình đóng góp vào OpenStack

2015 / 12 / 26Fujitsu Vietnam LimitedPODC (Platform Offshore Development Center)Cao Xuân Hoàng ([email protected])

Copyright 2015 Fujitsu Vietnam Limited

Page 2: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

2 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 3: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

3 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 4: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

devstack.org

4 Copyright 2015 Fujitsu Vietnam Limited

Page 5: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

rejoin-stack.sh

5 Copyright 2015 Fujitsu Vietnam Limited

Page 6: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

http://localhost/

6 Copyright 2015 Fujitsu Vietnam Limited

Page 7: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thực hành

7 Copyright 2015 Fujitsu Vietnam Limited

Tải devstack source code và thực hành

Page 8: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

8 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 9: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

http://launchpad.net/

9 Copyright 2015 Fujitsu Vietnam Limited

Page 10: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

https://www.openstack.org/join/

10 Copyright 2015 Fujitsu Vietnam Limited

Page 11: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Sign In

11 Copyright 2015 Fujitsu Vietnam Limited

Page 12: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

No agreement

12 Copyright 2015 Fujitsu Vietnam Limited

Page 13: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

New agreement

13 Copyright 2015 Fujitsu Vietnam Limited

Page 14: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Sign the Individual agreement

14 Copyright 2015 Fujitsu Vietnam Limited

Page 15: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Bạn có làm cho công ty nào không?

15 Copyright 2015 Fujitsu Vietnam Limited

Nếu những đóng góp của bạn đại diện cho một công ty, hãy báo người quản lý nhập thông tin của bạn vào CCLA “Corporate Contributor License Agreement”

http://docs.openstack.org/infra/manual/developers.html#account-setup

Page 16: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Signed agreement

16 Copyright 2015 Fujitsu Vietnam Limited

Page 17: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thực hành

17 Copyright 2015 Fujitsu Vietnam Limited

Hãy đăng ký trở thành thành viên và ký vào cam kết đóng góp.

Page 18: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

18 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 19: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

http://launchpad.net/

19 Copyright 2015 Fujitsu Vietnam Limited

Page 20: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Blueprint

20 Copyright 2015 Fujitsu Vietnam Limited

Là diễn đàn dùng để liệt kê và lên kế hoạch cho công việc muốn hướng đến.

Blueprint dùng để mô tả/giải thích cho giải pháp nhằm đạt được kết quả

Hiện nay hầu hết các dự án quản lý blueprints trên git repo được gọi là “specs”

https://wiki.openstack.org/wiki/Blueprints#Nova https://wiki.openstack.org/wiki/Blueprints#Neutron

Page 21: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Trạng thái lỗi

21 Copyright 2015 Fujitsu Vietnam Limited

New Lỗi mới được tạo

Incomplete Lỗi cần thêm thông tin từ người tạo ra nó

Confirmed Lỗi được xác thực

Triaged Lỗi đang được trao đổi, phân tích làm thế nào khác phục

In Progress Lỗi đã có người nhận khắc phục và đang trong quá trình sửa chữa

Fix Committed Nhánh chứa lỗi đã được hòa vào nhánh chính

Fix Released Kết quả sửa lỗi được đưa vào lần phát hành gần nhất

Page 22: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Trạng thái lỗi

22 Copyright 2015 Fujitsu Vietnam Limited

Invalid Đây không phải là lỗi

Opinion Đây là vấn đề đúng theo cách của nó

Won't Fix Đây là vấn đề đúng nhưng chúng tôi không mong đợi sẽ sửa nó

Page 23: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Trạng thái lỗi

23 Copyright 2015 Fujitsu Vietnam Limited

New Incomplete Confirmed Triaged In Progress Fix Committed Fix Released Invalid Opinion Won't Fix

Page 24: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Mức độ quan trọng của lỗi

24 Copyright 2015 Fujitsu Vietnam Limited

Critical Mất dữ liệu / ảnh hưởng đến hầu hết người dùng và không khắc phục được

HighMất dữ liệu / ảnh hưởng hầu hết ngườ dùng nhưng có thể khắc phuc được.Lỗi ở các tính năng quan trọng và không khặc phục được.

Medium Lỗi ở các tính năng quan trọng nhưng có thể khắc phục.Lỗi ở các tính năng phụ và không khắc phục được.

Low Vấn đề nhỏ và dễ dàng khắc phục được.

Wishlist Không hẳn là lỗi nhưng được đề nghị để cải thiện tính năng cho dự án

Undefined Chưa đánh giá mức độ ảnh hưởng ở thời điểm thiết lập

Page 25: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Mức độ quan trọng của lỗi

25 Copyright 2015 Fujitsu Vietnam Limited

Critical High Medium Low Wishlist Undefined

Page 26: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Đánh dấu lỗi

26 Copyright 2015 Fujitsu Vietnam Limited

low-hanging-fruit Các lỗi dễ dàng sửa chữa, phù hợp cho những người mới bắt đầu làm quen với việc đóng góp vào OpenStack.

documentation Lỗi liên quan hoặc ảnh hưởng đến tài liệu.

i18n Các vấn đề liên quan đến i18n.

security Sửa lỗi có khả năng nảy sinh vấn đề liên quan bảo mật

ops Sửa lỗi có ảnh hưởng quan trong đến hoạt động của OpenStack

SERIES-rc-potential Đánh dấu lỗi cần được giải phóng cho lần kế tiếp

SERIES-backport-potential Đánh dấu lỗi có thể đưa vào các bản đã giải phóng trước đó.

Per project tags https://wiki.openstack.org/wiki/BugTags

Page 27: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Đánh dấu lỗi

27 Copyright 2015 Fujitsu Vietnam Limited

Assigned To Người hiện tại đang chịu trách nhiệm sửa chửa. Phải được thiết lập khi lỗi ở trạng thái “In progress”

Milestone Cột mốc ta cần sửa cho lỗi hoặc mốc/phiên bản mà nó đã sửa.

Page 28: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thông báo lỗi

28 Copyright 2015 Fujitsu Vietnam Limited

Thiết lập đúng theo từng dự án của OpenStack Kiểm tra trùng lặp Trạng thái sẽ là “New”

Page 29: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Xác thực và đặt mức ưu tiên

29 Copyright 2015 Fujitsu Vietnam Limited

Thiếu thông tin => Trạng thái: “Incomplete” Thiết lập lại và đúng vấn đề => Trạng thái: “Confirmed” Người phát triển chính hoặc người giám sát lỗi của dự án =>

Mực độ quan trọng: <mức ảnh hưởng lỗi>

Page 30: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Debugging

30 Copyright 2015 Fujitsu Vietnam Limited

Xác định làm thế nào để sửa lỗi Hỏi người phát triển chính hoặc quản lý lỗi => Trạng thái:

“Triaged”

Page 31: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Sửa lỗi

31 Copyright 2015 Fujitsu Vietnam Limited

Người phát triển sẽ làm việc với lỗi được chỉ định Trạng thái: “In progress” Gerrit sẽ tự động thiết lập trạng thái của lỗi

Page 32: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Sau khi lỗi đã sửa được chấp nhận

32 Copyright 2015 Fujitsu Vietnam Limited

Kiểm tra, chấp nhận và được hòa vào nhánh chính Trạng thái: “Fix Committed” Thiết lập mốc hoặc nhánh được phát hành Trạng thái: “Fix Released”

Page 33: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thực hành

33 Copyright 2015 Fujitsu Vietnam Limited

Kiểm tra những lỗi trên launchpad và nâng cao khả năng sửa lỗi của bạn

Page 34: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

34 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 35: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

review.openstack.org

35 Copyright 2015 Fujitsu Vietnam Limited

Page 36: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Qui trình xử lý trên gerrit

36 Copyright 2015 Fujitsu Vietnam Limited

Page 37: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Nhập mã ssh

37 Copyright 2015 Fujitsu Vietnam Limited

https://review.openstack.org/#/settings/ssh-keys

Page 38: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Cấu hình git

38 Copyright 2015 Fujitsu Vietnam Limited

git config --global user.name "Firstname Lastname" git config --global user.email "[email protected]"

Page 39: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Cài đặt git review

39 Copyright 2015 Fujitsu Vietnam Limited

apt-get / yum / pip install … git review

Page 40: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

git clone

40 Copyright 2015 Fujitsu Vietnam Limited

Page 41: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

git review -s

41 Copyright 2015 Fujitsu Vietnam Limited

Page 42: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

git checkout -b TOPIC-BRANCH

42 Copyright 2015 Fujitsu Vietnam Limited

Page 43: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Chạy unit tests

43 Copyright 2015 Fujitsu Vietnam Limited

Page 44: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Mời người kiểm tra

44 Copyright 2015 Fujitsu Vietnam Limited

Page 45: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

git commit --amend

45 Copyright 2015 Fujitsu Vietnam Limited

Page 46: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Lịch sử các bản ghép trên gerrit

46 Copyright 2015 Fujitsu Vietnam Limited

Page 47: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

patchset diffs

47 Copyright 2015 Fujitsu Vietnam Limited

Page 48: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thực hành

48 Copyright 2015 Fujitsu Vietnam Limited

Tải bản ghép lên gerrit và mời người kiểm tra

Page 49: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

49 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 50: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

nvie inspired

50 Copyright 2015 Fujitsu Vietnam Limited

Page 51: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Các nhánh ổn định

51 Copyright 2015 Fujitsu Vietnam Limited

Page 52: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

2013.2 branch and tags

52 Copyright 2015 Fujitsu Vietnam Limited

Page 53: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

2013.2.4 preparation

53 Copyright 2015 Fujitsu Vietnam Limited

Page 54: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Kiểm tra

54 Copyright 2015 Fujitsu Vietnam Limited

Page 55: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thực hành

55 Copyright 2015 Fujitsu Vietnam Limited

Chuyển đến nhánh ổn định gần đây nhất

Page 56: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

56 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 57: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Đồng nhất qui trình kiểm tra

57 Copyright 2015 Fujitsu Vietnam Limited

Page 58: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Đồng nhất qui trình kiểm tra

58 Copyright 2015 Fujitsu Vietnam Limited

Page 59: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Góp ý trên từng dòng

59 Copyright 2015 Fujitsu Vietnam Limited

Page 60: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Bản nháp góp ý trên từng dòng

60 Copyright 2015 Fujitsu Vietnam Limited

Page 61: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Người kiểm tra thông thường

61 Copyright 2015 Fujitsu Vietnam Limited

Page 62: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Người kiểm tra chính

62 Copyright 2015 Fujitsu Vietnam Limited

Page 63: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thực hành

63 Copyright 2015 Fujitsu Vietnam Limited

Đẩy bản đang sửa chữa hoặc bản nháp lên gerrit và mời người kiểm tra

Page 64: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

64 Copyright 2015 Fujitsu Vietnam Limited

devstack.org Làm thế nào để đóng góp vào OpenStack launchpad.net review.openstack.org Mô hình rẽ nhánh (Branching model) Qui trinh kiểm tra Jenkins

Page 65: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Xử lý tất cả các bản đóng góp

65 Copyright 2015 Fujitsu Vietnam Limited

Page 66: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Kiểm tra trên gerrit

66 Copyright 2015 Fujitsu Vietnam Limited

Page 67: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thông báo lỗi

67 Copyright 2015 Fujitsu Vietnam Limited

Page 68: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Không phải là lỗi

68 Copyright 2015 Fujitsu Vietnam Limited

Page 69: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Kiểm tra lại lỗi (recheck)

69 Copyright 2015 Fujitsu Vietnam Limited

Page 70: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Thực hành

70 Copyright 2015 Fujitsu Vietnam Limited

Thêm lỗi và kiểm tra các thông báo từ jenkins

Page 71: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

THANK YOU!

71 Copyright 2015 Fujitsu Vietnam Limited

Reference linkhttps://wiki.openstack.org/wiki/OpenStack_Upstream_Training/Info

Page 72: [OSS Upstream Training] 8 workflow of an open stack contribution and tools

Copyright 2014 Fujitsu Vietnam Limited