- You need a Launchpad account and need to be joined to the Openstack team. You can also join the team of one of the many subprojects if you want to. Make sure Launchpad has your SSH key, Gerrit (the code review system) uses this.
- Sign the CLA as outlined in section 3 of the How To Contribute wiki page
- Tell git your details:
git config --global user.name "Firstname Lastname" git config --global user.email "email@example.com"
- Install git-review. This tool takes a lot of the pain out of remembering commands to push code up to Gerrit for review and to pull it back down to edit it. It is installed using:
pip install git-reviewSeveral Linux distributions (notably Fedora 16 and Ubuntu 12.04) are also starting to include git-review in their repositories so it can also be installed using the standard package manager.
- Grab a tree to hack on, for example for Nova you would do:
git clone git://github.com/openstack/nova.git
- Checkout a new branch to hack on:
git checkout -b TOPIC-BRANCH
- Start hacking
- Run the test suite locally to make sure nothing broke
- Commit your work using:
git commit -aor you can use the following to edit a previous commit:
git commit -a --amend
- Push the commit up for code review using:
git reviewThat is the awesome tool we installed earlier that does a lot of hard work for you
- Watch your email or review site, it will automatically send your code for a battery of tests on our Jenkins setup and the core team for the project will review your code. If there is any changes that should be made they will let you know.
- When all is good the review site will automatically merge your code
Thursday, 15 March 2012
The real way to start hacking on OpenStack
I've seen recent attempts at blog posts to show how to get started at hacking on an OpenStack project. Unfortunately they seem to have over-complicated the issue for new users. As part of the Core Infrastructure team it is my job to make submitting, reviewing and merging code easier for developers. This includes documenting that process, so here goes :)