Reddwarf-dev-env
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
- VMWare Tweaks https://github.com/stackforge/reddwarf-integration/blob/master/README.md
- Installing Devstack or Redstack on VMWare Fusion https://github.com/stackforge/reddwarf-integration
Local Dev
- Install Reddwarf API on your local Mac https://github.com/stackforge/reddwarf
- Run reddwarf/reddwarf/tools/install_venv.py
- Install python-reddwarfclient (pip install python-reddwarfclient) (Note: This maybe already be part of your .venv)
- Install python-keystoneclient (pip install python-keystoneclient)
- Install mysql-python (pip install mysql-python)
- Installing openssl on Mac OS X with cms enabled http://stackoverflow.com/questions/9275786/updating-openssl-version-on-osx
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. mysql, rabbitMQ)
- 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.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