Jump to: navigation, search

Difference between revisions of "Reddwarf-dev-env"

m (Installing VMWare Fusion and Reddwarf services)
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

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

  1. Installing Ubuntu Precise on VMWare Fusion http://wiki.openstack.org/vmware-fusion-precise (just use defaults)
  2. Recommended version ubuntu-12.04.1-server-amd64.iso
  3. VMWare Tweaks https://github.com/stackforge/reddwarf-integration/blob/master/README.md
  4. $ sudo apt-get install ssh (or openssh)
  5. Installing Devstack or Redstack on VMWare Fusion https://github.com/stackforge/reddwarf-integration

Local Dev

  1. On your local Mac: $ git clone https://github.com/stackforge/reddwarf.git
  2. Installing homebrew https://github.com/mxcl/homebrew/wiki/Installation
  3. $ brew install mysql
  4. Run reddwarf/reddwarf/tools/install_venv.py
  5. $ source ./venv/bin/activate
  6. Install python-swiftclient (maybe already installed)
  7. Install mysql-python (pip install mysql-python)
  8. Down the openssl tar ball from http://www.openssl.org/related/binaries.html
  9. Installing openssl on Mac OS X with cms enabled http://stackoverflow.com/questions/9275786/updating-openssl-version-on-osx
    1. as an alternative you can run
      brew install openssl
      and then back up and replace
      sudo 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

Configuring local reddwarf files

  1. 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)
  2. Update the reddwarf-guestagent.conf.sample as well if you are going to be running this locally.
  3. Update the host entries in api-paste.ini to point to the Devstack/Redstack host (i.e. keystone)

Configure python virtualenv for reddwarf project

  1. $ cd reddwarf/tools
  2. $ ./install_venv
  3. 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.

  1. $ bin/reddwarf-api --config-file=etc/reddwarf/reddwarf.conf.sample (web service)
  2. $ bin/reddwarf-taskmanager --config-file=etc/reddwarf-taskmanager.conf.sample (task manager)
  3. $ 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