Difference between revisions of "Reddwarf-dev-env"
Dan Nguyen (talk | contribs) m (→Installing VMWare Fusion and Reddwarf services) |
Dan Nguyen (talk | contribs) m (→Installing VMWare Fusion and Reddwarf services) |
||
Line 31: | Line 31: | ||
# Run reddwarf/reddwarf/tools/install_venv.py | # Run reddwarf/reddwarf/tools/install_venv.py | ||
# $ source ./venv/bin/activate | # $ source ./venv/bin/activate | ||
+ | # Install python-swiftclient (maybe already installed) | ||
# Install mysql-python (pip install mysql-python) | # Install mysql-python (pip install mysql-python) | ||
# Down the openssl tar ball from http://www.openssl.org/related/binaries.html | # Down the openssl tar ball from http://www.openssl.org/related/binaries.html |
Revision as of 21:17, 3 April 2013
Contents
Reddwarf API and Redstack Dev Environment Set Up on Mac OS X
Intro
This article describes how to point a local running Reddwarf instance to a Devstack/Redstack deployment in a VM or Cloud instance. You should be able to debug and test your changes without having to deploy.
Prerequisites
Installing VMWare Fusion and Reddwarf services
VM
- Installing Ubuntu Precise on VMWare Fusion http://wiki.openstack.org/vmware-fusion-precise (just use defaults)
- Recommended version ubuntu-12.04.1-server-amd64.iso
- VMWare Tweaks https://github.com/stackforge/reddwarf-integration/blob/master/README.md
- $ sudo apt-get install ssh (or openssh)
- Installing Devstack or Redstack on VMWare Fusion https://github.com/stackforge/reddwarf-integration
Local Dev
- On your local Mac: $ git clone https://github.com/stackforge/reddwarf.git
- Installing homebrew https://github.com/mxcl/homebrew/wiki/Installation
- $ brew install mysql
- Run reddwarf/reddwarf/tools/install_venv.py
- $ source ./venv/bin/activate
- Install python-swiftclient (maybe already installed)
- Install mysql-python (pip install mysql-python)
- Down the openssl tar ball from http://www.openssl.org/related/binaries.html
- Installing openssl on Mac OS X with cms enabled http://stackoverflow.com/questions/9275786/updating-openssl-version-on-osx
- as an alternative you can run
brew install openssl
and then back up and replacesudo cp /usr/bin/openssl /usr/bin/openssl_old; sudo cp /usr/local/Cellar/openssl/1.0.1e/bin/openssl /usr/bin/openssl; sudo chown root:wheel /usr/bin/openssl; sudo chmod 755 /usr/bin/openssl
- as an alternative you can run
Configuring local reddwarf files
- Update the host entries in reddwarf.conf.sample & reddwarf-taskmanager.conf.sample to point to the Devstack/Redstack host (i.e. nova_compute_url, nova_volume_url, notifier_queue_hostname)
- Update the reddwarf-guestagent.conf.sample as well if you are going to be running this locally.
- Update the host entries in api-paste.ini to point to the Devstack/Redstack host (i.e. keystone)
Configure python virtualenv for reddwarf project
- $ cd reddwarf/tools
- $ ./install_venv
- In your IDE set up the reddwarf project to use the projects .venv as the interpreter
Running the reddwarf services locally
Reddwarf scripts currently expect to be run from the project root folder. Configure your IDE to do this.
- $ bin/reddwarf-api --config-file=etc/reddwarf/reddwarf.conf.sample (web service)
- $ bin/reddwarf-taskmanager --config-file=etc/reddwarf-taskmanager.conf.sample (task manager)
- $ bin/reddwarf-guestagent --config-file=etc/reddwarf-guestagent.conf.sample (guest agent)
Notes
- If the services are not run in the project root the reddwarf/extensions will not be loaded.
- If you are developing guest agent code you will probably still have to copy files to the VM Devstack/Redstack