ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Surviving your first check-in: An engineers guide
               to contributing to OpenStack




                                     Colin McNamara ¨C Chief Geek, Nexus IS
                                                             CCIE #18233
                                                     @COLINMCNAMARA
                                                                   1/9/2013
1   www.Nexusis.com   877.286.3987
Agenda

      ¡ì?? How this all started ¨C ¡°a simple experiment¡±
      ¡ì?? The importance of community - Leveraging the power of the meetup
      ¡ì?? Talking your employer into supporting OpenStack and the CLA
      ¡ì?? Setting up your Dev environments - getting beyond Devstack
      ¡ì?? ¡°Getting¡± git, using the git repository for those that don't code for a
          living
      ¡ì?? Testing your code - what do you mean it doesn't build?
      ¡ì?? How to give back, and get other people involved in the community
2   www.Nexusis.com   877.286.3987
My Background




3   www.Nexusis.com   877.286.3987
My Perspective

                                     ¡ì?? Network Engineer first
                                        ¡ì?? CCIE #18233

                                     ¡ì?? Systems/Storage Second
                                        ¡ì?? IEEE, IETF, T11
                                     ¡ì?? Linux user since 98
                                     ¡ì?? Creator of ¡°Sausage Code¡±
                                     ¡ì?? NOT A PROGRAMMER


4   www.Nexusis.com   877.286.3987
How this craziness started




5   www.Nexusis.com   877.286.3987
¡°A simple experiment¡±

                                     ¡ì?? Ewan Mellor ¨C Citrix Xen
                                     ¡ì?? Simple feature, Deploy
                                         Storage QOS
                                     ¡ì?? Turned into a 4 month saga
                                     ¡ì?? Lots of lessons to be learned




6   www.Nexusis.com   877.286.3987
Leveraging the power of the Meetup




7   www.Nexusis.com   877.286.3987
Meetup.com ¨C Community is your friend
                                     ¡ì?? Join a Meetup.com group
                                        ¡ì?? http://www.meetup.com/
                                            openstack/
                                     ¡ì?? If there is none in your area¨C
                                         Start One
                                     ¡ì?? Many eyes help in
                                         overcoming challenges



8   www.Nexusis.com   877.286.3987
Background




9   www.Nexusis.com   877.286.3987
Talking to your employer about contributing




10   www.Nexusis.com   877.286.3987
Talking to your employer about contributing

                                      ¡ì?? Notify your manager. If you don¡¯t have a
                                          policy you have a chance to set one.
                                      ¡ì?? In Ca, you are only protected if your
                                          company isn¡¯t in the line of biz your project
                                          is.
                                      ¡ì?? If you are contributing on behalf of a
                                          company, an authorized representative of
                                          your company should also sign a
                                          Corporate Contributor License Agreement.
11   www.Nexusis.com   877.286.3987
Next steps ¨C Executing your CLA
                                      ¡ì?? Join the OpenStack foundation
                                      ¡ì?? Create your launchpad account
                                         ¡ì?? *** don¡¯t change your username after ***

                                      ¡ì?? Join the OpenStack team on launchpad
                                      ¡ì?? Sign the CLA electronically
                                      ¡ì?? Update the Contributors Wiki
                                      ¡ì?? Request openstack-cla membership on
                                          launchpad
12   www.Nexusis.com   877.286.3987
                                      ¡ì?? Wait (or ping an op on #openstack-dev)
Setting up your Dev environment




13   www.Nexusis.com   877.286.3987
10 minutes to Devstack

                                      ¡ì?? Best run on Ubuntu 12.04
                                      ¡ì?? Log in as a USER (not root)
                                      ¡ì?? Sudo apt-get install git
                                      ¡ì?? git clone
                                          https://github.com/openstack-dev/
                                          devstack.git
                                      ¡ì?? cd devstack && ./stack.sh


14   www.Nexusis.com   877.286.3987
Getting beyond Default Devstack

                                      ¡ì?? I like to run in a VMware environment
                                         ¡ì?? (in home lab + instance on laptop)
                                         ¡ì?? Working on cloning Rackspace¡¯s nested setup
                                             that cody_bunch is using

                                      ¡ì?? Spin up new instances easily
                                      ¡ì?? Quickly compare versions
                                      ¡ì?? Default install pushes QEMU
                                      ¡ì?? Puppet / Cobbler / Koan in your home lab
                                          will save you time / headaches
15   www.Nexusis.com   877.286.3987
Getting beyond Default Devstack - Stackrc
                                                   ¡ì?? /devstack/
                                                       stackrc


                                                   ¡ì?? Adjust API¡¯s /
                                                       Services


                                                   ¡ì?? Change git
                                                       repos

16   www.Nexusis.com   877.286.3987
Getting beyond Default Devstack - Stackrc




      ¡ì?? ~/devstack/stackrc updated to point to working development
          branch
      ¡ì?? Refs/changes/50/5050/1 is the review ID




17   www.Nexusis.com   877.286.3987
You¡¯ve made a change, Now What?

       ¡ì?? ./rejoin_stack.sh will attach you the screen with all the
           terminals for the various apps. There could be as many as 14
           screens depending on how many services are enabled
       ¡ì?? ¡°ctrl-c¡± and ¡°ctrl-d¡± on each window to kill the process. ¡°ctrl-a
           n¡± takes you to next terminal. Restart the process by using up-
           arrow key and entering return
       ¡ì?? Another easier way to kill all and restart is to do ¡°screen -ls¡±
           and kill the process. Restart by ./rejoin_stack.sh


18   www.Nexusis.com   877.286.3987
¡°Getting Git¡±                  OpenStack Workflows




19   www.Nexusis.com   877.286.3987
What is Git ?

                                      ¡ì?? Repository created for Linux Kernel Dev
                                      ¡ì?? Solves centralization problems ¨C you can
                                          code at the lake, or in your isolated lab
                                      ¡ì?? Can be complex (multiple ways of doing
                                          things)




20   www.Nexusis.com   877.286.3987
Setting things up ¨C Installing Git

Install Git

Install DevStack

Configure git

Install git-review

Clone a project

Verify gerrit works
21   www.Nexusis.com   877.286.3987
Setting things up ¨C Installing DevStack

Install Git

Install DevStack

Configure git

Install git-review

Clone a project

Verify gerrit works
22   www.Nexusis.com   877.286.3987
Setting things up ¨C Configuring Git

Install Git

Install DevStack

Configure git

Install git-review

Clone a project

Verify gerrit works
23   www.Nexusis.com   877.286.3987
Setting things up ¨C Configuring git-review

Install Git

Install DevStack                      Git review redirects a commit into a review and test
                                      process
Configure git

Install git-review

Clone a project

Verify gerrit works
24   www.Nexusis.com   877.286.3987
Setting things up ¨C Cloning a project

Install Git

Install DevStack

Configure git

Install git-review

Clone a project

Verify gerrit works
25   www.Nexusis.com   877.286.3987
Setting things up ¨C Testing Gerrit

Install Git

Install DevStack
                                      This error held us up for 2 weeks¡­
Configure git

Install git-review

Clone a project

Verify gerrit works
26   www.Nexusis.com   877.286.3987
Setting things up ¨C Generate your public key

Install Git

Install DevStack

Configure git

Install git-review

Clone a project

Verify gerrit works
27   www.Nexusis.com   877.286.3987
Setting things up ¨C Add your key to review.openstack.org

Install Git

Install DevStack

Configure git

Install git-review

Clone a project

Verify gerrit works
28   www.Nexusis.com   877.286.3987
Setting things up ¨C Add your key to review.openstack.org

Install Git
                                      Doesn¡¯t Work -
Install DevStack

Configure git

Install git-review

Clone a project                       Works -

Verify gerrit works
29   www.Nexusis.com   877.286.3987
Making, Testing and submitting changes




30   www.Nexusis.com   877.286.3987
Pro Git ¨C Well worth the price

                                        ¡ì?? I didn¡¯t write it, but this
                                            book is great
                                        ¡ì?? It is on Safari Books
                                            Online




31   www.Nexusis.com   877.286.3987
Setting things up


Create a topic branch

Change code

Test Code

Commit Changes

Submit them for review

Monitor the review process


32   www.Nexusis.com   877.286.3987
Edited v1_1 api to describe phys as well as virt CPU


Create a topic branch

Change code

Test Code

Commit Changes

Submit them for review

Monitor the review process


33   www.Nexusis.com   877.286.3987
./Run_tests.sh in each project


Create a topic branch

Change code

Test Code

Commit Changes

Submit them for review

Monitor the review process


34   www.Nexusis.com   877.286.3987
Commit your code


Create a topic branch

Change code

Test Code
                                      Be verbose, and be sure to call out whether a feature is
Commit Changes                        blueprinted or a bugfix
Submit them for review

Monitor the review process


35   www.Nexusis.com   877.286.3987
Submit it for review!!


Create a topic branch

Change code

Test Code

Commit Changes

Submit them for review

Monitor the review process


36   www.Nexusis.com   877.286.3987
Track the reviews progress


Create a topic branch

Change code

Test Code

Commit Changes

Submit them for review

Monitor the review process


37   www.Nexusis.com   877.286.3987
Giving back                    Engaging the community




38   www.Nexusis.com   877.286.3987
Giving back

                                      ¡ì?? Start a meetup.com group in your area
                                      ¡ì?? Connect with other meetup organizers
                                      ¡ì?? Present to your peers
                                      ¡ì?? Share your experience with the world




39   www.Nexusis.com   877.286.3987
Open Blueprints                Stuff to work on




40   www.Nexusis.com   877.286.3987
Vish ¨C Nova PTL Open Blueprints
                                      ¡ì?? edit-default-quota - nova grizzly
                                      ¡ì?? nova-api-samples - nova
                                          grizzlylive-migration-scheduling
                                      ¡ì?? DHCPv6 Support ¨C SFBay OpenStack
                                      ¡ì?? openstack-operations-manual - grizzly




41   www.Nexusis.com   877.286.3987
@colinmcnamara
                                      colin.mcnamara@nexusis.com
                                      www.colinmcnamara.com




42   www.Nexusis.com   877.286.3987

More Related Content

Colin McNamara - Surviving your first check-in: An engineers guide to contributing to OpenStack

  • 1. Surviving your first check-in: An engineers guide to contributing to OpenStack Colin McNamara ¨C Chief Geek, Nexus IS CCIE #18233 @COLINMCNAMARA 1/9/2013 1 www.Nexusis.com 877.286.3987
  • 2. Agenda ¡ì?? How this all started ¨C ¡°a simple experiment¡± ¡ì?? The importance of community - Leveraging the power of the meetup ¡ì?? Talking your employer into supporting OpenStack and the CLA ¡ì?? Setting up your Dev environments - getting beyond Devstack ¡ì?? ¡°Getting¡± git, using the git repository for those that don't code for a living ¡ì?? Testing your code - what do you mean it doesn't build? ¡ì?? How to give back, and get other people involved in the community 2 www.Nexusis.com 877.286.3987
  • 3. My Background 3 www.Nexusis.com 877.286.3987
  • 4. My Perspective ¡ì?? Network Engineer first ¡ì?? CCIE #18233 ¡ì?? Systems/Storage Second ¡ì?? IEEE, IETF, T11 ¡ì?? Linux user since 98 ¡ì?? Creator of ¡°Sausage Code¡± ¡ì?? NOT A PROGRAMMER 4 www.Nexusis.com 877.286.3987
  • 5. How this craziness started 5 www.Nexusis.com 877.286.3987
  • 6. ¡°A simple experiment¡± ¡ì?? Ewan Mellor ¨C Citrix Xen ¡ì?? Simple feature, Deploy Storage QOS ¡ì?? Turned into a 4 month saga ¡ì?? Lots of lessons to be learned 6 www.Nexusis.com 877.286.3987
  • 7. Leveraging the power of the Meetup 7 www.Nexusis.com 877.286.3987
  • 8. Meetup.com ¨C Community is your friend ¡ì?? Join a Meetup.com group ¡ì?? http://www.meetup.com/ openstack/ ¡ì?? If there is none in your area¨C Start One ¡ì?? Many eyes help in overcoming challenges 8 www.Nexusis.com 877.286.3987
  • 9. Background 9 www.Nexusis.com 877.286.3987
  • 10. Talking to your employer about contributing 10 www.Nexusis.com 877.286.3987
  • 11. Talking to your employer about contributing ¡ì?? Notify your manager. If you don¡¯t have a policy you have a chance to set one. ¡ì?? In Ca, you are only protected if your company isn¡¯t in the line of biz your project is. ¡ì?? If you are contributing on behalf of a company, an authorized representative of your company should also sign a Corporate Contributor License Agreement. 11 www.Nexusis.com 877.286.3987
  • 12. Next steps ¨C Executing your CLA ¡ì?? Join the OpenStack foundation ¡ì?? Create your launchpad account ¡ì?? *** don¡¯t change your username after *** ¡ì?? Join the OpenStack team on launchpad ¡ì?? Sign the CLA electronically ¡ì?? Update the Contributors Wiki ¡ì?? Request openstack-cla membership on launchpad 12 www.Nexusis.com 877.286.3987 ¡ì?? Wait (or ping an op on #openstack-dev)
  • 13. Setting up your Dev environment 13 www.Nexusis.com 877.286.3987
  • 14. 10 minutes to Devstack ¡ì?? Best run on Ubuntu 12.04 ¡ì?? Log in as a USER (not root) ¡ì?? Sudo apt-get install git ¡ì?? git clone https://github.com/openstack-dev/ devstack.git ¡ì?? cd devstack && ./stack.sh 14 www.Nexusis.com 877.286.3987
  • 15. Getting beyond Default Devstack ¡ì?? I like to run in a VMware environment ¡ì?? (in home lab + instance on laptop) ¡ì?? Working on cloning Rackspace¡¯s nested setup that cody_bunch is using ¡ì?? Spin up new instances easily ¡ì?? Quickly compare versions ¡ì?? Default install pushes QEMU ¡ì?? Puppet / Cobbler / Koan in your home lab will save you time / headaches 15 www.Nexusis.com 877.286.3987
  • 16. Getting beyond Default Devstack - Stackrc ¡ì?? /devstack/ stackrc ¡ì?? Adjust API¡¯s / Services ¡ì?? Change git repos 16 www.Nexusis.com 877.286.3987
  • 17. Getting beyond Default Devstack - Stackrc ¡ì?? ~/devstack/stackrc updated to point to working development branch ¡ì?? Refs/changes/50/5050/1 is the review ID 17 www.Nexusis.com 877.286.3987
  • 18. You¡¯ve made a change, Now What? ¡ì?? ./rejoin_stack.sh will attach you the screen with all the terminals for the various apps. There could be as many as 14 screens depending on how many services are enabled ¡ì?? ¡°ctrl-c¡± and ¡°ctrl-d¡± on each window to kill the process. ¡°ctrl-a n¡± takes you to next terminal. Restart the process by using up- arrow key and entering return ¡ì?? Another easier way to kill all and restart is to do ¡°screen -ls¡± and kill the process. Restart by ./rejoin_stack.sh 18 www.Nexusis.com 877.286.3987
  • 19. ¡°Getting Git¡± OpenStack Workflows 19 www.Nexusis.com 877.286.3987
  • 20. What is Git ? ¡ì?? Repository created for Linux Kernel Dev ¡ì?? Solves centralization problems ¨C you can code at the lake, or in your isolated lab ¡ì?? Can be complex (multiple ways of doing things) 20 www.Nexusis.com 877.286.3987
  • 21. Setting things up ¨C Installing Git Install Git Install DevStack Configure git Install git-review Clone a project Verify gerrit works 21 www.Nexusis.com 877.286.3987
  • 22. Setting things up ¨C Installing DevStack Install Git Install DevStack Configure git Install git-review Clone a project Verify gerrit works 22 www.Nexusis.com 877.286.3987
  • 23. Setting things up ¨C Configuring Git Install Git Install DevStack Configure git Install git-review Clone a project Verify gerrit works 23 www.Nexusis.com 877.286.3987
  • 24. Setting things up ¨C Configuring git-review Install Git Install DevStack Git review redirects a commit into a review and test process Configure git Install git-review Clone a project Verify gerrit works 24 www.Nexusis.com 877.286.3987
  • 25. Setting things up ¨C Cloning a project Install Git Install DevStack Configure git Install git-review Clone a project Verify gerrit works 25 www.Nexusis.com 877.286.3987
  • 26. Setting things up ¨C Testing Gerrit Install Git Install DevStack This error held us up for 2 weeks¡­ Configure git Install git-review Clone a project Verify gerrit works 26 www.Nexusis.com 877.286.3987
  • 27. Setting things up ¨C Generate your public key Install Git Install DevStack Configure git Install git-review Clone a project Verify gerrit works 27 www.Nexusis.com 877.286.3987
  • 28. Setting things up ¨C Add your key to review.openstack.org Install Git Install DevStack Configure git Install git-review Clone a project Verify gerrit works 28 www.Nexusis.com 877.286.3987
  • 29. Setting things up ¨C Add your key to review.openstack.org Install Git Doesn¡¯t Work - Install DevStack Configure git Install git-review Clone a project Works - Verify gerrit works 29 www.Nexusis.com 877.286.3987
  • 30. Making, Testing and submitting changes 30 www.Nexusis.com 877.286.3987
  • 31. Pro Git ¨C Well worth the price ¡ì?? I didn¡¯t write it, but this book is great ¡ì?? It is on Safari Books Online 31 www.Nexusis.com 877.286.3987
  • 32. Setting things up Create a topic branch Change code Test Code Commit Changes Submit them for review Monitor the review process 32 www.Nexusis.com 877.286.3987
  • 33. Edited v1_1 api to describe phys as well as virt CPU Create a topic branch Change code Test Code Commit Changes Submit them for review Monitor the review process 33 www.Nexusis.com 877.286.3987
  • 34. ./Run_tests.sh in each project Create a topic branch Change code Test Code Commit Changes Submit them for review Monitor the review process 34 www.Nexusis.com 877.286.3987
  • 35. Commit your code Create a topic branch Change code Test Code Be verbose, and be sure to call out whether a feature is Commit Changes blueprinted or a bugfix Submit them for review Monitor the review process 35 www.Nexusis.com 877.286.3987
  • 36. Submit it for review!! Create a topic branch Change code Test Code Commit Changes Submit them for review Monitor the review process 36 www.Nexusis.com 877.286.3987
  • 37. Track the reviews progress Create a topic branch Change code Test Code Commit Changes Submit them for review Monitor the review process 37 www.Nexusis.com 877.286.3987
  • 38. Giving back Engaging the community 38 www.Nexusis.com 877.286.3987
  • 39. Giving back ¡ì?? Start a meetup.com group in your area ¡ì?? Connect with other meetup organizers ¡ì?? Present to your peers ¡ì?? Share your experience with the world 39 www.Nexusis.com 877.286.3987
  • 40. Open Blueprints Stuff to work on 40 www.Nexusis.com 877.286.3987
  • 41. Vish ¨C Nova PTL Open Blueprints ¡ì?? edit-default-quota - nova grizzly ¡ì?? nova-api-samples - nova grizzlylive-migration-scheduling ¡ì?? DHCPv6 Support ¨C SFBay OpenStack ¡ì?? openstack-operations-manual - grizzly 41 www.Nexusis.com 877.286.3987
  • 42. @colinmcnamara colin.mcnamara@nexusis.com www.colinmcnamara.com 42 www.Nexusis.com 877.286.3987