Jump to: navigation, search

Difference between revisions of "HackingNovaMacOSX"

Line 12: Line 12:
 
<pre><nowiki>
 
<pre><nowiki>
 
brew install bzr
 
brew install bzr
</nowiki></pre>
+
# Register your username (your username substitues for heckj):
 
 
 
 
Register your username (your username substitues for heckj):
 
 
 
 
 
<pre><nowiki>
 
 
bzr lp-login heckj
 
bzr lp-login heckj
</nowiki></pre>
+
# Checkout Nova trunk
 
 
 
Checkout the Nova trunk.
 
 
 
 
 
<pre><nowiki>
 
 
bzr branch lp:nova
 
bzr branch lp:nova
 
</nowiki></pre>
 
</nowiki></pre>
Line 92: Line 80:
 
#... do cleaning work ...
 
#... do cleaning work ...
  
bzr push lp:~heckj/nova/cleaning
+
bzr push lp:~YOURID/nova/cleaning
 
</nowiki></pre>
 
</nowiki></pre>
  
  
 
To submit the merge/patch:
 
To submit the merge/patch:
* navigate to https://code.launchpad.net/~heckj/nova/cleaning
+
* navigate to https://code.launchpad.net/~YOURID/nova/cleaning
 
* click on the link "Propose for merging"
 
* click on the link "Propose for merging"
 
Open questions
 
* Once merged in and accepted, does the proposal get closed?
 
  Once a proposal is reviewed, merged, and accepted, Launchpad sets the branch status to "Merged" which effectively closes the proposal.
 
* Do we then delete this branch and create another with the next cleaning/merge request?
 
    Yes, a branch can be deleted locally and you just create another branch next time you want to modify code to be merged into another branch.
 
* Or do we make more changes, push to this branch, and then submit another merge request?
 
    You can do either though the merging is more complicated the further from trunk that your branch gets, I believe.
 

Revision as of 15:29, 29 June 2011

How to Set up a Development Environment on MacOS X

Notes for hacking and cleaning on Nova on MacOS X

Bazaar and Launchpad

OpenStack uses Launchpad, so you need to install the Bazaar client tools. See also [[[LifeWithBzrAndLaunchpad|| learning BZR and Launchpad]]])


brew install bzr
# Register your username (your username substitues for heckj):
bzr lp-login heckj
# Checkout Nova trunk
bzr branch lp:nova


The project is transition to hosting code on GitHub, so there is a copy of trunk on GitHub now too. You can get the trunk from Git too:


git clone git://github.com/openstack/nova.git


Install Python Dependencies

Use Python's easy_install to install virtualenv


sudo easy_install virtualenv


Initial code setup

Initial Code Setup:

cd nova
python tools/install_venv.py
source .nova_venv/bin/activate
pip install pep8 # submitting patch so that Nova has pep8 and pylint in PIP requirements file
pip install pylint


OpenSSL Dependency

If you have installed OpenSSL 1.0.0a on MacOS, which can happen when installing a MacPorts package for OpenSSL, you will see an error when running nova.tests.auth_unittest.AuthTestCase.test_209_can_generate_x509. The version that functions correctly is OpenSSL 0.9.8l 5, installed with MacOS 10.6 as a base element.

There is no easy way to install an older package version using macports, but if it had been installed you can reactivate it.

sudo port activate openssl @0.9.8n_0+darwin


The alternative is to remove it and use the default OSX openssl. This will give you dependency errors on the port command, so you need to force it.

sudo - f port uninstall openssl


Run the Tests

cd nova
bzr pull # get the latest stuff...
source .nova_venv/bin/activate
./run_tests.sh

#... do cleaning work ...

bzr push lp:~YOURID/nova/cleaning


To submit the merge/patch: